Anyone got any ideas for sending a pulse to a 24V relay via an opto isolator plugged into a USB port, this is to open a security gate some 150 metres away.
A short Linux script would be nice too!
AJH
Anyone got any ideas for sending a pulse to a 24V relay via an opto isolator plugged into a USB port, this is to open a security gate some 150 metres away.
A short Linux script would be nice too!
AJH
andrew coughed up some electrons that declared:
It's going to be a bit more complicated than that. Unless you really meant "anyone know of a USB to General-digital-IO device"? In which case I think I did, but I'll have go searching again... One readily available way is to wibble one of the handshake lines on an RS232 port (that could be a USB adaptor if needs be, as long as it's a decent chip that lets you wibble the handshake lines). RS232 will generally drive the LED in an opto isolator.
USB isn't good for 150m unless you cascade loads of hubs.
Cheers
Tim
It should be easy with one of these
Sounds like a 5V/12V relay plugged into a parallel port line (or even a serial port handshake line) which then switches a 24V supply to drive the main relay would be simpler - that way you don't need to drive USB directly.
In article , dennis@home scribeth thus
How exactly are you to control this gate?, on a timed basis or is there a command off the PC to open it and are you going to be there at the PC to make that?..?..
No but I was wondering about using a higher DC voltage and current limiting it so I could just use telephone wire and keep the opto isolator near the PC.
AJH
I was hoping to use a low power PC which has no serial output but I could use a usb to serial converter.
AJH
The idea is that the pc will check criteria and then send a pulse if it's met
AJH
Ok...
Dunno if the netiom will do that for you?. It works over 10/100 ethernet if distance is a problem?..
andrew coughed up some electrons that declared:
It's probably the simplest and cheapest way.
Your low power PC doesn't have any GPIO (digital IO) lines does it (some embedded style low power MOBOs do)?
Cheers
Tim
You could use X10.
The obvious way would be using something like the DTR line on a USB to RS232 adaptor. 99p on ebay usually.
Alternatively a remote single board PC with IO capability communicating with the main host over a homeplug network connection.
Arduino is "open source hardware" and becoming a popular and very cheap microcontroller board (USB interface, linux development tools etc) - I can attest to the very low entry threshold to "getting something working" with Arduino.
The digital outputs can sink enough to power a single relay without any further buffering - I've used one to drive a 12vDC relay directly.
The supplied drivers are windows-only, however, there is a third-party linux application available, with links from Velleman's site, supporting scripted behaviour.
It's a bit like using a sledge-hammer to crack a nut, but the card could always be used for "other" things as it's capabilities are recognised.
I've not bought from these people, but I found this site some time back:
Gordon
from these people:
Agreed. That's how I do it. Background: USB -> Serial -> self-built board with a PIC 16c74 on it. The serial works at 9600 Baid and sends a text string from an AutoIt script. As an added bonus, in this case, the 16c74 contains 8 * 8bit A-D's so you can take measurements, too!
Even then you can't get to 150m and stay within the spec.
MBQ
You could use a spare keyboard led as the computer half of your opto- isolator.
HomeOwnersHub website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.