English
Language : 

Z8F2480 Datasheet, PDF (16/24 Pages) Zilog, Inc. – Load current up to 3 amps
Z8F2480 Power Monitor with an eZ80F91 Webserver
Reference Design
b. Alternatively, enter the i2c_tracce on command on the eZ80F91 console to
cause the last AC measurement results to be displayed. For example, consider the
following trace:
Period b3c5
Period b3c1
Period b3c2
Period b3c3
Period b3c0
V 01ef
V 01f0
V 01ef
V 01ef
V 01ef
I 81f0
I 81ef
I 81ef
I 81f0
I 81ef
Phase 0000 IPO 002a08dd
Phase 0000 IPO 002a08dd
Phase 0000 IPO 002a08dd
Phase 0000 IPO 002a08dd
Phase 0000 IPO 002a08dd
The average ADC voltage value of these 5 traces is 0x01EFh (495 decimal).
c. Construct a table of (x,y) values in which the x value corresponds to the average
ADC reading value (see above); the y value corresponds to the actual AC input
voltage (RMS). In the running example, if the average ADC value is 495 when the
AC input voltage is 205 V RMS, then the data point obtained is (495,205).
3. After sweeping through all input voltages, use a linear least-squares analysis tool to
determine the slope and Intercept values that provide the lowest amount of errors over
the voltage range sampled.
4. Next, modify the index.htm javascript file located in the ZTPDemo_RD0027\Web-
site folder and edit the voltage equation to use the calibrated slope and intercept val-
ues.
5. Delete the compiler-generated index_htm.c file, rebuild the project, and reprogram
the eZ80F91 target.
a. Note that after modifying the javascript file, it may be necessary to force the
browser to reload the web page by using CTRL+F5 instead of clicking the Reload
button.
b. Additionally, note that it may take 7 to 8 seconds for the browser to display mea-
surement data if the eZ80F91 MCU is reprogrammed while the browser is run-
ning.
6. Repeat this voltage calibration with the new slope and intercept to verify that the mea-
surement results are within the desired level of accuracy. In some instances, it may be
necessary to repeat this process a second time.
Low-Gain Current Calibration
Observe the following procedure to perform a low-gain current calibration.
1. When calibrating load current, configure the AC signal generator to produce the
expected nominal line voltage (e.g., 120 V) and modify the load resistance to sweep
through the upper current range.
a. It will be necessary to insert an AC ammeter in series with the load to measure the
actual load current and adjust the load resistance to step the current by approxi-
mately 10 mA for each measurement.
RD002702-0814
Page 16 of 24