Low Cost Energy Meter
Low Cost Energy Meter
Low Cost Energy Meter
E
Semiconductors:
lectromechanical energy meters Analog Devices’ application notes. Its IC1 - ADE7757 metering IC
have been the standard for me- salient features are: IC2, IC5 - 7805 5V regulator
tering the electricity since bill- 1. It can read up to 999,999 units IC3, IC4 - MCT2E optocoupler
ing began. But these are now being (kWh) with a resolution of 0.01 unit. IC6, IC7 - MM74926 7-segment driv-
gradually replaced by digital signal er
2. It is designed for nominal 230V
T1-T8 - BC548 npn transistor
processor (DSP)-based energy meters, AC, 45-65 Hz and maximum line cur- D1-D3 - 1N4007 rectifier diode
or kilowatt-hour (kWh) meters. rent of 30 amps. (The metering IC can ZD1 - 15V, 1W zener diode
More accurate energy measure- be used with a maximum current of BR1 - W04M bridge rectifier
ment and additional features are in 120 amps.) DIS1- DIS8 - LTS543 common cathode,
7-segment display
fact accelerating the adoption of DSP- 3. The dynamic range is 400 (i.e., 75 LED1 - Red LED
based meters. Their additional features mA to 30A).
Resistors (all ¼-watt, ±5% carbon, unless
include power quality monitoring, re- 4. The meter count is 100 impulses/
mentioned otherwise):
cording of current/voltage peaks and kWh, i.e., 100 impulses will be required R1, R3, R7,
voltage sags, registering of digitised to register one unit. R8 - 500-ohm
waveforms for analysis, and monitor- 5. The accuracy level is better R2 - 6.2-kilo-ohm
ing of active and reactive power and than Class 2 defined in international R4 - 470-ohm
R5, R6 - 680-ohm
power factor information. standard IEC1036 (1996-09). The maxi- R9 - 350-micro-ohm (shunt)
Some metering chips have a se- mum error limit for various current R10 - 1.8-mega-ohm
rial port interface (SPI) that can be values as per this standard is shown R11 - 2.2-kilo-ohm
used for establishing communication in Table I. R13 - 470-ohm, 1W
with a microcontroller-based mobile R14 - 1-kilo-ohm
gadget to control the functionality of IC ADE7757 R12, R15- R28 - 220-ohm
VR1 - 470-kilo-ohm trimpot
the metering chip, perform calibration Fig. 1 shows the functional block
Capacitors:
and transfer the recorded data. Analog diagram of metering IC ADE7757. It is C1, C3, C7,
Devices offers an extensive range of available in 16-lead SOIC narrow-body C8-C10 - 0.1µF ceramic disk
metering ICs to serve various needs. package. In our PCB layout, it is to be C2, C6 - 10µF, 25V electrolytic
Here’s an energy meter using Ana- soldered on the conductor side of the C4, C5, C11,
log Devices’ ADE7757 chip for single- PCB. The IC has an on-chip oscillator, C12 - 0.068µF ceramic disk
C13 - 0.47µF, 630V polyester
phase, 2-wire (phase and neutral) sys- so it requires no external crystal or C14 - 470µF, 35V electrolytic
tems used in households. IC ADE7757 resonator, thus reducing the overall C15 - 1000µF, 16V electrolytic
is a low-cost, single-chip solution for cost of building a watt-hour meter. It Miscellaneous:
operates off a L1, L2 - Ferrite bead inductor
Battery - 4.5V rechargeable battery
5V power sup-
X1 - 230V AC primary to 7.5V,
ply. 500mA secondary trans-
In operation, former
the chip directly
interfaces with and V2, respectively. Channel V1 (also
a shunt resistor called ‘current channel’) is used for
(used as the cur- current sensing and channel V2 (also
rent sensor) and called ‘voltage channel’) is used for
AC analogue voltage sensing.
voltage sensing The differential output from the
input. It has two current-sensing resistor is connected
analogue input between V1P and V1N inputs, while the
channels des- differential output signal proportional
Fig. 1: Functional block diagram of IC ADE7757 ignated as V1 to the AC line voltage, obtained through
5 8 • M ay 2 0 0 5 • e l e c t ro n i c s f o r yo u w w w. e f y m ag . co m
CMYK
Construction
a resistor divider, is signal. The instantaneous power signal
connected between is achieved by a direct multiplication of
pins V2P and V2N. the current and voltage signals. In order
IC ADE7757 also to extract the real power component
has a reference circuit (referred to as the DC component), the
and a fixed DSP func- instantaneous power signal is low-pass
tion for calculation filtered. This scheme correctly calculates
of the real power. A the real power for sinusoidal current
highly stable oscil- and voltage waveforms at all power fac-
lator integrated into tors. All the signal processing is carried
the chip provides the out in the digital domain for superior
necessary clock for stability over temperature and time.
the chip. IC ADE7757 Fig. 2 shows the block diagram for
supplies the average signal processing along with the wave-
Fig. 2: Block diagram for signal processing along with the waveforms at real-power informa- forms at the output of the multiplier
the output of the multiplier and the low-pass filter (LPF) tion on the F1 and and after the low-pass filter (LPF). It is
F2 low-frequency outputs. observed that this method of extract-
These outputs may be used to ing the real power information holds
directly drive a stepper mo- good even when the current is not in
tor-based electromechanical phase with the voltage. The real power
counter or any other suitable component (DC component) of the
counter. instantaneous power for sinusoidal
IC ADE7757 also provides voltage/current waveforms with a
a high-frequency output at power factor of 0.5 (current lagging the
Fig. 3: Typical mains current sampling the calibration frequency voltage by 60°) is:
(CF) pin for a selected me-
ter constant (here, it is 3200 V×I
× cos 60°
impulses/kWh). This high- 2
frequency output provides
instantaneous real-power The real power calculation holds
information, which is used good even for non-sinusoidal current
to speed up the calibration and voltage waveforms.
process. It also provides a Mains current sampling (channel
means for quickly verifying V1). The voltage output from the cur-
Fig. 4: Typical mains voltage sampling the meter’s functionality and rent sensor (proportional to the load
accuracy in a production en- current) is connected to channel V1
vironment. of IC ADE7757, which is a fully dif-
Table I ferential voltage input. The V1P input
Accuracy Requirements Theory of operation is positive with respect to V1N. The
Percentage error limits 3 The two analogue-to-digital maximum peak differential signal on
Current value1 PF2 Class 1 Class 2 converters (ADCs) used in the channel V1 should be less than ±30
chip digitise the output of current mV (i.e., 21mV rms for a pure sinusoi-
0.05 lb < l < 0.1 lb 1 ±1.5% ±2.5%
and voltage sensors. The ADCs dal signal) with reference to analogue
0.1 lb < l < lMAX 1 ±1.0% ±2.0%
are 16-bit, sigma-delta type with ground (AGND) for the specified op-
0.1 lb < l < 0.2 lb 0.5 lag ±1.5% ±2.5%
an oversampling rate of 450 kHz. eration. Typical sampling connections
0.8 lead ±1.5%
These work with oversampling are shown in Fig. 3.
0.2 lb < l < lMAX 0.5 lag ±1.0% ±2.0%
so that the bandwidth of the Mains voltage sampling (channel
0.8 lead ±1.0%
Notes. 1. The current ranges for the specified accuracy are expressed in
input signal is much less than V2). The output of the line voltage
terms of the basic current (Ib), which is defined as the value of the current fs/2, where ‘fs’ is the sampling sensor is connected to IC ADE7757 at
in accordance with which the relevant performance of a direct connec-
tion meter is fixed. IMAX is the maximum current at which the accuracy is frequency. In its most basic form, this analogue input. Channel V2, like
maintained. At these frequencies we have taken the value of basic current the sigma-delta converter con- channel V1, is a fully differential-volt-
Ib as 5 amp.
2. Power factor (PF) gives the phase relationship between the fundamental tains a one-bit ADC and DAC. age input channel with maximum peak
voltage (45 to 65 Hz) and current waveforms. Here, it can be simply defined It produces a higher-resolution differential signal of ±165 mV refer-
as PF = cos f, where f is the phase angle between the pure sinusoidal
current and the voltage. digital word output by averaging enced to analogue ground (AGND).
3. The percentage error =
several one-bit samples. Typical connections for mains voltage
(Energy registered by the meter–True energy)×100 The real power is derived sampling channel V2 are shown in Fig.
True energy
from the instantaneous power 4. It is quite convenient to adjust the
w w w. e f y m ag . co m e l e c t ro n i c s f o r yo u • M ay 2 0 0 5 • 5 9
CMYK
Construction
ratios of Ra and VR for adjusting the be 30 2 ×350×10 –6
gain of the meter. watts = 315 mW.
Phase matching between channels. This is reasonably
It is important that the relative phase low.
difference between voltage and cur- The chosen
rent waveforms at the inputs of V1 shunt must:
and V2 channels is not disturbed since 1. Provide the
any phase mismatch between channels necessary dynam-
will translate into significant measure- ic range (400 to
ment error at low power factors. IC 500).
ADE7757 is internally phase-matched Fig. 5: Output signal timing diagram 2. Dissipate
over the frequency range of 40 Hz to less power.
1 kHz between the two channels, 3. Be small-size, so that it can be
which ensures that the relative phase Table II installed within the meter case to avoid
relations of the two channels are main- F1-4 Frequency Selection tampering.
tained throughout the useful range of S1 S0 F 1-4 (Hz) 4. Have low temperature coeffi-
frequencies. cient. (Manganin has low temperature
0 0 0.85
Power supply monitor. The on-chip coefficient.)
0 1 1.7
power supply monitor of IC ADE7757 For experimental purposes, we
1 0 3.4
continuously monitors the power sup- used 24mm long 18SWG copper wire,
1 1 6.8
ply (VDD). If the supply is less than which gave a shunt resistance of
4V, IC ADE7757 is reset. This ensures around 350 µΩ.
proper device operation at power-up Table III
and power-down. The power supply Output Frequency on CF Pin Design example
monitor has built-in hysteresis and SCF S1 S0 CF Signals For designing a meter with 100 pulses/
filtering that provides a high degree (Hz) kWh count, proceed as follows:
of immunity to false triggering due to Step 1. Select the shunt as discussed
1 0 0 128×F1, F2
noisy supply. above. The shunt selected is 350 µΩ.
0 0 0 64×F1, F2
Transfer function. The transfer The sense voltage V1rms at constant
1 0 1 64×F1, F2
function refers to the relation between basic current (Ib) of 5 amps would be
0 0 1 32×F1, F2
the true power into the load and its 1.75 mV.
1 1 0 32×F1, F2
representation in terms of the equiva- Step 2. With nominal mains volt-
0 1 0 16×F1, F2
lent frequency at F1 and F2 output age of 230V AC rms and constant
1 1 1 16×F1, F2
points. The transfer function of IC basic current (Ib) of 5 amps, the energy
0 1 1 2048×F1, F2
ADE7757 is quite linear, and as such, consumed in one hour is 230×5 = 1150
a one-point calibration (at Ib) at unity watt-hour or 1.15 kWh.
power factor is all that is needed to Table IV Since we have selected 100 pulses/
calibrate the meter. If precautions are Approximate Timings for the kWh, for consumption of 1.15 kWh,
taken at the design stage, no calibration Outputs (Fig. 5) the output should be 115 pulses. The
is necessary at power factors as low as equivalent frequency (cycles per sec.)
Parameter Time duration Units
0.5 (i.e., phase difference of 60°). is 115/3600 = 0.0319443 Hz.
The output frequency or pulse rate t 1 550 ms Step 3. Assuming S0 = 0 and S1 =
is related to the input voltage signals t 2 1.428 (min.) sec 1, read F1-4 value from Table II, which
as follows: t 3 0.714 (min.) sec is 3.4 Hz.
where Freq is the output frequency t 4 180 ms Step 4. From the transfer function
t 5 44.65 (min.) ms equation, calculate V2rms by substitut-
515.84×V1rms×V2rms×F1-4 t 6 165 (min.) ms ing Vref=2.5V and the other values:
Freq =
Vref2 Shunt selection. In order to arrive 0.0319443 Hz = (515.84x1.75x10-3
at the values of V1rms and V2rms we xV2rmsx3.4)/2.52
on F1 and F2 (Hz), V1rms is the differ- must select the size/power dissipation or V2rms = 65 mV
ential rms voltage signal on channel rating of shunt for developing V1rms Thus an rms voltage sample of
V1 (volts), V2rms is the differential rms (proportional to line current), which 65 mV measured between V2P and
voltage signal on channel V2 (volts), is the most critical part of the design. AGND, and V2N and AGND, in con-
Vref is the reference voltage (2.5V ± 8%) We have chosen the maximum current junction with rms voltage sample of
and F1-4 is one of four possible frequen- as 30 amps and the shunt size as given 1.75 mV (refer step 1) measured be-
cies selected by using the S0 and S1 in the application note, i.e., 350 µΩ. At tween V1P and AGND, and V1N and
logic inputs (see Table II). 30 amps, its power dissipation would AGND, should produce 115 pulses per
6 0 • M ay 2 0 0 5 • e l e c t ro n i c s f o r yo u w w w. e f y m ag . co m
CMYK
Construction
hour, or 0.0319443
Hz (refer Step 2), at
F1 and F2 outputs of
IC ADE7757. Now,
if we set the select
calibration frequency
(SCF) to logic 1, the
output pulses at CF
will be 32 times the
pulse rate at either
F1 or F2 output (see
Table III).
As stated earlier,
the CF output is used
for calibration. Since
this frequency is com-
paratively high, the
real power informa-
tion is accumulated
very fast and hence
less averaging is car-
ried out for the CF
output. That means
the meter is more
responsive to pow-
er fluctuations. The
CF output can
also be used for inter-
facing with microcon-
trollers.
Timing of out-
puts. The timing dia-
gram for F1, F2 and
CF pulse outputs is
shown in Fig. 5 and
the approximate tim-
ings for the selected
parameters are given
in Table IV.
The circuit
By following the
aforementioned de-
sign principles, we
Fig. 6: Circuit of the energy meter using ADE7757
w w w. e f y m ag . co m e l e c t ro n i c s f o r yo u • M ay 2 0 0 5 • 6 1
CMYK
CMYK
Construction
and reference circuit. All the other sig- (DIS5 through DIS8). IC6 is cascaded
nal processing is carried out in digital Soldering of SMT ICs to IC7 by connecting the ‘Carry’ output
domain. Apply flux to the pads where the IC is to be of IC6 to the clock input of IC7.
The power supply for IC ADE7757 soldered. Transistors T1 through T8 drive the
Add a small amount of solder to one of the
is derived directly from mains using corner pin pads. respective digit displays DIS1 through
the capacitor divider network compris- Line up the IC with the pads on the PCB. DIS8.
ing C13 and C14. Most of the voltage Double check the IC orientation. Since F1 output comprises 100
is dropped across C13 (0.47µF polyester Melt the solder with your iron and move pulses for each energy unit (kWh), a
the IC into position with tweezers. Let the
capacitor rated for 630V), while resistor decimal point is permanently placed
solder solidify.
R13 (470-ohm, 1W) is used as a current Solder the diagonally opposite pin. Check
between DIS2 and DIS3. Thus the dis-
limiter. The output across C14 is limit- under magnification that all pins line up with play can show up to 999999.99 units
ed to 15V DC, which serves as an input their respective pads. and then restart from 000000.00.
to regulator 7805 (IC2). The regulated Solder the rest of the pins and check under The meter and the PCB lay-
magnification.
5V is fed to IC1 at its VDD pin 1. In this out must be designed such
Note. Special techniques may be needed for
application, the phase line is connected some packages. that the conducted/radiated
to AGND (pin 6) and DGND (pin 13) electromagnetic disturbances and
and hence to the common terminal of the electrostatic discharge do not
regulator IC2.
Two MM74926 ICs
(IC6 and IC7) are cas-
caded to act as an 8-
digit ripple counter, in
conjunction with eight
7-segment displays
(DIS-1 through DIS-
8), which require ad-
ditional 5V regulated
and isolated supply (to
avoid extension of live
mains to the counter
section). A conven-
tional 5V regulator
circuit incorporating a
bridge rectifier (BR1),
smoothing capacitor
(C15) and regulator
IC 7805 (IC5) has been
used for the purpose.
A 4.5V rechargeable
battery is used to pro-
vide back-up so that
the counter does not
reset when mains fails.
Diode D3 prevents bat-
tery discharge through Fig. 7: Actual-size, single-side PCB layout for the energy meter using ADE7757
the regulator during
mains interruption. The voltage drop play and internal multiplexing circuit- damage the meter or disturb its
across diode D3 is compensated by ry with four multiplexed outputs. As working. Other disturbances to be
using diode D2 in series with the com- multiplexing circuit has its own free- considered are electromagnetic
mon terminal of regulator 7805 (IC5). running oscillator, it does not require HF fields, fast transience burst and
The F1 output of IC1 is coupled external clock. The counter advances power line surge.
to 8-digit ripple counter IC MM74926 on the negative edge of the clock pulse. All of the precautionary compo-
via optocoupler IC3, while LED1 in- The high input at the latch-enable pin nents and design techniques (ferrite
dicates that IC1 is working. CMOS IC displays the counter outputs. beads, capacitor line filters, large SMD
MM74926 consists of a 4-digit counter, IC6 drives the first four 7-segment resistors and grounding of the PCB
internal output latch, npn output displays (DIS1 through DIS4), while layout) contribute to protect the meter
source drivers for the 7-segment dis- IC7 drives the remaining four displays circuitry from all forms of electromag-
w w w. e f y m ag . co m e l e c t ro n i c s f o r yo u • M ay 2 0 0 5 • 6 2
CMYK
netic disturbances.
Ferrite beads play a
more important role
against RF and fast
transience burst.
This being a non-
commercial educa-
tional project, all the
laid down design prin-
ciples have not been
adhered to. A simple
single-side PCB has
been used for assem-
bling the energy meter
circuit and testing it.
The PCB track layout is
shown in Fig. 7 and its
component layout in
Fig. 8. The method for
soldering the surface
mount ICs is given in
the box.
The datasheet
for the metering IC
ADE7757 has been in-
cluded in this month’s
EFY-CD.
Fig. 8: Component layout for the PCB in Fig. 7