Re: USB relay boards
Dale Elshoff WB8CJW <dale.elshoff@...>
HID (Human Interface Device) is part of the operating system that communicates through the USB and is compatible on various platforms and there is no device driver to be concerned with. Various utilities, source code and examples are available on the web and I did a fair amount of searching and found a gui I like that returns the device number and provides on/off control with a visual indication of the relay state. My preference is this direct download http://www.giga.co.za/Kit_Drivers/USB_Relay2.zip. I am using the command line application CommandApp_USBRelay.exe where I pass the device ID, open or close the relay followed by the desired relay number (..\USB HID Batch\USBRelay libary\TestApp\CommandApp_USBRelay AS4JT open 01). A script, batch file or AutoHotKey script can be used to send the command. usb_relay_device.dll needs to be in the same folder as the executable.
I made a hotkey (Ctrl+Winkey+1) to turn on and (Ctrl+Winkey+0) to turn off my amateur TV transmitter from the pc.
The reliability of
the HID control has been excellent. No comm port number reassignment
like occurs with the serial comm devices from time to time. Even
after the computer goes into "sleep" mode or heaven help us
update occurs the device does not lose its mind or forget what
it is supposed
to do. After power has
the last state the relay was in (open or closed) is remembered.
So much better than USB to parallel or USB to Serial RS-232
stuff I have tried.