Reading pulses from meters with pulse outputs..
Last updated: November 2010
Authors: Glyn Hudson, Trystan Lea
A note on what this document covers
Although a wealth of information about pulse counting is available, this document deals with counting pulses from as many as 12 sources, using a continuous sampling and direct port manipulation (vice interrupt driven) Arduino sketch.
When counting pulses from only one or two meters, it's best to use the interrupt method. There are only two interrupt pins on the Arduino, if you wish to count pulses from more than two sources then please read on!
How to interface with wired / switched pulse outputs is discussed also.
Many meters have pulse outputs, examples include: single phase and three phase electrical energy meters, Gas meters, Water meters.
The pulse output may be a flashing LED or a switching relay (usually solid state) or both.
In the case of an electricity meter, a pulse output corresponds to a defined amount of energy passing through the meter (kWh/Wh). For single-phase domestic electricity meters (e.g. the Elster A100c) each pulse usually equals one Wh (1000 pulses per kWh). With higher power meters (often three-phase), each pulse corresponds to a greater amount of energy e.g. 2, or even 10, Wh per pulse.
What is a pulse?
Figure 1 illustrates a pulse output. The pulse width T_high varies depending on the meter. Some pulse output meters allow T_high to be set. T_high remains constant during operation. For the A100c meter T_high is 50ms. The time between the pulses T_low is what indicates the power measured by the meter.
For the A100c meter, each pulse represents 1/1000th of a kWh, i.e. 1 Wh, of energy passing through the meter.
3600 seconds per hour = 3600J per pulse i.e. 1 Wh = 3600J
therefore, instantaneous power P = 3600 / T where T is the time between the falling edge of each pulse.
Optical pulse counting: Flashing LEDs
Many electricity meters do not have pulse output connections or the connections are not accessible due to restrictions imposed by the utility company. All modern meters have an optical pulse output LED. In such cases an optical sensor can be used to interface with the meter.
The red pulse-output LED can be seen in the A100c picture above. To detect the pulses from the LED, you need a light sensor. There is a wealth of documentation on the internet on using an Arduino to detect pulsed LED output.
- An article by AirSensor: Arduino Electricity Datalogger which uses the TSL261 or TSL257 Light to Voltage sensor, Glyn has found the TSL257 Light to Voltage sensor to be best for detecting LED pulses from a Reporter 5193B meter (see notes on optical sensors below).
- An article by Eric Sandeen Energy Monitor Proof of Concept using an Axman photoreciever
- An article by Ken Boak: Using an Arduino to measure gas consumption
Notes on optical sensors (results of initial tests)
The TLS261 photo diode was also tested. Since this sensor is IR it is not affected as much by ambient light. Was able to detect pulses from a bright LED, but not from the Reporter 5193B meter.
Wired / Switched output pulse detection
Many meters also have wired / switched pulse outputs. Many have connection diagrams similar to this one that comes with the A100c. The two smaller holes are the pulse output connections. I have added Vin and Vout labels to make it a little clearer. Vin is provided by an external power supply. Vout is the meter output created by toggling an internal solid state relay (like a switch between Vin and Vout)
Wired / Swtiched output supply voltage
From what I understand, 24V is a fairly standard supply for such meter systems, but other voltages can usually be used. Meters often have a fairly wide pulse output supply voltage range of 3 to 35V. So the 5V supply from an Aarduino could be used. Higher voltages are desirable when there is more noise in the environment and the cable runs are longer.
Watch out for mains connected pulse outputs: Make sure your meter's pulse output is not connected to the high voltage mains (within the meter). Ssome meters have one of the pulse output connectors connected to neutral. If your meter is one of these you will need isolation circuitry to interface with an Arduino.
Live wire proximity: The pulse outputs are usually very close to live wires, so watch out for those too!
Pulse output meter to Arduino connection diagram:
The 10k resistor keeps the digital input at GND (digital level 0) when the pulse output 'switch' is open.
Thanks to Jerry for the links and comment below.
Single optical pulse counting using a JeeNode board and a Hope RFM12 RF module: