+ Add Pulse Counting

Many meters, including single phase, 3-phase, import and export electricity meters, gas meters, water meters and heat meters, have pulse outputs. The pulse output may be a flashing LED or a relay (typically solid state) or both.

Using an Optical Pulse Sensor it is possible to detect the LED / IR ‘pulse’ output from a utility meters. Meters with wired pulse outputs can be connected directly with two wires and usually switch a voltage provided by the monitoring hardware.

In the case of an electricity meter, a pulse output corresponds to a certain amount of energy passing through the meter (kWh/Wh). For single-phase domestic electricity meters e.g. Elster A100c, each pulse typically corresponds to 1 Wh (1000 pulses per kWh). Water and gas meters will usually be marked to show the quantity of water (litres/gallons) or gas (cubic meters/cubic feet) that each pulse represents.

  • The emonTx V3.4, emonPi and emonTH all have one spare interrupt pulse input as standard (IRQ 1, Dig3) which can be used for pulse counting.
  • This pulse input is accessible via the RJ45 socket on both the emonTx and emonPi.
  • The pulse input is also available on terminal block port 4 of the emonTx.
  • The pulse input is available on the emonTH terminal block.

Unlike clip-on CT based monitoring, pulse counting is measuring exactly what the utility meter is measuring i.e. what you get billed for. Pulse counting cannot provide an instantaneous power reading like clip on CT sensors can. It is often worthwhile using pulse counting in conjunction with clip on CT sensors to get the best of both techniques.

The emonPi and emonTx can simultaneously perform pulse counting and CT based monitoring.

Some meters are configured to pulse on both import and export. If your meter is, and you use it for both (e.g. an import meter on a property with grid-connected Solar PV) then you will have difficulty making good use of an optical pulse sensor, as it will not agree with either the meter reading or any CT sensor measurement.

One possibility is to use the sign (positive or negative) of the output of a CT sensor attached to the meter's input (or output) to distinguish between positive and negative pulses. You can then either reject negative pulses, or count them separately if you wish. This community forum discussion contains more information on how to do this.

Pulse counting with an emonPi

View in Shop →

Option 1: Using an Optical pulse sensor


It is advisable to shield the sensor and the meter from bright light as this can adversely affect readings.

  1. Identify your utility meter’s pulse output, usually a red flashing LED marked ‘kWh’. Stick the sensor over the LED, carefully aligning the hole so the flashing LED shines through clearly. Be sure to clean any dust from the meter face before attaching the sensor.

  2. Plug sensors RJ45 connector into emonPi / emonTx RJ45 socket.

Ensure the sensor is plugged into the RJ45 socket on the emonPi on the same side as the CT connection jack-plug sockets NOT the Etherent socket.

If installed correctly when the emonPi / emonTx is powered up the pulse sensor LED should flash in sync with the utility meter LED. See video clip:

You may need to switch on a large electrical load e.g. kettle to generate some pulses

Note: If the pulsecount value in emoncms does not increase in line with LED flashes, it maybe that there is light from another source interfering with the pulse detection. Some meters have a plastic cover that makes it quite hard to keep external light away from the pulse sensor. See forum thread here for more details.

Option 2: Wired pulse counting

To connect to a meter with a wired pulse output it’s possible to either wire the pulse output cable directly to a RJ45 passthrough connector or to a RJ45 to terminal block adapter. The screenshot below shows an example with a simple RJ45 passthrough connector.

RJ45 Pinout
The RJ45 implements a standard pinout used by other manufacturers of DS18B20 temperate sensing hardware such as Sheepwalk Electronics.



Pulse counting with an emonTx V3

The OpenEnergyMonitor optical pulse counter can also be used with the emonTx. The optical pulse counter plugs into the RJ45 socket on the EmonTx. Follow the instructions and suggestions for mounting given for the emonPi above.


Alternatively the terminal block can be used for wired pulse counting. Connect the pulse output to IRQ1 Dig3 (4th along from left).


If you are using an optical counter attached to the terminal block, connect the power pin to the 3.3V terminal or 5V if the emonTx is powered via USB (2nd or 1st from the left) and connect ground to GND (3rd from the left).

For isolated volt-free / switch output (SO) pulse output devices, connect across IRQ1 Dig3 and GND. There is an internal pull-up resistor on the pulse input that is enabled in the standard firmware that will pull the signal up when the switched output is open.

In the face of long leads and/or moderate interference, it is advisable to “stiffen” the relatively weak internal pull-up with a parallel 10 kΩ (or possibly less if necessary) resistor wired between the pulse input and the 3.3 V supply.

Alternatively a volt-free / switch output (SO) pulse output device can be connected across 3.3V (or 5V) and IRQ1 Dig3. A pull-down resistor of resistance low enough to overcome the internal pull-up resistor needs to be added in this case, or a higher-value resistor with the firmware modified to disable the internal pull-up.

We recommend powering the emonTx v3 from either a 5V USB or AC-AC adaptor when used for pulse counting operation. Due to the additional power requirements of the optical pulse sensor, battery life will be reduced significantly compared to an emonTx powered by 3 AA batteries for CT operation only.

Pulse counting with an emonTH V2

In addition to temperature and humidity sensing the EmonTH has a digital input (with interrupt) that can be used for pulse counting. This can be used for wired pulse counting or with the Optical LED pulse sensor.


To use the Optical LED Pulse sensor the easiest way is to remove the RJ45 connector and then strip back the black sheathing to reveal the red (3.3V power), black (GND) and blue (pulse) wires. Connect the red wire to the 3.3V terminal, the black wire to the GND terminal and the blue wire to the terminal labelled D3 (top) or IRQ1/D3 Pulse Counting (bottom of the board).

Direct pulse counting with a RaspberryPi

Another option for pulse counting is to use a spare GPIO pin on a RaspberryPi directly. See EmonHub Interfacers: Direct pulse counting guide for details

Elster A100C IrDa

If you have an Elster meter (tested with Elster 100C) the emonTx V3 with an IR TSL261R sensor can be used to interface directly with the meter protocol to read off the exact accumulated watt hours that you have generated or used. This reading can be used on its own or to cross-check and calibrate CT based measurement. See here for original blog post

Emoncms input setup

See the Emoncms pulse counting guide.



The optical pulse sensor should work with all utility meters that have an LED or IR optical pulse output. The sensor has been tested to work with the following meters. The ‘pulses per kwh’ calibration can be used to configure the input process for the pulse data, see above:

Meter Image Pulses Per KWh

Multiplication factor for

Wh Accumulator feed

Elster A100c

(single phase)

1000 1000 / 1000 = 1

Actaris ace9000

(single phase)

800 1000 / 800 = 1.25

Xil XLA12

(single phase)

800 1000 / 800 = 1.25

Elster A1100


500 1000 / 500 = 2

Elster AS300P

(single phase)

4000 1000 / 4000 = 0.25

Elster A1140


1000 1000 / 1000 = 1

Landis & Gyr 5254E

(single phase)

1000 1000 / 1000 = 1

 Inepro PRO1D

2000 1000/2000 = 0.5


AMR Smart Meter

1000 1000 / 1000 = 1

Landis & Gyr E110

(Single Phase)


1000 / 1000 = 1

Secure Liberty 100

(Single Phase)


1000 / 3200 = 0.3125

Please help us expand this table by contributing details for your meter. Email photo and scale factor to [email protected]