ADE7761B
Rev. 0 | Page 21 of 24
APPLICATIONS INFORMATION
INTERFACING TO A MICROCONTROLLER FOR
ENERGY MEASUREMENT
The easiest way to interface the ADE7761B to a microcontroller
is to use the CF high frequency output with the output frequency
scaling set to 2048 × F
1
, F
2
. This is done by setting SCF = 0
and S0 = S1 = 1 (see
Table 8). With full-scale ac signals on the
analog inputs, the output frequency on CF is approximately
5.5 kHz.
Figure 35 illustrates one scheme that could be used to
digitize the output frequency and carry out the necessary
averaging mentioned in the
Frequency Output CF section.
TIME
±10%
AVERAGE
FREQUENCY
CF
FREQUENCY
RIPPLE
MCU
UP/DOWN
COUNTER
LOGIC
CF
REVP
1
ADE7761B
FAULT
2
1
REVP MUST BE USED IF THE METER IS BIDIRECTIONAL OR
DIRECTION OF ENERGY FLOW IS NEEDED.
2
FAULT MUST BE USED TO RECORD ENERGY IN FAULT CONDITION.
6797-033
Figure 35. Interfacing the ADE7761B to an MCU
As shown in Figure 35, the frequency output CF is connected to
an MCU counter or port that counts the number of pulses in a
given integration time, determined by an MCU internal timer.
The average power, proportional to the average frequency, is
Timer
Counter
PowerActiveAverageFrequencyAverage ==
The energy consumed during an integration period is
CounterTime
Time
Counter
TimePowerAverageEnergy =×=×=
For the purpose of calibration, this integration time could be
10 sec to 20 sec to accumulate enough pulses to ensure correct
averaging of the frequency. In normal operation, the integration
time could be reduced to 1 sec or 2 sec, depending on, for
example, the required update rate of a display. With shorter
integration times on the MCU, the amount of energy in each
update may still have a small amount of ripple, even under
steady load conditions. However, over a minute or more, the
measured energy has no ripple.
SELECTING A FREQUENCY FOR AN ENERGY
METER APPLICATION
As shown in Table 6, the user can select one of four frequencies.
This frequency selection determines the maximum frequency
on F1 and F2. These outputs are intended to be used to drive
the energy register (electromechanical or other). Because only
four different output frequencies can be selected, the available
frequency selection was optimized for a meter constant of
100 impulses/kWh with a maximum current of between 10 A
and 120 A.
Table 9 shows the output frequency for several
maximum currents (I
MAX
) with a line voltage of 240 V. In all
cases, the meter constant is 100 impulses/kWh.
Table 9. F
1
and F
2
Frequency at 100 Impulses/kWh
I
MAX
(A) F
1
and F
2
(Hz)
12.5 0.083
25 0.166
40 0.266
60 0.4
80 0.533
120 0.8
The f
1–4
frequencies allow complete coverage of this range of
output frequencies on F1 and F2. When designing an energy
meter, the nominal design voltage on Channel V2 (voltage)
should be set to half-scale to allow for calibration of the meter
constant. The current channel should also be no more than half-
scale when the meter sees maximum load, which accommodates
overcurrent signals and signals with high crest factors.
Table 10
shows the output frequency on F1 and F2 when both analog
inputs are half-scale. The frequencies listed in
Table 10 align
well with those listed in
Table 9 for maximum load.
Table 10. F
1
and F
2
Frequency with Half-Scale AC Inputs
S0 S1 f
1–4
(Hz)
Frequency on F1 and F2, Channel V1 and
Channel V2, Half-Scale AC Inputs (Hz)
0 0 1.72 0.092
0 1 3.44 0.183
1 0 6.86 0.337
1 1 13.5 0.734
When selecting a suitable f
1–4
frequency for a meter design, the
frequency output at I
MAX
(maximum load) with a meter constant
of 100 impulses/kWh should be compared with Column 4 of
Table 10. The frequency that is closest in Table 10 determines
the best choice of frequency (f
1-4
). For example, if a meter with
a maximum current of 40 A is being designed, the output
frequency on F1 and F2 with a meter constant of 100 impulses
per kWh is 0.266 Hz at 40 A and 240 V (see
Table 9).
Looking at
Table 10, the closest frequency to 0.266 Hz
in Column 4 is 0.183 Hz. Therefore, F
2
(3.4 Hz; see Table 6)
is selected for this design.