views:

215

answers:

5

It's very simple.

I want to plug a lamp into the UK mains supply.

I want to be able to power it on and off from software - say from serial port commands, or by running a command-line or something I can get to from ruby or Java.

I see lots written about how to do this with X10 with American power systems - but has anybody actually tried doing this in the UK?

If you got this working:

1) Exactly what hardware did you use?

2) How do you control it from software?

Thanks!

A: 

This search seemed to yield some good hits.

vkraemer
Yes there's a bewildering array of choices. **I'd like to hear from people who have done it** so I can choose an approach.
cartoonfox
+3  A: 

There is really no differences on what you have to do on the US and on the UK. What you need is either use the parallel port, from which you can control 8 sockets without hardware multiplexing, and up to 256 with multiplexing, or a microcontroller with serial/USB communication support (you could use PIC, which are easy to program with assembler) to control the same kind of hardware: a board with either triacs of relays (I'd recommend relays, as with them you don't have to worry what device you connect/control) that support the voltage of your electric grid, and some transistors to actuate the triacs/relays, to decouple the control circuit with the power circuit.

The DIY hardware needed to do this is not really that hard, and you might learn some if you've never done electronics.

If you have a computer with a parallel port and a small amount of devices to control, I'd go with a simple circuit that couples every output of the port to a transistor that actuates the relay, which closes the circuit for each device.

There are some already built circuit boards on the market that you can buy, but I can't overstate the fact that it's not hard to DIY.

Some already built relay circuit.

voyager
I'm not sure if I'm misunderstanding the question. Am I?
voyager
Your answer is useful in that I have been looking at what it would take to build from scratch. I have looked at a USB->serial and a serial to relays board which might do the job, but I'm a bit scared about running 240v AC through it - safety issues and not wanting to frazzle a computer. (The board I looked at didn't seem to use an opto-isolator, so I worry...)Initially I think I'd rather use a product but later move to something a bit neater that's more custom.
cartoonfox
+3  A: 

There are X10 products for the UK (and European) power systems as well, complete with UK 3-pin plugs.

The projects you've seen for the American system can be applied to the UK simply by buying the UK version of the products.

To send and receive commands on the powerline, you would need the CM12 module, which can be programmed through the serial port as you require. In addition there is already a selection of off-the-shelf software that can control the CM12 module. It might be easier for you to interface with such software, instead of controlling the CM12 directly.

A popular online vendor of UK-based X10 products is Let's Automate.

Daniel Vassallo
+1  A: 

I am a happy customer of Phidgets products and this one would satisfy your requirement: PhidgetInterfaceKit 0/0/4 (interface is through a USB port).

Product Description The PhidgetInterfaceKit 0/0/4 Provides a convenient way to interface your PC with various higher-voltage devices such as incandescent bulbs, high-power relays, and motors The 1014 contains 4 Relay Outputs for switching AC or DC power; the relays are Single Pole Double Throw (SPDT).

In terms of software control, Phidgets Inc. offer many libraries.

alt text

jldupont
+1  A: 

Try the iBoot . . . we use it at hospitals . . . very reliable uses a very simple interface. UK power is available as well . . .

TheEruditeTroglodyte