Circuit Lake

Electronic Project and Circuit Collection

AVR Power Usage Logger

08/01/2011 Category: AVR, Data Acquisition, Microcontroller, Monitoring, Project

This ATmega168-based project monitors household power usage and logs it to an SD card. Signals from voltage and current detectors amplified LMC6484AIN quad op-amp and then AVR microcontroller computes the power consumption using the formula P=VxI.

AVR Based Homemade Power Meter

The voltage and current are each sampled at 9615 Hz so the integration should be fairly accurate even for highly non-sinusoidal loads such as computers or fluorescent bulbs. A graphical LCD shows the power usage as a strip chart and can also act as an oscilloscope to display the voltage and current waveforms. The current is amplified in three stages (1x, 10x, and 100x) so that different gains can be used giving accurate readings for both high and low power usage.

The current is measured using a pair of current transformers installed in the fuse box. The transformers are made from old TV flyback cores with 100 turns of magnet wire. A 0.2 ohm current sense resistor is connected to the coil and the whole thing is wrapped in electrical tape for safety. USB cables connect the sensors to the main unit, although shielded audio cables would work just as well. Unfortunately the two cores produce different reading for the same amount of input current, and this affects the accuracy of the measurements by about 10%. Probably there is some magnetic saturation going on here, trying a few different types of cores would probably help. This power meter project designed by Dan Stahlke.