Energy Meter Hacking – Reading EOUT Pulses




  • Open the meter whilst connected to mains power
  • Perform any measurements whilst the meter’s case is open


opto_circuitA quick explanation of the circuit, the signal from the energy meter is EOUT_B (note the small horizontal bar across the text ‘EOUT’, this signifies that the signal is active low) and this drives a PN2222A general purpose NPN transistor. The NPN transistor was used to drive the opto’s LED at approx 10mA instead of the CS5460A having to source this current. The output of the opto-isolator was configured to be active-high because active low signals can be confusing.

The hardware was quickly assembled on some protoboard. Note that the output resistor (R4) has not been installed on this board as it will be external to the meter.

Assembly was a pain, finding a suitable place for the opto board inside the meter took two attempts. Hot glue saved the day in the end.

4N25 installed in energy meter
Opto board installed with some hot glue.

Before closing up the meter, a thorough check of clearances was made to ensure that the output wires could not come in contact with the mains voltages.

Once I was satisfied that everything was safe I powered up the meter with nothing connected. None of the blue smoke escaped.

Then the energy meter’s output wires were connected to a small PCB with a pull-up resistor for the opto’s output transistor, a 5V bench supply and an IkaLogic logic analyser. (If you want a low cost but very capable logic analyser I highly recommend the Scanalogic-2 Logic Analyser.)

All ready for power up.

A 2400W clothes iron was connected to the energy meter and powered up – it began to draw 9.75A.

Current being measured whilst recording EOUT pulses.

The logic analyser was configured to trigger off the EOUT pulses and set to record data. Sampling rate was 250kHz and each division is 537us.

Screenshot of EOUT pulses
Pulses recorded from the EOUT pin

Review of the logic analyser’s results show that the EOUT pin outputs its data as a burst of pulses. This concurs with the CS5460A, which says ‘the pulses may be sent out in “bursts”’. When an appliance is removed from the meter, the pulses stop.

Well, this proves that the energy meter’s EOUT pin is outputting a stream of pulses. Next up is to review the datasheet and perform some trials to determine the relationship between the rate of pulses and the power being measured by the meter.

3 thoughts on “Energy Meter Hacking – Reading EOUT Pulses

  1. Hi,

    I have a energy meter with a similar circuitboard. The chip on the meter seems to be CS5460A ( , similar to the one you have been hacking. My question is, why do you not use SPI (SDO/SDI lines) to read the data from the chip ? (See the imprint on your circuitboard next to the ribbon cable to the LCD panel)
    Currently i am making attempts to read this chip using a raspberry pi, but not have been able to make correct readings. If you have insight how to get this working it would be great. Currently i have the following wiring between my energy meter and raspberry pi:

    Signal Ground PIN 6 Ground

    Regarding the relationship between the pulse and the energy consumption, the CS5460A document reads;
    The required number of pulses per unit energy present at EOUT is specified to be 500 pulses/kW-hr; given that the maximum line-voltage is 250 V (RMS) and the maximum line-current is 20 A (RMS).



  2. Hi Peter,

    Thanks for your comment.

    No I haven’t interfaced to the SPI interface on my meter yet so I can’t share my experience communicating with the chip yet. However, looking at the section “4.2 Serial Port Interface” of the CS5460A’s datasheet, it details that you must control the Chip Select “CS” line to enable communication. The CS chip is active low, and from the datasheet, “When CS is set to logic 1, the SDI, SDO, and SCLK pins will be held at high impedance. When the CS pin is set to logic 0, the SDI, SDO, and SCLK pins have the following functionality…”

    Try setting the CS pin to logic 0 (driving to 0V) first and then try to communicate using the SPI interface.

    I disagree regarding that the EOUT is specified as 500 pulses/kw-hr. That statement is from an example in the datasheet that steps you through the process calculating the Pulse Rate (PR) register if your application required 500pulses/kw-hr.

    For my meter, I would need to read the contents of the pulse rate (PR) register using the SPI interface to determine how many pulses per kW-hr my meter outputs. Alternatively, a more crude method would be to connect a known constant load to the meter and count the number of EOUT pulses in 1 hour and then calulcate the pulses/kW-hr.

    I hope that helps,


Share your thoughts


You are commenting using your account. Log Out /  Change )

Google photo


Twitter picture


Facebook photo


Connecting to %s
