Go Down

Topic: My electrical power meter (Read 16774 times) previous topic - next topic


And then correlate used energy with outdoor temperature

Here's one I made earlier ;)


Last hour of everything :


Somewhat out of date 'howto'



Thanks for the nice write up. It should help make my project much easier. Our electric Coop has just started a new rate structure where in addition to charging a base rate and Kw charge, they are charging a demand rate for the the maximum 15 minute period of the month.

We have a smart meter like yours that pulses an IR signal for every Watt. I have an old data logger that I connnected to the meter to record the usage and it is working good but due to its age, can only save about 2-3 days of data and has limited connectivity.

After reading your post, I just ordered a Ardunio and LCD display so that I can replicate your setup. The main challenge will be putting together a system that can store the one minute averages and allow me to get the data remotely. My power meter is about 100 meters from the house so it might be hard to reach it with WiFi. I am thinking about trying a ethernet shield and communicating through a Powerline network connection since I have a power outlet available at the meter.

I am looking at using a SD card for the data storage and am trying to figure out the best way to do that. I just saw that Seeedunio has just announced a new board named Stalker that includes a SD card slot, time chip and xBee socket. It looks like this board might meet most of my needs.

I am new to the Ardunio so posts like yours help a lot and I really appreciate the time you took to put it together.  :)


Find an old laptop and put it in a weatherproof box at the meter, connected to your Arduino.   That should be able to hold years of log data.  I've gotten nearly a dozen free old laptops by posting want ads on Freecycle.org.  I used them for digital picture frames.  But I have an extra one that I'm going to use for Arduino-specific stuff - in fact it's going to be a power usage monitor like the OP's.


Feb 07, 2010, 12:52 am Last Edit: Feb 07, 2010, 01:28 am by CRS8291 Reason: 1
I received my Arduino about two weeks ago and tried out your sketch and it works good. One question, I reduced the sketch down to a bare minimum so that I could understand how it works and there is one command that I do not understand. In the variable declaration section the following variable is declared:

Code: [Select]
volatile byte sensorstate = LOW;  //Start with sensor in LOW

Then at the end of the sensortick function it reads:

Code: [Select]
 sensorstate = LOW;

I can't figure out what this does, maybe somebody could explain it to me. I assume that it should reset the sensor pin state but I can not find a place where it refers to the sensor pin.


edit: Once I'm done I will put together a write up in the exhibition section. For now, I will put a couple pictures of what I've done so far here. It took me a while to find a good meter cover to protect the sensor from ambient sunlight. The cover is a 2.5 quart plastic bucket I bought at ACE hardware. I painted the inside black and the outside gray. I first cut the bottom of the bucket off but it was still getting too much light so I taped the bottom back on and made a little window to view the meter.

One small change I made to the sketch was to change the Interrupt condition from RISING to HIGH because the sensor would go crazy when I opened the little door to look at the meter.

The sensor I used is a light to voltage TAOS Photodiode mfg part number TSL267-LF that I purchased from Mouser. Right now the sensor is taped to the top of the meter with the bucket covereing it. Later I will chage it so that the sensor is mounted on the outside of the bucket so that removing the bucket will remove the entire assembly.


Great thread! I just finished my version of this project.

Measuring My Electricity Consumption Cost in Real-Time

My meter is outside so i used pvc piping and lots of silicon to protect it.

Looking forward to your comments!



You're right CRS8291. the variable sensorstate is obselete. It must be some old stuff left in the code. Im sure its possible to tidy it up even more.
Glad you could use my code for your meter.

Go Up