The underlying theme of this project, as I’ve said before, is remote access or remote control of the radio.
One thing that was bugging me was the physical power supply to the SoftRock. Admittedly it’s only a 12v supply but I wanted a way of flicking the switch without having to physically visit the rig each time, which is what I’m currently having to do. Equally, I’ve seen enough devices that are left plugged in permanently go pop when their life sustaining voltage is removed. That can be an expensive one, trust me!
What we need is a way to remotely switch the radio PSU and anything else that needs it now or in the future.
Enter the Denkovi USB 4 Relay Board
Denkovi do a huge range of automation products for home and industry, their site’s worth a look at just for the potential! I plumped for a 4 relay USB variant due to
a/ cost – at $20 you can’t go wrong
b/ 4 relays – at this size the board is powered off of the USB cable which carries the signals to it, reducing the need for yet another 230v wall wart cluttering the place up
c/ size – it’s tiny!
d/ USB – I strongly considered IP control BUT the radio’s on only when the attached computer is on plus IP is a lot of money. Fun but expensive!
The nice people in Bulgaria had it with me within a couple of days and sent links for all the necessary software. Be warned, you get nothing with it so if you need PSUs, cables etc. you need to order at the time, but not a problem as this little thing needs no external power and I’ve got enough USB cables laying around to knit a festive jumper.
Anyway, when plugged into a Windows machine, Windows does it’s thing and installs all the necessary drivers. The device appears on a virtual serial Comm Port and is ready to go.
Denkovi do a whole host of control applications for various platforms and have made them openly available.
The windows front end provides a nice graphical package which allows you to toggle the relays on and off to your hearts content at all sorts of calendar and timer controlled flags. If you’re really, really bored you can use this to get the relays to click out your favourite TV theme tune . . . . apparently.
It’s a great package to play with but I wanted a simple way of toggling the power on and off.
Denkovi provide a command line tool which is Java based that provides other options.
With the correct RTE or SDK installed for your OS version, it’s as simple as starting up a command prompt and issuing the command –
java -jar DenkoviRelayCommandLineTool.jar list
lists the attached devices and provides the device identifier to allow you to send commands to individual relays on that board
java -jar DenkoviRelayCommandLineTool.jar DAE0006K 4 2 1
equates to “4” relays, “2” relay #2, “1” on
java -jar DenkoviRelayCommandLineTool.jar DAE0006K 4 2 0
equates to “4” relays, “2” relay #2, “1” off
There are countless other permutations and combinations but that’s all we need here.
It gets better. By creating a shortcut in windows and pasting that command line into the shortcut you get an icon which when you double click, executes the command.
Create one for on and one for off and you’re done . . . . . nearly.
If you right click on a shortcut which runs a command line executable you get some extra tabs which control the shape, size, location and colour of the ensuing shell which pops up when the command runs.
If you change the background colour of the screen to green for the Radio ON shortcut and red for the Radio OFF shortcut, you get a nice coloured flag pop up as visual confirmation that the relay is in the state you want it to be.
Note – if you run the Windows DRM package at any point it polls the board and resets all the relays when it connects. If you’ve got stuff switched on from command lines or shortcuts and then do that, everything will just die! Word of warning in case you’ve got something vital or valuable dangling on an electromagnetically controlled latch when this happens