Maxim Integrated 71M6534 Energy Meter IC Family Software User Manual

Page 59

Advertising
background image

71M653X Software User’s Guide

functions, the same equations were rewritten in the Demo Code to use much simpler mathematical operations that are
closer to the capabilities of the MPU.

As with the procedure presented in the DBUM, a signal with the described voltage and current should be applied to the
meter and held constant during the auto-calibration process.

The cal_begin() routine starts the calibration state-machine by setting the flag cal_flag to YES, after setting the
calibration factors to default values, recording the calibration temperature, calculating the temperature compensation
coefficients and setting the counter cs for calibration cycles.

The calibration state machine is the routine Calibrate() (in meter\calphased.c) called by meter_run() (in
meter\meter.c). After calibration is started by cal_begin(), meter_run() calls Calibrate() once per
accumulation interval, when new metering data is available.

Calibrate() uses the variable cs (count of seconds) to control the stabilization delay, measurement time and adjustment
phase. cs counts down.

1) If cs > Scal: The state machine waits for the CE to settle after the unity gain and temperature

compensation data are loaded in the routine cal_begin().

2) If

cs

= Scal: The variables for cumulative V, Wh and VARh are cleared.

3) If 0 <= cs <= Scal: For V, Wh and VARh are added to the variables. Using two accumulation intervals is

enough because it covers both chop polarities of temperature measurements.

4) If

cs = 0

: This signals the end of the calibration. measurements are then used to calculate and set the

calibration coefficients for phase, voltage and currents in CE DRAM.

5) The adjustments are saved to nonvolatile memory.

The calibration is fast because the measurements are collected from all the elements simultaneously during the
measurement interval. When the gains and phases are adjusted, the code quickly steps through a table of indexes,
reading the data from each element and writing the adjustments for each element.

The calibration is so fast that TSC believes that it may pay to use this method to calibrate a meter in equation 2 or 5,
and then change to the actual metering equation, possibly even reloading the code.

High accuracy temperature calibration:

For accuracies up to 0.5%, standard values can compensate the ADC and voltage regulator for temperature. For 0.2%
or better accuracy, high accuracy “trimmed” parts are usually required. The trimmed parts have a temperature
response that is characterized at the factory, and programmed into the part.

The demo code has sample code to adjust the quadratic temperature parameters of a meter containing a trimmed part.
See compensation() in meter\calphased.c

In these meters, the current and voltage sensors also usually have temperature compensation curves, and these
usually need to be compensated as well. The demo code has an explicit place to combine the data into a single
quadratic compensation. See compensation() in meter\calphased.c.

Contact factory support for information about trimmed parts.

Linear (non-phase-adjusted) calibration:

In the extended code set, TSC maintains autocalibration code that does a linear adjustment of the gains for current and
voltage, without adjusting phase.

Derivation of the calibration equations:

These calculations assume that during the meter's calibration measurements, the CE gains are unity, 16384, and the
phase adjustments are zero. The applied signal is assumed to be a sine applied to both the current and voltage
measurement with no phase shift.

A non-trignometric derivation for the fast calibration is generally superior because the cos() of the typically tiny
corrective angle Φ is just not that accurate.

v1.1v1.1

TERIDIAN Proprietary

59 of 116

© Copyright 2005-2008 TERIDIAN Semiconductor Corporation

Advertising
This manual is related to the following products: