The JBS relay board is a USB controlled, bus powered PCB with 8 computer controllable relays.
They are available from: http://stores.ebay.co.uk/Affordable-Electronic-Parts.
See http://kalikosystems.co.uk for a full write up of relay boards, case design, Windows software, etc. It's all been said there, so go!
So far I have written some simple code to control the relays. It only works with the first board it finds on the USB system and there is no support for the inputs. It is written in C and uses libusb for communication with the board.
There are three programs you can build to use the board: a simple GUI with 8 on buttons and 8 off buttons, a simple command line program which you can set all the relays at once with, and a daemon which can accept commands via a FIFO to flip individual relays. All three are contained in the file below - read the readme file for dependencies, compilation / run instructions, etc.
The twist with this board is that to change any relay, you have to send the desired state for all the relays - so you either set them all at once, or some piece of software must remember the states of all the relays. As I see it, this can either be done as a kernel module which might expose a control file in proc for example, or by using a daemon and libusb, all done in userspace. So far I have written the daemon version :)
Download here: relaycontrol-0.2.tar.gz
Back to main page
23747 hits since 27/Jun/09