Home power consumption measuring unit connected
Home power consumption measuring unit is connected and running some communication tests.

In Norway we have a LED in our home fuse boxes that flashes a defined number of times per kW, this unit measures the home power consumption by counting those pulses. This is calculated into kW and can be read from a computer over the serial interface. In addition to this unit you will need a sensor to read the LED, that is not covered in this project. It is important that this sensor is accurate to get precise values.

Table of content



The consumption is measured in kW and calculated by dividing the number of LED pulses by 500 (500 pulses pr. kW). The registration will continue as long as the module receives a signal from the sensor.

Storing values

Two values are stored in EEPROM; current and previous consumption. By sending a command over the serial interface the current value can be moved to previous and cleared. This makes it possible to compare the current period with the previous. Values are written to EEPROM every hour, and restored during boot. This means that in the event of a power loss you could lose up to one hour of monitoring.

On first start up the unit will show -1 kW for both current and previous usage, this can be cleared by moving current to previous two times. Or you can enter a current value manually. Correct EEPROM values will then be stored one hour after the first signal is received.

Reading values

It is possible to use the serial interface directly to read and move consumption values. But ideally an external system, like a computer or Raspberry Pi, could pull values at set intervals. This would make it possible to create graphs and trends over time.


Input pins

  1. PB.0 Sensor

Output pins

  1. PB.1 Run LED
  2. PB.2 Signal LED


Power connector

2,5 mm, 9-24V=, positive center.

D-Sub 9-pin connector: Sensor

  • 6 : 5V + out
  • 7 : 5V - out
  • 8 : 5V + sensor in
  • 9 : 5V - sensor in

D-Sub 9-pin connector: RS-232

  • 2 : Transmit
  • 3 : Receive
  • 5 : GND


Terminal communication

PCMU v.1.0
uCtrl Development 0704001

Press 0 for help

1 - Current usage
2 - Previous usage
3 - Enter starting point
4 - Move current to previous

Current usage will be deleted! (0 to cancel)
Enter starting point in kW : 100
100 kW saved
100 kW current usage (50000 pulses)
100 kW moved to previous
100 kW previous usage
0 kW current usage (0 pulses)

Serial settings

  • Baud : 9600
  • Data bits : 8
  • Parity : None
  • Stop bits : 1


Schematic drawing

Home power consumption measuring unit circuit
Schematic drawing for home power consumption measuring unit; with AVR ATtiny2313 and MAX232.

Source code


Measures the power consumption by counting LED pulses from the home fuse box, written with BASCOM-AVR.

Master Releases

0 0 0 v1.0 Visual Basic 5 months ago

Image gallery

Parts list

Project: Home power consumption measuring unit by Thomas Jensen is licensed under CC BY-SA 4.0 with attribution required.

Similar resources

  •   Created Jan 26, 2007
  •   Last modified 5 days ago
  • Project status: Given away