View Full Version : Computer controlled relays
KA8RAW
04-21-2009, 07:50 AM
I need a circuit that controls a few relays safely from my computer.
I guess it doesn't matter whether its Parallel port, Serial Port or USB port, but I would prefer USB as long as I dont have to program a pict chip.
The circuit should be well buffered to isolate and protect my computer.
Can someone point me in the right direction for this circuit? I would even consider a commercial built unit if the price is reasonable.
K8ERV
04-21-2009, 03:17 PM
Interesting question, hope you get some answers.
TOM K8ERV Montrose Colo
ZL3GSL
04-22-2009, 02:14 AM
sorry ... DSL: problems here cause a double posting.
ZL3GSL
04-22-2009, 02:24 AM
Have a look at the ULN28xx Darlington driver (http://elab.ist.utl.pt/rec/Controlo_Experiencias/placa_dsPIC/ULN2803.pdf) packages designed for this sort of application. They work nicely for reasonable loads ... up to 500 mA and, I think, up to 50 volts, from TTL level inputs. 6, 7, or 8 drivers per package, and easy pinout. I've driven stepper motors with them from a parallel port.
XP and later Windows versions might put some difficulty in the way of driving the port -- I don't know. It's easy in DOS. :D
If you need a circuit try searching for things like "relay driver parallel port".
AC0GR
04-22-2009, 03:14 AM
A quite in-depth look at the parallel port and how to control it is here.
http://www.epanorama.net/circuits/parallel_output.html
and there is this kit... http://www.electronickits.com/kit/complete/elec/ck1601.htm
though I am suprised they didnt use opto-isolators.
and this includes the simple software to control any of these
http://www.geocities.com/micgm/circuit/circuit.html
whew.. now -I- feel a project coming on!
KA8RAW
04-22-2009, 07:05 AM
ZL3GSL, That darlington array is one that I have been looking at recently. If I decide to go parallel port, I will be homebrewing using that IC.
AC0GR, The electronickits.com website has a unit that works off the serial port. I am somewhat leaning that way, since I have recently done some serial port programming. I wonder, if it will really be necessary to use an opto-isolator as long as the port just switches a relay and accepts no actual input.
Unless other options, (like USB port) comes along, I will have to ponder which way to go. Parallel port circuit can be built cheaply, but I will need to learn to program it, or, I can buy the serial port kit for $74.95
Decisions.....:confused:
KB8NHL
04-22-2009, 11:52 AM
I have used X10 home automation for a while now. I think I bought everything from thehomeautomationstore.com. X10.com often has good deal, but I've heard stories of terrible customer service. In addition to being able to turn on light and stuff, there is a module called the universal module. It has a pair of contacts that close when commanded...you can send command with a handheld remote, wall switches, or the computer (the computer is you buy the $50 homeautomation software). The cool part is that for the $50, you get the software, and the wireless reciever/computer interface which also can store macros and timed events. I've got bathroom heaters coming one before I wake up, a "mood button" that kills the lights in my room, and turns on the fireplace. Tons of fun. Each module costs between $7 and $15, so I call it relatively affordable. An add-on that I don't have is the web interface, where I could access the automation software from anywhere and make changes. Perhaps one day. I have heard that the security camera stuff is crap, so don't bother.
Google X10 automation for more info. Good luck
VK2AKG
04-22-2009, 01:58 PM
http://www.futurlec.com/Relay_4.shtml
http://www.futurlec.com/Relay_8.shtml
73 Frank vk2akg
KA8RAW
04-23-2009, 05:14 PM
AKG, is there more detailed info on those boards? It looks like the would need something else to connect them to the computer.
KJP, I will be writing the controller software in Visual Basic 2008.
ZL3GSL
04-24-2009, 02:48 AM
Programming the parallel port is easy. Just write the 8 data bits to the base address of the port 3BC, 378, or 3F8 (usually 378) and they appear on pins 2 to 9 of the connector (LSB on pin 2). Pin 1 has a 1 microsecond strobe pulse. I use Turbo Pascal.
"parallel port address"to Google will find lots of help.
VK2AKG
04-27-2009, 03:04 PM
AKG, is there more detailed info on those boards? It looks like the would need something else to connect them to the computer.
Although I was aware of them, I have never used the boards I linked and have no info beyond that linked.
That said, the adverts say:
Board accepts standard +5V input and will work with most microcontrollers and control systems [4 relay board] and
Each output is easily controlled with a standard +5V TTL signal [8 relay board]
parallel ports (and some 'non standard' serial ports) use TTL (5V) logic levels so, direct connection should be possible.
I expect both boards would fully meet the requirements posted in your original question with no additional hardware beyond the 12V supply needed to power the relay coils.
you might also wish to see: http://www.beyondlogic.org/spp/parallel.htm re interfacing to the parallel port.
73 Frank vk2akg
WA4OTD
05-05-2009, 02:00 AM
I have a USB board from Velleman that I use at work. I think it is a lower end model than this but similar.
Universal USB card.
http://www.vellemanusa.com/downloads/0/infosheets/vm140_uk.pdf
Relay board
http://www.vellemanusa.com/us/enu/product/view/?id=522356
KE3FG
05-05-2009, 04:50 PM
The last three computers I bought have no serial or parallel ports, only a few USB ports. I bought a USB interface board from Delcom in New Jersey for about $35. It contains an LSI chip that interfaces to an 8 bit parallel input port plus a 4 bit parallel output port. It is shipped with several Visual Basic programs that allow you to use it. I don't have Visual Basic development software on my computer, so I wrote interface software in C-Sharp and it works fine for external control.
KA8RAW
05-05-2009, 04:54 PM
I have a USB board from Velleman that I use at work. I think it is a lower end model than this but similar.
Universal USB card.
http://www.vellemanusa.com/downloads/0/infosheets/vm140_uk.pdf
Relay board
http://www.vellemanusa.com/us/enu/product/view/?id=522356
USB! This may change everything, thanks!
KL7AJ
05-05-2009, 05:31 PM
Try this:
http://www.bb-elec.com/product.asp?sku=232DRIO&TrailType=Sub&Trail=40
B&B also has about the only reasonably priced DAQ cards around.
Eric
WA4OTD
05-15-2009, 05:52 PM
I just checked, my board is K8055. Very flexible I/O board.
http://www.velleman.be/ot/en/product/view/?id=351346