In electricity meters, the energy consumed is normally measured in fraction of kilowatt hour (kWh) pulses.
This information can be used to accurately calibrate any meter or to report measurement during normal
operation. To serve both these tasks efficiently, the microcontroller has to accurately generate and record
the number of these pulses. It is a general requirement to generate these pulses with relatively little jitter.
Although, time jitters are not an indication of bad accuracy, as long as the jitter is averaged out it would
give a negative indication on the overall accuracy of the meter.
The average power to generate the energy pulses is used. The average power (calculated by the
foreground process) is accumulated every ΣΔ interrupt. This is equivalent to converting it to energy. Once
the accumulated energy crosses a threshold, a pulse is generated. The amount of energy above this
threshold is kept and new energy amount is added on top of it in the next interrupt cycle. Since the
average power tends to be a stable value, this way of generating energy pulses is very steady and free of
jitter.
The threshold determines the energy "tick" specified by the power company and is a constant. For
example, this can be in kWh. In most meters, the pulses per kWh decide this energy tick. For example in
this application, the number of pulses generated per kWh is set to 6400 for active and reactive energies.
The energy "tick" in this case is 1 kWh or 6400. Energy pulses are generated and also indicated via LEDs
on the board. Port pins are toggled for the pulses with control over the pulse width for each pulse.
Figure 10 shows the flow diagram for pulse generation.