TERIDIAN Semiconductor Corporation makes no warranty for the use of its products, other than expressly contained in the Company’s
warranty detailed in the TERIDIAN Semiconductor Corporation standard Terms and Conditions. The company assumes no responsibility for any errors which may appear in this document, reserves the right to change devices or specifications detailed herein at
any time without notice and does not make any commitment to update the information contained herein.
1.1 General .................................................................................................................................................................... 9
1.2 Safety and ESD Precautions ................................................................................................................................. 9
1.6 Suggested Equipment not Included ................................................................................................................... 10
1.7 Demo Board Test Setup ....................................................................................................................................... 10
1.7.1 Power Supply Setup ........................................................................................................................................ 13
1.7.2 Cable for Serial Connection (Debug Board) .................................................................................................... 13
1.7.4 Serial Connection Setup .................................................................................................................................. 15
1.8 Using the Demo Board ......................................................................................................................................... 16
1.8.1 Serial Command Language ............................................................................................................................. 17
1.8.2 Using the Demo Board for Energy Measurements .......................................................................................... 25
1.8.3 Adjusting the Kh Factor for the Demo Board ................................................................................................... 25
1.8.4 Adjusting the Demo Boards to Different Current Transformers ....................................................................... 26
1.8.5 Adjusting the Demo Boards to Different Voltage Dividers ............................................................................... 26
1.10.2 Important Demo Code MPU Parameters ..................................................................................................... 33
1.10.3 Useful CLI Commands Involving the MPU and CE ...................................................................................... 39
1.11 Using the ICE (In-Circuit Emulator) ................................................................................................................. 39
2 APPLICATION INFORMATION ............................................................................................................................. 41
2.1 Calibration Theory ................................................................................................................................................ 41
2.1.1 Calibration with Three Measurements ............................................................................................................. 41
2.1.2 Calibration with Five Measurements ............................................................................................................... 43
2.1.3 Fast Calibration ............................................................................................................................................... 44
2.2.6 Compensating for Non-Linearities ................................................................................................................... 52
2.3 Calibrating and Compensating the RTC ............................................................................................................. 53
2.4 Schematic Information ......................................................................................................................................... 54
2.4.1 Components for the V1 Pin ............................................................................................................................. 54
2.5 Testing the Demo Board ...................................................................................................................................... 57
2.5.1 Functional Meter Test ...................................................................................................................................... 57
4.3 71M6534H IC Description ..................................................................................................................................... 81
4.4 Formulae for Fast Calibration ............................................................................................................................. 84
Figure 1-4: Port Speed and Handshake Setup (left) and Port Bit setup (right) .................................................................. 16
Figure 1-5: Command Line Help Display .......................................................................................................................... 17
Figure 1-7: Emulator Window Showing Reset and Erase Buttons (see Arrows) ............................................................... 30
Figure 1-8: Emulator Window Showing Erased Flash Memory and File Load Menu ......................................................... 30
Figure 2-1: Watt Meter with Gain and Phase Errors. ......................................................................................................... 41
Figure 2-3: Calibration Spreadsheet for Three Measurements ......................................................................................... 50
Figure 2-4: Calibration Spreadsheet for Five Measurements ............................................................................................ 50
Figure 2-5: Calibration Spreadsheet for Rogowski coil ..................................................................................................... 51
Figure 2-6: Non-Linearity Caused by Quantification Noise ............................................................................................... 52
Figure 2-7: Voltage Divider for V1 ..................................................................................................................................... 54
Figure 2-8: External Components for RESET ................................................................................................................... 54
Figure 2-13: Meter with Calibration System ...................................................................................................................... 57
Figure 2-14: Calibration System Screen ........................................................................................................................... 58
Figure 4-13: Debug Board: Top Signal Layer .................................................................................................................... 79
Table 1-5: CE RAM Locations for Calibration Constants .................................................................................................. 27
Table 1-10: MPU Status Word Bit Assignment.................................................................................................................. 37
Table 1-12: CLI Commands for MPU Data Memory .......................................................................................................... 39
Table 4-1: D6534T14A2 Demo Board: Bill of Material ...................................................................................................... 69
Table 4-2: Debug Board: Bill of Material ........................................................................................................................... 76
The TERIDIAN Semiconductor Corporation (TSC) 71M6534H Demo Board is a demonstration board for
evaluating the 71M6534H device for 3-phase electronic power metering applications. It incorporates a 71M6534
or 71M6534H integrated circuit, peripheral circuitry such as a serial EEPROM, emulator port, and on board
power supply as well as a companion Debug Board that allows a connection to a PC through a RS232 port. The
demo board allows the evaluation of the 71M6534 or 71M6534H energy meter chip for measurement accuracy
and overall system use.
The board is pre-programmed with a Demo Program in the FLASH memory of the 71M6534/6534H IC. This embedded application is developed to exercise all low-level function calls to directly manage the peripherals, flash
programming, and CPU (clock, timing, power savings, etc.).
The 71M6534/6534H IC on the Demo Board is pre-programmed with default calibration factors.
1.2 SAFETY AND ESD PRECAUTIONS
Connecting live voltages to the demo board system will result in potentially hazardous voltages on the demo
board.
THE DEMO SYSTEM IS ESD SENSITIVE! ESD PRECAUTIONS SHOULD BE TAKEN
WHEN HANDLING THE DEMO BOARD!
EXTREME CAUTION SHOULD BE TAKEN WHEN HANDLING THE DEMO BOARD
ONCE IT IS CONNECTED TO LIVE VOLTAGES!
1.3 DEMO KIT CONTENTS
• Demo Board D6534T14A2 with 71M6534H IC and pre-loaded demo program:
• Debug Board
• Two 5VDC/1,000mA universal wall transformers with 2.5mm plug (Switchcraft 712A compatible)
• Serial cable, DB9, Male/Female, 2m length (Digi-Key AE1020-ND)
At printing time of this document only the following version of the Demo Board is available:
•Demo Board D6534T14A2 (standard)
1.5 COMPATIBILITY
This manual applies to the following hardware and software revisions:
• 71M6534 or 71M6534H chip revision A03
• Demo Kit firmware revision 4p6q
• Demo Boards D6534T14A2
1.6 SUGGESTED EQUIPMENT NOT INCLUDED
For functional demonstration:
• PC w/ MS-Windows
For software development (MPU code):
•Signum ICE (In Circuit Emulator): ADM-51 – see update information in section 1.11
http://www.signum.com
®
versions XP, ME, or 2000, equipped with RS232 port (COM port) via DB9 connector
•Keil 8051 “C” Compiler kit: CA51
http://www.keil.com/c51/ca51kit.htm
, http://www.keil.com/product/sales.htm
1.7 DEMO BOARD TEST SETUP
Figure 1-1 shows the basic connections of the Demo Board plus Debug Board with the external equipment for
desktop testing, i.e. without live power applied. For desktop testing, both the Demo and Debug board may be
powered with their 5VDC power supplies.
The D6534T14A2 Demo Board block diagram is shown in Figure 1-2. It consists of a stand-alone meter Demo
Board and an optional Debug Board. The Demo Board contains all circuits necessary for operation as a meter,
including display, calibration LED, and internal power supply. The Debug Board provides magnetic isolation
from the meter and interfaces to a PC through a 9 pin serial port. For serial communication between the PC and
the TERIDIAN 71M6534H, the Debug Board needs to be plugged with its connector J3 into connector J2 of the
Demo Board.
Connections to the external signals to be measured, i.e. AC voltages and current signals derived from shunt
resistors or current transformers, are provided on the rear side of the demo board (see Figure 3-1).
Caution: It is recommended to set up the demo board with no live AC voltage
connected, and to connect live AC voltages only after the user is familiar with
the demo system.
All input signals are referenced to the V3P3 (3.3V power supply to the chip).
•Internal (using phase A of the AC line voltage). The internal power supply is only suitable when phase A
exceeds 220V RMS.
• External 5VDC connector (J1) on the Demo Board
• External 5VDC connector (J1) on the Debug Board.
The power supply jumper JP1 must be consistent with the power supply choice. JP1 connects the AC line
voltage to the internal power supply. This jumper should usually be left in place.
1.7.2 CABLE FOR SERIAL CONNECTION (DEBUG BOARD)
For connection of the DB9 serial port to a PC, either a straight or a so-called “null-modem” cable may be used.
JP1 and JP2 are plugged in for the straight cable, and JP3/JP4 are empty. The jumper configuration is reversed
for the null-modem cable, as shown in Table 1-1.
Cable
Configuration
Straight Cable
Null-Modem Cable Alternative -- -- Installed Installed
JP1 through JP4 can also be used to alter the connection when the PC is not configured as a DCE device.
Table 1-2 shows the connections necessary for the straight DB9 cable and the pin definitions.
Table 1-3 shows the connections necessary for the null-modem DB9 cable and the pin definitions.
A few seconds after power up, the LCD display on the Demo Board should display this brief greeting:
H E L L 0
The “HELLO” message should be followed by the display of accumulated energy alternating with the text “Wh”.
3. 0. 0 0 1
W h
If the PB switch on the Demo Board is pressed and held down), the display will cycle through a series of
parameters, as shown in Table 1-4.
Step
Displayed
Text
1
DELTA C
2
3
4
5
6
7
8
9
HZ
Wh
Wh
VARh
VARh
VAh
HOURS
TIME
Once, the Debug Board is plugged into J2 of the Demo Board, LED DIO1 on the Debug Board will flash with a
frequency of 1Hz, indicating CE activity. The LED DIO0 will flash with a frequency of 5Hz, indicating MPU
activity.
Figure 1-4: Port Speed and Handshake Setup (left) and Port Bit setup (right)
Once, the connection to the demo board is established, press <CR> and the prompt, >, should appear. Type >?
to see the Demo Code help menu. Type >i to verify the Demo Code revision.
1.8 USING THE DEMO BOARD
The 71M6534/6534H Demo Board is a ready-to-use meter prepared for use with external current transformers.
Using the Demo Board involves communicating with the Demo Code via the command line interface (CLI). The
CLI allows modifications to the metering parameters, access to the EEPROM, initiation of auto-cal sequences,
selection of the displayed parameters, changing of calibration factors and more operations that can be used to
evaluate the 71M6534 chip.
Before evaluating the 71M6534/6534H on the Demo Board, users should get familiar with the commands and
responses of the CLI. A complete description of the CLI is provided in section 1.8.1.
The Demo Code residing in the flash memory of the 71M6534/6534H provides a convenient way of examining
and modifying key meter parameters. Once the Demo Board is connected to a PC or terminal per the
instructions given in Section 1.7.2 and 1.7.4, typing ‘?’ will bring up the list of commands shown in Figure 1-5.
Figure 1-5: Command Line Help Display
The tables in this chapter describe the commands in detail.
Read consecutive 16-bit words in Decimal, starting at
address A
Read consecutive 16-bit words in Hex, starting at
address A
Write consecutive memory values, starting at address
A
Page 19
71M6534H Demo Board User’s Manual
Commands for MPU/XDATA Access:
) MPU DATA ACCESS Comment
Description: Allows user to read from and write to MPU data space.
Usage: ) [Starting MPU Data Address] [option]…[option]
Command
)A???
combinations:
)A$$$
Read three consecutive 32-bit words in Decimal,
starting at address A
Read three consecutive 32-bit words in Hex, starting at
address A
)A=n=m
Write the values n and m to two consecutive
addresses starting at address A
?) Display useful RAM addresses.
Example: )08$$$$ Reads data words 0x08, 0x0C, 0x10, 0x14
)04=12345678=9876ABCD Writes two words starting @ 0x04
MPU or XDATA space is the address range for the MPU XRAM (0x0000 to 0xFFF). All MPU data words are in
4-byte (32-bit) format. Typing ]A? will access the 32-bit word located at the byte address 4 * A = 0x28. The
energy accumulation registers of the Demo Code can be accessed by typing two Dollar signs (“$$”), typing
question marks will display negative decimal values if the most significant bit is set.
Commands for DIO RAM (Configuration RAM) and SFR Control:
R DIO AND SFR CONTROL Comment
Description: Allows the user to read from and write to DIO RAM and special function registers (SFRs).
Usage: R [option] [register] … [option]
Command
combinations:
RIx…
Select I/O RAM location x (0x2000 offset is
automatically added)
Rx… Select internal SFR at address x
Ra???...
Read consecutive SFR registers in Decimal, starting at
address a
Ra$$$...
Read consecutive registers in Hex, starting at address
a
Ra=n=m…
Set values of consecutive registers to n and m starting
at address a
Example: RI2$$$ Read DIO RAM registers 2, 3, and 4 in Hex.
DIO or Configuration RAM space is the address range 0x2000 to 0x20FF. This RAM contains registers used for configuring
basic hardware and functional properties of the 71M6534/6534H and is organized in bytes (8 bits). The 0x2000 offset is
automatically added when the command RI is typed.
The SFRs (special function registers) are located in internal RAM of the 80515 core, starting at address 0x80.
Description: Allows user to enable read and write to EEPROM.
Usage: EE [option] [arguments]
Command
combinations:
EERa.b Read EEPROM at address 'a' for 'b' bytes.
EESabc..xyz Write characters to buffer (sets Write length)
EETa Transmit buffer to EEPROM at address 'a'.
EEWa.b...z Write values to buffer
CLS Saves calibration to EEPROM
Example:
Due to buffer size restrictions, the maximum number of bytes handled by the EEPROM command is
0x40.
EECn EEPROM Access (1 Æ Enable, 0 Æ Disable)
EEShello
EET$0210
Writes 'hello' to buffer, then transmits buffer to
EEPROM starting at address 0x210.
Auxiliary Commands:
Typing a comma (“,”) repeats the command issued from the previous command line. This is very helpful when
examining the value at a certain address over time, such as the CE DRAM address for the temperature (0x40).
The slash (“/”) is useful to separate comments from commands when sending macro text files via the serial
interface. All characters in a line after the slash are ignored.
Commands controlling the CE, TMUX and the RTM:
C COMPUTE ENGINE
CONTROL
Description: Allows the user to enable and configure the compute engine.
Usage: C [option] [argument]
Command
combinations:
CTn
CREn RTM output control (1 Æ Enable, 0 Æ Disable)
CRSa.b.c.d Selects CE addresses for RTM output
Example: CE0
CT3 Selects the VBIAS signal for the TMUX output pin
CEn
Comment
Compute Engine Enable (1 Æ Enable,
0 Æ Disable)
Select input n for TMUX output pin. n is interpreted as
a decimal number.
Disables CE, followed by “CE OFF” display on LCD.
The Demo Code will reset if the WD timer is enabled.
Commands controlling the Auto-Calibration Function:
CL AUTO-CALIBRATION
Comment
CONTROL
Description: Allows the user to initiate auto-calibration and to store calibration values.
Usage: CL [option]
Command
combinations:
CLB
Begin auto-calibration. Prior to auto-calibration, the
calibration coefficients are automatically restored from
flash memory.
CLS
Save calibration coefficients to EEPROM starting at
address 0x0004
CLR Restore calibration coefficients from EEPROM
CLD Restore coefficients from flash memory
Example: CLB Starts auto-calibration and saves data automatically.
Before starting the auto-calibration process, target values for voltage, duration and current must be entered in
MPU RAM (see section 1.9.5), and the target voltage and current must be applied constantly during calibration.
Calibration factors can be saved to EEPROM using the CLS command.
Commands controlling the Pulse Counter Function
CP PULSE-COUNT CONTROL Comment
Description: Allows the user to control the pulse count functions.
Usage: CP [option]
Command
combinations:
CPA
Start pulse counting for time period defined with the
CPD command. Pulse counts will display with
commands M15.2, M16.2
CPC
Clear the absolute pulse count displays (shown with
commands M15.1, M16.1)
CPDn
Set time window for pulse counters to n seconds, n is
interpreted as a decimal number.
Example: CPD60 Set time window to 60 seconds.
Pulse counts accumulated over a time window defined by the CPD command will be displayed by M15.2 or
M16.2 after
Commands M15.1 and M16.1 will display the absolute
zero with the CPC command (or the XRAM write )1=2).
Commands M15.2 and M16.2 will display the number of pulses counted during the interval defined by the CPD
command. These displays are reset only after a new reading, as initiated by the CPA command.
the defined time has expired.
pulse count for the W and VAR outputs. These displays are reset to
Commands for Identification and Information:
I INFORMATION MESSAGES Comment
Description: Allows user to read information messages.
Usage: I Displays complete version information
The I command is mainly used to identify the revisions of Demo Code and the contained CE code.
Commands for Controlling the RMS Values Shown on the LCD Display:
Description: Allows user to select meter RMS display for voltage or current.
Usage: MR [option]. [option]
Command
combinations:
MR2. [phase] Displays instantaneous RMS voltage
Example: MR1.3 Displays phase C RMS current.
Phase 4 is the measured neutral current.
No error message is issued when an invalid parameter is entered, e.g. MR1.8.
Commands for Controlling the MPU Power Save Mode:
PS POWER SAVE MODE Comment
Description: Enters power save mode
Usage: PS
Return to normal mode is achieved by resetting the MPU (Z command).
Commands for Controlling the RTC:
MR1. [phase] Displays instantaneous RMS current
Disables CE, ADC, CKOUT, ECK, RTM, SSI, TMUX
VREF, and serial port, sets MPU clock to 38.4KHz.
RT REAL TIME CLOCK
CONTROL
Description: Allows the user to read and set the real time clock.
Usage: RT [option] [value] … [value]
Command
combinations:
RTR Read Real Time Clock.
RTTh.m.s Time of day: (hr, min, sec).
RTAs.t
Example: RTD05.03.17.5 Programs the RTC to Thursday, 3/17/2005
RTA1.+1234 Speeds up the RTC by 1234 PPB.
The “Military Time Format” is used for the RTC, i.e. 15:00 is 3:00 PM.
RTDy.m.d.w: Day of week
Comment
(year, month, day, weekday [1 = Sunday]). If the
weekday is omitted it is set automatically.
Real Time Adjust: (start, trim). Allows trimming of the
RTC.
If s > 0, the speed of the clock will be adjusted by ‘t’
parts per billion (PPB). If the CE is on, the value
entered with 't' will be changing with temperature, based
on Y_CAL, Y_CALC and Y_CALC2.
Commands for Accessing the Trim Control Registers:
T TRIM CONTROL Comment
Description: Allows user to read trim and fuse values.
Usage: T [option]
Command
T4 Read fuse 4 (TRIMM).
combinations:
T5 Read fuse 5 (TRIMBGA)
T6 Read fuse 6 (TRIMBGB).
Example: T4 Reads the TRIMM fuse.
These commands are only accessible for the 71M6534H (0.1%) parts. When used on a 71M6534
(0.5%) part, the results will be displayed as zero.
Reset Commands:
W RESET Comment
Description: Watchdog control
Usage: W
Halts the Demo Code program, thus suppressing the
triggering of the hardware watchdog timer. This will
cause a reset, if the watchdog timer is enabled.
1.8.2 USING THE DEMO BOARD FOR ENERGY MEASUREMENTS
The 71M6534/6534H Demo Board was designed for use with current transformers (CT).
The Demo Board may immediately be used with current transformers having 2,000:1 winding ratio and is
programmed for a Kh factor of 3.2 and (see Section 1.8.4 for adjusting the Demo Board for transformers with
different turns ratio).
Once, voltage is applied and load current is flowing, the red LED D5 will flash each time an energy sum of 3.2
Wh is collected. The LCD display will show the accumulated energy in Wh when set to display mode 3
(command
Similarly, the red LED D6 will flash each time an energy sum of 3.2 VARh is collected. The LCD display will
show the accumulated energy in VARh when set to display mode 5 (command
>M3 via the serial interface).
>M5 via the serial interface).
1.8.3 ADJUSTING THE KH FACTOR FOR THE DEMO BOARD
The 71M6534/6534H Demo Board is shipped with a pre-programmed scaling factor Kh of 3.2, i.e. 3.2Wh per
pulse. In order to be used with a calibrated load or a meter calibration system, the board should be connected
to the AC power source using the spade terminals on the bottom of the board. The current transformers should
be connected to the dual-pin headers on the bottom of the board. The connection is the same for single-ended
or differential mode. See chapter 3.1 for proper jumper settings.
The Kh value can be derived by reading the values for IMAX and VMAX (i.e. the RMS current and voltage
values that correspond to the 250mV maximum input signal to the IC), and inserting them in the following
equation for Kh:
Kh = IMAX * VMAX * 66.1782 / (In_8 * WRATE * N
The small deviation between the adjusted Kh of 3.19902 and the ideal Kh of 3.2 is covered by calibration. The
default values used for the 71M6534/6534H Demo Board are:
Explanation of factors used in the Kh calculation:
* X) = 3.19902 Wh/pulse.
ACC
WRATE: The factor input by the user to determine Kh
IMAX: The current input scaling factor, i.e. the input current generating 176.8mVrms at the IA/IB/IC
input pins of the 71M6534. 176.8mV rms is equivalent to 250mV peak.
VMAX: The voltage input scaling factor, i.e. the voltage generating 176.8mVrms at the VA/VB/VC
input pins of the 71M6534
In_8: The setting for the additional ADC gain (8 or 1) determined by the CE register IA_SHUNT
: The number of samples per accumulation interval, i.e. PRE_SAMPS *SUM_CYCLES
N
ACC
X: The pulse rate control factor determined by the CE registers
PULSE_SLOW and
PULSE_FAST
Almost any desired Kh factor can be selected for the Demo Board by resolving the formula for WRATE:
WRATE = (IMAX * VMAX * 66.1782) / (Kh * In_8 * N
For the Kh of 3.2Wh, the value 171 (decimal) should be entered for
command
1.8.4 ADJUSTING THE DEMO BOARDS TO DIFFERENT CURRENT TRANSFORMERS
The Demo Board is prepared for use with 2000:1 current transformers (CTs). This means that for the unmodified Demo Board, 208A on the primary side at 2000:1 ratio result in 104mA on the secondary side, causing
176.8mV at the 1.7Ω resistor pairs R24/R25, R36/R37, R56/R57 (2 x 3.4Ω in parallel).
In general, when
IMAX is applied to the primary side of the CT, the voltage V
at the IA, IB, or IC input of the
in
71M6534 IC is determined by the following formula:
= R * I = R * IMAX/N
V
in
where N = transformer winding ratio, R = resistor on the secondary side
If, for example, if the current corresponding to
IMAX = 208A is applied to a CT with a 2500:1 ratio, only 83.2mA
will be generated on the secondary side, causing only 141mV of voltage drop.
The steps required to adapt a 71M6534 Demo Board to a transformer with a winding ratio of 2500:1 are outlined
below:
1) The formula R
= 176.8mV/(IMAX/N) is applied to calculate the new resistor R
x
. We calculate Rx to 2.115Ω
x
2) Changing the resistors R24/R25, R106/R107to a combined resistance of 2.115Ω (for each pair) will
cause the desired voltage drop of 176.8mV appearing at the IA, IB, or IC inputs of the 71M6534 IC.
Simply scaling IMAX is not recommended, since peak voltages at the 71M6534 inputs should always be in the
range of 0 through ±250mV (equivalent to 176.8mV rms). If a CT with a much lower winding ratio than 1:2,000
is used, higher secondary currents will result, causing excessive voltages at the 71M6534 inputs. Conversely,
CTs with much higher ratio will tend to decrease the useable signal voltage range at the 71M6534 inputs and
may thus decrease resolution.
1.8.5 ADJUSTING THE DEMO BOARDS TO DIFFERENT VOLTAGE DIVIDERS
The 71M6534 Demo Board comes equipped with its own network of resistor dividers for voltage measurement
mounted on the PCB. The resistor values are 2.5477MΩ (for channel A, R15-R21, R26-R31 combined) and
750Ω (R32), resulting in a ratio (R
600V. A large value for VMAX has been selected in order to have headroom for overvoltages. This choice need
not be of concern, since the ADC in the 71M6534 has enough resolution, even when operating at 120Vrms.
If a different set of voltage dividers or an external voltage transformer (potential transformer) is to be used,
scaling techniques similar to those applied for the current transformer should be used.
In the following example we assume that the line voltage is not applied to the resistor divider for VA formed by
R15-R21, R26-R31, and R32, but to a voltage transformer with a ratio N of 20:1, followed by a simple resistor
divider. We also assume that we want to maintain the value for VMAX at 600V to provide headroom for large
voltage excursions.
) of 1:3,393.933. This means that VMAX equals 176.78mV*3,393.933 =
R
When applying
V
is scaled by the resistor divider ratio RR. When the input voltage to the voltage channel of the 71M6534 is the
s
desired 176.8mV, V
Resolving for R
VMAX at the primary side of the transformer, the secondary voltage V
If potential transformers (PTs) are used instead of resistor dividers, phase shifts will be introduced that will require negative phase angle compensation. TERIDIAN Demo Code accepts negative calibration factors for
phase.
1.9 CALIBRATION PARAMETERS
1.9.1 GENERAL CALIBRATION PROCEDURE
Any calibration method can be used with the 71M6534/6534H chips. This Demo Board User’s Manual presents
calibration methods with three or five measurements as recommended methods, because they work with most
manual calibration systems based on counting "pulses" (emitted by LEDs on the meter).
Naturally, a meter in mass production will be equipped with special calibration code offering capabilities beyond
those of the Demo Code. It is basically possible to calibrate using voltage and current readings, with or without
pulses involved. For this purpose, the MPU Demo Code can be modified to display averaged voltage and
current values (as opposed to momentary values). Also, automated calibration equipment can communicate
with the Demo Boards via the serial interface and extract voltage and current readings. This is possible even
with the unmodified Demo Code.
A complete calibration procedure is given in section 2.2 of this manual.
Regardless of the calibration procedure used, parameters (calibration factors) will result that will have to be
applied to the 71M6534/6534H chip in order to make the chip apply the modified gains and phase shifts
necessary for accurate operation. Table 1-5 shows the names of the calibration factors, their function, and their
location in the CE RAM.
Again, the command line interface can be used to store the calibration factors in their respective CE RAM
addresses. For example, the command
>]10=+16302
stores the decimal value 16302 in the CE RAM location controlling the gain of the current channel (CAL_IA) for
phase A.
The command
>]11=4005
stores the hexadecimal value 0x4005 (decimal 16389) in the CE RAM location controlling the gain of the
Table 1-5: CE RAM Locations for Calibration Constants
Description
Adjusts the gain of the voltage channels. +16384 is the typical value. The
gain is directly proportional to the CAL parameter. Allowed range is 0 to
32767. If the gain is 1% slow, CAL should be increased by 1%.
Adjusts the gain of the current channels. +16384 is the typical value. The
gain is directly proportional to the CAL parameter. Allowed range is 0 to
32767. If the gain is 1% slow, CAL should be increased by 1%.
This constant controls the CT phase compensation. No compensation
occurs when PHADJ=0. As PHADJ is increased, more compensation is
introduced.
Page 28
71M6534H Demo Board User’s Manual
1.9.2 CALIBRATION MACRO FILE
The macro file in Figure 1-6 contains a sequence of the serial interface commands. It is a simple text file and
can be created with Notepad or an equivalent ASCII editor program. The file is executed with HyperTerminal’s
It is possible to send the calibration macro file to the 71M6534H for “temporary” calibration. This will temporarily
change the CE data values. Upon power up, these values are refreshed back to the default values stored in
flash memory. Thus, until the flash memory is updated, the macro file must be loaded each time the part is
powered up. The macro file is run by sending it with the transfer
Æ
Use the Transfer
Send Text File command!
Æ
send text file procedure of HyperTerminal.
1.9.3 UPDATING THE 6534_DEMO.HEX FILE
The d_merge program updates the 6534_demo.hex file with the values contained in the macro file. This
program is executed from a DOS command line window. Executing the d_merge program with no arguments
will display the syntax description. To merge macro.txt and old_6534_demo.hex into new_6534_demo.hex, use
the command:
The new hex file can be written to the 71M6534H through the ICE port using the ADM51 in-circuit emulator.
This step makes the calibration to the meter permanent.
1.9.4 UPDATING CALIBRATION DATA IN FLASH MEMORY WITHOUT USING THE
ICE OR A PROGRAMMER
It is possible to make data permanent that had been entered temporarily into the CE RAM. The transfer to
EEPROM memory is done using the following serial interface command:
>]U
Thus, after transferring calibration data with manual serial interface commands or with a macro file, all that has
to be done is invoking the U command.
After reset, calibration data is copied from the EEPROM, if present. Otherwise, calibration
data is copied from the flash memory. Writing 0xFF into the first few bytes of the EEPROM
deactivates any calibration data previously stored to the EEPROM.
The Demo Code is able to perform a single-point fast automatic calibration, as described in section 2.2.3. This
calibration is performed for channels A, B, and C only, not for the NEUTRAL channel. The steps required for the
calibration are:
1. Enter operating values for voltage and current in I/O RAM. The voltage is entered at MPU address
0x10 (e.g. with the command
command )11=+300 for 30A) and the duration measured in accumulation intervals is entered at 0x0F.
2. The operating voltage and current defined in step 1 must be applied at a zero degree phase angle to
the meter (Demo Board).
3. The CLB (Begin Calibration) command must be entered via the serial interface. The operating voltage
and current must be maintained accurately while the calibration is being performed.
4. The calibration procedure will automatically reset CE addresses used to store the calibration factors to
their default values prior to starting the calibration. Automatic calibration also reads the chip
temperature and enters it at the proper CE location temperature compensation.
5. CE addresses 0x10 to 0x15 and 0x18 to 0x1A will now show the new values determined by the autocalibration procedure. These values can be stored in EEPROM by issuing the CLS command.
Tip: Current transformers of a given type usually have very similar phase angle for identical operating
conditions. If the phase angle is accurately determined for one current transformer, the corresponding
phase adjustment coefficient PHADJ_X can be entered for all calibrated units.
)10=+2400 for 240V), the current is entered at 0x11 (e.g. with the
1.9.6 LOADING THE 6534_DEMO.HEX FILE INTO THE DEMO BOARD
Hardware Interface for Programming: The 71M6534/6534H IC provides an interface for loading code into the
internal flash memory. This interface consists of the following signals:
E_RXTX (data), E_TCLK (clock), E_RST (reset), ICE_E (ICE enable)
These signals, along with V3P3D and GND are available on the emulator header J14. Production meters may
be equipped with much simpler programming connectors, e.g. a 6x1 header.
Programming of the flash memory requires a specific in-circuit emulator, the ADM51 by Signum Systems
(http//www.signumsystems.com) or the Flash Programmer (TFP-2) provided by TERIDIAN Semiconductor.
Chips may also be programmed before they are soldered to the board. The TGP1 gang programmer suitable for
high-volume production is available from TERIDIAN. It must be equipped with LQFP-120 sockets.
In-Circuit Emulator: If firmware exists in the 71M6534/6534H flash memory; it has to be erased before loading
a new file into memory. Figure 1-7 and Figure 1-8 show the emulator software active. In order to erase the flash
memory, the RESET button of the emulator software has to be clicked followed by the ERASE button ().
Once the flash memory is erased, the new file can be loaded using the commands File followed by Load. The
dialog box shown in Figure 1-8 will then appear making it possible to select the file to be loaded by clicking the
Browse button. Once the file is selected, pressing the OK button will load the file into the flash memory of the
71M6534/6534H IC.
At this point, the emulator probe (cable) can be removed. Once the 71M6534/6534H IC is reset using the reset
button on the Demo Board, the new code starts executing.
Flash Programmer Module (TFP-2): Follow the instructions given in the User Manual for the TFP-2.
1.9.7 THE PROGRAMMING INTERFACE OF THE 71M6534/6534H
Flash Downloader/ICE Interface Signals
The signals listed in Table 1-6 are necessary for communication between the Flash Downloader or ICE and the
71M6534/6534H.
SignalDirectionFunction
E_TCLK Output from 71M6534/6534H Data clock
E_RXTX Bi-directional Data input/output
E_RST Input to the 71M6534/6534H Flash Downloader Reset (active low)
ICE_E Input to the 71M6534/6534H
Table 1-6: Flash Programming Interface Signals
The other signals accessible at the emulator interface connector J14 (E_TBUS[0]-E_TBUS[3],
E_ISYNC) can be used for an optional trace debugger.
The E_RST signal should only be driven by the Flash Downloader when enabling these interface signals. The
Flash Downloader must release E_RST at all other times.
Enable signal for the ICE interface. Must
be high for all emulation or programming
operations.
The Demo Board is shipped preloaded with Demo Code revision 4.6q or later in the 71M6534 or 71M6534H
chip. The code revision can easily be verified by entering the command >i via the serial interface (see section
1.8.1). Check with your local TERIDIAN representative or FAE for the latest revision.
The Demo Code offers the following features:
• It provides basic metering functions such as pulse generation, display of accumulated energy,
frequency, date/time, and enables the user to evaluate the parameters of the metering IC such as
accuracy, harmonic performance, etc.
• It maintains and provides access to basic household functions such as real-time clock (RTC).
• It provides access to control and display functions via the serial interface, enabling the user to view
and modify a variety of meter parameters such as Kh, calibration coefficients, temperature
compensation etc.
• It provides libraries for access of low-level IC functions to serve as building blocks for code
development.
A detailed description of the Demo Code can be found in the Software User’s Guide (SUG). In addition, the
comments contained in the library provided with the Demo Kit can serve as useful documentation.
The Software User’s Guide contains the following information:
In the Demo Code, certain MPU XRAM parameters have been given fixed addresses in order to permit easy
external access. These variables can be read via the serial interface, as described in section 1.7.1, with the )n$
command and written with the )n=xx command where n is the word address. Note that accumulation variables
are 64 bits long and are accessed with )n$$ (read) and )n=hh=ll (write) in the case of accumulation variables.
Default values are the values assigned by the Demo Code on start-up.
All MPU Input Parameters are loaded by the MPU at startup and should not need adjustment during meter
calibration.
MPU Input Parameters for Metering
XRAM Word
Address
0x00
0x01 0
0x02 764569660
0x03 275652520
Default
Value
433199
Name Description
For each element, if WSUM_X or VARSUM_X of that element
exceeds WCREEP_THR, the sample values for that element are
not zeroed. Otherwise, the accumulators for Wh, VARh, and VAh
are not updated and the instantaneous value of IRMS for that
element is zeroed.
ITHRSHLDA
The default value is equivalent to 0.08A. Setting
zero disables creep control.
Bit 0: Sets VA calculation mode.
CONFIG
PK_VTHR
0: V
Bit 1: Clears accumulators for Wh, VARh, and VAh. This bit
need not be reset.
When the voltage exceeds this value, bit 5 in the MPU status
word is set, and the MPU might choose to log a warning. Event
logs are not implemented in Demo Code.
The default value is equivalent to 20% above 240Vrms.
When the current exceeds this value, bit 6 in the MPU status
word is set, and the MPU might choose to log a warning. Event
logs are not implemented in Demo Code.
RTC adjust, 100ppb. Read only at reset in demo code.
RTC adjust, linear by temperature, 10ppb*ΔT, in 0.1˚C. Provided
for optional code.
RTC adjust, squared by temperature, 1ppb*ΔT2, in 0.1˚C.
Provided for optional code.
RMS
.
Page 34
71M6534H Demo Board User’s Manual
XRAM Word
Address
0x07 0
0x08 4
0x09 6000
0x0A 2080
0x0B 0
0x0C 0
0x0D
0x0E
0x0F 2
0x10 2400
0x11 300
0x12 75087832
0x13 50
0x14 --
0x15 --
0x16 --
Default
Value
Name Description
This address contains a number that points to the selected pulse
PULSEW_SRC
PULSER_SRC
VMAX
IMAX
PPMC
PPMC2
PULSEX_SRC
PULSEY_SRC
SCAL
VCAL
ICAL
VTHRSHLD
PULSE_WIDTH
TEMP_NOM
NCOUNT
source for the Wh output. Selectable pulse sources are listed in
Table 1-8.
This address contains a number that points to the selected pulse
source for the VARh output. Selectable pulse sources are listed
in Table 1-8.
The nominal external RMS voltage that corresponds to 250mV
peak at the ADC input. The meter uses this value to convert
internal quantities to external. LSB=0.1V
The nominal external RMS current that corresponds to 250mV
peak at the ADC input for channel A. The meter uses this value
to convert internal quantities to external. LSB=0.1A
PPM/C*26.84. Linear temperature compensation. A positive
value will cause the meter to run faster when hot. This is applied
to both V and I and will therefore have a double effect on
products.
PPM/C2*1374. Square law compensation. A positive value will
cause the meter to run faster when hot. This is applied to both V
and I and will therefore have a double effect on products.
This address contains a number that points to the selected pulse
source for the XPULSE output. Selectable pulse sources are
listed in Table 1-8.
This address contains a number that points to the selected pulse
source for the YPULSE output. Selectable pulse sources are
listed in Table 1-8.
Count of accumulation intervals for auto-calibration.
Applied voltage for auto-calibration. LSB = 0.1V rms of AC signal
applied to all elements during calibration.
Applied current for auto-calibration. LSB = 0.1A rms of AC signal
applied to all elements during calibration. Power factor must be
1.
Voltage to be used for creep detection, measuring frequency,
zero crossing, etc.
Pulse width in µs = (2*PulseWidth + 1)*397. 0xFF disables this
feature. Takes effect only at start-up.
Nominal (reference) temperature, i.e. the temperature at which
calibration occurred. LSB = Units of TEMP_RAW, from CE.
The count of accumulation intervals that the neutral current must
be above
bit.
The neutral current threshold.
INTHRSHLD
INTHRSHLD required to set the “excess neutral” error
Any of the values listed in Table 1-8 can be selected for as a source for PULSEW and PULSER. The
designation “source_I” refers to values imported by the consumer; “source_E” refers to energy exported by the
consumer (energy generation).
Number Pulse Source Description Number Pulse Source Description
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
WSUM
W0SUM
W1SUM
W2SUM
VARSUM
VAR0SUM
VAR1SUM
VAR2SUM
I0SQSUM
I1SQSUM
I2SQSUM
INSQSUM
V0SQSUM
V1SQSUM
V2SQSUM
VASUM
VA0SUM
VA1SUM
Default for
PULSEW_SRC
Default for
PULSER_SRC
24
25
26
27
28
29
30
31
32
33
34
18
19
20
21
22
23
VA2SUM
WSUM_I
W0SUM_I
W1SUM_I
W2SUM_I
VARSUM_I
VAR0SUM_I
VAR1SUM_I
VAR1SUM_I
WSUM_E
W0SUM_E
W1SUM_E
W2SUM_E
VARSUM_E
VAR0SUM_E
VAR1SUM_E
VAR2SUM_E
Sum of imported real energy
Imported real energy on element
A
Imported real energy on element
B
Imported real energy on element
C
Sum of imported reactive energy
Imported reactive energy on
element A
Imported reactive energy on
element B
Imported reactive energy on
element C
Sum of exported real energy
Exported real energy on element
A
Exported real energy on element
B
Exported real energy on element
C
Sum of exported reactive energy
Exported reactive energy on
element A
Exported reactive energy on
element B
Exported reactive energy on
element C
Table 1-8: Selectable Pulse Sources
MPU INSTANTANEOUS OUTPUT VARIABLES
The Demo Code processes CE outputs after each accumulation interval. It calculates instantaneous values
such as VRMS, IRMS, W and VA as well as accumulated values such as Wh, VARh, and VAh. Table 1-9 lists
the calculated instantaneous values.
The MPU maintains the status of certain meter and I/O related variables in the Status Word. The Status Word is
located at address 0x21. The bit assignments are listed in Table 1-10.
Name DESCRIPTION
Vrms_A
Vrms_B*
Vrms_C
Irms_A
Irms_B
Irms_C
Irms_N
Table 1-9: MPU Instantaneous Output Variables
V
from element 0, 1, 2.
rms
I
from element 0, 1, 2 or neutral
rms
Deviation from Calibration (reference) temperature.
LSB = 0.1 0C.
Frequency of voltage selected by CE input. If the selected voltage is below
the sag threshold, Frequency=0. LSB Hz
Indicates that all elements are in creep mode. The CE’s pulse variables
CREEP
MINVC
PB_PRESS
SPURIOUS
MINVB
MAXVA
MAXVB
MAXVC
MINVA
WD_DETECT
MAXIN
MAXIA
MAXIB
MAXIC
MINT
will be “jammed” with a constant value on every accumulation interval to
prevent spurious pulses. Note that creep mode therefore halts pulsing
even when the CE’s pulse mode is “internal”.
Element C has a voltage below VThrshld. This forces that element into
creep mode.
A push button press was recorded at the most recent reset or wake from a
battery mode.
An unexpected interrupt was detected.
Element B has a voltage below VThrshld. This forces that element into
creep mode.
Element A has a voltage above VThrshldP.
Element B has a voltage above VThrshldP.
Element C has a voltage above VThrshldP.
Element A has a voltage below VThrshld. This forces that element into
creep mode. It also forces the frequency and main edge count to zero.
The most recent reset was a watchdog reset. This usually indicates a
software error.
The neutral current is over INThrshld. In a real meter this could indicate
faulty distribution or tampering.
The current of element A is over IThrshld. In a real meter this could
indicate overload.
The current of element B is over IThrshld. In a real meter this could
indicate overload.
The current of element C is over IThrshld. In a real meter this could
indicate overload.
The temperature is below the minimum, -40C, established in option_gbl.h.
This is not very accurate in the demo code, because the calibration
temperature is usually poorly controlled, and the default temp_nom is
usually many degrees off. –40C is the minimum recommended operating
temperature of the chip.
Page 37
71M6534H Demo Board User’s Manual
Status
Word Bit
15
16
17
18
19
20
21
22
23
25
26
27
28
31
Name DESCRIPTION
The temperature is above the maximum, 85C, established in option_gbl.h.
This is not very accurate in the demo code, because the calibration
MAXT
BATTERY_BAD
CLOCK_TAMPER
CAL_BAD
CLOCK_UNSET
POWER_BAD
GNDNEUTRAL
TAMPER
SOFTWARE
SAGA
SAGB
SAGC‡
F0_CE
ONE_SEC
temperature is usually poorly controlled, and the default temp_nom is
usually many degrees off. 85C is the maximum recommended operating
temperature of the chip.
Just after midnight, the demo code sets this bit if VBat < VBatMin. The
read is infrequent to reduce battery loading to very low values. When the
battery voltage is being displayed, the read occurs every second, for up to
20 seconds.
Clock set to a new value more than two hours from the previous value.
Set after reset when the read of the calibration data has a bad longitudinal
redundancy check or read failure.
Set when the clock’s current reading is A) More than a year after the
previously saved reading, or B) Earlier than the previously saved reading,
or C) There is no previously saved reading.
Set after reset when the read of the power register data has a bad
longitudinal redundancy check or read failure in both copies. Two copies
are used because a power failure can occur while one of the copies is
being updated.
Indicates that a grounded neutral was detected.
Tamper was detected †**
A software defect was detected.
Element A has a sag condition. This bit is set in real time by the CE and
detected by the ce_busy interrupt (ce_busy_isr() in ce.c) within 8 sample
intervals, about 2.6ms. A transition from normal operation to SAGA
causes the power registers to be saved, because the demo PCB is
powered from element A.
Element B has a sag condition. This bit is set in real time by the CE and
detected by the ce_busy interrupt (ce_busy_isr() in ce.c) within 8 sample
intervals, about 2.6ms.
Element C has a sag condition. See the description of the other sag bits.
A square wave at the line frequency, with a jitter of up to 8 sample
intervals, about 2.6ms.
Changes each accumulation interval.
Accumulation values are accumulated from XFER cycle to XFER cycle (see Table 1-11). They are organized as
two 32-bit registers. The first register stores the decimal number displayed on the LCD. For example, if the LCD
shows “001.004”, the value in the first register is 1004. This register wraps around after the value 999999 is
reached. The second register holds fractions of the accumulated energy, with an LSB of
9.4045*10
-13
*VMAX*IMAX*In_8 Wh.
The MPU accumulation registers always hold positive values.
The CLI commands with two question marks, e.g. )39?? should be used to read the variables.
XRAM
Word
Name Description
Address
0x2C
0x44
0x34
0x4C
0x3C
0x2E
0x46
0x36
0x4E
0x3E
0x30
0x48
0x38
0x50
0x40
0x32
0x4A
0x3A
0x52
0x42
Whi
Whe
VARhi
VARhe
VAh
Whi_A
Whe_A
VARhi_A
VARhe_A
VAh_A
Whi_B
Whe_B
VARhi_B
VARhe_B
Vah_B
Whi_C
Whe_C
VARhi_C
VARhe_C
VAh_C
Total Watt hours consumed (imported)
Total Watt hours generated (exported)
Total VAR hours consumed
Total VAR hours generated (inverse consumed)
Total VA hours
Total Watt hours consumed through element 0
Total Watt hours generated (inverse consumed) through element 0
Total VAR hours consumed through element 0
Total VAR hours generated (inverse consumed) through element 0
Total VA hours in element 0
Total Watt hours consumed through element 1
Total Watt hours generated (inverse consumed) through element 1
Total VAR hours consumed through element 1
Total VAR hours generated (inverse consumed) through element 1
Total VA hours in element 1
Total Watt hours consumed through element 2
Total Watt hours generated (inverse consumed) through element 2
Total VAR hours consumed through element 2
Total VAR hours generated (inverse consumed) through element 2
1.10.3 USEFUL CLI COMMANDS INVOLVING THE MPU AND CE
Table 1-12 shows a few essential commands involving MPU data memory.
Command Description
)1=2 Clears the accumulators for Wh, VARh, and VAh by setting bit 1 of the CONFIG register.
)A=+2080 Applies the value 208A to the IMAX register
)9=+6000 Applies the value 600V to the VMAX register
)2F?? Displays the total accumulated imported Wh energy
MR2.1 Displays the current RMS voltage in phase A
MR1.2 Displays the current RMS current in phase B
RI5=26
RI5=6 Re-enables the emulator clock by clearing bit 5 in I/O RAM address 0x05.
]U
Disables the emulator clock by setting bit 5 in I/O RAM address 0x05. This command will disable
emulator/programmer access to the 71M6534.
Stores the current CE RAM variables in EEPROM memory. The variables stored in flash memory
will be applied by the MPU at the next reset or power-up if no valid data is available from the
EEPROM.
Table 1-12: CLI Commands for MPU Data Memory
1.11 USING THE ICE (IN-CIRCUIT EMULATOR)
The ADM51 ICE by Signum Systems (www.signum.com) can be used to erase the flash memory, load code
and debug firmware. Before using the ICE, the latest WEMU51 application program should be downloaded from
the Signum website and installed.
It is very important to create a new project and selecting the TERIDI AN 71M6534 IC in the project d ialog
when starting a 6534-based design. Using the ICE with project settings co pied from a 6521 or 651X designs will lead to erratic results.
For details on installing the WEMU51 program and on creating a project, see the SUG 653X (Software Users’
Guide).
A typical meter has phase and gain errors as shown by φS, AXI, and AXV in Figure 2-1. Following the typical
meter convention of current phase being in the lag direction, the small amount of phase lead in a typical current
sensor is represented as -φ
They include errors in voltage attenuators, current sensors, and in ADC gains. In other words, no errors are
made in the ‘input’ or ‘meter’ boxes.
. The errors shown in Figure 2-1 represent the sum of all gain and phase errors.
S
INPUT
I
L
is phase lag
L
V
−
is phase lead
S
ERRORS
S
XI
XV
RROR
METER
Π
≡
CTUAL
I
RMS
W
V
RMS
−
DEAL
DEAL
Figure 2-1: Watt Meter with Gain and Phase Errors.
During the calibration phase, we measure errors and then introduce correction factors to nullify their effect. With
three unknowns to determine, we must make at least three measurements. If we make more measurements, we
can average the results.
A fast method of calibration will also be introduced in section 2.1.3.
2.1.1 CALIBRATION WITH THREE MEASUREMENTS
The simplest calibration method is to make three measurements. Typically, a voltage measurement and two
Watt-hour (Wh) measurements are made. A voltage display can be obtained for test purposes via the command
>MR2.1 in the serial interface.
Let’s say the voltage measurement has the error E
where E
percentage values. They should be zero when the meter is accurate and negative when the meter runs slow.
The fundamental frequency is f
, AXI, and φS errors, we calculate the new calibration voltage gain coefficient from the
XV
VCAL
A
XV
S
⎡
20
⎢
9
⎛
−
1
⎜
tan
φ
⎣
And we calculate the new calibration current gain coefficient, including compensation for a slight gain increase
in the phase calibration circuit.
_
ICAL
NEW
=
ICAL
A
XI
2.1.3 FAST CALIBRATION
The calibration methods described so far require that the calibration system sequentially applies currents at
various phase angles. A simpler approach is based on the calibration system applying a constant voltage and
current at exactly zero degrees phase angle. This approach also requires much simpler mathematical
operations.
Before starting the calibration process, the voltage and current calibration factors are set to unity (16384) and
the phase compensation factors are set to zero.
During the calibration process, the meter measures for a given constant time, usually 30 seconds, and is then
examined for its accumulated Wh and VARh energy values. Access to the internal accumulation registers is
necessary for this method of calibration. The phase angle introduced by the voltage and/or current sensors is
then simply determined by:
30060
EE
1800
, the desired phase lag:
[]
S
0
1
+
⎟
⎟
)2)(60tan(
++
⎠
−−
929
−−−+
−−
[]
S
9
−−−−
Tf
πφ
0
πφπ
1_
9
Tf
π
0
⎤
)2cos()21(2)21(1)tan(
−−+
⎥
)2cos()21(1)tan()2sin()21(
TfTf
0
⎦
92020
−−−
−−
−+−−
π
29
)21()2cos()21(21
))2cos()21(222(2
TfPHADJPHADJ
0
⎞
)(
EE
−
CAL_VA is determined by comparing the applied voltage to the measured voltage, or:
CAL_IA is determined by comparing applied real energy with the measured apparent energy (and
compensating for the change applied to
The derivation of these formulae is shown in the Appendix.
Calibration requires that a calibration system is used, i.e. equipment that applies accurate voltage, load current
and load angle to the unit being calibrated, while measuring the response from the unit being calibrated in a
repeatable way. By repeatable we mean that the calibration system is synchronized to the meter being
calibrated. Best results are achieved when the first pulse from the meter opens the measurement window of the
calibration system. This mode of operation is opposed to a calibrator that opens the measurement window at
random time and that therefore may or may not catch certain pulses emitted by the meter.
It is essential for a valid meter calibration to have the voltage stabilized a few seconds
before the current is applied. This enables the Demo Code to initialize the 71M6534/6534H
and to stabilize the PLLs and filters in the CE. This method of operation is consistent with
meter applications in the field as well as with metering standards.
Each meter p
with either three or five measurements. The PHADJ equations apply only when a current transformer is used for
the phase in question. Note that positive load angles correspond to lagging current (see Figure 2-2).
hase must be calibrated individually. The procedures below show how to calibrate a meter phase
During calibration of any phase, a stable mains voltage has to be present on phase A
. This
enables the CE processing mechanism of the 71M6534/6534H necessar y to obtain a stable
calibration.
Voltage
Current lags
voltage
(inductive
Positive
direction
+60°
)
Current
-60°
Current leads
voltage
(capacitive
Using EnergyGenerating Energy
)
Voltage
Figure 2-2: Phase Angle Definitions
The calibration procedures descacing the voltage and current sensors
ribed below should be followed after interf
to the 71M6534/6534H chip. When properly interfaced, the V3P3 power supply is connected to the meter
neutral and is the DC reference for each input. Each voltage and current waveform, as seen by the
71M6534/6534H, is scaled to be less than 250mV (peak).
2.2.1 CALIBRATION PROCEDURE WITH THREE MEASUREMENTS
The calibration procedure is as follows:
1) All calibration factors are reset to their default values, i.e. CAL_IA = CAL_VA = 16384, and PHADJ_A
= 0.
2) An RMS voltage V
of the meter is recorded. The voltage reading error Axv is determined as
V
actual
Axv = (V
actual - Videal
3) Apply the nominal load current at phase angles 0° and 60°, measure the Wh energy and record the
errors E
AND E60.
0
4) Calculate the new calibration factors CAL_IA, CAL_VA, and PHADJ_A, using the formulae presented
in section 2.1.1 or using the spreadsheet presented in section 2.2.5.
5) Apply the new calibration factors CAL_IA, CAL_VA, and PHADJ_A to the meter. The memory
locations for these factors are given in section 1.9.1.
6) Test the meter at nominal current and, if desired, at lower and higher currents and various phase
angles to confirm the desired accuracy.
7) Store the new calibration factors CAL_IA, CAL_VA, and PHADJ_A in the flash memory of the meter. If
the calibration is performed on a TERIDIAN Demo Board, the methods shown in sections 1.9.3 and
1.9.4 can be used.
8) Repeat the steps 1 through 7 for each phase.
9) For added temperature compensation, read the value in CE RAM location 0x54 and write it to CE RAM
location 0x11.This will automatically calculate the correction coefficients PPMC and PPMC2 from the
nominal temperature entered in CE location 0x11 and from the characterization data contained in the
on-chip fuses.
Tip: Step 2 and the energy measurement at 0° of step 3 can be combin ed into one step.
consistent with the meter’s nominal voltage is applied, and the RMS reading
2.2.2 CALIBRATION PROCEDURE WITH FIVE MEASUREMENTS
The calibration procedure is as follows:
1) All calibration factors are reset to their default values, i.e. CAL_IA = CAL_VA = 16384, and PHADJ_A
= 0.
2) An RMS voltage V
of the meter is recorded. The voltage reading error Axv is determined as
V
actual
Axv = (V
actual - Videal
3) Apply the nominal load current at phase angles 0°, 60°, 180° and –60° (-300°). Measure the Wh
energy each time and record the errors E
4) Calculate the new calibration factors CAL_IA, CAL_VA, and PHADJ_A, using the formulae presented
in section 2.1.2 or using the spreadsheet presented in section 2.2.5.
5) Apply the new calibration factors CAL_IA, CAL_VA, and PHADJ_A to the meter. The memory
locations for these factors are given in section 1.9.1.
6) Test the meter at nominal current and, if desired, at lower and higher currents and various phase
angles to confirm the desired accuracy.
7) Store the new calibration factors CAL_IA, CAL_VA, and PHADJ_A in the flash memory of the meter. If
a Demo Board is calibrated, the methods shown in sections 1.9.3 and 1.9.4 can be used.
8) Repeat the steps 1 through 7 for each phase.
9) For added temperature compensation, read the value in CE RAM location 0x54 and write it to CE RAM
location 0x11. This will automatically calculate the correction coefficients PPMC and PPMC2 from the
nominal temperature entered in CE location 0x11 and from the characterization data contained in the
on-chip fuses.
Tip: Step 2 and the energy measurement at 0° of step 3 can be combin ed into one step.
consistent with the meter’s nominal voltage is applied, and the RMS reading
ideal
) / V
ideal
, E60, E
0
, and E
180
300
.
2.2.3 FAST CALIBRATION – AUTO-CALIBRATION
The fast calibration procedure is supported by the Demo Code when the Auto-Cal function is executed. This
procedure requires the following steps:
1) Establish load voltage and current from the calibration system. The load angle must be exactly 0.00
degrees.
2) Enter the expected voltage and current using CLI commands. For example, to calibrate for 240V, 30A for
two seconds, enter
3) Issue the CLI command
4) Wait the specified number of seconds.
Check the calibration factors established by the automatic procedure. libration factors established by the automatic procedure.
2.2.4 CALIBRATION PROCEDURE FOR ROGOWSKI COIL SENSORS
Demo Code containing CE code that is compatible with Rogowski coils is available from TERIDIAN Semiconductor.
Rogowski coils generate a signal that is the derivative of the current. The CE code implemented in the
Rogowski CE image digitally compensates for this effect and has the usual gain and phase calibration
adjustments. Additionally, calibration adjustments are provided to eliminate voltage coupling from the sensor
input.
Current sensors built from Rogowski coils have relatively high output impedance that is susceptible to
capacitive coupling from the large voltages present in the meter. The most dominant coupling is usually
capacitance between the primary of the coil and the coil’s output. This coupling adds a component proportional
to the derivative of voltage to the sensor output. This effect is compensated by the voltage coupling calibration
coefficients.
As with the CT procedure, the calibration procedure for Rogowski sensors uses the meter’s display to calibrate
the voltage path and the pulse outputs to perform the remaining energy calibrations. The calibration procedure
must be done to each phase separately, making sure that the pulse generator is driven by the accumulated real
energy for just that phase. In other words, the pulse generator input should be set to WhA, WhB, or WhC,
depending on the phase being calibrated.
In preparation of the calibration, all calibration parameters are set to their default values. VMAX and IMAX are
set to reflect the system design parameters. WRATE and PUSE_SLOW, PULSE_FAST are adjusted to obtain
the desired Kh.
Step 1: Basic Calibration
three measurement procedure (2.2.1) or the five measurement calibration procedure (2.2.2) described in the CT
section. Perform the procedure at a current large enough that energy readings are immune from voltage
coupling effects.
The one exception to the CT procedure is the equation for PHADJ—after the phase error, φs, has been
calculated, use the PHADJ equation shown below. Note that the default value of PHADJ is not zero, but rather
–3973.
: After making sure VFEED_A, VFEED_B, and VFEED_C are zero, perform either the
50
If voltage coupling at low currents is introducing unacceptable errors, perform step 2 below to select non-zero
values for VFEED_A, VFEED_B, and VFEED_C.
Step 2: Voltage Cancellation:
energy error. At this current, measure the errors E
Calibration spreadsheets are available from TERIDIAN Semiconductor. They are also included in the CD-ROM
shipped with any Demo Kit. Figure 2-3 shows the spreadsheet for three measurements. Figure 2-4 shows the
spreadsheet for five measurements with three phases.
For CT and shunt calibration, data should be entered into the calibration spreadsheets as follows:
1. Calibration is performed one phase at a time.
2. Results from measurements are generally entered in the yellow fields. Intermediate results and
calibration factors will show in the green fields.
3. The line frequency used (50 or 60Hz is entered in the yellow field labeled AC frequency.
4. After the voltage measurement, measured (observed) and expected (actually applied) voltages are
entered in the yellow fields labeled “Expected Voltage” and “Measured Voltage”. The error for the
voltage measurement will then show in the green field above the two voltage entries.
5. The relative error from the energy measurements at 0° and 60° are entered in the yellow fields labeled
“Energy reading at 0°” and “Energy reading at 60°”. The corresponding error, expressed as a fraction
will then show in the two green fields to the right of the energy reading fields.
6. The spreadsheet will calculate the calibration factors CAL_IA, CAL_VA, and PHADJ_A from the
information entered so far and display them in the green fields in the column underneath the label
“new”.
7. If the calibration was performed on a meter with non-default calibration factors, these factors can be
entered in the yellow fields in the column underneath the label “old”.
For a meter with default calibration factors, the entries in the column underneath “old” should be at the
default value (16384).
A spreadsheet is also available for Rogowski coil calibration (see Figure 2-5). Data entry is as follows:
1. All nominal values are entered in the fields of step one.
2. The applied voltage is entered in the yellow field labeled “Input Voltage Applied” of step 2. The entered
value will automatically show in the green fields of the two other channels.
3. After measuring the voltages displayed by the meter, these are entered in the yellow fields labeled
“Measured Voltage”. The spreadsheet will show the calculated calibration factors for voltage in the
green fields labeled “CAL_Vx”.
4. The default values (-3973) for PHADJ_x are entered in the yellow fields of step 3. If the calibration
factors for the current are not at default, their values are entered in the fields labeled “Old CAL_Ix”.
5. The errors of the energy measurements at 0°, 60°, -60°, and 180° are entered in the yellow fields
labeled “% Error …”. The spreadsheet will then display phase error, the current calibration factor and
the PHADJ_x factor in the green fields, one for each phase.
6. If a crosstalk measurement is necessary, it should be performed at a low current, where the effects of
crosstalk are noticeable. First, if (old) values for VFEEDx exist in the meter, they are entered in the
spreadsheet in the row labeled “Old VFEEDx”, one for each phase. If these factors are zero, “0” is
entered for each phase.
7. Test current and test voltage are entered in the yellow fields labeled VRMS and IRMS.
8. The crosstalk measurement is now conducted at a low current with phase angles of 0° and 180°, and
the percentage errors are entered in the yellow fields labeled “% error, 0 deg” and “% error, 180 deg”,
one pair of values for each phase. The resulting VFEEDx factors are then displayed in the green fields
labeled VFEEDx.
Enter values in yellow fields!
Results will show in green fields…
Step 1: Enter Nominal Values:
Nominal CAL_V16384Resulting NominalREV4.3
Nominal CAL_I16384Values: X6
PHADJ-3973Kh (Wh)0.440
WRATE179
Calibration Frequency [Hz]50
IMAX (incl. ISHUNT)30.000
Step 2: VRMS Calibration:Phase
Step 3: Current Gain and Phase Calibration
Step 4: Crosstalk Calibration (Equalize Gain for 0° and 180°)
1. Rogowski coils have significant crosstalk from voltage to current. This contributes to gain and phase errors.
2. Therefore, before calibrating a Rogowski meter, a quick 0° load line should be run to determine
at what current the crosstalk contributes at least 1% error.
3. Crosstalk calibration should be performed at this current or lower.
4. If crosstalk contributes an E0 error at current Ix, there will be a 0.1% error in E60 at 15*Ix.
Nonlinearity is most noticeable at low currents, as shown in Figure 2-6, and can result from input noise and
truncation. Nonlinearities can be eliminated individually for each channel by using the QUANT_n variables
(QUANT_A, QUANT_B, QUANT_C).
12
10
8
6
error [%]
4
2
0
0.1110100
I [A]
Figure 2-6: Non-Linearity Caused by Quantification Noise
The error can be seen as the presence of a virtual constant noise current. Assuming a noise current of 10mA,
this current hardly contributes any error at currents of 10A and above, whereas the same noise current becomes dominant at small measurement currents.
The value that should to be used for
nQUANT
−=
_
VMA
Where error = observed error at a given voltage (V) and current (I),
VMAX = voltage scaling factor, as described in section 1.8.3,
IMAX = current scaling factor, as described in section 1.8.3,
QUANT_n LSB value = 1.04173*10
LSB =
Example: Assuming an observed error in channel A as in Figure 2-6, we determine the error at 1A to be +1%. If
VMAX is 600V and IMAX = 208A, and if the measurement was taken at 240V, we determine QUANT_A as
follows:
QUANT_n can be determined by the following formula:
error
100
IV
⋅
⋅⋅
LSBIMA
error
-9
W
1
_
−=
AQUANT
QUANT_A is to be written to the CE location 0x26 (see the Data Sheet). It does not matter which current value
is chosen as long as the corresponding error value is significant (5% error at 0.2A used in the above equation
will produce the same result for QUANT_A).
Input noise and truncation can cause similar errors in the VAR calculation that can be eliminated using the
QUANT_VARn variables. QUANT_VARn is determined using the same formula as QUANT_n.
The real-time clock (RTC) of the 71M6534 is controlled by the crystal oscillator and thus only as accurate as the
oscillator. The 71M6534 has two rate adjustment mechanisms:
•Analog rate adjustment, using the I/O RAM register RTCA_ADJ[6:0]. This adjustment is used to set the
oscillator frequency at room temperature close to the target (ideal) value. Adjusting RTCA_ADJ[6:0] will
change the time base used for energy measurements and thus slightly influence these energy
measurements. Therefore it is recommended to adjust the RTC before
•Digital rate adjustment is used to dynamically correct the oscillator rate under MPU control. This is
necessary when the IC is at temperatures other than room temperature to correct for frequency
deviations.
The analog rate adjustment
Setting RTCA_ADJ[6:0] to 00 minimizes the load capacitance, maximizing the oscillator frequency. Setting
RTCA_ADJ[6:0] to 3F maximizes the load capacitance, minimizing the oscillator frequency.
The maximum adjustment is approximately ±60ppm. The precise amount of adjustment will depend on the
crystal and on the PCB properties. The adjustment may occur at any time, and the resulting clock frequency
can be measured over a one-second interval using a frequency counter connected to the TMUXOUT pin, while
0x10 or 0x11 is selected for the I/O RAM register TMUX[4:0]. Selecting 0x10 will generate a 1-second output;
selecting 0x11 will generate a 4-second output. The 4-second output is useful to adjust the oscillator at high
accuracy. It is also possible to set TMUX[4:0] to 0x1D to generate a 32.768kHz output.
The adjustment of the oscillator frequency using RTCA_ADJ[6:0] at room temperature will cause the 71M6534
IC to maintain the adjusted frequency
uses the I/O RAM register RTCA_ADJ[6:0], which trims the crystal load capacitance.
calibrating a meter.
The digital rate adjustment
clock rate is adjusted by writing the appropriate values to PREG[16:0] and QREG[1:0]. The default frequency is
32,768 RTCLK cycles per second. To shift the clock frequency by Δ ppm, calculate PREG and QREG using the
following equation:
PREG and QREG form a single adjustment register with QREG providing the two LSBs. The default values of
PREG and QREG, corresponding to zero adjustment, are 0x10000 and 0x0, respectively. Setting both PREG and
QREG to zero is illegal and disturbs the function of the RTC.
If the crystal temperature coefficient is known, the MPU can integrate temperature and correct the RTC time as
necessary, using PREG[16:0] and QREG[1:0].
The Demo Code adjusts the oscillator clock frequency using the parameters
which can be obtained by characterizing the crystal over temperature. Provided the IC substrate temperature
tracks the crystal temperature, the Demo Code adjusts the oscillator within very narrow limits.
The MPU Demo Code supplied with the TERIDIAN Demo Kits has a direct interface for these coefficients and it
directly controls the PREG[16:0] and QREG[1:0] registers. The Demo Code uses the coefficients in the following
form:
Note that the coefficients are scaled by 10, 100, and 1000 to provide more resolution.
Example: For a crystal, the deviations from nominal frequency are curve fitted to yield the coefficients a = 10.89,
b = 0.122, and c = –0.00714. The coefficients for the Demo Code then become (after rounding, since the Demo
Code accepts only integers):
can be used to adjust the clock rate up to ±988ppm, with a resolution of 3.8ppm. The
In this section, hints on proper schematic design are provided that will help designing circuits that are functional
and sufficiently immune to EMI (electromagnetic interference).
2.4.1 COMPONENTS FOR THE V1 PIN
The V1 pin of the 71M6534/6534H can never be left unconnected.
A voltage divider should be used to establish that V1 is in a safe range when the meter is in mission mode (V1
must be lower than 2.9V in all cases in order to keep the hardware watchdog timer enabled). Pulling ICE_E up
to V3P3 automatically disables the hardware watchdog timer.
R
R
1
V3P3
V3P3
GND
GND
1
R
R
2
2
Figure 2-7: Voltage Divider for V1
On the 6534 Demo Boards this feature is implemented with resistors R83/R86/R105 and capacitor C21. See
the board schematics in the Appendix for details.
R
R
3
3
5kΩ
5kΩ
100pF
100pF
V1
C
C
1
1
V1
2.4.2 RESET CIRCUIT
Even though a functional meter will not necessarily need a reset switch, the 71M6534 Demo Boards provide a
reset pushbutton that can be used when prototyping and debugging software (see Figure 2-8). R1 and C1 are
mounted very close to the 71M6534. In severe EMI environments R2 can be removed, if the trace from the
pushbutton switch to the RESETZ pin poses a problem,
For production meters, the RESET pin should be directly connected to GND.
The oscillator of the 71M6534 drives a standard 32.768kHz watch crystal (see Figure 2-9). Crystals of this type
are accurate and do not require a high current oscillator circuit. The oscillator in the 71M6534 has been
designed specifically to handle watch crystals and is compatible with their high impedance and limited power
handling capability. The oscillator power dissipation is very low to maximize the lifetime of any battery backup
device attached to the VBAT pin.
71M653X
71M653X
C
C
1
33pF
33pF
7pF
7pF
It is not necessary to place an external resistor across the crystal.
1
crystal
crystal
C
C
2
2
Figure 2-9: Oscillator Circuit
XIN
XIN
XOUT
XOUT
2.4.4 EEPROM
EEPROMs should be connected to the pins DIO4 and DIO5 (see Figure 2-10). These pins can be switched
from regular DIO to implement an I2C interface by setting the I/O RAM register DIO_EEX (0x2008[4]) to 1. Pullup resistors of 10kΩ must be provided for both the SCL and SDA signals.
The 71M6534 has an on-chip LCD controller capable of controlling static or multiplexed LCDs. Figure 2-11
shows the basic connection for LCDs. Note that the LCD module itself has no power connection.
71M653X
71M653X
LCD
LCD
segments
segments
commons
commons
Figure 2-11: LCD Connections
2.4.6 OPTICAL INTERFACE
The 71M6534 IC is equipped with two pins supporting the optical interface: OPT_TX and OPT_RX. The
OPT_TX pin can be used to drive a visual or IR light LED with up to 20mA, a series resistor (R
helps limiting the current). The OPT_RX pin can be connected to the collector of a photo-transistor, as shown in
Figure 2-12.
This section will explain how the 71M6534/6534H IC and the peripherals can be tested. Hints given in this
section will help evaluating the features of the Demo Board and understanding the IC and its peripherals.
2.5.1 FUNCTIONAL METER TEST
This is the test that every Demo Board has to pass before being integrated into a Demo Kit. Before going into
the functional meter test, the Demo Board has already passed a series of bench-top tests, but the functional
meter test is the first test that applies realistic high voltages (and current signals from current transformers) to
the Demo Board.
Figure 2-13 shows a meter connected to a typical calibration system. The calibrator supplies calibrated voltage
and current signals to the meter. It should be noted that the current flows through the CT or CTs that are not
part of the Demo Board. The Demo Board rather receives the voltage output signals from the CT. An optical
pickup senses the pulses emitted by the meter and reports them to the calibrator. Some calibration systems
have electrical pickups. The calibrator measures the time between the pulses and compares it to the expected
time, based on the meter Kh and the applied power.
AC Voltage
Outputs
Calibrated
Current CT
Pulse
Counter
under
Test
Opt ica l Pick up
for Pulses
PC
Meter
Calibrator
Figure 2-13: Meter with Calibration System
TERIDIAN Demo Boards are not calibrated prior to shipping. However, the Demo Board pulse outputs are
tested and compared to the expected pulse output. Figure 2-14 shows the screen on the controlling PC for a
typical Demo Board. The number in the red field under “As Found” represents the error measured for phase A,
while the number in the red field under “As Left” represents the error measured for phase B. Both numbers are
given in percent. This means that for the measured Demo Board, the sum of all errors resulting from tolerances
of PCB components, CTs, and 71M6534/6534H tolerances was –2.8% and –3.8%, a range that can easily be
compensated by calibration.
Testing the RTC inside the 71M6534/6534H IC is straightforward and can be done using the serial command
line interface (CLI) of the Demo Code.
To set the RTC and check the time and date, we apply the following sequence of CLI commands:
>M10 LCD display to show calendar date
>RTD05.09.27.3
>M9
>RTT10.45.00
Sets the date to 9/27/2005 (Tuesday)
LCD display to show time of day
Sets the time to 10:45:00. AM/PM distinction: 1:22:33PM = 13:22:33
2.5.4 HARDWARE WATCHDOG TIMER (WDT)
The hardware WDT of the 71M6534/6534H is disabled when the voltage at the V1 pin is at 3.3V (V3P3). On the
Demo Boards, this is done by plugging in a jumper at TP10 between the V1 and V3P3 pins.
Conversely, removing the jumper at TP10 will enable the WDT. When the WDT is enabled, typing “W” at the
command line interface will cause the Demo Board to reset.
2.5.5 LCD
Various tests of the LCD interface can be performed with the Demo Board, using the serial command line
interface (CLI):
Setting the LCD_EN register to 1 enables the display outputs.
Register Name Address [bits] R/WDescription
LCD_EN
To access the LCD_EN register, we apply the following CLI commands:
>RI21$ Reads the hex value of register 0x2021
2021[5] R/W Enables the LCD display. When disabled, VLC2, VLC1, and
VLC0 are ground, as are the COM and SEG outputs.
>25
>RI21=5
>RI21=25
The LCD_CLK register determines the frequency at which the COM pins change states. A slower clock means
lower power consumption, but if the clock is too slow, visible flicker can occur. The default clock frequency for
the 71M6534/6534H Demo Boards is 150Hz (LCD_CLK = 01).
Register Name Address [bits] R/WDescription
LCD_CLK[1:0]
To change the LCD clock frequency, we apply the following CLI commands:
Response from Demo Code indicating the bit 5 is set
Writes the hex value 0x05 to register 0x2021 causing the display to be switched off
Sets the LCD_EN register back to normal
2021[1:0] R/W Sets the LCD clock frequency, i.e. the frequency at which SEG
Response from Demo Code indicating the bit 0 is set and bit 1 is cleared.
f
= 32,768Hz
w
00: f
/29, 01: fw/28, 10: fw/27, 11: fw/26
w
Page 60
71M6534H Demo Board User’s Manual
>RI21=24 Writes the hex value 0x24 to register 0x2021 clearing bit 0 – LCD flicker is visible now
>RI21=25
Writes the original value back to LCD_CLK
2.6 TERIDIAN APPLICATION NOTES
Please contact your local TERIDIAN sales representative for TERIDIAN Application Notes. Available application notes
will be listed below in future editions of this document.
3.1 D6534T14A2 BOARD DESCRIPTION: JUMPERS, SWITCHES AND
TEST POINTS
The items described in the following table refer to the flags in Figure 3-1.
Table 3-1: D6534T14A2 Demo Board Description
Item #
1
2
3 J4, J6, J8,
4 JP1 PS_SEL[0]
5 J9 Neutral
6 J12
7 J1 -- Plug for connecting the external 5 VDC power supply
8 JP8 VBAT
Reference
Designator
TP2 VA/V3P3
TP4 VB/V3P3
TP6 VC/V3P3
SW2 RESET
SW3 PB
Name Description
VA_IN, VB_IN,
VC_IN
OPT_RX,
OPT_TX_OUT
Two-pin header test points. One pin is either the VA, VB or
VC line voltage input to the IC and the other pin is V3P3A.
Chip reset switch: When the button is pressed, the RESET
pin is pulled high which resets the IC into a known state.
Multi-function pushbutton, used to wake-up the 71M6534
from sleep mode into brownout mode. In mission mode,
this button functions to control the parameters displayed on
the LCD.
VA_IN, VB_IN, and VC_IN are the line voltage inputs.
Each point has a resistor divider that leads to the respective pin on the chip that is the voltage input to the A/D.
These inputs connect to spade terminals located on the
bottom of the board.
Caution: High Voltage! Do not touch these pins!
Two-pin header. When the jumper is installed the onboard power supply (AC signal) is used to power the demo
board. When not installed, the board must be powered by
an external DC supply connected to J1.
installed.
The neutral wire connect to the spade terminal located on
the bottom of the board.
5-pin header for access to the optical interface (UART1).
For better EMI performance, jumpers should be
installed from both OPT_RX and OPT_TX_OUT to
V3P3D.
Three-pin header that allows the connection of a battery. If
no battery is connected to the VBAT pin, a jumper should
be placed between pins 1 and 2
3-pin header for selecting the output driving the VARh
9 JP20 --
pulse LED. 1-2: RPULSE, 2-3: YPULSE. A jumper is normally installed from pin 1 to pin 2.
10 TP13 GND GND test point.
11 D6 VARS LED for VARh pulses
2-pin header enabling access to the selected pulse output
(DIO8, DIO6, OPT_TX) and V3P3.
2-pin header enabling access to the selected pulse output
(DIO7, DIO9) and V3P3.
12
TP20
--
TP21
3-pin header for selecting the output driving the Wh pulse
13 JP19 SEG28/ DIO08
LED. 1-2: WPULSE or OPT_TX, 2-3: XPULSE. A ju mper is normally installed from pin 1 to pin 2.
14 D5 WATTS LED for Wh pulses
15 TP15 GND GND test point.
3-pin header for selection of the firmware function in
battery mode. Plugging a jumper across pins 2 and 3 will
16 JP16 BAT MODE
select 9600bd and will also disable the battery modes.
Plugging a jumper across pins 1 and 2 will select 300bd
and enable battery modes.
17 JP6 DIO3_R 3-pin header allowing access to the DIO03 pin.
18 TP16 GND GND test point.
3-pin header for selection of the voltage for the ICE_E pin.
19 JP7 ICE_EN
A jumper is normally installed between V3P3D and
ICE_E, enabling programming of the 71M6534.
20
JP13, JP14,
JP15
DIO56, DIO57,
DIO58
2-pin headers providing access to the DIO pins DIO56,
DIO57, and DIO58.
21 U8 -- LCD with eight digits and 14 segments per digit.
22 J2 DEBUG 8X2 header providing access for the Debug Board.
23 -- -- The 71M6534 IC in LQFP-120 package.
24 TP8
CKTEST,
TMUXOUT
25 J18 SPI Interface
2-pin header providing access to the TMUXOUT and
CKTEST signals.
2X5 header providing access to the SPI interface of the
71M6534.
26 TP14 GND GND test point.
3-pin header used to enable or disable the hardware
27 TP10 V1_R
watchdog timer (WDT). The WDT is disabled by plugging as jumper between V1_R and V3P3 (default) and
enabled by plugging as jumper between V1_R and GND.
28 J14 EMULATOR I/F
29 J17 --
2x10 high-density connector port for connecting the
Signum ICE ADM-51 or the TFP-2 programmer.
6-pin header providing access to the essential signals of
the emulator interface.
J19 IAN, IAP
30
J20 IBN, IBP
J21 ICN, ICP
2-pin headers providing access to the current input pins of
channel A, B, C and D, used in differential mode.
GNDA P Analog ground: This pin should be connected directly to the ground plane.
GNDD P Digital ground: This pin should be connected directly to the ground plane.
V3P3A P
V3P3SYS P System 3.3V supply. This pin should be connected to a 3.3V power supply.
V3P3D O
VBAT P
V2P5 O
Analog Pins:
Analog power supply: A 3.3V power supply should be connected to this pin. It must be the same
voltage as V3P3SYS.
Auxiliary voltage output of the chip, controlled by the internal 3.3V selection switch. In mission
mode, this pin is internally connected to V3P3SYS. In BROWNOUT mode, it is internally
connected to VBAT. This pin is floating in LCD and sleep mode.
Battery backup power supply. A battery or super-capacitor is to be connected between VBAT
and GNDD. If no battery is used, connect VBAT to V3P3SYS.
Output of the internal 2.5V regulator. A 0.1µF capacitor to GNDA should be connected to this
pin.
Name Type Description
IAP, IAN,
IBP, IBN,
ICP, ICN,
IDP, IDN
VA, VB,
VC
V1 I
V2, V3 I
VBIAS O Low impedance output for use in biasing current sensors and voltage dividers.
VREF O Voltage Reference for the ADC. This pin should be left open.
XIN
XOUT
Pin types: P = Power, O = Output, I = Input, I/O = Input/Output
Differential or single-ended Line Current Sense Inputs: These pins are voltage inputs to the
I
internal A/D converter. Typically, they are connected to the outputs of current sensors. In singleended mode, the IXN pin should be tied to V3P3A.
Line Voltage Sense Inputs: These pins are voltage inputs to the internal A/D converter. Typically,
I
they are connected to the outputs of resistor dividers.
Comparator Input: This pin is a voltage input to the internal comparator. The voltage applied to
the pin is compared to the internal VBIAS voltage (1.6V). If the input voltage is above VBIAS, the
comparator output will be high (1). If the comparator output is low, a voltage fault will occur. A
series 5kΩ resistor should be connected from V1 to the resistor divider.
Comparator Inputs: These pins are voltage inputs to internal comparators. The voltage applied to
these pins is compared to the internal BIAS voltage of 1.6V. If the input voltage is above VBIAS,
the comparator outputs will be high (1).
Crystal Inputs: A 32kHz crystal should be connected across these pins. Typically, a 33pF
capacitor is also connected from XIN to GNDA and a 15pF capacitor is connected from XOUT to
I
GNDA. It is important to minimize the capacitance between these pins. See the crystal
manufacturer datasheet for details.
O LCD Common Outputs: These 4 pins provide the select signals for the LCD display.
SEG0…SEG2,
SEG7, SEG8,
SEG12…SEG18,
O Dedicated LCD Segment Output.
SEG20…SEG23
SEG24/DIO4
…
SEG50/DIO30
SEG55/E_
ISYNC_BRKRQ
Multi-use pins, configurable as either LCD SEG driver or DIO. (DIO4 = SCK, DIO5 =
SDA when configured as EEPROM interface, WPULSE = DIO6, VARPULSE = DIO7
I/O
when configured as pulse outputs)
I/O Multiuse pin, configurable as either LCD SEG driver or Emulator Handshake.
SEG54/E_TBUS3
SEG53/E_TBUS2
SEG52/E_TBUS1
I/O Multiuse pins, configurable as either LCD SEG driver or Emulator Trace Bus.
SEG51/E_TBUS0
SEG56/DIO36
…
I/O Multi-use pins, configurable as either LCD SEG driver or DIO.
SEG75/DIO55
SEG3/PCLK
SEG4/PSDO
SEG5/PCSZ
I/O Multi-use pins, configurable as either LCD SEG driver or SPI PORT.
SEG6/PSDI
DIO3, DIO56
DIO57, DIO58
I/O Dedicated DIO pins.
E_RXTX/SEG9 I/O
E_RST/SEG11 I/O
Multi-use pins, configurable as either emulator port pins (when ICE_E pulled high) or
LCD SEG drivers (when ICE_E tied to GND).
E_TCLK/SEG10 O
ICE enable. When zero, E_RST, E_TCLK, and E_RXTX become SEG32, SEG33, and
ICE_E I
SEG38 respectively. For production units, this pin should be pulled to GND to disable
the emulator port.
CKTEST/SEG19 O
Multi-use pin, configurable as either Clock PLL output or LCD segment driver. Can be
enabled and disabled by CKOUT_EN.
TMUXOUT O Digital output test multiplexer. Controlled by DMUX[3:0].
Multi-use pin, configurable as either Optical Receive Input or general DIO. When
OPT_RX/DIO1 I/O
configured as OPT_RX, this pin receives a signal from an external photo-detector
used in an IR serial interface.
Multi-use pin, configurable as Optical LED Transmit Output, WPULSE, RPULSE, or
OPT_TX/DIO2 I/O
general DIO. When configured as OPT_TX, this pin is capable of directly driving an
LED for transmitting data in an IR serial interface.
Chip reset: This input pin is used to reset the chip into a known state. For normal
RESET I
operation, this pin is pulled low. To reset the chip, this pin should be pulled high. This
pin has an internal 30μA (nominal) current source pull-down. No external reset
circuitry is necessary.
For the current calibration we have to realize that the meter's sig
imaginary (VARh) parts of the energy. i_gain, the current gain,
and rotated in the complex plane to eliminate phase error. Let φ be the phase adjust angle.
VARh
gainmeasured
gainmeasured
+
trix:
applied
VVARh
⋅
gainmeasured
ϕϕ
A vector is rotated by multiplying by a 2x2 ma
cos(φ) -sin(φ)
sin(φ) cos(φ)
The linear adjustment vector is:
Wh
applied
i
is the real part of multiplying the rotation matrix by the linear adjustment vector.:
gain
i
=)sin()cos(
gain
The term after the + sign is negligible, since the applied reactive energy is near zero, so i
i⋅=)cos(
gain
VWh
⋅
gainmeasured
⋅
Wh
ϕ
applied
VWh
nal is the vector sum of the real (Wh) and
must be scaled to eliminate power errors
VARhWh
appliedapplied
VVARhVWh
⋅
gainmeasured
gain
becomes:
Furthermore,
Wh
=)cos(
VAh
Wh
measured
measured
applied
ϕ
which simplifies the equation for i
i
=
gain
VAh
repeatability due to the signal processing performed in the 71M65XX chip.
The CE uses the value 16384 for unity gain. We can then substitute:
1.0 for D6534T14A1 board 10/16/2007 Document Creation
1.1 11/27/2008 Updated schematics and values used for capacitors at XIN/XOUT pins.
2.0 5/28/2008
Updated document to match board revision 2 (D6534T14A2): Schematics, BOM,
board description, and layout.
User’s Manual: This User’s Manual contains proprietary product information of TERIDIAN Semiconductor Corporation (TSC) and
is made available for informational purposes only. TERIDIAN assumes no obligation regarding future manufacture, unless agreed
to in writin
Demo Kits and ttime of order acknowledgment,
including those pertaining to warranty, patent infringement and limitation of liability. TERIDIAN Semiconductor Corporation (TSC)
reserves the right to make changes to this document at any time without notice. Accordingly, the reader is cautioned to verify the
validity of schematics and firmware of designs based on this document. TSC assumes no liability for applications assistance.
Page: 86 of 86
g.
heir contents are sold subject to the terms and conditions of sale supplied at the
TERIDIAN Semiconductor Corp., 6440 Oak Canyon Road, Suite 100,
TEL (714) 508-8800, FAX (714) 508-8877, http://www.teridian.com