Step 2: Electricity usage sensor unit

On most household electricity meters there is a LED that pulses  every time a certain amount of Watts have been used. On mine one pulse means 0.8Wh used. This was printed next to the pulsing LED.

Of course you could remove the LEDand direclty grab the pulse from there but as I have a great respect for that box I didn´t dare to dismantle it. Instead I decided on placing a light sensor on top of the LED and get the pulses this way.

Without properly studing light sensors I first ordered some "photo cells" but quickly realized they cant pick up a quick pulse. Instead I got some Photo Reflective Sensors that have a light and IR sensor. With this sensor there was no problem to catch the pulses. Of course I had to cover the area around no to let any additional light in.

How to count the pulses? First I wanted to do this just with the XBee but as I couldn´t figure out a way to easily do it I put a Arduino to provide some logic. The sensor is attached to an analog port and the Arduino does a count++ every time it senses a pulse. A counter on the Arduino counts to 60 seconds and then sends the count over XBee to a coordinator. The Arduino is actually a clone by Seeeduino.

Arduino sketch and XBee config attached.
<p>You made nice project</p><p>I made simple Do it yourself in 10 minutes bluetooth controlled home automation</p><p><a href="http://www.instructables.com/id/Take-control-of-your-house-in-10-Minutes/" rel="nofollow">http://www.instructables.com/id/Take-control-of-your-house-in-10-Minutes/</a></p>
<p>A suggestion on how to make the fireplace sensor and cord more appealing to the eye: incorporate it into an 2d copper wire tree. </p><p><a href="http://thespringsong.blogspot.com/2009/11/copper-tree-2d-wall-mounting-small-1500.html" rel="nofollow">http://thespringsong.blogspot.com/2009/11/copper-t...</a></p><p>Use some copper <strong>enameled wire </strong>instead of the black insulated cable for the part that is visibly on the surface that you see. Also, you can place surface mount LEDs on twisted pair branches for fruit that lights up. The sensor will then become just another fruit in your wall art.</p><p>You can make a vine if you don't want a tree. Use copper leaf to make leaves.</p>
<p>I forgot to say, use CA glue (super glue) to tack it on. You can use copper leaf on your sensor as well.</p>
<p>Hi , </p><p>Is there a java class instead of python script to read data from receiving xbee connected to COM port of PC while transmitting xbee (at the arduino)is sending data </p>
I plan to do the same but with PHP for the backend and jQuery for User interface... and... I'll put MySQL directly on my online webserver. I plan to render graf with google data/graf API service!
<p>Very nice!! I need to do a voc monitoring network for a project, but i don&acute;t know where to connect my voc-sensor(tgs 2620). I have a arduino UNO, xbee shield , 2 xbee, and one xbee adapter.</p><p>Where can i connect my voc-sensor? </p><p>I also calibrated my sensor (in the arduino sketch without xbee connection), but i don&acute;t realy know how to write a new sketch for xbee connection.</p><p>Can you explain me how i can write the sketch for arduino and where i can connect my sensor?</p><p>Thanks</p>
<p>Hi!</p><p>Connection: I assume the sensor gives out an analog value which is relative to the value it is sensing. That would mean you just connect it to one of the analog ports on the Arduino (A0, A1...). However as the sensor seems to need warmup and heating the schematic is not as simple as a analog temp sensor... Anyway, in the sketch you want to read the analog value from that pin. <br><br>I also assume you want to use the Xbees to send the sensor value to a PC. For that check e.g. my Electricity monitor sketch. To receive the value with python on a PC check my gatherValues.py. It is horrible and old code but the current version is much longer so that will just confuse... You want to especially look at gatherValues() and message_received(data)</p>
HI,<br><br>thanks for your answer.<br>I will use a TGS 2620, Arduino, xbee shield and xbee pro series 2b for the transmitting side. Xbee and Xbee usb explorer for receiving side.<br>But i don&acute;t know how to configure it for this purpose? <br>Do you have some ideas?<br><br>Thanks a lot for this tutorial
Nice one, would love to do this. The kit is very scarce and expensive in South Africa, but need to give this a go
Thanks for the mention of the <a href="http://www.wunderground.com/weather/api/" rel="nofollow">wunderground</a> service. I had never heard of them, but their API looks perfect for the home automation project I am working on.
First Ill say good 'structible, I'm always happy to see more Xbee projects, I am trying to get into the Arduino/wireless game and these are great for learning. <br> <br>To hide the cord: <br> <br>First, run it in a way that the cord makes only right angle turns and runs straight. Get a staple gun that has small but slightly long staples and use it to staple the cord in place. Make sure to pull the cord somewhat tight to keep it looking straight and you wont need very many staples (like 1 every foot at most). So turn the sensor sideways so the cord goes to the right and tape it back down for now. Run the cord from the sensor straight to the right to the gap at the wall, then run it straight down the gap to the top of the baseboard. Run it along the baseboard to wherever it needs to go. <br> <br>After this, come back with some white paint and paint over the cord and staples along the baseboards to make them blend in more. The part on the fireplace just pick a neutral brown so its less obvious or if you have some good painting skills you can try to paint the cord to match. As for the sensor itself you can paint some of it (obviously not the sensor part) to match. Im not sure if you are using that to measure the air or the surface but if its the air you can just use a little double-sided tape on the sensor to keep it there. If you are measuring the surface it will be a bit more difficult, perhaps putting a small amount of hot glue or silicon (something that wont damage stuff) along the outside edge to hold it in place. <br> <br>Hope that helps :)

About This Instructable


135 favorites

More by jweymarn: myHome - home automation with Arduino and XBee iPhone Legodock Nintendo 8bit PC
Add instructable to: