Arduino based electricity meter

Posted on Feb 6, 2014

The idea is that the infra-red light is reflected by the disc, except by the dark red line. The reflected light is received by the sensor and this way the Arduino can keep track of the number of revolutions. Note that the infra-red sensor is sensitive to a certain frequency of infra-red light (36kHz in this case), this makes it insensitive to changes in the ambient light. Note that the entire circuit

Arduino based electricity meter
Click here to download the full size of the above Circuit.

is pretty compact and that it can be made by sticking the components directly in the Arduino and bending their pins, only a few cables are needed to connect the LED and sensor to pin 3 and 8 respectively. In fact my father and I managed to get the whole thing into an old clear plastic box for holding a cassette tape. We did have to make a hole in it though, because the plastic reflected to much IR light and made it impossible to read the electricity meter. In the end we taped the whole box to the electricity meter. It took a bit of fiddling to get the led and sensor aligned to the disc, and them some turning of the potentiometer to tune the sensitivity; if the resistance is too low, the led will give off to much IR light and the sensor will react even when the red line on the disc crosses in front of it. The program for the Arduino and contents of the SD card are at the bottom of this post. Note that I used dutch terms in the program, since my father is more comfortable with his native language. The program does several things: It installs an interrupt service routine that reacts to any change on pin 8, i. e. the sensor. This interrupt routine then starts a timer that will trigger an other interrupt in a few milliseconds. If the sensor changes back to its old value before the timer expires, the change in sensor state is interpreted as noise, and the timer is stopped. So the sensor has to give a stable value for a few...

Leave Comment

characters left:

New Circuits



Popular Circuits

Rear Fog Light Controller With Delay
49Mhz Fm Transmitter Circuit
voltage Calculating current in a simple circuit
toggle switch schematic with relay
Acceleration Monitor using ADXL202 and AVR
2N6766 FET Derating Curve
i2c rtc interfacing with lpc2129 arm7 tyro
Capacitive Dimmer switch circuit
Over-temperature alarm and cooling circuit
Air compressor circuit
0-1 hours of power a circuit diagram of the timing of the AC power supply