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:

Related Circuits

  • New Circuits

    .

     


    Popular Circuits

    TDA1554 / 22W Stereo Amplifier
    Toy siren
    USB Powered Stereo Computer Speaker
    simple supply voltage monitor
    Triac Testing Circuit PCB
    24V Battery Charger Schematic
    555 transistor characteristic curve tracer circuit diagram



    Top