Controlling relay via the web

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
Post Reply
User avatar
K7RDB
Posts: 3
Joined: Sat Aug 14, 2010 7:31 am
Contact:

Controlling relay via the web

Post by K7RDB » Sat Aug 14, 2010 7:43 am

Does anyone know of an article anywhere that describes how to control a relay/relays via TCP/IP? I'd like to use a PIC oe something via serial or USB so it wouldn't require the facilities of a whole PC with say a parallel port...

thanks
73 de K7RDB

User avatar
reloadron
Posts: 519
Joined: Sat Jun 28, 2008 8:57 am
Location: Cleveland, Ohio
Contact:

Re: Controlling relay via the web

Post by reloadron » Sat Aug 14, 2010 4:20 pm

You may want to check out the following links:

http://www.instructables.com/id/Worldwi ... -under-20/

and

http://www.instructables.com/id/Control ... h-your-PC/

They may give you a few ideas.

Ron

User avatar
haklesup
Posts: 2934
Joined: Thu Aug 01, 2002 1:01 am
Location: San Jose CA
Contact:

Re: Controlling relay via the web

Post by haklesup » Sat Aug 14, 2010 4:26 pm

Search on "Ethernet Module" or Embedded Ethernet" and you will find plenty of examples. I found some on Digikey and mouser but they were high end boards with lots of features and price to match.

I searched ebay and after scanning through all the routers, I found a nice cheap little module with Ethernet in and SPI interface to your own microcontroller. that was only about $22 w ship
http://cgi.ebay.com/ENC28J60-Ethernet-C ... ltDomain_0

A little further down was the same thing with a microcontroller module included in the $50 range
http://cgi.ebay.com/USB2-0-LPC2148-Modu ... ment_Tools

For a little more heres one with an embedded web server
http://cgi.ebay.com/Ethernet-controller ... ltDomain_0

For about that price I had seen in Frys a USB web server. It was a box with an ethernet port and 4 USB ports, you set it up on your network and can operate USB devices remottely. Not sure how universal that would be with a USB controlled switch.

ANy of these modules will have datasheets and maybe app notes to tell you how to use them

User avatar
kheston
Posts: 348
Joined: Wed Dec 03, 2003 1:01 am
Location: CA
Contact:

Re: Controlling relay via the web

Post by kheston » Sun Aug 15, 2010 6:21 pm

Browse your local thrift stores for a WRT54G-flavor router. I've purchased one for as little as $5. There are a number of posts about powering a relay with one at http://www.openwrt.org.
Kurt - SF Bay

psycho
Posts: 388
Joined: Thu Jan 10, 2008 8:13 pm
Location: Northwest Indiana
Contact:

Re: Controlling relay via the web

Post by psycho » Sun Aug 15, 2010 9:30 pm

http://www.microchip.com/tcpip

They have a boatload of microcontroller solutions. I have used several of their ethernet devices for experimentation. They have a fairly nice protocol stack that is pretty easy to customize - and free.

Hope it helps,
Kevin

dyarker
Posts: 1708
Joined: Fri Aug 22, 2003 1:01 am
Location: Izmir, Turkiye; from Rochester, NY
Contact:

Re: Controlling relay via the web

Post by dyarker » Sun Aug 15, 2010 10:44 pm

To not tie up a PC you need something like a Wiznet WIZ105SR (WIZ107SR is easier to find, but is RS-232 vs TTL). These little modules convert Ethernet IP to serial. Add a PIC, or your favorite micro controller, and control as many relays as you have IO pins.

Any PC on your LAN can control the relay by telnet or http (depending on how you set it up).

Complications arise if you want to control the relay from anywhere on the Internet.

Your ISP must allow you to have a server on-line (many don't).

The IP number assigned to your ADSL/Cable/satelite MODEM/router box is probably dynamic, so you will need a service like DYNDNS so your controller can be found on the 'net.

The MODEM/router is set to assign local dynamic IP numbers to your PCs. A fixed local IP number will have to be assigned to the controller network interface (be it Wiznet, PC, or other).

The MODEM/router will have to be set to pass incoming requests to the fixed local IP number.

Cheers,
Dale Y

User avatar
K7RDB
Posts: 3
Joined: Sat Aug 14, 2010 7:31 am
Contact:

Re: Controlling relay via the web

Post by K7RDB » Sat Sep 04, 2010 12:29 pm

Awesome, thanks everyone for the great suggestions - that gave me lots to work with!
73 de K7RDB

User avatar
Bob Scott
Posts: 1192
Joined: Wed Nov 20, 2002 1:01 am
Location: Vancouver, BC
Contact:

Re: Controlling relay via the web

Post by Bob Scott » Tue Sep 21, 2010 6:50 am

chenlng wrote:Thank you for your article, it is very helpful. I am very unfortunate because you encountered a similar problem
_________________
Tomorrow is another day
SPAM[/b]undance-ii-boots.html]ugg shoes
^^^Spam hiding in tiny font. Poor unfortunate Mr. Chen needs a spanking.

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests