USB power switch + current meter

I need a 240V switch that can be controlled via USB, also being able to measure the current flowing (or at least the presence/lack of some current) via USB. Linux compatible of course :) Ideally this switch would have a dead mans reset too - my linux controller would need to send an 'on' signal every (say) 30 seconds or it would turn off automatically. Any suggestions? I could probably build the 240V logic myself but aren't qualified and it would suck if something caught fire etc because I did something stupid :) Thanks James

On 4 June 2012 23:18, James Harper <james.harper@bendigoit.com.au> wrote:
I need a 240V switch that can be controlled via USB, also being able to measure the current flowing (or at least the presence/lack of some current) via USB. Linux compatible of course :)
Arduino provides lots of nice interfaces via Linux & USB to hardware. I built this one: http://www.practicalarduino.com/projects/appliance-remote-control which allows you to turn on/off 240 volt appliances via radio which is a way to stay safe and legal from 240volt cabling. It switches on/off my heater (I also added a temperature sensor). I talk to it via serial over USB - sending commands to turn it on/off.
Ideally this switch would have a dead mans reset too - my linux controller would need to send an 'on' signal every (say) 30 seconds or it would turn off automatically.
Any suggestions? I could probably build the 240V logic myself but aren't qualified and it would suck if something caught fire etc because I did something stupid :)
Doesn't have your dead man's reset or current/voltage sensor but perhaps that book (http://www.practicalarduino.com/about) has some other projects (or the web) that you can adapt to fit your needs. It certainly describes the issues with control/manipulating HW in a way I found very understandable and practical for people with out much electrical experience. Mind you soldering and related skills do take a little bit of working at to get working... Andrew

On 04/06/12 23:18, James Harper wrote:
I need a 240V switch that can be controlled via USB, also being able to measure the current flowing (or at least the presence/lack of some current) via USB. Linux compatible of course :)
Ideally this switch would have a dead mans reset too - my linux controller would need to send an 'on' signal every (say) 30 seconds or it would turn off automatically.
Any suggestions? I could probably build the 240V logic myself but aren't qualified and it would suck if something caught fire etc because I did something stupid :)
I bought a reasonably-priced ($10-15 I think?) serial-controlled bank of relays last year, which then works with a USB-to-serial cable fine. I have a Perl library that talks the right serial protocol on Github if you're interested. It doesn't have the deads-man-switch feature though.. That'll be harder to find. You might be able to rig something up via a Leostick ($30) or Arduino or Beaglebone though -- but they might be overkill (and then you'd be worried that your code *doing* the deads-man-switch logic might be buggy..)

On 05/06/12 16:53, Trent W. Buck wrote:
James Harper wrote:
Ideally this switch would have a dead mans reset too
This is typically called a watchdog. Linux has drivers for several chipsets.
Those hardware watchdog chipsets just reset everything, rather than specifically switch off some relays, though.. I thought? I admit I haven't used them beyond that function, so maybe they can do more.

On 05/06/12 16:53, Trent W. Buck wrote:
James Harper wrote:
Ideally this switch would have a dead mans reset too
This is typically called a watchdog. Linux has drivers for several chipsets.
Those hardware watchdog chipsets just reset everything, rather than specifically switch off some relays, though.. I thought? I admit I haven't used them beyond that function, so maybe they can do more.
A watchdog is just a chip. In most cases it's wired to the system reset but you could wire it to anything I guess, which is what I'd want. A system reset watchdog might work if there was a guarantee that the USB controlled device would reset everything to off, and I would have to have my controller software write to the watchdog device instead of using a watchdog daemon. The mythical 'black box' that I just connect to via USB would be better though. James

On Mon, Jun 4, 2012, at 01:18 PM, James Harper wrote:
I need a 240V switch that can be controlled via USB, also being able to measure the current flowing (or at least the presence/lack of some current) via USB. Linux compatible of course :)
Ideally this switch would have a dead mans reset too - my linux controller would need to send an 'on' signal every (say) 30 seconds or it would turn off automatically.
Any suggestions? I could probably build the 240V logic myself but aren't qualified and it would suck if something caught fire etc because I did something stupid :)
Thanks James
James, Two questions: 1. Can you separate the two functions into two devices: one to control 240V, the other to do the current measurement? 2. Do you have to use USB? Assuming the answers are "yes" and "no", have a look at the iBoot, which is a remote 240V switch. It has an Ethernet interface and can be controlled via a web client. It has different heartbeat/watchdog functions and a range of other useful features: http://www.zantech.com.au/power/reboot/iboot.html With the current measurement, assuming you want to measure the current of a 240VAC device, there are current clamps that output an XML stream via a USB or serial interface. One example: http://www.currentcost.com/ And details of how to drive it via Linux & Perl: http://www.jibble.org/currentcost/ Let us know how you go. Regards Graeme

I need a 240V switch that can be controlled via USB, also being able to measure the current flowing (or at least the presence/lack of some current) via USB. Linux compatible of course :)
Ideally this switch would have a dead mans reset too - my linux controller would need to send an 'on' signal every (say) 30 seconds or it would turn off automatically.
Any suggestions? I could probably build the 240V logic myself but aren't qualified and it would suck if something caught fire etc because I did something stupid :)
Actually even better would be something that communicates entirely over the 240V power eg X10, but would also need to be able to report back current usage (I think X10 is send-and-forget), and for the project I have in mind I'd also need to be able to report on a few switch states too via the 240V... That way I could have the controller somewhere else entirely. James

James Harper wrote:
Actually even better would be something that communicates entirely over the 240V power eg X10 [...]
I haven't paid attention to that market, but I had the impression that while X10 was very well known and widely deployed, there were several alternatives that have been around for a few years and are shinier, e.g. orders of magnitude more bandwidth. Would a lurker care to pipe up and set me straight?
participants (5)
-
Andrew Worsley
-
Graeme Cross
-
James Harper
-
Toby Corkindale
-
Trent W. Buck