Maxim Integrated cannot assume responsibility for use of any circuitry other than circuitry entirely embodied in a Maxim Integrated product. No circuit patent
licenses are implied. Maxim Integrated reserves the right to change the circuitry and specifications without notice at any time.
Maxim Integrated 160 Rio Robles, San Jose, CA 95134 USA 1-408-601-1000
1.1 General .................................................................................................................................................................... 5
1.2 Safety and ESD Notes ............................................................................................................................................ 5
1.6 Suggested Equipment not Included ..................................................................................................................... 6
1.7 Demo Board Test Setup ......................................................................................................................................... 7
1.7.1 Power Supply Setup .......................................................................................................................................... 8
1.7.2 Cables for Serial Communication ...................................................................................................................... 8
1.7.4 Serial Connection Setup .................................................................................................................................... 9
1.8 Using the Demo Board ......................................................................................................................................... 10
1.8.1 Serial Command Language ............................................................................................................................. 11
1.8.2 Using the Demo Board for Energy Measur ements .......................................................................................... 17
1.8.3 Adjusting the Kh Factor for the Demo Board ................................................................................................... 17
1.8.4 Adjusting the Demo Boards to Different SHUNT Resistors ............................................................................. 17
1.8.5 Using the Pre-Amplifier ................................................................................................................................... 17
1.8.6 Using Current Transformers (CTs) .................................................................................................................. 17
1.8.7 Implementing a Single-Phase 3-Wire Meter (EQU 1) ...................................................................................... 17
1.8.8 Adjusting the Demo Boards to Different Voltage-Dividers ............................................................................... 17
1.9.1 General Calibration Procedur e ........................................................................................................................ 18
1.10.2 Important MPU Addresses ........................................................................................................................... 23
1.10.3 LSB Values in CE Registers ........................................................................................................................ 30
1.10.4 Calculating IMAX and Kh ............................................................................................................................. 30
1.10.5 Determining the Type of 71M6x0x ............................................................................................................... 31
1.10.6 Communicating with the 71M6X0X .............................................................................................................. 32
2 APPLICATION INFORMATION ............................................................................................................................. 34
2.1 Sensor Connections and Equations ................................................................................................................... 34
2.2 Calibration Theory ................................................................................................................................................ 37
2.2.1 Calibration with Three Measurements ............................................................................................................. 37
2.2.2 Calibration with Five Measurements ............................................................................................................... 38
2.3.7 Compensating for Non-Linearities ................................................................................................................... 45
2.4 Temperature Compensation ................................................................................................................................ 46
2.4.2 Software Features for Temperatur e Compensation ........................................................................................ 47
2.4.3 Calculating Parameters for Compensation ...................................................................................................... 48
2.5 Testing the Demo Board ...................................................................................................................................... 51
2.5.1 Functional Meter Test ...................................................................................................................................... 51
2.6 Sensors and Sensor Placement .......................................................................................................................... 53
4.2 71M6541-DB Bill of Material ................................................................................................................................. 67
4.4 71M6541 Pinout Information ................................................................................................................................ 73
4.5 Revision History ................................................................................................................................................... 76
Figure 2-2: Single-Phase Two-Wire M eter with Shunt Sensor .......................................................................................... 35
Figure 2-3: Single-Phase Two-Wire M eter with two Shunt Sensors .................................................................................. 35
Figure 2-4: Single-Phase Three-Wire M eter with two Shunt Sensors ............................................................................... 36
Figure 2-4: Watt Meter with Gain and Phase Errors. ......................................................................................................... 37
Figure 2-7: Calibration Spreadsheet for Three Measurements ......................................................................................... 43
Figure 2-8: Calibration Spreadsheet for Five Measurements ............................................................................................ 44
Figure 2-9: Non-Linearity Caused by Quantification Noise ............................................................................................... 45
Figure 2-10: GAIN_ADJ over Temperature ........................................................................................................................ 49
Figure 2-11: GAIN_ADJ and GAIN_ADJ’ over Temperature .............................................................................................. 49
Figure 2-12: Meter with Calibration System ...................................................................................................................... 52
Figure 2-13: Calibration System S creen ........................................................................................................................... 52
Figure 2-14: Wh Load Lines at Room T em perature with 71M6201 and 50 µΩ Shunts ..................................................... 53
Figure 2-17: Loop Formed by Shunt and Sen sor Wire ...................................................................................................... 56
Figure 2-18: Shunt with Compensation Loop .................................................................................................................... 56
3 Rev 4.0
71M6541 Demo Board REV 3.0 User’s Manual
Figure 2-19: Shunt with Center Drill H ol es ........................................................................................................................ 56
Figure 4-3: 71M6541-DB REV 3.0: T op View ................................................................................................................... 69
Figure 4-4: 71M6541-DB REV 3.0: T op C opper ............................................................................................................... 70
Table 1-4: CE RAM Locations for Calibr ation Constants .................................................................................................. 19
Table 1-5: Flash Programming Interf ac e Signals .............................................................................................................. 22
Table 1-7: Bits in the MPU Status Word ............................................................................................................................ 29
Table 1-8: CE Registers and Associated LSB Values ....................................................................................................... 30
Table 1-9: IMAX for Various Shunt Resistance Values and Remote Sensor Types.......................................................... 31
Table 4-1: 71M6541-DB REV 3.0: Bill of Material ............................................................................................................. 67
The Maxim Integrated 71M6541-DB REV 3.0 Demo Bo ar d is a demonstration board for evaluating the 71M6541
device for single-phase electronic energy metering applications in conjunction with the Remote Sensor Interface. It incorporates a 71M6541 integrated circuit, a 71M6601 Remote Interface IC, peri pheral circuitry such as
a serial EEPROM, emulator port, and on-board power supply. A serial to USB converter allows communication
to a PC through a USB port. The Demo Board al lows the evaluation of the 71M6541 energy meter chip for
measurement accuracy and overall system use.
The board is pre-programmed with a Demo Program (Demo Code) in the FLAS H memory of the 71M6541F IC.
This embedded application is developed to exercise all low-level func tion calls to directly manage the p eripherals, flash programming, and CPU (clock, timing, power savings, etc.).
The 71M6541F IC on the Demo Board is pre-programmed and pre-calibrat ed for the 50 µΩ or 120 µΩ shunt
shipped with the board. The Demo Board may also be used for operation with a CT after hardware modifications that can be easily performed by the user. This configuration will require a different version of the Demo
Code.
71M6541 Demo Board REV 3.0 User’s Manual
1.2 SAFETY AND ESD NOTE S
Connecting live voltages to the demo boar d system will result in potentially hazardous voltages on t he demo
board.
THE DEMO SYSTEM IS ESD SENSITIVE! ESD PRECAUTIONS SHOULD BE TAKEN
WHEN HANDLING THE DEMO BOA RD!
EXTREME CAUTION SHOULD BE TAKEN WHEN HANDLING THE DEM O BOARD
ONCE IT IS CONNECTED TO LIVE VOLTAGES! BOARD GROUND IS CLOSE TO LIVE
VOLTAGE!
CAUTION: THE PHASE A CONNEC T ION OF THE DEMO BOARD IS CONNECTED TO
THE LIVE VOLTAGE SHUNT. THE NEUTRAL SHUNT IS ISOLATED VIA THE
71M6X0X REMOTE SENSOR INTE RFACE AND CONNECTED TO THE PHASE B INPUT. EXTREME CARE MUST BE TAKEN WHEN CHANGING SHUNT AND VOLTAGE
CONNECTIONS!
5 Rev 4.0
1.3 DEMO KIT CONTENTS
•Demo Board D6541 REV 3.0 containing one 71M6601 or 71M6201 Remote Sensor Int erface and one
71M6541F IC with pre-loaded demo program
• 5VDC/1,000mA universal wall t r ansformer with 2.5mm plug (Switchcraft 712A compatible)
• Serial-USB converter
• USB cable
• ANSI base with 50 μΩ shunt resistor (optional, for ANSI kits only)or two 120 μΩ shunt resistors
1.4 DEMO BOARD VERSIONS
This manual applies to D6541 REV 3.0 only.
1.5 COMPATIBILITY
This manual applies to the following hardware and software revisions:
• 71M6541 chip revision B02
• Demo Kit firmware revision 5.4G or later
• Demo Board D6541 REV 3.0
71M6541 Demo Board REV 3.0 User’s Manual
1.6 SUGGESTED EQUIPMENT NOT INCLUDED
For functional demonstration:
•PC with Windows® 2000, Windows XP®, or Windows 7 operating system, equipped with USB port.
For the use of the optional Debug Board, a serial interface (COM port) is required.
For software development (MPU code) :
• Signum
• Keil 8051 “C” Compiler
Windows and Windows XP are registered trademarks of Microsoft Corp.
Systems In-Circuit Emulator (ICE): ADM-51
Signum WEMU51 version 3.11.09 or later should be used.
o
Kit: CA51
6 Rev 4.0
1.7 DEMO BOARD TEST SETUP
DEMONSTRATION METER
IA
IB
NEUTRAL
IAP
IBP
V3P3A
VA
LINE
GND
V3P3
GND
5.0 VDC
Input
EEPROM
ICE Connector
SEGDIO52
SEGDIO10
TX
RX
DB9 to PCCOM Port
6541
Single Chip Meter
TMUXOUT
TMUX2OUT
3.3V or 5V
LCD
SDCK
SDATA
IAN
IBN
V3P3SYS
Wh
VARh
SEGDIO0/WPULSE
SEGDIO1/VPULSE
PULSE OUTPUTS
SEGDIO7/YPULSE
SEGDIO6/XPULSE
V3P3SYS
V3P3D
VBAT
Battery 2
(optional)
J13
PB
On-board components
powered by V3P3D
OPTO
OPTO
OPTO
OPTO
OPTO
5V DC
V5_DBG
GND_DBG
V5_DBG
V5_DBG
RS-232
INTERFACE
GND_DBG
V5_DBG
OPTO
OPTO
FPGA
06/03/2010
V5_NI
CE HEARTBEAT (1Hz)
MPU HEARTBEAT (5Hz)
DEBUG BOARD (OPTIONAL)
RTM INTERFACE
JP21
J21
4
15, 16
13, 14
6
6
8
12
10
3
1
2
5, 7,
9, 11
GND
V3P3SYS
JP6
J1
PULSE A
PULSE B
Power Supply
J5
68 Pin
Connector
VBAT_RTC
Battery 1
(optional)
RESET
JP56J12
JP20
SPI Connector
J14
J19
JP5
CN1
Isolator
RESET
PB
USB
Interface
External
Shunts
6601
J5
J3
Serial/USB
Converter
Iso-
GND
Load
LN
Figure 1-1 shows the basic connectio ns of the Demo Board plus optional Debug Board with the external equipment. The PC can be connected via the USB Interface (CN1). For stand-alone testing (without AC voltage) the
Demo Board maybe powered via the 5.0 VDC input (J20). The optional Debug Board must be powered with its
own 5 VDC power supply.
The Demo Board contains all circuits necessary for operation as a meter , including display, calibration LEDs,
and internal power supply. Communication with a PC USB port is provided v i a c onnector CN1. The optional
Debug Board uses a separate power supply, and is optically isolate d from the Demo Board. It interfaces to a PC
through the USB connector.
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 V3P3A (3.3V power supply to the chip).
71M6541 Demo Board REV 3.0 User’s Manual
1.7.1 POWER SUPPLY SETUP
There are several choices for the meter power supply:
oInternal (using the AC line voltage). The internal power supply is only suitable when the voltage ex-
ceeds 100V RMS. To enable the internal s upply, a jumper needs to be inst all ed across JP6 on the top
of the board.
oExternal 5.0VDC connector (J20) on the Demo Board.
1.7.2 CABLES FOR SERIAL COMMUNICATION
1.7.2.1 USB Connection (Recommended)
A standard USB cable can be used to connec t the Demo Board to a PC running HyperTer minal or a similar serial interface program. A suitable driver, e.g., the FTDI CDM Driver Pac kage, must be installed on the PC to enable the USB port to be mapped as a virtual COM port. The driver can be found on the FTDI web site
(www.ftdichip.com).
See Table 3-1 for correct placement of j um per JP5 depending on whether the USB c onnection or the serial
connection via the Debug Board is used.
1.7.2.2 Serial Connection (via Optional Debug Board)
For connection of the DB9 serial port of the Debug Board to a PC serial port ( C OM port), 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 r ev ersed for the null-modem cable, as shown in Table 1-1.
Cable Configura-
tion
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 t he pi n definitions.
Table 1-3 shows the connections neces sary for the null-modem DB9 cable and t he pin definitions.
See Table 3-1 for correct placement of j um per JP5 on the Demo Board depending on whether the USB connection or the serial connection via the Debug Board is used.
Mode
Default
Table 1-1: Jumper Settings on Debug Board
PC Pin
2 TX 2
3 RX 3
5 Signal Ground 5
Table 1-2: Straight Cable Connections
PC Pin Function Demo Board Pin
2 TX 3
3 RX 2
5 Signal Ground 5
Table 1-3: Null-modem Cable Connections
JP1 JP2 JP3 JP4
Installed Installed -- --
Function Demo Board Pin
Jumpers on Debug Board
8 Rev 4.0
1.7.3 CHECKING OPERATION
H E L L 0
5. 4 G
0. 0 0 Wh SYS
0 3
Unit
A few seconds after power up, the LCD display on the Demo Board should display a brief greeting in the top
row and the demo code revision in the bottom row:
The “HELLO” message should be foll owed by the display of accumulated energy:
The “SYS” symbol will be blinking, indic ating activity of the MPU inside t he 71M6541.
In general, the fields of the LCD are us ed as shown below:
Command number
71M6541 Demo Board REV 3.0 User’s Manual
Measured value
(Phase)
1.7.4 SERIAL CONNECTION SETUP
After connecting the USB cable from the Demo Board to the PC, or after c onnecting the serial cable from the
optional Debug Board to the PC, s tart the HyperTerminal application and create a session using the following
parameters:
Port Speed: 9600 bd
Data Bits: 8
Parity: None
Stop Bits: 1
Flow Control: XON/XOFF
When using the USB connection, you may have to define a new port in HyperTerminal after selecting File
Properties and then clicking on the “Connect Using“ dialog box. If the U S B-to-serial driver is installed (see s ection 1.7.2.1) a port with a number not corresponding to an actual serial port, e.g., COM5, will appear in the dialog box. This port should be selected for the USB connection.
HyperTerminal can be found by selecting Programs Accessories Communicati ons from the Windows
menu. The connection parameters ar e configured by selecting File Properties and then by pressing the Configure button. Port speed and flow control are configured under the General tab (Figure 1-3, left), bit settings are
configured by pressing the Configur e button (Figure 1-3, right), as s hown below. A setup file (file name “Demo
Board Connection.ht”) for Hyper Terminal that can be loaded with Fil e Open is also provided with the to ols
and utilities.
Port parameters can only be adjusted when the connection is not active. The disconnect
button, as shown in Figure 1-2 must be clicked in order to disconnect the port.
start
9 Rev 4.0
71M6541 Demo Board REV 3.0 User’s Manual
Figure 1-2: HyperTerminal Sample Window with Disconnect Button (Arr ow)
Figure 1-3: Port Speed and Handshake Setup (left) and Port Bit setup (right)
Once, the connection to the demo board is established, press <CR> and the command prompt,
pear. Type
>? to see the Demo Code help menu. Type >i to ver ify the demo code revision.
>, should ap-
1.8 USING THE DEMO BOARD
The 71M6541 Demo Board is a ready-to-use meter prepared for use with external sh unt resistors.
Demo Code versions for single-phase two-wire operation (EQU 0, with secondary tamper sensor) and for sin-
gle-phase three-wire operation ( A N S I configuration, EQU 1) are provided by Maxim Integrated. Demo Boards in
ANSI configuration are preloaded with Demo Code for EQU 1, Demo Boards in IEC configuration are preloade d
with Demo Code for EQU 0.
Using the Demo Board involves communicating with the Demo Code via the com mand line interface (CLI). The
CLI allows all sorts of manipulations to the metering parameters, ac c ess to the EEPROM, selection of the displayed parameters, changing calibration factors and many more operations.
Before evaluating the 71M6541 on the Demo B oard, users should get familiar with the commands and responses of the CLI. A complete descriptio n of the CLI is provided in section 1.8.1.
10 Rev 4.0
1.8.1 SERIAL COMMAND LANGUAGE
The Demo Code residing in the flash memory of the 71M6541 provides a convenie nt way of examining a nd
modifying key meter parameters via its command line interface (CLI).
The tables in this chapter describe the commands in detail.
Commands for CE Data Access:
] CE D ATA ACCESS Comment
Description: Allows user to read from and write to CE data space.
Usage: ] [Starting CE Data Address] [option]…[option]
Command
combinations:
]A$$$ Read consecutive 16-bit words in Hex, starting at address A ]A=n=n Write consecutive memory values, starting at address A
Example: ]40$$$ Reads CE data words 0x40, 0x41 and 0x42.
]7E=1AD2=9A23 Writes two hexadecimal words starting @ 0x7E
]10=+16384 Writes one decimal word starting @ 0x10
All CE data words are in 4-byte (32-bit) format. Typing ]A? will access the 32-bit word located at the b yte address 0x0000 + 4 * A = 0x1028.
]A??? Read consecutive 16-bit words in Decimal, starting at ad-
71M6541 Demo Board REV 3.0 User’s Manual
dress A
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
combinations:
)A$$$ Read three consecutive 32-bit words in Hex, starting at ad-
)A=n=mWrite the values n and m to two consecutive addresses start-
?) Display useful RAM addresses.
Example: )08$$$$ Reads data words 0x08, 0x0C, 0x10, 0x14
)04=FFFFAD2=9A23 Writes two hexadecimal words starting @ 0x04
)04=+1000 Writes decimal 1,000 to address 0x04
)04=-1000 Writes decimal -1,000 to address 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.
)A??? Read three consecutive 32-bit words in Decimal, starting at
address A
dress A
ing at address A
11 Rev 4.0
71M6541 Demo Board REV 3.0 User’s Manual
Command
Command
combinations:
Command
combinations:
Commands for I/O RAM (Configuration RAM) and SFR Control:
R I/O RAM AND SF R CONTROL Comment
Description: Allows the user to read from and write to DIO RAM and special function registers (SFRs).
Usage: R [option] [register] … [option]
combinations:
Rx…Select internal SFR at address x
Ra???... Read consecutive SFR registers in Decimal, starting at ad-
Ra$$$... Read consecutive registers in Hex, starting at address a Ra=n=m… Set values of consecutive registers to n and m starting at
Example: RI2$$$ Read DIO RAM registers 2, 3, and 4 in Hex.
The SFRs (special function registers) are located in internal RAM of the 80515 core, starting at address 0x80.
Commands for EEPROM Control:
EE EEPROM CONTROL Comment
Description: Allows user to enable read from and write to EEPROM.
Usage: EE [option] [arguments]
RIx… Select I/O RAM location x (0x2000 offset is automatically
added)
dress a
address a
EECn EEPROM Access (1 Enable, 0 Disable)
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: EEShello
EET$0210
Due to buffer size restrictions, the maximum number of bytes handled by the EEPROM command is 0x40.
Writes 'hello' to buffer, then transmits buffer to EEPROM starting at address 0x210.
Commands for Flash Memory Control:
F FLASH CONTROL Comment
Description: Allows user to enable read from and write to Flash memory.
Usage: F [option] [arguments]
FRa.b Read Flash at address 'a' for 'b' bytes.
FSabc..xyz Write characters to buffer (sets Write length) FTaTransmit buffer to Flash memory at address 'a'.
FWa.b...z Write string of bytes to buffer
Example: FShello
FT$FE10
Writes 'hello' to buffer, then transmits buffer to EEPROM starting at address 0xFE10.
12 Rev 4.0
71M6541 Demo Board REV 3.0 User’s Manual
Auxiliary Commands:
Typing a comma (“,”) repeats the comman d issued from the previous command line. This is very helpful when
examining the value at a certain addres s over time, such as the CE DRAM addr ess for the temperature (0x40).
The slash (“/”) is useful to separate comments from commands when sending macro text files via the s erial interface. All characters in a line af ter the slash are ignored.
Commands controlling the CE, TMUX and the RTM:
C COMPUTE ENGINE,
Comment
MEMORY, AND CALIBRATION CONTROL
Description: Allows the user to enable and configure the compute engine, store and recall configurations, and
Usage: C [option] [argument]
Command
combinations:
CTn.m Selects the signal for the TMUX output pins (n = 1 for
CREn RTM output control (1 Enable, 0 Disable) CRSa.b.c.d Selects CE addresses for RTM output CLS Stores calibration and other settings to EEPROM. CLR Restores calibration and other settings from EEPROM. CLD Restores calibration and other settings to defaults. CLB Start auto-calibration based on voltage (MPU address 0x17,
CLC Apply machine-readable calibration control (Intel Hex-
CPA Start the accumulating periodic pulse counters. CPC Clear the pulse counters CPDn Activate pulse counters for n seconds
Example: CE0 Disables CE, (“SYS will stop blinking on the LCD). CT1.3 Selects the VBIAS signal for the TMUX output pin
initiate calibration.
CEn Compute Engine Enable (1 Enable,
0 Disable)
TMUXOUT, n = 2 for TMUX2OUT). m is interpreted as a dec-
imal number.
current (MPU 0x18), and duration (MPU 0x16) in seconds.
Records).
Commands for Identification and Information:
I INFORMATION MESSAGES Comment
Description: Allows the user to read information messages.
Usage: I Sends complete demo code version information on serial inter-
M0Displays meter ID on LCD.
The I command is mainly used to identify the revisions of Demo Code and the contained CE code.
face.
13 Rev 4.0
71M6541 Demo Board REV 3.0 User’s Manual
Command
combinations:
Commands for Battery Mode Control and Battery Test:
B I NFO RMATION MESSAGES Comment
Description: Allows the user to control battery modes and to test the battery.
Usage: BL Enters LCD mode when in brownout mode (B> prompt).
BS Enters sleep mode when in brownout mode (B> prompt).
BT Starts a battery test – when in mission mode (> prompt).
BWSn Set wake timer to n seconds for automatic return to brownout
mode.
BWMn Set wake timer to n minutes for automatic return to brownout
mode.
Commands for Controlling the RTC:
RT REAL-TIME CLOCK CON-
Comment
TROL
Description: Allows the user to read and set the real time clock.
Usage: RT [option] [value] … [value]
Command
combinations:
RTRRead Real Time Clock.
RTTh.m.s Time of day: (hr, min, sec). RTAs.t Real Time Adjust: (start, trim). Allows trimming of the RTC.
> Access look-up table for RTC compensation.
Example: RTD05.03.17.5 Programs the RTC to Thursday, 3/17/2005 RTA1.+1234 Speeds up the RTC by 1234 PPB. >0???? Read the first four bytes in the look-up table.
RTDy.m.d.w: Day of week (year, month, day, weekday [1 = Sunday]). If the weekday is
omitted it is set automatically.
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.
The “Military Time Format” is used for the RTC, i.e., 15:00 is 3:00 PM.
Commands for Accessing the Trim Control Registers:
T TRIM CONTROL Comment
Description: Allows user to read trim and fuse values.
Usage: T [option]
These commands are only accessible for the 71M6541H (0.1%) parts. When used on a 71M6541 (0.5%) part,
the results will be displayed as zero.
14 Rev 4.0
71M6541 Demo Board REV 3.0 User’s Manual
Reset Commands:
W RESET Comment
Description: Watchdog control
Usage: W Halts the Demo Code program, thus suppressing the trigger-
Commands for the 71M6X0X Remote Sensor Interface:
6 71M6X0X Interface Comment
Description: Commands for control of the Re-
mote Sensor Interface IC.
Usage: 6En Remote sensor Enable (1 Enable, 0 Disable) 6Ra.b Read Remote Sensor IC number a with command b. 6Ca.b Write command b to Remote Sensor IC number a. 6Ta.b Send command b to Remote Sensor IC number a in a loop
6T2 Send temp command to 6000 number 2 in a loop forever. 6R1.20 Reads the temperature from Remote Sensor IC number 1.
ing of the hardware watchdog timer. This will cause a reset, if
the watchdog timer is enabled.
forever.
15 Rev 4.0
71M6541 Demo Board REV 3.0 User’s Manual
1.04 Whr
04
2.21 VARhr
05
0.95 VARhr
06
07
0.7 hr
08
01:43:59
09
01.01.01
10
1
120
13
14
24.10 A
15
241.27 V
16
3.34 V
17
1
50400 W
19
88.88.88
Commands for Controlling the Metering Values Shown on the LCD Display:
Step
0
1
2
3
4
5
6
7
8
9
Text or Nu-
merical Dis-
play
10000
00
24.5 °C
01
59.9
02
3.27 Whr
03
4.11 VAhr
CLI
command
M0
M1
M2
M3
M4
M5
M6
M7
M8
M9
Displayed Parameter(s)
Meter ID
Temperature difference from calibr ation temperature.
Frequency at the VA_IN input [Hz]
Accumulated imported real energy [Wh]. The default display setting
after power-up or reset.
Accumulated exported real energy [Wh].
Accumulated reactive energy [V ARh].
Accumulated exported reactive energy [VARh].
Accumulated apparent energy [V A h].
Elapsed time since last reset or power up.
Time of day (hh.mm.ss)
10
11
12
13
14
15
16
17
18
19
20
0.62
11
0
48
241.34 W
18
88.88.88
88.88.88
M10
M11.P
M12
M13
M14
M15.P
M16
M17
M18
M19
M20
Date (yy.mm.dd)
Power factor (P = phase)
Not used in the 71M6541
Zero crossings of the mains voltage
Duration of sag or neutral current [s]
RMS current (P = phase)
RMS voltage
Battery voltage
Momentary power in W (P = phase)
Demand
LCD Test
Displays for total consumption wrap around at 999.999Wh (or VARh, VAh) due to the limited number of available display digits. Internal registers (counters) of the Demo Code are 64 bits wide and do not wrap around.
16 Rev 4.0
71M6541 Demo Board REV 3.0 User’s Manual
1.8.2 USING THE DEMO BOARD FOR ENERGY MEASUREMENTS
The 71M6541 Demo Board was designed for use with shunt resistors connected directly t o the IAP/IAN pins of
the 71M6541 and via the Remote Sensor I nterface and it is shipped in this configuration.
The Demo Board may immediately be used with a 50 µΩ shunt resistor (ANSI) or a 120 µΩ shunt resistor (IEC).
It is programmed for a kh factor of 1.0 (see Section 1.8.4 for adjusting the Demo Board for shunts with different
resistance).
Once, voltage is applied and load current is flowing, the red LED D5 will f l ash each time an energy sum of 1.0
Wh is collected. The LCD display wil l show the accumulated energy in Wh whe n s et to display mode 3 (com-
>M3 via the serial interface).
mand
Similarly, the red LED D6 will flas h each time an energy sum of 1.0 VARh is collected. The LCD display will
show the accumulated energy in VARh when set to display mode 5 (command
>M5 via the serial interface).
1.8.3 ADJUSTING THE KH FACTOR FOR THE DEMO BOARD
The 71M6541F Demo Board is shipped with a pre-programmed scaling factor Kh of 1.0, i.e., 1.0 Wh per pulse.
In order to be used with a calibrated loa d or a meter calibration system, the boar d should be connected to the
AC power source using the spade terminals on the bottom of the board. The shunt resistor should be connected
to the dual-pin header labeled J3 on the bottom of the board.
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 insert i ng them in the following equation
for Kh:
Kh = 109.1587*
See the explanation in section 1.10.4 for an exact definition of the constants and variables involv ed i n the equation above.
VMAX*IMAX / (SUM_SAMPS*WRATE*X),
1.8.4 ADJUSTING THE DEMO BOARDS TO DIFFERENT SHUNT RESISTORS
The Demo Board is prepared for use with 120 µΩ or 50 µΩ (ANSI option) shunt resistors in both current channels. For the Demo Board, a certain current flowing through the 120 µΩ shunt resistor will result in the maximum
voltage drop at the ADC of the 71M6541. This current is defined as IMAX.
IMAX will change when different values are used for the shunt r es i s tor(s) which will require that
be updated as shown in section 1.10.4.
WRATE has to
1.8.5 USING THE PRE-AMPLIFIER
In its default setting, the 71M6541 is applies a gain of 1 to the current input for phase A (IAP/IAN pins). This
gain is controlled with the PRE_E bit in I/O RAM (r efer to the IC data sheet). The command line interface (RI
command) can be used to set or reset this bit. It is recommended to maintain the gain of setting of 1
(RI2704=0x90).
1.8.6 USING CURRENT TRANSFORMERS (CTs)
Phase B of the 71M6541 Demo Board can be equipped with a CT that may be connected at header J8. A burden resistor of 1.7 Ω, or any other value m ay be installed at the R33 and R34 locations. With a 2000:1 ratio CT,
the maximum current fort phase B will be 208 A.
Note: The CT configuration will require a different version of the Demo Code.
Current measurements can be displa ye d for phase B by the demo code, and the corr esponding currents can be
extracted by the MPU from the CE register s for tamper detection when using the Demo Code for EQU 0.
1.8.7 IMPLEMENTING A SINGLE-PHASE 3-WIRE METE R (EQU 1)
This application will require two identical current sensors for eac h phase. The simplest approach is to use identical shunt resistors for each channel .
1.8.8 ADJUSTING THE DEMO BOARDS TO DIFFERENT VOLTAGE-DIVIDERS
The 71M6541 Demo Board comes equipped with its own network of resist or dividers for voltage measurement
mounted on the PCB. The resistor values (for the D6541 REV 3.0 Demo Board) are 2.5 477MΩ (R15-R21, R26R31 combined) and 750Ω (R32), resulti ng in a ratio of 1:3,393.933. Thi s means that
176.78mV*3,393.933 = 600V. A large value for VMAX has been selected in order t o have headroom for
17 Rev 4.0
VMAX equals
71M6541 Demo Board REV 3.0 User’s Manual
overvoltages. This choice need not be of concern, since the ADC in the 71M6541 has enough resolution, even
when operating at 120Vrms or 240Vrms.
If a different set of voltage-dividers or an external voltage transformer (potential transformer) is to be used,
scaling techniques should be used.
In the following example we assume that the line voltage is not applied t o the resistor divider for VA formed b y
R15-R21, R26-R31, and R32, but to a volt age transformer with a ratio N of 20:1, followed by a simple resistor
divider. We also assume that we want t o m aintain the value for
voltage excursions.
VMAX at 600V to provide headroom for large
When applying
is scaled by the resistor divider rat i o RR. When the input voltage to the voltage channel of the 71M6541 is the
V
s
desired 177mV, V
VMAX at the primary side of the transformer, the secondary voltage V
This divider ratio can be implemented, for example, with a combination of one 16.95 kΩ and one 100 Ω resistor.
If potential transformers (PT s ) are used instead of resistor dividers, phase shifts will be introduced that will re-
quire negative phase angle compens ation. Maxim Integrated Demo C ode accepts negative calibration f ac tors
for phase.
1.9 CALIBRATION PARAMETERS
1.9.1 GENERAL CALIBRATION PROCEDURE
Any calibration method can be used with the 71M6541F chips. This Demo Board User’s Manual present s calibration methods with three or fiv e 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 71M6541 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 modif ied to display averaged voltage
and current values (as opposed to momentary values). Also, automate d c al ibration 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.
Complete calibration procedur es are given in section 2.3 of this manual.
Regardless of the calibration proc edure used, parameters (calibration factors) will result that will have to be ap-
plied to the 71M6541F chip in order to make the chip apply the modified gains and phase shifts necessary for
accurate operation. Table 1-4 s hows 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
is:
s
stores the decimal value 16302 in the CE RAM location controlling the gain of the current channel (
CAL_IA).
The command
>]11=4005
stores the hexadecimal value 0x4005 (decimal 16389) in the CE RAM loc ation controlling the gain of the voltage channel (
CAL_VA).
The internal power supply generat es a ripple on the supply and ground nets that is 90° phase shifted with respect to the AC supply voltage. This affects the accuracy of the VARh measurements. If optimization of the
VARh accuracy is required, this can be done by writing a value into the QUANT_VAR regist er of the CE (see
section 2.3.7).
18 Rev 4.0
Table 1-4: CE RAM Locations for Calibration Constants
CE0 /disable CE
CE1 /enable CE
CE Ad-
Coefficient
CAL_VA
CAL_IA
CAL_IB
PHADJ_A
LCOMP2_B
dress
(hex)
0x11
0x10
0x13
0x12
0x15
Description
Adjusts the gain of the voltage chan nels. +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 chann el s . +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 phase compensation. No compensation occurs
in a phase when PHADJ_A = 0 or when LCOMP2_n = 16384. As
LCOMP2_n is increased, more compensation is introduced.
CE codes for CT configuration do not use delay adjustment. These codes
use phase adjustment (
1.9.2 CALIBRATION MACRO FILE
The macro file in Figure 1-4 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
Transfer->Send Text File command.
It is possible to send the calibration mac ro file to the 71M6541F for “temporary” calibration. This will temporaril y
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!
1.9.3 UPDATING THE DEMO CODE (HEX FILE)
The d_merge program updates t he hex file (usually named 6541_1p2b_19jan09.hex or similar) with th e values
contained in the macro file. This pro gram 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_6541_demo.hex into new_6541_demo.hex, use the command:
The new hex file can be written to the 71M6541F/71M6541H through the ICE port using the ADM-51 in-circuit
emulator or the TFP-2 flash programmer.
send text file procedure of HyperTerminal.
19 Rev 4.0
71M6541 Demo Board REV 3.0 User’s Manual
1.9.4 UPDATING CALIBRATION DATA IN FLASH O R EEPROM
It is possible to make data permanent that had been entered temporarily into the CE RAM. The transfer t o
EEPROM memory is done using the following serial interface command:
>]CLS
Thus, after transferring calibration data with manual serial int er face commands or with a macro file, all that has
to be done is invoking the U command.
Similarly, calibration data can be restored to default values using the CLD command.
After reset, calibration data is cop ied 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 p r eviously stored to the EEPROM.
1.9.5 LOADING THE CODE FOR THE 71M6541 INTO THE DEM O BOARD
Hardware Interface for Programming: The 71M6541F IC provides an interface for loading code into the inter-
nal flash memory. This interface consi s ts of the following signals:
E_RXTX (data), E_TCLK (clock), E_RST (reset), ICE_E (ICE enable)
These signals, along with V3P3D an d GND are available on the emulator h eaders J14.
Programming of the flash memory requires a specific in-circuit emulator, the ADM-51 by Signum Systems
(www.signum.com) or the Flash Programmer (T FP2) available through Digi-Key (www.digikey.com) or Mouser
Electronics (www.mouser.com).
Chips may also be programmed before t hey are soldered to the board. Gang programmers suitable for highvolume production are availab le from BPM Microsystems (www.bpmmicro.com).
In-Circuit Emulator: If firmware exists in the 71M6541F flash memory; it has t o be erased before loading a new
file into memory. Figure 1-5 and Figure 1-6 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.
To successfully erase the flash memory, the following steps have to be taken :
1) Disable the CE by writing 0x00 to addres s 0x2000
2) Write 0x20 to address 0x2702 (
3) Reset the demo board (RESET button or power cycle)
4) Activate the ERASE button in the WEMU51 user interface
5) Now, new code can be loaded into the flash memory
Once the flash memory is erased, the new file can be loaded using the comm ands File followed by Load. The
dialog box shown in Figure 1-6 will then appear making it possible to select the file to be loaded by clicking the
Browse button. Once the file is sel ec ted, pressing the OK button will loa d the file into the flash memory of t he
71M6541F IC.
At this point, the emulator probe (cab le) can be removed. Once the 71M6541F IC is reset using the reset button
on the Demo Board, the new code starts executing.
FLSH_UNLOCK[ ] register in I/O RAM)
20 Rev 4.0
71M6541 Demo Board REV 3.0 User’s Manual
Figure 1-5: Emulator Window Showing Reset and Erase Buttons (see Arrows)
Figure 1-6: Emulator Window Showing Erased Flash Memory and File Load Menu
Flash Programmer Module (TFP-2): The operational firmware of the T FP 2 will have to be upgraded to revision
1.53. Follow the instructions given in the User Manual for the TFP-2.
21 Rev 4.0
71M6541 Demo Board REV 3.0 User’s Manual
Signal
Direction
Function
ICE_E
Input to the 71M6541
ICE interface is enabled when ICE _E is
pulled high
E_TCLK
Output from 71M6541
Data clock
E_RXTX
Bi-directional
Data input/output
E_RST
Bi-directional
Flash Downloader Reset (active low)
1.9.6 THE PROGRAMMING INTERFACE OF THE 71M6541
Flash Downloader/ICE Interface Signals
The signals listed in Table 1-5 are neces sary for communication between the Flash Downloader or ICE and the
71M6541.
Table 1-5: Flash Programming Interface Signals
The E_RST signal should only be driven by the Flash Downloader when enabli ng these interface
signals. The Flash Downloader mus t release E_RST at all other times.
22 Rev 4.0
1.10 DEMO CODE
1.10.1 DEMO CODE DESCRIPTION
The Demo Board is shipped preloade d with Demo Code in the 71M6541F chip. The code r ev i s i on can easily be
verified by entering the command >i v i a the serial interface (see sectio n 1.8.1). Check with your local Maxim Integrated representative or FAE for the latest revision.
The Demo Code is provided in two diff er ent versions:
•Single-phase two-wire operation (EQU 0, with secondary tamper sensor). Energy measurement and
Wh/VARh pulses are based solely on VA (phase A voltage) and IA (phase A current). Energy and current values for IB (secondary phase) are available as CE outputs to the MPU f or processing of tampering events.
•Single-phase three-wire operation ( ANSI configuration, EQU 1). E ner gy measurements and Wh/VARh
pulses are based on VA (IA – IB) / 2.
71M6541 Demo Board REV 3.0 User’s Manual
Both Demo Code versions use the same CE code, but with different settings of the
The Demo Code offers the following features:
•It provides basic metering functions such as pulse generation, display of accumulated energy, fre-
quency, 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 basi c household functions such as the real-time clock (RTC).
• It provides access to control and dis pl ay functions via the serial interface, enabling the user to vie w
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 de-
velopment.
A detailed description of the Demo C ode can be found in the Software User’s G uide (SUG). In addition, the
comments contained in the librar y prov ided with the Demo Kit can serve as usef ul documentation.
The Software User’s Guide contains the following information:
In the demo code, certain MPU XRAM para m eters have been given addresses in order to permit easy external
access. These variables can be read via the command line interface (if available), with the )n$ com mand and
written with the )n=xx command where n is the word address. Note that accumulat ion variables are 64 bits long
and are accessed with )n$$ (read) and )n=hh=ll (write) in the case of accumulat ion variables.
The first part of the table, the addr esses )00..)1F, contains adjustments, i.e., numbers that may need adjustment in a demonstration meter, and so are par t of the calibration for demo code. In a r eference meter, these
may be in an unchanging table in code space.
The second part, )20..)2F, pertains to calibration, i.e., variables that are likely to need indivi dual adjustments for
quality production meters.
The third part, )30…, pertains to meas ur ements, i.e., variables and regi s ters that may need to be read in a
demonstration meter.
EQU register.
23 Rev 4.0
Loading...
+ 53 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.