Counter for power consumption in the household

Powermeter has an output with 1000 pulses per kWh which is calculated hourly. Detection of the pulses is performed with a photo diode taped to the IR diode on the power meter.
Skärmavbild 2013-12-29 kl. 13.45.17

Heating in the house hold is steered