Wednesday 6 March 2013

Using the Raspberry Pi as an energy monitor

If one could easily monitor energy pulses with the Raspberry Pi, then it could be used as an energy monitor. By running a web browser on the Pi, this data could be looked at from anywhere in the world. This post shows how the Raspberry Pi can be used to collect energy usage data from a domestic electricity meter.

UPDATED to show LED PULSE SENSOR from Crucible Technologies
Most modern electricty meters have a light pulse output. On the example below this pulses 1000 times for every kWh used. That mans it pulses once everytime a watt hour is used.


A photo transistor could be used to detect these light pulses and convert them to digital pulses that could be easily read using one of the pins on GPIO port on the Raspberry Pi.

Below is a box containing the necessary electronics with sticky pads to attach it to the electricity meter. The photo transistor is mounted just behind the hole machined to the front of the case.


The sketch of the circuit is shown below. It uses the 3.3 V rail of the Raspberry Pi and also has connections to 0V and an input on the GPIO port. The led shown flashes every time the led on the meter pulses. This gives confidence to the user that the detector has been fastened correctlty to the meter.


I hope that readers of this post find this useful. Please comment to this post if you would like a Bill of Materials and a supplier for the parts used for this circuit as well as a clearer circuit diagram.

Also happy to supply built units for a nominal cost if there is enough interest. Please let me know. 

Update: 16th May 2014

Crucible Technologies have introduced the LED PULSE SENSOR - This commercial product is supplied in a custom plastic moulding and comes ready to stick onto the led on the energy meter.

Picture of LED Pulse Sensor  Alternate picture of LED Pulse Sensor

Here is a project using this hardware






7 comments:

  1. Hi,
    I want to build the same circuit. Could you give more details about the component ? What kind of photo transistor should I buy ?
    Also, my power meter has only one flashing led. Does this circuit will work using only one photo transistor ?

    Thank you very much for sharing this.
    (sorry my English, I am French)

    ReplyDelete
    Replies
    1. MisterTee12 March 2013 15:21

      Hi, There is only one led. This is actually one 3-pin package that has two photo-transistors built in. This is the part that I used.

      http://www.rapidonline.com/Electronic-Components/Kingbright-L-610MP4BT-BD-Phototransistor-72-8968

      One photo transistor might work as well. Just try it out.

      Regards

      Delete
  2. Hello,

    I want to do the same project.
    Can you tell give me more details about the program you are running to store and display the energy history

    Best regards

    ReplyDelete
  3. Trying to replicate this and I'm having trouble with catching the pulses properly using wiringPi. Can you please shed some light on the software part of this project? I'd rather avoid python if possible. Currently trying to do this with C and the wiringPi examples of wiringPiISR().

    ReplyDelete
  4. Hi - thanks for the post - I've used your circuit to monitor my meter and have acknowledged this post in my sidb/PiMeter GitHub repo, hope that's OK with you.

    ReplyDelete
    Replies
    1. That's great. Can you let me have a link to your post?

      Delete
    2. Sure: https://github.com/sidb/PiMeter

      Delete