6613_OMU_2+2S_URT_V1_00 Firmware Desc rip tio n Doc ument UG_6613_060
Maxim cannot assume responsibility for use of any circuitry other than circuitry entirely embodied in a Maxim product. No circuit
patent licenses are implied. Maxim reserves the right to change the circuitry and specifications without notice at any time.
Maxim Integr ated Products, 12 0 San Gabriel Drive, Sun nyvale, CA 94086 408- 737-7600
2011 Maxim Integrated Products Maxim is a registered trademark of Maxim Integrated Products.
This document describes the 6613_OMU_2+2S_URT_v100 firmware, which is used with the Teridian
78M6613 power and energy measurement IC. This firmware provides simple methods for calibration and
access to measurement data such as Instantaneous Power, Voltage, Current, Power Factor, and Line
Frequency. It is specifically developed for measurement of up to two single phase loads with the
following key features:
• Optimized for using current shunt resistors with analog inputs A0, A2 are configured as Voltage input
• Phase error calibration routine included for use of current transformers and/or maintaining accuracy
• Low-latency SAG status pin for sub-cycle AC fault detection.
• UART (RS232) host interface (Command Line Interface).
All measurement calculations are computed by the 78M6613 and communicated to the host processor
over a serial interface (UART0) on the TX and RX pins of the 78M6613 device. Digital IOs utilized by this
firmware include:
Figure 1 shows a simplified connection diagram of the 78M6613 (emulator connections, decoupling
capacitors and 3.3VDC power supply are omitted in this diagram).
and input A1,A3 are configured as Current inputs.
over non-ideal power factors.
Figure 1: Typical 78M6613 Connection Diagram for 6613_OMU_2+2S_URT_v100
Rev. 1.1 5
6613_OMU_2+2S_URT_V1_00 Firmware Desc rip tio n Doc ument UG_6613_060
2 Measurement Description
2.1 Basic Measurement Equations
The Teridian 78M6613 with firmware 6613_OMU_2+2S_URT_v100 provides the user with measurement
data referred to as “Wideband” (WB). Wideband measurements are generally of interest when measuring
non-sinusoidal current/voltage, a typical condition in switched mode power supplies or similar systems.
Table 1: Measurement Equations Definitions
Symbol Parameter Wideband Equation
V RMS Voltage
I RMS Current
P Active Power
Q Reactive Power Q = √(S2 – P2)
S Apparent Power S = V * I
PF Power Factor P/S
PA Phase Angle ACOS (P/S)
V = √∑
I = √∑
P = ∑
The measurement outputs are continuously available to the user. To obtain measurement outputs, the
serial UART interface between the 78M6613 and the host processor must be set up and is described in
Section 3.
2.2 Sample Rate and Accumulation Interval
2
v(t)
2
i(t)
(i(t) * v(t))
This firmware utilizes an effective sampling rate of 3641 samples per second for each input.
The values described in section 2.1 are calculated over a period commonly referred as accumulation
interval. The registers containing the measurements are updated at the completion of every accumulation
time. The accumulation interval for this firmware is fixed at roughly 496 milliseconds.
3 Serial Communication
The serial communication with the 78M6613 takes place over a UART (RS232) interface. The default
settings for the UART of the 78M6613, as implemented in this firmware, are given below:
The 6613_OMU_2+2S_URT_v100 firmware implements an instruction set called the Command Line
Interface (CLI), which facilitates communication via UART between the 78M6613 and the host processor.
4.1 Identification and Information Commands
The I command is used to identify the revisions of the 6613_OMU_2+2S_URT_v100 firmware code and
the embedded CE code. The host sends the I command to the 78M6613 as follows:
>I<CR>
The 78M6613 will reply the following:
TSC 78M6613 OMU 2+2S URT V1.00, Nov 05 2010(c) 2010 Teridian Semiconductor Corp.
All Rights Reserved
CEVIVI200F0
>
4.2 Reset Commands
A soft reset of the 78M6613 can be performed by using the Z command. The soft reset restarts code
execution at addr 0000 and does not alter flash contents. To issue a soft reset to the 78M6613, the host
sends the following:
>Z<CR>
The W command acts like a hardware reset. The energy accumulators in XRAM will retain their values.
Z Reset
Description: Allows the user to cause soft resets.
Usage: Z Soft reset.
W Simulates watchdog reset.
Rev. 1.1 7
6613_OMU_2+2S_URT_V1_00 Firmware Desc rip tio n Doc ument UG_6613_060
4.3 MPU Data Access Command
All the measurement calculations are stored in the MPU data addresses of the 78M6613. The host
requests measurement information using the MPU data access command which is a right parenthesis
)
To request information, the host sends the MPU data access command, the address (in hex) which is
requested, the format in which the data is desired (Hex or Decimal) and a carriage return. The contents
of the addresses that would be requested by the host are contained in Section 7.
4.3.1 Individual Address Read
The host can request the information in hex or decimal format. $ requests information in hex, and ?
requests information in decimal. When requesting information in decimal, the data is preceded by a + or
a -. The exception is )AB? which returns a string (see Table 3, MPU location address 0xAB).
An example of a command requesting the measured power in Watts (located at address 0x08) in decimal
is as follows:
>)08?<CR>
An example of a command requesting the measured power in Watts (located at address 0x08) in hex is
as follows:
>)08$<CR>
4.3.2 Consecutive Read
The host can request information from consecutive addresses by adding additional ? for decimal or
additional $ for hex.
An example of requests for the contents in decimal of ten consecutive addresses starting with 0x12 is:
>)12??????????<CR>
An example of requests for the contents in hex of ten consecutive addresses starting with 0x12 would be:
>)12$$$$$$$$$$<CR>
Note: The number of characters per line is limited to no more than 60.
The block read command can also be used to read consecutive registers: )saddr:eaddr? For decimal
format or )saddr:eaddr$ for hex format where saddr is the start address and eaddr is the final address.
The following block read command requests the information contained in Table 2 in decimal format:
>)20:3D?<CR>
4.3.4 Concatenated Reads
Multiple commands can also be added on a single line. Requesting information in decimal from two
locations and the block command from above are given below:
>)12?)15?)20:3D?<CR>
Note: The number of characters per line is limited to no more than 60.
4.3.5 U Command
The U command is used for updating default values of the MPU Data permanently in the flash. Before
issuing the U command, CE must first be turned off by the disable CE command. An example of a U
command is as follows:
>)U
Additional examples of MPU Data Access commands are provided in the following table:
) MPU Data Access
Description: Allows user to read from and write to MPU data space.
Usage: ) {Starting MPU Data Address} {option}…{option}<CR>
Command
Combinations:
)saddr? <CR> Read the register in decimal.
)saddr?? <CR> Read two consecutive registers in decimal.
)saddr???<CR> Read three consecutive registers in decimal.
)saddr:eaddr?
Block read command in decimal format. Read
consecutive registers starting with starting
address saddr and ending with addres s eaddr.
Results given in decimal.
)saddr$<CR> Read the register word in h ex.
)saddr$$ <CR> Read two consecutive register words in hex.
)saddr$$$<CR> Read three consecutive register words in hex.
)saddr:eaddr$
Block read command in hex format. Read
consecutive registers starting with starting
address saddr and ending with addres s eaddr.
Results given in hex.
)saddr=n<CR> Write the value n to address saddr in hex format.
)saddr=n=m<CR> Write the values n and m to two consecutive
addresses starting at saddr in hex format.
)saddr=+n<CR> Write the value n to address saddr in decim al
format.
)saddr=+n=+m<CR> Write the values n and m to two consecutive
addresses starting at saddr in decimal format.
Rev. 1.1 9
6613_OMU_2+2S_URT_V1_00 Firmware Desc rip tio n Doc ument UG_6613_060
)U<CR>
Updates the default values of the MPU Data
permanently in the flash.
Examples: )08$<CR> Reads data word at MPU address location 0x08
in hex format.
)08$$<CR> Reads data words at MPU address location
0x08, 0x09 in hex format.
)08$$$<CR> Reads data words at MPU address location
0x08, 0x09, 0x0A in hex format.
)28:4D$ Read data words in hex.
)08?<CR> Reads data word at MPU address location 0x08
in decimal format.
)08??<CR> Reads data words at MPU address location
0x08, 0x09 in decimal format.
)08???<CR> Reads data words at MPU address location
0x08, 0x09, 0x0A in decimal format.
)28:4D? Read data words at MPU a ddres s locatio n
starting 0x28 to 0x4D in decimal.
)04=12345678<CR> Writes 0x12345678 to MPU address location
0x04 in the hex format.
)04=12345678=9876ABCD<CR> Writes 0x12345678 to MPU address location
0x04 and 0x9876ABCD at MPU address location
0x05 in the hex format.
)04=+123<CR> Writes 123 to MPU address location 0x04 in the
decimal format.
)04=+123=-334<CR> Writes 123 to MPU address location 0x04 and
The repeat command can be useful for monitoring measurements and is efficient in demands from the
host.
If the host requests line frequency, alarm status, Irms wb overcurrent event count, Vrms SAG event
count, Vrms overvoltage event count, vo lta ge, po wer, and accumulated energy measurements with the
following command string:
>)20????????<CR>
If the host then desires this same request without issuing another command, the repeat command can be
used:
>, (no carriage return needed for the repeat command)
The host only needs to send one character rather than an entire string.
Auxiliary
Description: Various
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.
/ 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.
Rev. 1.1 11
6613_OMU_2+2S_URT_V1_00 Firmware Desc rip tio n Doc ument UG_6613_060
4.5 Calibration Commands
Using the precision source method, the user provides a precision voltage and precision current load to the
device for calibration. The 6613_OMU_2+2S_URT_v100 firmware provides commands to calibrate the
measurement units. For linear current sensors, such as current shunt, no phase calibration is necessary.
There are two types of calibration commands. The first type provides complete calibration. The second
group, called atomic calibration commands, provides calibration for individual energy measurement
parameters of the IC.
The CALW command calibrates the temperature, voltage, and power (instead of the current).
To calibrate channel 1, enter the following:
>CALW<CR> or CALW1<CR>
The response is:
TCal OK
VCal OK:
WCal 1 OK:
>
To calibrate channel 2, enter the CAL2 command:
>CALW2<CR>
The response is:
TCal OK
VCal OK:
WCal 2 OK:
>
The device calibrates the temperature, the volta ge, and the power and save all values to flash.
The CALW3 command calibrates both channel 1 and channel 2.
The complete calibration commands are summarized in the following table:
Complete Calibration Commands
Description: Calibrates the IC.
Usage: CAL<channel> Calibrates temperature, then voltage,
and finally current for the given channel.
CAL1 = Calibra tes channel 1
6613_OMU_2+2S_URT_V1_00 Firmware Desc rip tio n Doc ument UG_6613_060
4.5.2 Atomic Calibration Commands
The atomic calibration commands provide individual calibration of:
• Voltage.
• Current.
• Phase.
• Temperature.
• Power.
A sequence of these commands results in full calibration of the unit.
4.5.2.1 CLV Command
The CLV atomic calibration command calibrates voltage to the target value and tolerance and saves the
coefficients to flash. To calibrate the voltage, enter the CLV command:
>CLV<CR>
The response is:
VCal OK:
>
4.5.2.2 CLI Command
The user can then calibrate the current using the CLI command. The CLI command calibrates the current
from the specified channel to the target value and tolerance and saves the coefficients CLW. To calibrate
the current for channel 1, enter the following:
>CLI<CR> or CLI1<CR>
The response is:
ICal 1 OK:
>
The CLI2 command performs the current calibration for channel 2.
The CLI3 command performs the current calibration for both channel 1 and channel 2.
4.5.2.3 CLP Command
The user can calibrate for phase added by a current transformer by using the CLP command. The CLP1
command calibrates the phase from channel 1 to the target value and tolerance and saves the coefficient
to flash. An example of the procedure is given below.
Apply a controlled precision voltage and current signal at a set phase angle.
1. Enter target phase angle at )C3.
2. Enter phase tolerance at )BF
3. Enter phase calibration command.
>CLP<CR> or CLP1<CR>
The response is
>PCal 1 OK:
14 Rev. 1.1
Loading...
+ 32 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.