Monthly Archives: February 2010

Electricity monitoring with Christmas lights and Arduino

This was my geeky Christmas project:

What’s happening in the video…

The red/orange lights flash faster when the electricity usage in my house increase. The green/blue lights flash faster when the electricity usage in my Mum’s house increases (though in the video, the usage stays at a constant level so the lights don’t speed up).

Initially, the lights are flashing at the default reading of 1 kW. Then as the electricity usage levels vary, the red/orange lights start to flash out of sync with the green/blue lights. After a short time, though, I switch the kettle on (you can just about hear it in the background!) and you can see the red/orange lights start to flash a lot more quickly (as the kettle takes about 3 kW on top of whatever the current reading is). The lights slow down again as the kettle switches off.

How does it work?

In my house I have a Current Cost monitor, which reads the live power usage of the house and publishes it (using IBM messaging protocol MQTT) to a server on the Internet. An application on my laptop (to which my Arduino – small circuit board with a processor on it – is connected) subscribes to the readings in real time and passes the information to the Arduino. The Arduino does some calculations to convert the readings to speed of flashing so that the higher the reading, the faster the lights flash. The Arduino uses that speed calculation to control the relay switches connected to the Arduino, which in turn control the power to the lights – when the relay allows power to the lights, the lights come on; when the relay cuts the power to the lights, the lights go off, and so on.

This slideshow on Slideshare shows the overall connections between all the parts, and some pretty pictures:

Update:

This project got a brief mention in an Imperica article: “A colleague of Piper has built a Christmas lights application using MQTT and Arduino, with the lights changing colour according to energy use in the house.”

Come to OggCamp10 – in Liverpool 1st-2nd May!

OggCamp10 banner


OggCamp10 is an unconference, which means that the schedule will be finalised on the day. So if you come along, you can not only have a say in that schedule but you can offer to be part of that schedule.

What to expect…

OggCamp10 isn’t just about software. You can offer to talk about anything at all. And if people want to hear your talk, you’ll be able to give it. Even if your talk isn’t on the schedule, you can still meet up with like-minded people and discuss the things that are important and interesting to you.

At last year’s OggCamp, we had talks on how to hook your house up to Twitter (or Identica!), politics and geeks, online privacy and security, engaging young people in open source, how to explain programming to your grandmother, just what is Pokebook(!), and what your pig says about you (yes, really).

You can see the final schedule from OggCamp 2009, plus photos and Twitter/Identica feeds from the weekend, on the OggCamp 2009 website.

OggCamp is jointly organised by the Ubuntu-UK Podcast and Linux Outlaws podcast teams. OggCamp 2009 was a one-day event in Wolverhampton, UK and about 120 people turned up – which was fantastic! OggCamp10 will be a bigger and better two-day event in Liverpool, UK at The Black-e community arts centre.

Audio trailer…please play

Our resident Liverpudlian, Dan, has done this brilliant audio trailer for OggCamp10 (MP3 or OGG). Have a listen! If you produce your own podcast, we’d be eternally grateful if you’d play it for your listeners – thanks!

Sponsorship opportunity…

And finally, if you are interested in sponsoring OggCamp10 by contributing towards the cost of the venue hire, or by providing prizes for the event, or if you have any cool novel ways to support us, please email me: uupc@lauracowen.co.uk. Thanks.