Home |
Search |
Today's Posts |
|
UK diy (uk.d-i-y) For the discussion of all topics related to diy (do-it-yourself) in the UK. All levels of experience and proficency are welcome to join in to ask questions or offer solutions. |
Reply |
|
LinkBack | Thread Tools | Display Modes |
#1
Posted to uk.d-i-y
|
|||
|
|||
switching a relay via USB
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 |
#2
Posted to uk.d-i-y
|
|||
|
|||
switching a relay via USB
andrew coughed up some electrons that declared:
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 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 |
#3
Posted to uk.d-i-y
|
|||
|
|||
switching a relay via USB
"andrew" wrote in message ... 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! It should be easy with one of these http://www.maplin.co.uk/Module.aspx?ModuleNo=42857 |
#4
Posted to uk.d-i-y
|
|||
|
|||
switching a relay via USB
On Sun, 28 Jun 2009 22:28:40 +0100, andrew wrote:
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 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. |
#5
Posted to uk.d-i-y
|
|||
|
|||
switching a relay via USB
In article , dennis@home
scribeth thus "andrew" wrote in message ... 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! It should be easy with one of these http://www.maplin.co.uk/Module.aspx?ModuleNo=42857 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?..?.. -- Tony Sayer |
#6
Posted to uk.d-i-y
|
|||
|
|||
switching a relay via USB
Tim S wrote:
USB isn't good for 150m unless you cascade loads of hubs. 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 |
#7
Posted to uk.d-i-y
|
|||
|
|||
switching a relay via USB
PCPaul wrote:
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. I was hoping to use a low power PC which has no serial output but I could use a usb to serial converter. AJH |
#8
Posted to uk.d-i-y
|
|||
|
|||
switching a relay via USB
andrew wrote:
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! http://www.robot-electronics.co.uk/a...y_Modules.html |
#9
Posted to uk.d-i-y
|
|||
|
|||
switching a relay via USB
tony sayer wrote:
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?..?.. The idea is that the pc will check criteria and then send a pulse if it's met AJH |
#10
Posted to uk.d-i-y
|
|||
|
|||
switching a relay via USB
In article , andrew
scribeth thus tony sayer wrote: 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?..?.. 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?.. -- Tony Sayer |
#11
Posted to uk.d-i-y
|
|||
|
|||
switching a relay via USB
andrew coughed up some electrons that declared:
PCPaul wrote: 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. I was hoping to use a low power PC which has no serial output but I could use a usb to serial converter. AJH 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 |
#12
Posted to uk.d-i-y
|
|||
|
|||
switching a relay via USB
"andrew" wrote in message ... PCPaul wrote: 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. I was hoping to use a low power PC which has no serial output but I could use a usb to serial converter. You could use X10. |
#13
Posted to uk.d-i-y
|
|||
|
|||
switching a relay via USB
andrew wrote:
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. 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. -- Cheers, John. /================================================== ===============\ | Internode Ltd - http://www.internode.co.uk | |-----------------------------------------------------------------| | John Rumm - john(at)internode(dot)co(dot)uk | \================================================= ================/ |
#14
Posted to uk.d-i-y
|
|||
|
|||
switching a relay via USB
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. http://arduino.cc/ |
#15
Posted to uk.d-i-y
|
|||
|
|||
switching a relay via USB
dennis@home wrote:
It should be easy with one of these http://www.maplin.co.uk/Module.aspx?ModuleNo=42857 It's a nice kit, available ready-built (I've bought one, in the past). 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. |
#16
Posted to uk.d-i-y
|
|||
|
|||
switching a relay via USB
In article ,
andrew wrote: 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! I've not bought from these people, but I found this site some time back: http://www.cleware.de/indexE.html e.g. http://www.cleware.de/produkte/p-usboptoreed_e.html They advertise Linux support and while their website seems to have changed since I last looked, they did mention previously command-line utilities. Gordon |
#17
Posted to uk.d-i-y
|
|||
|
|||
switching a relay via USB
Gordon Henderson writes:
In article , andrew wrote: 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! I've not bought from these people, but I found this site some time back: http://www.cleware.de/indexE.html They've always seemed quite expensive to me. I'm tempted to try one from these people: http://www.easydaq.biz/PagesUSB/USB4PRSRMxFRAME.htm -- Jón Fairbairn http://www.chaos.org.uk/~jf/Stuff-I-dont-want.html (updated 2009-01-31) |
#18
Posted to uk.d-i-y
|
|||
|
|||
switching a relay via USB
On Mon, 29 Jun 2009 00:21:20 +0100, John Rumm wrote:
andrew wrote: 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. 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. 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! |
#19
Posted to uk.d-i-y
|
|||
|
|||
switching a relay via USB
On Jun 28, 11:05*pm, Tim S wrote:
andrew coughed up some electrons that declared: USB isn't good for 150m unless you cascade loads of hubs. Even then you can't get to 150m and stay within the spec. MBQ |
#20
Posted to uk.d-i-y
|
|||
|
|||
switching a relay via USB
On 28 June, 22:28, andrew wrote:
Anyone got any ideas for sending a pulse to a 24V relay via an opto isolator plugged into a USB port, Dead simple: Velleman kits from Maplins Best(ish): USB Bit Whacker Most capable: Arduino board |
#21
Posted to uk.d-i-y
|
|||
|
|||
switching a relay via USB
On Mon, 29 Jun 2009 06:05:27 -0700, Man at B&Q wrote:
On Jun 28, 11:05Â*pm, Tim S wrote: andrew coughed up some electrons that declared: USB isn't good for 150m unless you cascade loads of hubs. Even then you can't get to 150m and stay within the spec. We do it at work over that sort of distance with a USB-to-Cat5 converter. Seems to work OK, but only at USB1.1 speeds. However, that's plenty fast enough for a relay ;-) For this job though, having the switching closer to the PC and using Plain Old Volts to carry the signal to the gates seems like a better bet... something like the USB-RLY08 for £40+Vat from http://www.robot- electronics.co.uk/acatalog/Relay_Modules.html would do it nicely. I'm assuming you could pick up the 24V from the gate end, so this would only need to be a switch. |
#22
Posted to uk.d-i-y
|
|||
|
|||
switching a relay via USB
"Man at B&Q" wrote in message ... On Jun 28, 11:05 pm, Tim S wrote: andrew coughed up some electrons that declared: USB isn't good for 150m unless you cascade loads of hubs. Even then you can't get to 150m and stay within the spec. Why are you assuming the USB will be extended to 150m rather than the wires to the relay? It is easy to make a relay operate over 150m of cable. |
#23
Posted to uk.d-i-y
|
|||
|
|||
switching a relay via USB
On Jul 4, 9:46*pm, "dennis@home"
wrote: "Man at B&Q" wrote in ... On Jun 28, 11:05 pm, Tim S wrote: andrew coughed up some electrons that declared: USB isn't good for 150m unless you cascade loads of hubs. Even then you can't get to 150m and stay within the spec. Why are you assuming the USB will be extended to 150m rather Why are you assuming that I made such an assumption? Why can't you comprehend "USB isn't good for 150m unless you cascade loads of hubs"? I didn't make any assumptions about anything. MBQ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
RF switching | Electronic Schematics | |||
How to locate the distributors of relay, relay socket, and switches? | Electronics | |||
How to locate the distributors of relay, relay socket, and switches? | Electronics Repair | |||
switching | Electronics Repair | |||
it keeps switching off!! | UK diy |