USB Relay


USB Relay

 

USB Relay

 


USB Relay is a small hardware device to turn other devices on and off, using your computer. It is connected to your computer via usb.

USB Relay

The firmware is based on the avr-usb firmware from http://www.obdev.at/products/avrusb. The avr-usb firmware implements usb completely in software. The device presents itself as a classless device. The device is controlled by vendor type commands. The protocol supports up to 256 relays. But the current implementation supports only one. There are two commandos. The device 2 host command 0 returns the number of relays on this device as one byte. In this implementation this is always 1. The host 2 device command 1 sets the value of one relay. The upper byte of the value in the command is the relay to set, the lower byte is the desired state of the relay. This implementation knows only the relay number 0.







The software includes a library some command line tools and a small gui. The software depends on libusb (http://libusb.wiki.sourceforge.net).



All parts except the included library use the included library to communicate with the device. If you want to integrate usb-Relay into your own software, The included library is all you need.



There are two command line utilities for usb-Relay. “count” returns the number of relays on the device. “set” set’s the status of one relay.



The small gui allows the user to set all relays using only his mouse. The gui is not really useful.



All the software runs on Linux. libusb runs also on FreeBSD, NetBSD, OpenBSD, Darwin, MacOS X, and Windows. I never tested it on another OS than Linux, but it should run on any OS where libusb runs.

USB Relay

USB Relay

Circuit search tags:


Sorry, comments are closed!