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.
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.
For more detail: AVR Power Usage Logger using ATmega168 microcontroller