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
Controlling relay via the web
Controlling relay via the web
73 de K7RDB
Re: Controlling relay via the web
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
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
Re: Controlling relay via the web
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
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
Re: Controlling relay via the web
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
Re: Controlling relay via the web
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
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
-
- Posts: 1917
- Joined: Fri Aug 22, 2003 1:01 am
- Location: Izmir, Turkiye; from Rochester, NY
- Contact:
Re: Controlling relay via the web
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,
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
Re: Controlling relay via the web
Awesome, thanks everyone for the great suggestions - that gave me lots to work with!
73 de K7RDB
Re: Controlling relay via the web
^^^Spam hiding in tiny font. Poor unfortunate Mr. Chen needs a spanking.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
Who is online
Users browsing this forum: No registered users and 63 guests