Download as pdf or txt
Download as pdf or txt
You are on page 1of 35

TI Designs

Single-Phase Electric Meter with Isolated Energy


Measurement

TI Designs

Design Features

TI Designs provide the foundation that you need


including methodology, testing and design files to
quickly evaluate and customize the system. TI Designs
help you accelerate your time to market.

Design Resources

TIDM-METROLOGY-HOST

Design Page

MSP430AFE253
MSP430F6638
ISO7420
ISO7421
TPS77033
TPD4E004

Product Folder
Product Folder
Product Folder
Product Folder
Product Folder
Product Folder

Simplified Meter Calibration by Using USB


Connection
Isolated Communications Between Metrology AFE
and Host MCU
TI Energy Library for Metrology Calculates All
Energy Measurement Parameters
Host MCU Application Controls Onboard LCD and
Meter Calibration
Single-Phase Energy Measurement Achieves Class
0.2 Accuracy
Segment LCD on Board

Featured Applications

ASK Our E2E Experts


WEBENCH Calculator Tools

Metering
Street Lighting

ELECTRICAL
ISOLATION
BOUNDARY

AC mains
N
L
MSP430AFE
JTAG

Capacitive
Power supply

VCC

LCD
DISPLAY

VCC
RST
VSS

GND

MSP430
AFE

GPIO

A
B

Analog to
Digital

8 MHz

F663x JTAG

XT2 IN

I1-

C
TEST

I In
I1+
V1+
V In

REAC MAX

kW

kWh

XT2 OUT
HF crystal

V1-/
V1Vref(O)
Vref(I)
VREF

AC mains
I/O I/O

LOAD

URXD0
UTXD0

SCLK

SCLK

SOMI SIMO

UART TO PC
SPI

RS 232
BRIDGE

SPI
SPI

MSP430
F663x

VCC
GND

Optical Digital
Isolators

APPLICATION
PROCESSOR
USB

ISOLATED
AC/DC
POWER
SUPPLY

VCC
GND

20-pin

SPI

USB COMM
TO PC

Wireless
Daughter
Card EMK
Interface

20-pin

All trademarks are the property of their respective owners.


TIDU455 August 2014
Submit Documentation Feedback

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

System Description

www.ti.com

An IMPORTANT NOTICE at the end of this TI reference design addresses authorized use, intellectual property matters and other
important disclaimers and information.

System Description
Electric meter developers often prefer to separate the energy measurement function from the host
processor functions such as ANSI/IEC data tables, DLMS/COSEM, tariff management, and
communications. This design demonstrates a method for keeping these meter functions separated by
using the MSP430AFE253 as the metrology processor and the MSP430F6638 as the host processor. The
design also demonstrates how to isolate communications between the two processors to achieve the
necessary safety requirements. Finally, this design demonstrates a method for meter calibration using the
USB interface on the F6638 MCU.
The MSP430AFE25x devices belong to the MSP430F2xx family of devices. These devices find their
application in energy measurement and have the necessary architecture to support it. The
MSP430AFE25x, mentioned as MSP430AFE from this point forward, has a powerful 12-MHz CPU with
MSP430 architecture. The analog front end (AFE) consists of up to three analog-to-digital converters
(ADC) based on a second-order sigma-delta architecture that supports differential inputs. The sigma-delta
ADCs (SD24_A) have capabilities to output 24-bit results and can be grouped together for simultaneous
sampling of voltage and currents on the same trigger. In addition, each has an integrated gain
amplifier (with gains up to 32) for amplification of low-output sensors. A 1616-bit hardware multiplier on
this chip is used to further accelerate math intensive operations required for metrology parameters. The
programmable software on the MSP430AFE supports calculation of various parameters for single phase
energy measurement with tamper detection. The key parameters calculated during energy measurements
are RMS current and voltage, active, reactive, and apparent power and energies, power factor, and
frequency.
The MSP430F663x, the host processor in this two-chip architecture, has a powerful 20-MHz CPU with an
MSP430 architecture. The MSP430F663x contains a full-speed Universal Serial Bus (USB), integrated
LCD driver with contrast control for up to 160 segments, a hardware real-time clock with battery back-up
system, multiple timers, and serial communication interfaces. With large a on-chip memory, this device is
best suited as an application processor to interface to any low-cost metrology processor such as the
MSP430AFE. The host-processor related portions of this design are isolated from the metrology-processor
related portions, thereby isolating the host processor from mains high voltage. Isolated inter-processor
communication between the metrology and host processor is made possible using the ISO7420 and
ISO7421 isolators on the SPI/UART pins.
This design guide has a complete metrology and application source code provided as a downloadable zip
file.

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

TIDU455 August 2014


Submit Documentation Feedback

Design Features

www.ti.com

Design Features
This section describes the front-end passives and other components required for the design of an energy
meter using the MSP430AFE.

2.1

Hardware Implementation

2.1.1

Power Supply
The MSP430 family of microcontrollers support a number of low-power modes in addition to low-power
consumption during active (measurement) mode when the CPU and other peripherals are active. Since an
energy meter is always interfaced to the AC mains, the DC supply required for the measuring element
(MSP430AFE) can be easily derived using an AC-to-DC conversion mechanism.
The reduced power requirements of this device family allow design of power supplies to be small,
extremely simple, and cost-effective. The power supply allows the operation of the energy meter by being
powered directly from the mains. The next sub-sections discuss the various power supply options that are
available to users to support their design.

2.1.1.1

Resistor Capacitor (RC) Power Supply

Figure 1 shows a simple capacitor power supply that supplies a regulated output voltage of 3.3 V using
the mains AC voltage of 110 to 230 V.
R23
DNP
TPS77033

0
R26

DGND_AFE

U+

IN

/EN

OUT

DVCC_PL

FB

ZD1

GND

C4
0.1u

IC3

DNP (3.3V)
0.1u
C26+
C23
10u

D10
LL103A

C25

R22
560R / 5W

2200uF

910n / 400V

ZD2
5.1V

S20K275

V1

NEUTRAL
1uH
L6

C49

LINE_A

1uH
L5

R1

LINE

DGND_AFE
CONNECT AGND and DGND
DGND_AFE

Figure 1. Simple Capacitive Power Supply for the MSP430 Energy Meter
Appropriate values of resistor R22 and capacitor C49 are chosen based on the required output currentdrive of the power supply. Voltage from mains is directly fed to a RC based circuit followed by a
rectification circuitry to provide a DC voltage for the operation of the MSP430. This DC voltage is
regulated to 3.3 V for full speed operation of the MSP430. For the circuit above, the drive provided is
approximately 25 mA. The design equations for the power supply are given in the MSP Family MixedSignal Microcontroller Application Notes (SLAA024, Section 3.8.3.2). If an additional drive is required, use
either an NPN output buffer or a transformer- or switching-based power supply.

TIDU455 August 2014


Submit Documentation Feedback

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

Design Features

2.1.1.2

www.ti.com

Switching-Based Power Supply

When high current drive is required to drive RF transceivers, a simple capacitive power supply will not
provide enough peak-current. Therefore, a switching-based power supply is required. A separate power
supply module on the board may be used to provide 3.3-V DC from the AC mains of 110 to 230-V AC.
Figure 2 shows the use of an SMPS module to provide a 3.3-V rail with increased current drive. This
module is used on the EVM430-AFE253 to provide an isolated voltage to drive only the MSP430F663x
and its associated interfaces.

R5

S20K275

L_APP

26

26

22

22

C38

4.7u/400V

N_APP

VO-

NC

NC

ZD3

VO-

DVCC_APP_PL

C37

VO+

150uF
C36

VO+

0.1u

DGND_APP

SMAJ5.0ABCT

Figure 2. Switching-Based Power Supply for the MSP430 Applications Processor

2.1.2

Analog Inputs
The MSP430AFEs AFE, which consists of the ADC, is differential and requires that the input voltages
at the pins do not exceed 500 mV (gain = 1). To meet this specification, the current and voltage inputs
need to be scaled down. In addition, since the SD24_A allows negative voltage of up to 1 V; AC mains
signals can be directly interfaced without the need for level shifters. This sub-section describes the AFE
used for voltage and current channels.

2.1.2.1

Voltage Inputs

The voltage from the mains is usually 230 or 110 V and needs to be scaled down to a range of 500 mV.
The AFE for voltage consists of spike protection varistors (not shown) followed by a simple voltage divider
and a RC low-pass filter that acts like an anti-alias filter.

V1 R44
330k
330k

R50

NEUTRAL

AGND_AFE

R24

C13

100

R53

330k

R41

GND

R38

1.5K

LINE_A

47pF
C14

1K

47pF

V1+
C41
15nF
V1-

R47
AGND_AFE

Figure 3. AFE for Voltage Inputs


Figure 3 shows the AFE for the voltage inputs for a mains voltage of 230 V. The voltage is brought down
to approximately 350 mVRMS, which is a 495-mV peak and fed to the positive input, adhering to the
MSP430 analog limits. A common mode voltage of zero can be connected to the negative input of the
.
NOTE: The anti-alias resistors on the positive and negative sides are different because the input
impedance to the positive terminal is much higher; therefore, a lower value resistor is used
for the anti-alias filter. If this filter is not maintained, a relatively large phase shift would result
between voltage and current samples.

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

TIDU455 August 2014


Submit Documentation Feedback

Design Features

www.ti.com

2.1.2.2

Current Inputs

The AFE for current inputs is a little different from the AFE for the voltage inputs. Figure 4 shows the AFE
used for current channel I1 and I2.
AVCC_AFE
1N4148

BLM21BD121SN1D

1N4148
D24
D25

L17
BLM21BD121SN1D

GND

R20
C31

AGND_AFE1

GND

6.8

1 21 2

L18
BLM21BD121SN1D

R19

1K

D29

15nF
I1-

R18

D27

1N4148
D28

I1+

47pF C30

C18 47pF
1K

BLM21BD121SN1D

1N4148
D26

C17

R17

6.8

R33

1K

DNP
R16

GND
L16

R34

1 21 2

L15

D22
D23

R21

IN+

47pF C34
15nF
C33
47pF IN-

1K

JMP1
2

AGND_AFE

Figure 4. AFE for Current Inputs


Resistor R16 is the burden resistor that would be selected based on the current range used and the turnsratio specification of the CT (not required if shunt resistors are used as current sensors). The value of the
burden resistor for this design is around 6.8 . The anti-aliasing circuitry consisting of R and C follows the
burden resistor. The input signal to the converter is a fully differential input with a voltage swing of 500mV maximum with gain of the converter set to 1.

2.2

Software Implementation
The software for the implementation of one-phase metrology is discussed in this section. The first subsection discusses the setup of various peripherals of the metrology and application processors. In the
second sub-section, the metrology software is described as two major processes: the foreground process
and background process. In the third sub-section, the application software is described in detail.
Subsequently, the process of how the MSP430F663x receives metering parameters from the AFE is
described.

2.2.1

Peripherals Setup
The major peripherals of the MSP430AFE are the 24-bit sigma delta (SD24_A) ADC, clock system,
watchdog timer (WDT), and so on. For the MSP430F663x, the major peripherals of are the clock system,
timer, USB, LCD, WDT, and SPI (USCI).

TIDU455 August 2014


Submit Documentation Feedback

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

Design Features

2.2.1.1

www.ti.com

AFE SD24_A Setup

The MSP430AFE has up to three independent sigma delta data converters. For a single phase system, at
least two s are necessary to independently measure one voltage and current. The code accompanying
this application note will address the metrology for a 1-phase system with limited discussion to antitampering. The clock to the SD24_A is derived from an external crystal 8-MHz external crystal (ACLK).
The sampling frequency is defined as fs = fM / OSR, the OSR is chosen to be 256, and the modulation
frequency is chosen as 1 MHz, resulting in a sampling frequency of 3906 Hz. The SD24_As are
configured to generate regular interrupts every sampling instant.
The following are the channels associations:
A0.0+ and A0.0: Current I1
A1.0+ and A1.0: Current I2 (Neutral)
A2.0+ and A2.0: Voltage V1
2.2.1.2

AFE Main Clock Setup

The MSP430AFE supports an external high-frequency crystal with frequencies of up to 12 MHz. In this
EVM, an 8-MHz crystal is used, and MCLK is sourced from this external crystal.
2.2.1.3

AFE UART/SPI Setup

The MSP430F6638, the master, and MSP430AFE, the slave, communicate via SPI. In this application, the
SPI is configured in 8-bit, 3-wire mode with SPI clock set at 1 MHz.
2.2.1.4

F6638 Main Clock Setup

The MSP430F6638 supports external low-frequency or external high-frequency crystals. In this EVM, an
8-MHz high frequency crystal is used and MCLK is sourced from this crystal. In addition, a low-frequency
32,768-Hz crystal is used as ACLK to source the real time clock and LCD.
2.2.1.5

F6638 Real-Time Clock (RTC_B)

The RTC_B is a real-time clock module that is configured to give precise one-second interrupts. Based off
these one-second interrupts, the time and date are updated in the software as necessary.
2.2.1.6

F6638 LCD Controller (LCD_B)

The LCD controller on the MSP430F6638 can support up to 4-mux displays and 160 segments. In the
current design, the LCD controller is configured to work in 4-mux mode using 88 segments with a refresh
rate set to ACLK/64, which is 512 Hz. For information about the parameters displayed on the LCD, see
Section 5.1.

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

TIDU455 August 2014


Submit Documentation Feedback

Design Features

www.ti.com

2.2.2

Metrology Foreground Process


The metrology foreground process includes the initial setup of the MSP430AFE hardware and software
immediately after a device reset. Figure 5 shows the flowchart for this process.
RESET

Hardware setup:
Clock, SD24_A, Port pins, Timer,
USART

1 second of Energy
accumulated? Wait for
acknowledgement from
Background process

Y
Calculate RMS Current, RMS
Voltage, Active Power, Apparent
Power, Reactive Power,
Frequency (Hz), and Power
Factor

a. AFEENRDYFG set to indicate


foreground process is complete
b. Global flag AFEINTPENDING
set to indicate changes to the
metering status register

Figure 5. Metrology Foreground Process


The setup routines involve the initialization of the ADC, clock system, general purpose input/output (I/O
port) pins, timer, and the USART SPI communication. The MSP430AFE is configured as an 8-bit, 3-wire
SPI slave.
NOTE: Since the USART is configured for SPI, the RS-232 communication using UART cannot be
used simultaneously.

After the hardware is setup, the foreground process waits for the background process to notify it to
calculate new metering parameters. This notification is done through a status flag every time a frame of
data is available for processing. The data frame consists of processed current, voltage, active, and
reactive quantities accumulated for one second. This frame is equivalent to accumulation of 50 or 60
cycles of data synchronized to the incoming voltage signal. In addition, a sample counter keeps tracks of
how many samples have been accumulated over this frame period. This count can vary as the software
synchronizes with the incoming mains frequency.

TIDU455 August 2014


Submit Documentation Feedback

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

Design Features

www.ti.com

All values are accumulated in separate 48-bit registers to further process and obtain the RMS and mean
values during the foreground process. Using the foregrounds calculated values of active and reactive
power, the apparent power is calculated. The frequency (in Hertz) and power factor are also calculated
using parameters calculated by the background process and the formulas in Section 4.3. After all the
metering parameters are calculated, the AFEENRDYFG metering interrupt flag is asserted high to indicate
the completion of the foregrounds calculation of the metrology parameters for the current frame.
2.2.2.1

Formulae

This section briefly describes the formulae used for the voltage, current, and energy calculations. As
discussed in the previous sections, simultaneous voltage and current samples are obtained from three
independent converters at a sampling rate of 3906 Hz. Track of the number of samples that are
present in one second is kept and used to obtain the RMS values for voltage and for each current via the
following formulas:
Sample
count

VRMS = K v

Sample
count

v(n) v(n)

n =1

IRMS,ph = K i,ph

Sample count

iph (n) iph (n)

n =1

Sample count

where

ph = Live or Neutral
v(n) = Voltage sample at a sample instant n
iph(n) = Each current sample at a sample instant n
Sample count = Number of samples in one second
Kv = Scaling factor for voltage
Ki,ph = Scaling factor for line or neutral current

(1)

Power and energy are calculated for a frames worth of active and reactive energy samples. These
samples are phase corrected and passed on to the foreground process, which uses the number of
samples (sample count) to calculate total active and reactive powers via the following formulas:
Sample
count

PACT,ph = K ACT,ph

Sample
count

v(n) iph (n)

n =1

Sample count

PREACT, ph = KREACT, ph

v 90 (n) iph (n)

n =1

Sample count

where

v90(n) = Voltage sample at a sample instant n shifted by 90 degrees


KACT,ph = Scaling factor for active power
KREACT,ph = Scaling factor for reactive power

(2)

Active energy is calculated from the active power by the following equations:
E ACT, ph = PACT, ph Sample count

EREACT, ph = PREACT, ph Sample count

(3)

For reactive energy, the 90 phase shift approach is used for two reasons:
1. The approach allows accurate measurement of the reactive power for very small currents.
2. The approach conforms to the measurement method specified by IEC and ANSI standards.
The calculated mains frequency is used to calculate the 90-shifted voltage sample. Since the frequency
of the mains varies, first measure the mains frequency accurately to phase shift the voltage samples
accordingly (see Section 2.2.3.3).
Implementing the applications phase shift consists of an integer part and a fractional part. The integer part
is realized by providing an n samples delay. The fractional part is realized by a fractional delay filter (see
Section 2.2.3.2).

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

TIDU455 August 2014


Submit Documentation Feedback

Design Features

www.ti.com

After calculating the active and reactive power, the apparent power is calculated by the following formula:

PAPP, ph = PACT, ph2 + PREACT, ph 2

(4)

The background process calculates the frequency in terms of samples per mains cycle. The foreground
process then converts this to Hertz by the following formula:
Sampling Rate
Frequency (Hz) =
Frequency
where

Sampling rate in units of samples per second


Frequency in units of samples per mains cycle

(5)

After the active and apparent powers have been calculated, the absolute value of the power factor is
calculated. In the meters internal representation of power factor, a positive power factor corresponds to a
capacitive load and a negative power factor corresponds to an inductive load. The sign of the internal
representation of power factor is determined by whether the current leads or lags voltage, which is
determined in the background process. Therefore, the internal representation of power factor is calculated
by the following formula:
PAct
, if capacitive load
P
Apparent
Internal Representation of Power Factor =
- PAct
, if inducitive load
PApparent

2.2.3

(6)

Metrology Background Process


The metrology background process uses the interrupt as a trigger to collect voltage and current
samples (up to three values). These samples are used to calculate intermediate results in dedicated 48-bit
accumulation registers for parameters explained in Section 4.2. The background function deals mainly
with time critical events in software. Once sufficient samples (one second's worth) have been
accumulated, the foreground process is triggered to calculate final values of VRMS, IRMS, active, reactive
and apparent powers, active, reactive and apparent energy, frequency, and power factor. The background
process is also wholly responsible for the calculation of energy proportional pulses, frequency (in samples
per cycle), and the sign of the power factor. Figure 6 shows the flow diagram of the background process.

TIDU455 August 2014


Submit Documentation Feedback

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

Design Features

www.ti.com

SD24 Interrupts @
3906/sec

Read Voltage V1
Read Currents I1, and I2

a. Remove residual DC
b. Accumulate samples for instantaneous
Power
c. Accumulate for I RMS for both currents and
VRMS
d. Calculate frequency in samples per
second
e. Keep track of whether current leads or
lags voltage

1 second of energy
calculated?

Y
Store readings and notify
foreground process

Pulse generation based on


power accumulation threshold

AFEINTPENDING
flag asserted?

Y
Interrupt MSP430F6638 and
clear AFEINTPENDING flag

Return from
Interrupt

Figure 6. Background Process


The following sections discuss the various elements of electricity measurement in the background
process.

10

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

TIDU455 August 2014


Submit Documentation Feedback

Design Features

www.ti.com

2.2.3.1

Voltage and Current Signals

The converter has a fully differential input architecture, and each pin can accept negative inputs;
therefore, no level-shifting is necessary for the incoming AC voltage (unlike single-ended or pseudodifferential converters).
The output of each is a signed integer and any stray DC or offset value on these s are removed
using a DC tracking filter in software. Separate DC estimates for voltage and current are obtained using
the filter for voltage and current samples respectively. This estimate is then subtracted from subsequent
voltage and current samples.
The resulting instantaneous voltage and current samples are used to generate the following intermediate
results:
Accumulated squared values of voltage and current, which is used for VRMS and IRMS calculations,
respectively.
Accumulated energy samples to calculate active energy.
Accumulated energy samples using current and 90 phase-shifted voltage to calculate reactive energy.
These accumulated values are processed by the foreground process.
2.2.3.2

Phase Compensation

When a current transformer (CT) is used as a sensor, it introduces a phase shift between the current and
voltage signals. Also, the voltage and current input circuits passive components may introduce another
phase shift. The relative phase shift between voltage and current samples need to be compensated to
ensure accurate measurements. The converters have programmable delay registers (SD24PREx) that
can be applied to a particular channel. This built-in feature (PRELOAD) is used to provide the phase
compensation required. Figure 7 shows the usage of PRELOAD to delay sampling on a particular
channel.
SD24OSRx = 32
f M cycles:

32

40

32

Conversion

Delayed Conversion

Conversion

Load SD24PREx
SD24PREx = 8

Preload
Applied

Delayed Conversion
Result
Time

Figure 7. Phase Compensation Using PRELOAD Register


The fractional delay resolution is a function of input frequency (fin), OSR, and the sampling frequency (fs).
360 fin 360 fin
=
Delay resolutionDeg =
OSR fs
fm
(7)
In this application, for an input frequency of 60 Hz, OSR of 256, and sampling frequency of 3906, the
PRELOAD register resolution (one step) is about 0.02 and the maximum PRELOAD delay (a maximum of
255 steps) is 5.25. When using CTs that provide a larger phase shift than this maximum, entire sample
delays along with fractional delay must be provided. This phase compensation can also be modified on
the fly to accommodate temperature drifts in CTs, but one must ensure that the conversions on the
have been stopped.

TIDU455 August 2014


Submit Documentation Feedback

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

11

Design Features

2.2.3.3

www.ti.com

Frequency Measurement and Cycle Tracking

The instantaneous current and voltage samples for each phase are accumulated in 48-bit registers. A
cycle-tracking counter and sample counter keep track of the number of samples accumulated. When
approximately one seconds worth of samples have been accumulated, the background process stores
these 48-bit registers and notifies the foreground process to produce the average results such as RMS
and power values. Cycle boundaries are used to trigger the foreground averaging process since it
produces very stable results.
For frequency measurements, do a straight-line interpolation between the zero crossing voltage samples.
Figure 8 depicts the samples near a zero cross and the process of linear interpolation.

noise corrupted samples

good samples
linear interpolation

Figure 8. Frequency Measurement


Since noise spikes can cause errors, the application uses a rate-of-change check to filter out the possible
erroneous signals and make sure points interpolated are from genuine zero-crossing points. For example,
with two negative samples, a noise spike can make one of them positive and, therefore, make the
negative and positive pairs look as if there is a zero crossing.
The resultant cycle-to-cycle timing goes through a simple low-pass filter to further smooth out cycle-tocycle variations. This results in a stable and accurate frequency measurement tolerant of noise.
2.2.3.4

LED Pulse Generation

In electricity meters, the energy consumed is normally measured in fraction of kilowatt hour (KWh) pulses.
This information can be used to accurately calibrate any meter or for accuracy measurement. Typically,
the measuring element (MSP430) is responsible to generate pulses proportional to the energy consumed,
typically defined as pulses per kWh. To serve both these tasks efficiently pulse generation has to be
accurate with relatively little jitter. Although, time jitters are not an indication of bad accuracy, they would
give a negative indication on the overall accuracy of the meter. Therefore, the jitter has to be averaged
out.
This application uses average power to generate these energy pulses. The average power (calculated by
the foreground process) is accumulated every interrupt, spreading the accumulated energy from the
previous one-second time frame evenly for each interrupt in the current one-second time frame. This time
frame is equivalent to converting power to energy. Once the accumulated energy crosses a threshold, a
pulse is generated. The amount of energy above this threshold is kept and new energy value is added on
top of it in the next interrupt cycle. Since the average power tends to be a stable value, this way of
generating energy pulses is very steady and free of jitter.

12

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

TIDU455 August 2014


Submit Documentation Feedback

Design Features

www.ti.com

The threshold determines the energy tick specified by meter manufacturers and is a constant. The tick is
usually defined in "pulses per kWh or just in KWh. One pulse's needs to beg generates for every energy
tick. For example, in this application, the number of pulses generated per KWh is set to 1600 for active
and reactive energies. The energy tick in this case is 1 KWh per 1600 pulses. Energy pulses are
generated and available on a header and also through LEDs on the board. General purpose I/O pins are
used to produce the pulses. The number of pulses per kWh and each pulse-width can be configured in the
software. Figure 9 shows the flow diagram for pulse generation.
SD interrupts @
3906 Hz

Energy
Accumulator+=
Average Power

Energy Accumulator
>1 tick?

Y
Energy Accumulator =
Energy Accumulator 1 tick

Generate
1 pulse

Proceed to other
tasks

Figure 9. Pulse Generation for Energy Indication


In this application, the average power is represented in units of 0.01 W; therefore, the corresponding value
of the 1-KWh threshold is defined as:
1
1 KW Number of interrupts per second Number of seconds per hour
1-KWh Threshold =
.01
= 100,000 3906 3600 = 0x14765AAD400
(8)

TIDU455 August 2014


Submit Documentation Feedback

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

13

Design Features

2.2.4

www.ti.com

Application Processor Software


The application processor is a proxy between the AFE and various types of external communication and
LCD display. It is responsible for responding to port (I/O) and SPI (receive) interrupts from the AFE and
USB interrupts from a PC GUI. Figure 10 shows the flowchart of the main components of the software that
runs on the MSP430F663x.
RESET

Peripheral Setup:
Clock,, Port pins, Timers, USB, LCD, USCI

Y
2 seconds passed since
last LCD update?

a. Update LCD display to new


metering parameter
b. Send latest active power
readings to CC2530

Y
Received port interrupt
from AFE?

Send request to the AFE to send


its metering-interrupt flags

Notified by AFE that


any of the metering-interrupt
flags are asserted?

N
Y
Y
Received a complete
packet from the AFE?

Decode the received packet and


take the proper action
depending on what is received

Call corresponding function for


each metering-interrupt flag
that is asserted.

Y
GUI requested
calibration factors?

Read calibration factors from


the AFE and send it to the GUI

GUI requested to
change calibration
factor values?

Y
Send new calibration factors to
the AFE

GUI requested
configuration
information?

Y
Read configuration information
from the AFE and send it to the
GUI

Figure 10. Application Software


After a device reset, the MSP430F663x sets up the peripherals and initializes the CPU and SMCLK clock
(at 8 MHz), port pins, timers, USB, USCI, and LCD. One USCI module is configured for SPI
communication to the MSP430AFE and another module is configured for UART for wireless
communication. In this application, the USCI module for SPI communication is configured as a 3-pin, 8-bit
SPI master with a SPI clock of 1 MHz. The USCI module that is configured for UART communication is
connected to a ZigBee network processor (CC2530) and is configured for 8N1 with a baud rate of 115200.

14

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

TIDU455 August 2014


Submit Documentation Feedback

Design Features

www.ti.com

Once the hardware has been configured, the MSP430F663x enters a while loop. At the beginning of each
iteration of the loop, a timer flag is checked to determine the start of a new 2-second interval. Every twosecond interval, the LCD display is updated with a different metering parameter. Additionally, updated
active power readings received from the MSP430AFE are sent to a RF transceiver (CC2530, configured
as transmitter). Section 2.2.5 discusses how the MSP430F663x receives the active power readings and
other metering parameters from the MSP430AFE.
After determining if it is a new two-second interval, as shown in Figure 10, appropriate actions are taken.
2.2.5

Transferring New E-Meter Parameters from AFE to MSP430F663x


Although the MSP430F663x calls a function for each asserted metering-interrupt flag, only one of these
functions actually has code to deal with its corresponding metering-interrupt flag being asserted. This
function deals with the case the AFE has just calculated new e-meter parameters and has alerted the
MSP430F663x via the corresponding metering-interrupt flag. For the other functions, the user may add
code to customize the performed actions for each metering interrupt. Figure 11 shows the process used to
calculate the metering parameters and transfer the newly calculated parameters from the AFE to the
MSP430F663x.

MSP430AFE
Background

Foreground

After a second of
samples, background
tells the foreground
that the metering
parameters are ready
to be calculated.

Foreground calculates
metering paramters
based on the values
from the background.

When the background


sees that the
AFEINTPENDING flag is
set, it outputs a pulse
}vZ^&_/Ed_]v.
The flag is then cleared.

Foreground sets
AFEENRDYF and
AFEINTPENDING flags
to signify that new
emeter parameters
have been calculated.

MSP430F6638

The pulse on AFE_INT


triggers the F6638 port
interrupt, which lets
the F6638 know that
the AFE has requested
an interrupt.

Once the F6638 knows that


the AFE requested an
interrupt, it sends a SPI
command to the AFE for it to
send the values of the
metering-interrupt flags.

F6638 receives the


metering-interrupt
flags and sees that
AFENRDYF is asserted
which means new
meter parameters have
been calculated.

Has F6638
requested all
the metering parameters
from AFE?

AFE receives this


request and sends the
metering-interrupt
flags via SPI. After
sending the flags, they
are cleared.

YY

N
N
AFE receives request
and sends requested
metering parameter via
SPI

Receive and store


metering parameter

Request the next parameter


via SPI

All Metering Parameters


Received

Figure 11. Transference of Meter Parameters from AFE to MSP430F663x

TIDU455 August 2014


Submit Documentation Feedback

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

15

Block Diagram

www.ti.com

Block Diagram
Figure 12 shows a high-level system block diagram of the reference EVM (EVM430-AFE253) from Texas
Instruments, which is divided into a metrology portion that has the MSP430AFE and the application
portion that has the MSP430F663x. The MSP430AFE is a slave metrology processor and the
MSP430F663x is the host/application processor. Isolated inter-processor communication is made possible
using digital isolators on the SPI/UART pins.
ELECTRICAL
ISOLATION
BOUNDARY

AC mains
N
L
MSP430AFE
JTAG

Capacitive
Power supply

VCC

LCD
DISPLAY

VCC
RST
VSS

GND

MSP430
AFE

GPIO

A
B

Analog to
Digital

8 MHz

F663x JTAG

XT2 IN

I1-

C
TEST

I In
I1+
V1+
V In

REAC MAX

kW

kWh

XT2 OUT
HF crystal

V1-/
V1Vref(O)
Vref(I)
VREF

AC mains
I/O I/O

LOAD

URXD0
UTXD0

SCLK

SCLK

SOMI SIMO

UART TO PC
SPI

SPI
SPI

RS 232
BRIDGE

MSP430
F663x

VCC
GND

APPLICATION
PROCESSOR

Optical Digital
Isolators

USB

ISOLATED
AC/DC
POWER
SUPPLY

VCC
GND

20-pin

SPI

USB COMM
TO PC

Wireless
Daughter
Card EMK
Interface

20-pin

Figure 12. EVM430-MSP430AFE253 System Block Diagram

16

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

TIDU455 August 2014


Submit Documentation Feedback

Block Diagram

www.ti.com

Figure 13 shows the high level interface with MSP430 used for a single-phase energy meter application. A
single-phase, two-wire connection to the mains is shown in this case with tamper detection. Current
sensors are connected to each of the current channels and a simple voltage divider is used for
corresponding voltages. The CT has an associated burden resistor that must be connected at all times to
protect the measuring device. The choice of the CT and the burden resistor is done based on the
manufacturer and current range required for energy measurements. The choice of the shunt resistor value
is determined by the current range, gain settings of the SD24_A on the AFE and the tolerance of the
power dissipation. The choice of voltage divider resistors for the voltage channel is selected to ensure the
mains voltage is divided down to adhere to the normal input ranges that are valid for the MSP430
SD24_A. Refer to the MSP430x2xx users guide and MSP430AFE datasheet for these limits.
From utility

MSP430
AFE2x3

VCC
RST
VSS

PULSE2
Analog to
Digital

I1+
C
T

PULSE1

I In
I1I2I2+
V1+

V In

V1-/
V1Vref(O)
Vref(I)
VREF

XT2IN

HF crystal
(Up to 12 MHz)

XT2OUT
SPI
UART

Application
interface

LOAD

Figure 13. Single-Phase, Two-Wire Connection Using MSP430AFE2x3

TIDU455 August 2014


Submit Documentation Feedback

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

17

Energy Meter Demo

www.ti.com

Energy Meter Demo


The following figures of the EVM best describe the hardware. Figure 14 is the top view of the energy meter. Figure 15 then shows the location of
various pieces of the EVM.

F6638 JTAG

LCD
F6638 USB
RF
Connector

F6638

F6638-AFE
Isolators

Reactive Pulse
Isolated Supply
on Bottom
of Board

Isolated RS-232
Active Pulse

AFE JTAG

AFE253
Capacitive Supply
(Some portions
located on bottom
of board)

Figure 14. Top View of the EVM

18

Analog Front End

Figure 15. Top View of the EVM with Blocks and Jumpers

Single-Phase Electric Meter with Isolated Energy Measurement

TIDU455 August 2014


Submit Documentation Feedback
Copyright 2014, Texas Instruments Incorporated

Energy Meter Demo

www.ti.com

4.1

Connections to the Test Setup or AC Voltages


NOTE: This is a single-phase system and any reference to secondary currents and voltages should
not be confused with a dual-phase system.

AC voltage or currents can be applied to the board for testing purposes at these points:
Pads L1 and N1 correspond to the line and neutral voltage inputs. The EVM can measure up to 230-V
AC, 50 or 60 Hz from the AC line. This line voltage can also be used to power the MSP430AFE from
AC mains.
Pads CUR1+ and CUR1, which are the current inputs after the sensors (secondary AC current for CT
or AC voltage across shunt). Care must be taken that the AC peak amplitude fed to the corresponding
not exceed 500 mV.
CUR2+ and CUR2 can also be used as current inputs to measure another current (typically used to
measure return current for tamper detection). Care must be taken that the AC peak amplitude fed to
the corresponding not exceed 500 mV.
Pads L2 and N2 correspond to the same Line and Neutral voltage inputs. The AC mains line and
neutral voltages should be connected to these pads to provide isolated power to the host
MSP430F6638 and its associated components. On this EVM, this connection has not been made.
Figure 16 and Figure 17 shows the various connections that need to be made to the test set up for proper
functionality of the EVM.

Figure 16. Top View of the EVM with Test Setup


Connections

TIDU455 August 2014


Submit Documentation Feedback

Figure 17. Side View of the EVM with Test Setup


Connections

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

19

Energy Meter Demo

www.ti.com

With an AC test setup, the connections have to be made according to Figure 16 and Figure 17 that show
the connections from the top and side view respectively. L and N correspond to the voltage inputs from
the AC test setup. I+ and I corresponds to one set of current inputs and I+ and I corresponds to the
second set of current inputs.
Although the EVM hardware and software support measurement for the second current, the EVM obtained
from Texas Instruments does not have the second sensor. The current outputs from the AC test source
must be connected to I+ and I only. If an additional sensor needs to be placed, use the two bottom left
slots corresponding to terminals I+ and I. Additional wired connections need to be made to connect the
output of these sensors to points CUR2+ and CUR2 on the EVM.

20

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

TIDU455 August 2014


Submit Documentation Feedback

Energy Meter Demo

www.ti.com

4.2

Jumper Settings
Table 1. Header Names and Jumper Settings on the EVM
NAME

ACT

COMMS

COMMS_APP

DGND1

DGND2

TIDU455 August 2014


Submit Documentation Feedback

TYPE

2-pin header

42-pin header

42-pin header

Header

Header

MAIN FUNCTIONALITY

VALID USE-CASE

COMMENTS

Active Energy Pulses +


GND (WARNING)

Probe here for active


energy pulses. The pin
under the "ACT" label
corresponds to the
Active Energy Pulse and
the other pin
corresponds to ground.

This header is not


isolated from AC voltage
so do not connect
measuring equipments
unless isolators external
to the EVM are
available. See HDR1
instead.

Communication header
for MSP430AFE
(WARNING)

The SPI pins on this


header are interfaced to
the MSP430F663x via
on board isolators
(ISO1/ISO2/ISO3). The
This contains the SPI
UART pins correspond
and UART lines of the
to the UART signals and
MSP430AFE isolated
are not the associated
from the MSP430F6638. translated RS-232
This header also
signals; therefore, they
contains the nonhave UART voltage
isolated active and
levels and not RS232
reactive energy pulse
voltage levels. Do not
outputs (Duplicated on
connect the active and
ACT and REACT
reactive pulse pins on
headers).
this header to a scope
or other measuring
equipment if external
isolators are not present.
See HDR1 and HDR2
instead.

Communication header
for MSP430F663x

This contains the SPI


lines and the application
interrupt pin (APP_INT)
and other signals
connected to the RF
connector: RF_GPIO1,
RF_GPIO2, and SFD.

The SPI pins on this


header are interfaced to
the MSP430AFE via on
board isolators
(ISO1/ISO2/ISO3). The
APP_INT is an isolated
input from the
MSP430AFE used to
alert the MSP430F6638
that updated metering
parameters are ready.
All pins on this header
are isolated from the AC
mains

Ground voltage header


for MSP430AFE
(WARNING)

Probe here for GND


voltage of the
MSP430AFE
(DGND_AFE). Connect
negative terminal of
bench or external power
supply when powering
the MSP430AFE
externally.

Do not probe here if the


MSP430AFE is
connected to AC mains
unless when using an
isolated AC test setup.

Ground Voltage Header


for MSP430F663x

Probe here for GND


voltage of the
MSP430F663x
(DGND_APP). Connect
negative terminal of
bench or external power
supply when powering
the MSP430F663x
externally.

Note that DGND_APP is


not isolated with USB
GND voltages on the
EVM.

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

21

Energy Meter Demo

www.ti.com

Table 1. Header Names and Jumper Settings on the EVM (continued)


NAME

DVCC1

DVCC2

HDR1

HDR2

Header

Header

Header

Header

MAIN FUNCTIONALITY

VALID USE-CASE

COMMENTS

VCC Voltage Header for


MSP430AFE
(WARNING)

Probe here for VCC


supply voltage of the
MSP430AFE
(DVCC_AFE). Connect
positive terminal of
bench or external power
supply when powering
the MSP430AFE
externally.

Do not probe here if the


MSP430AFE is
connected to AC mains
unless when using an
isolated AC test setup.

VCC Voltage Header for


MSP430F663x
(WARNING)

Probe here for VCC


supply voltage of the
MSP430F663x
(DVCC_APP). Connect
positive terminal of
bench or external power
supply when powering
the MSP430F663x
externally.

Note that DGND_APP is


not isolated with USB
GND voltages on the
EVM.

Probe here for isolated


active energy pulses.

This is isolated from AC


mains voltage so it is
safe to connect a scope
or other measuring
equipments since
isolators are already
present on the EVM.

Isolated Reactive
Energy Pulses

Probe here for reactive


energy pulses.

This is isolated from AC


mains voltage so it is
safe to connect a scope
or other measuring
equipments since
isolators are already
present on the EVM.
Conditions based on
sensor:
CT: Always have a
jumper
Shunt: Do not connect a
jumper

Isolated Active Energy


Pulses

JMP1

Jumper

"CUR2" Current Sensor


Reference

Place a jumper here to


reference the negative
terminal of the "CUR2"
to analog ground
(AGND_AFE).

JTG_PWR1

Jumper

JTAG Power Selection


for MSP430AFE

Jumper placed during


JTAG programming.

See Section 4.3 for


configuration
information.

JTG_PWR2

Jumper

JTAG Power Selection


for MSP430F663x

Jumper placed during


JTAG programming.

See Section 4.3 for


configuration
information.

PWR1

Jumper

Power Option Select for


MSP430AFE

Jumper placed when


powering the
MSP430AFE either via
AC mains or external
power.

See Section 4.3 for


configuration information

PWR2

Jumper

Power Option Select for


MSP430F663x

Jumper placed when


powering the
See Section 4.3 for
MSP430F663x either via configuration information
mains or external power.

Reactive Energy Pulses


+ GND (WARNING)

Probe here for reactive


energy pulses. The pin
next to the LED
corresponds to the
Reactive Energy Pulse
pin and the other pin
corresponds to ground.

REACT

22

TYPE

Header

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

This header is not


isolated from AC voltage
so do not connect
measuring equipments
unless isolators external
to the EVM are
available. See HDR2
instead.

TIDU455 August 2014


Submit Documentation Feedback

Energy Meter Demo

www.ti.com

4.3

Power Supply Options


The EVM can be configured to operate with different sources for power specific to the MSP430AFE and
the MSP430F663x. The various sources of power to the MSP430s are JTAG, AC mains voltage, and
external bench supply and battery. Table 2 lists the header settings for the power options of the
MSP430AFE only.
Table 2. AFE Power Selection Headers
POWER OPTION

JTG_PWR1

PWR1

JTAG

Jumper on bottom two pins when board is


oriented as in Figure 16

No jumper

AC Mains Voltage

(WARNING)

External bench supply/battery

No jumper if debugging is not desired.

Jumper on [1-2]

Do not debug using JTAG unless AC


source or JTAG is isolated from each
other. Jumper on the top two pins (when
the board is oriented as shown in
Figure 16) if debugging is desired.
No jumper if debugging is not desired;
Jumper on the top two pins (when the
board is oriented as shown in Figure 16) if
debugging is desired.

Jumper on [2-3]

When powered by the AC mains voltage, the PWR1 header can also be treated as a current consumption
header by placing an ammeter across it.
Table 3 lists the header settings for the power options of the MSP430F663x only.
Table 3. F663x Power Selection Headers
POWER OPTION
JTAG

JTG_PWR2
Jumper on [1-2]

PWR2
No jumper

AC Mains voltage

No jumper if debugging is not desired;


Jumper on [2-3] if debugging is desired.

Jumper on [1-2]

External bench supply/battery

No jumper if debugging is not desired;


Jumper on [2-3] if debugging is desired.

Jumper on [2-3]

R15 must be populated (default)

Jumper on [2-3]

USB power

When powered by the mains supply, PWR2 header can also be treated as a current consumption header
by placing an ammeter across it.

TIDU455 August 2014


Submit Documentation Feedback

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

23

Results and Calibration

www.ti.com

Results and Calibration


When the MSP430F6638 and MSP430AFE are turned on, the results will be available through LCD and
the PC GUI.

5.1

Viewing Results via LCD


Table 4 shows the different metering parameters that are displayed on the LCD. If the AFE is not turned
on, then the metering parameters (with the exception of day and time) will not be updated from their
respective initial values. The initial values for the metering parameters are shown in the Initial LCD Value
column of Table 4. The LCD display scrolls between metering parameter every two seconds. To
distinguish metering parameters from each other, one or two characters are displayed on the LCD to the
left of the actual reading. The Symbol column shows which characters correspond to which metering
parameter. The Comments column provides a brief interpretation of the displayed metering parameters.
Table 4. LCD Metering Parameters
PARAMETER NAME

SYMBOL

UNITS

INITIAL LCD VALUE

COMMENTS

Voltage

Volts (V)

0.08

Current

Amps (A)

0.009

Frequency

Hertz (Hz)

Active Power

Watt (W)

Total consumed Active


Energy

100 Tick

Date

Year/Month/Day
(yymmdd)

110321

Time

Hour/Minute/Second
(hhmmss)

10203

Reactive Power

Volt-Ampere Reactive
(var)

Apparent Power

Volt-Ampere (VA)

The ':' symbol


represents the decimal
point '.'

Every 10 ticks
increments the tenths
place by 1.

The characters

Power Factor

Constant between 0 and


1

are used if the


load is determined to be
a capacitive load.
The characters

are used if the


load is determined to be
an inductive load.

24

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

TIDU455 August 2014


Submit Documentation Feedback

Results and Calibration

www.ti.com

5.2

Viewing Results via GUI


To open the GUI, follow these steps:
1. Once the MSP430F663x is turned on and the EVMs USB connector is connected to the PC, open the
device manager to find the COM port assigned to the EVM. In this example, COM19 is used.
2. Enter the /Source/GUI folder and open calibration-config.xml in a text editor.
3. Change the port name field within the <meter> tag to the COM port of the meter. In Figure 18, this field
is changed to COM19.

Figure 18. GUI Config File Changed with to EVM COM Port
4. Open calibrator.exe, which is located in the /Source/GUI folder. If the COM port in calibrationconfig.xml was changed in the previous step to the com port of the enumerated EVM, the GUI should
pop up.
Under correct connections, a top-left button will be green. If there are problems with connections or if the
code is not configured correctly, the button will be red. Once the GUI is executing, the results can be
viewed by pressing the green button as shown in Figure 19.

Figure 19. GUI Startup Window

TIDU455 August 2014


Submit Documentation Feedback

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

25

Results and Calibration

www.ti.com

Once the green button is clicked, the results window pops up, as shown in Figure 20. Note that, unlike the
LCD, the GUI power factor is displayed as a constant from 0 to 10 instead of a constant from 0 to 1. Also,
there is a trailing 'L' or 'C' to indicate an inductive or capacitive load respectively.

Figure 20. Results Window

26

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

TIDU455 August 2014


Submit Documentation Feedback

Design Files

www.ti.com

Design Files

6.1

Schematics
To download the schematics, see TIDM-METROLOGY-HOST.
DVCC_AFE

C16

R73
12pF

MSP430AFE253
ACT

L18
BLM21BD121SN1D

D29
AGND_AFE1

R21

GND

R19

6.8

1 21 2

1N4148
D28

C54
0.1u

R27

47pF C34
15nF
C33

1k

BC860B/BC857B

DNP

R30

T1

R29

PS8802
BC860B/BC857B

NEUTRAL
1uH
L6

R31

R23
DNP
TPS77033

D10
LL103A

OUT

IN

DVCC_PL

IC3

C4
0.1u

0
R26

U+

/EN

FB

ZD1

R22
560R / 5W

DNP (3.3V)
0.1u
C26+
C23
10u

910n / 400V

GND

C49

LINE_A

1uH
L5

220

2.2k

R32

T2

R40

UART_TX

DGND_AFE
CONNECT AGND and DGND
DGND_AFE

DGND_AFE

47pF IN-

1K

JMP1

1.5k

V1

IN+

TIL191

LINE

8
7
6

R28

HDR1
2

15nF
I1-

LL103A

1
4

C25

C31

1K

D27

ZD2
5.1V

R20

U2
2

68

DGND_AFE

R18

L17
BLM21BD121SN1D

OK2

1K

D7

-12V

TXD

47pF C30

C18 47pF
1K

BLM21BD121SN1D

1N4148
D26

GND

6.8

DNP
R16

R33

GND
L16

C17

R17

I1+

10u
C53
0.1u

R37

S20K275

1N4148
D24
D25

R34

1 21 2

L15

TIL191

DVCC_AFE
REACT_PULR76

1K

DVCC

R47
AGND_AFE
BLM21BD121SN1D

D22
D23

15nF
V1-

HDR2

GND

47pF

ACT_PUL R75
1K

C41

6
7
8
9
G2
F09HP

1N4148

1K

1.5K

AGND_AFE

R24

AVCC_AFE

47pF
C14

NEUTRAL

DVCC_AFE

V1+

C13

OK1

R1

R50
100

LL103A

G1

10u GND1
C22

1
2

V1 R44
330k

C15

REACT

R53

R41

RS232
CON1

1
2
3
4
5

D4

DGND_AFE

DVCC
330k

PS8802
+12V

DGND_AFE

330k

RXD

1k

UART_RX

REACT_PUL

R38

R36

ACT_PUL
DGND_AFE

DVCC_EXT

LINE_A

2.2k

DGND_AFE

DGND_AFE

JTAG1

DGND_AFE

DVCC_AFE

U5
8
7
6

R39

2200uF

DVCC_PL

C27
1
2.2n
3
REACT_PUL
DGND_AFE
5
7
9 TCK_AFE
11
13

2
4
6
8
10
12
14

XT2OUT

C19

DVCC_AFE 47k
DVCC_FET1

XT2IN

DVCC_AFE

1
2
3

R61

SPI_CS
SPI_CLK
SOMI
SIMO
UART_RX
UART_TX
AFE_INT
ACT_PUL
DVCC_AFE
XT2OUT
XT2IN
DGND_AFE

1
2

JTG_PWR1

AGND

1
2

1 A0.0+
P2.0/STE0/TA0/TDI/TCLK 24
2 A0.0P1.7/UCLK0/TA1/TDO/TDI 23
3 A1.0+
P1.6/SOMI0/TA2/TCK 22
A1.04
P1.5/SIMO0/SVSOUT/TMS21
5 AVCC
P1.4/URXD0/SD2DO20
6 AVSS
P1.3/UTXD0/SD1DO 19
7 VREF
P1.2/TA0/SD0DO 18
8 A2.0+
P1.1/TA1/SDCLK 17
DVCC16
9 A2.0P2.7/XT2OUT 15
10 TEST/SBWTCK
P2.6/XT2IN 14
11 RST/NMI/SBWTDIO
12 P1.0/SVSIN/TACLK/SMCLK/TA2 DVSS 13

12pF

3
4

C1

PWR1

I1+
I1IN+
INAVCC_AFE
AGND_AFE
VREF
V1+
V1TCK_AFE
RESET_AFE

S4

DGND_AFE

XT2
XT2

0.1u

1
2
3

DGND_AFE

AGND_AFE

10k

AGND_AFE
VREF

D3

REACT_PUL

LL103A

ACT_PUL

10u

D1

C9

C12 C10

LL103A

0.1u 0.1u

10u

2 UART_RX
4 UART_TX
6 REACT_PUL
8 ACT_PUL

DVCC_AFE

C11

COMMS

LED2 1K

R72

DGND_AFE

DVCC_AFE

AVCC_AFE

LED1 1K

10

AVCC_AFE

SIMO 1
3
SOMI
SPI_CLK5
SPI_CS 7

DVCC_AFE

1
2
3
4

1
2
3
4

DVCC_AFE

R2

DGND1

DVCC1

AGND_AFE

Figure 21. TIDM-METROLOGY-HOST Schematic Page 1

TIDU455 August 2014


Submit Documentation Feedback

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

27

Design Files

www.ti.com
RST/NMI

AVCC_APP
C32
10u

C35
0.1u
R4
0

PWR2

DGND_APP

AVCC_APP

C47

HFOUT
HFIN

C7

0.1u
R3 DVCC_APP
C8
10

10u

U1

1
2

1
2

C50

DGND_APP

VCC1
OUTA
INB
GND1

VCC2
INA
OUTB
GND2

8
7
6
5

DVCC_AFE
SOMI
SIMO
DGND_AFE

0.1u
C52

ISO7421FE
DGND_APP

0.1u
C2

47pF

DVCC_APP1
MSPI_CS 2
MSPI_CLK 3
DGND_APP4

VCC1
INA
INB
GND1

VCC2
OUTA
OUTB
GND2

8
7
6
5

DVCC_AFE
SPI_CS
SPI_CLK
DGND_AFE

0.1u
C55

ISO7420FE
DVCC_APP

0.1u

C5

C6

10u

S0
DGND_APP
S1
S2
S3
S4
S5
S6
S7
S8
S9
S10
DVCC_APP
DGND_APP
S11
S12
S13
S14
S15
S16
S17
S18
S19
S20
S21
A0CS
12pF
XIN
XT1
XT1

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50

DGND_APP

DGND_APP
C46
470n
LCDCAP
COM0
COM1
COM2
COM3
APP_INT
MSPI_CS
RF_GPIO1
RF_GPIO2
SFD
CCA
RESETCC
VREG_EN

10u

C48

75
74
73
72
71
70
69
68
67
66
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51

DVCC_APP

C21

47pF

DVCC_APP
DVCC_APP1
M_SOMI 2
M_SIMO 3
4
DGND_APP

DGND

2
3
4
5
6
7
8
9
10
AVCC_APP 11
AGND_APP 12
13
XIN
XOUT 14
AGND_APP 15
16
A0CLK 17
M_SIMO 18
M_SOMI 19
MSPI_CLK20
A0SIMO 21
A0SOMI 22
23
24
25
DVCC_APP

C20

0.1u

HCTC_XTL_4

AGND_APP
AGND_APP
1

0.1u

DVCC2

DGND_APP

DVCC_APP

DVCC_APP

DGND2

DVCC_APP_PL
DVCC_APP
DVCC_APP_EXT

1
2
3

1
2
3

100
99
98
97
96 RST/NMI
95 TCK
94 TMS
93 TDI
92 TDO
91 TEST
90 DGND_APP
89 DVCC_APP
88
87
86
85 HFOUT
84 HFIN
83 AGND_APP
82 V18
DVCC_APP_EXT
81 VUSB
80 VBUS
R15
79 PU.1/DM 0
Q1G$1
78
PUR
77 PU.0/DP
2
1
76 DGND_APP

DVCC_FET2

JTG_PWR2

TEST

DGND_APP
RST/NMI
DGND_APP
TCK
TMS
TDI
TDO

13
11
9
7
5
3
1

DGND_APP

JTAG2
14
12
10
8
6
4
2

COMMS_APP
MSPI_CS1
2 APP_INT
MSPI_CLK
3
4 RF_GPIO1
M_SIMO5
6 RF_GPIO2
8 SFD
M_SOMI7

C24
2.2n

R14
47k

Q1G$2

DVCC_APP

XOUT

DVCC_APP1
APP_INT 2

3
DGND_APP 4

VCC1
OUTA
INB
GND1

VCC2
INA
OUTB
GND2

8
7
6
5

DVCC_AFE
AFE_INT
DGND_AFE

ISO7421FE

LCDCAP
C51

S0 P$14
S1 P$13
S2 P$12
S3 P$11
S4 P$10
S5 P$9
S6 P$8
S7 P$7
S8 P$6
S9 P$5
S10 P$4
S11 P$3
S12 P$2
S13 P$1

1A_1B_1C_1D
1F_1G_1E_DP1DOL_ERR_MINUS_MEM
2A_2B_2C_2D
ENV_TX_RX_8BC
2F_2G_2E_DP2
ANT_A2_A1_A0
3A_3B_3C_3D
BT_B1_B0_BB
3F_3G_3E_COL3
AU_AR_AD_AL
4A_4B_4C_4D
PL_P0_P1_P2
4F_4G_4E_DP4
F1_F2_F3_F4
5A_5B_5C_5D
F5_PR_P4_P3
5F_5G_5E_COL5
COM0
6A_6B_6C_6D
COM1
6F_6G_6E_DP6
COM2
7A_7B_7C_7D
COM3
7F_7G_7E_DP7

10u
P$26
P$25
P$24
P$23
P$22
P$21
P$20
P$19
P$18
P$17
P$16
P$15

S21
S20
S19
S18
S17
S16
S15
S14
COM0
COM1
COM2
COM3

DGND_APP

Softbaugh SBLCDA4 interface

C29
C28
12pF

DNP
DGND_APP

Figure 22. TIDM-METROLOGY-HOST Schematic Page 2


28

Single-Phase Electric Meter with Isolated Energy Measurement

TIDU455 August 2014


Submit Documentation Feedback
Copyright 2014, Texas Instruments Incorporated

Design Files

www.ti.com

10u

R84

DGND_APP

26

22

22

C38

4.7u/400V

N_APP
VO+

VO+

VO-

VO-

RF_GPIO2
NC

RF4

RF3

26

DVCC_APP_PL

NC

ZD3

2
4
6
8
10
12
14
16
18
20 R85

C37

1
3
5
R77 A0SIMO
7
A0SOMI
R78 CCA
9
R79 SFD
11
R80
13
R81 A0CS
R87 15
R82 A0CLK RESETCC
17
A0SIMO
R83
A0SOMI RF_GPIO1 R86 19

2
4
6
8
10
12
14
16
18
20

1
3
5
7
9
11
13
15
17
19

S20K275

R108
R105
R106
R107

R5

VREG_EN
RESETCC
A0SIMO
A0SOMI

C45

0.1u

L_APP

150uF
C36

C44

DVCC_APP

0.1u

DGND_APP

SMAJ5.0ABCT
DGND_APP
USB2
VBUS

LL103A
D2

R35 27

R6
1.4k
PUR
PU.0/DP
PU.1/DM

D-

D+ 3

D+

4.7u

C43

VBUS

D- 2
DGND_APP
4

GND

SHIELD

SHIELD1

33k

0.1u

R9

TPD4E004

C42

GND IO3

5
IO4
IO2
2

10p

IO1 VCC

10p

IC7

C39 C40

R25
1M

R7 27

DGND_APP

DGND_APP
DGND_APP

DGND_APP

DGND_APP

Figure 23. TIDM-METROLOGY-HOST Schematic Page 3

TIDU455 August 2014


Submit Documentation Feedback

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

29

Design Files

6.2

www.ti.com

Bill of Materials
To download the bill of materials (BOM), see the design files at TIDM-METROLOGY-HOST.
Table 5. BOM

30

ITEM

QTY

S4

REFERENCE

C38

RS-232

VALUE

PART DESCRIPTION

Switch

Pushbutton Switch

DIGIKEY PARTNUMBER
P8006S-ND

4.7 u/400 V

Capacitor

565-1411-ND

9-pin connector

DB-9 Connector

A32115-ND

ACT, DGND2, DVCC2, REACT,HDR1, HDR2, JMP1

2-pin Jumper header

Jumper header

609-3296-ND
Break and use

JTG_PWR1, JTG_PWR2, PWR1, PWR2

3-pin Jumper header

Jumper header

609-3296-ND
Break and use

DGND1, DVCC1

4-pin Jumper header

Jumper header

609-3296-ND
Break and use

COMMS, COMMS_APP

42 8-pin header

Jumper header

609-3296-ND
Break and use

LED1

Light Emitting Diode

LED

511-1256-1-ND
511-1254-1-ND

LED2

Light Emitting Diode

LED

10

JTAG1, JTAG2

14-pin Connector

JTAG Connector

MHB14K-ND

11

RF3, RF4

20-pin Connector

RF Connector

TFM-110-02-SM-D-A-K

12

USB2

USB Connector

USB_RECEPTACLE

WM17113-ND

13

ZD1

3.6 V

Zener Diode

DNP

14

20

R4. R15. R24, R26, R34, R77, R78, R79, R80, R81, R82, R83, R84, R85,
R86, R87, R105, R106, R107, R108

Resistor 0603

P0.0GCT-ND

15

16

C1, C2, C6, C8, C10, C12, C21, C25, C26, C35, C37, C43, C45, C50,
C52, C55

0.1 u

Capacitor 0603

311-1366-1-ND

16

C53, C54

0.1 u

Capacitor 0805

445-1349-1-ND

17

R53

1.5 K

Resistor 0603

P1.5KGCT-ND

18

R31

1.5 K

Resistor 0805

RMCF0805JT1K50CT-ND

19

R17, R18, R20, R21, R47, R72, R73, R75, R76

1K

Resistor 0603

P1.0KGCT-ND

20

R29, R36

1K

Resistor 0805

P1.0KACT-ND

21

R25

22

D22, D23, D24, D25, D26, D27, D28, D29

23

R6

24

L5, L6

25

C24, C27

26

27

1M

Resistor 0603

P1.0MGCT-ND

1N4148

Diode

568-1749-1-ND

1.4 k

Resistor 0603

P1.40KHCT-ND

EXC-ML20A390U

Inductor

P10191CT-ND

2.2 n

Capacitor 0603

478-6210-1-ND

R39, R40

2.2 k

Resistor 0805

P2.2KGCT-ND

ZD2

5.1 V

Zener Diode

568-4874-1-ND

Single-Phase Electric Meter with Isolated Energy Measurement

TIDU455 August 2014


Submit Documentation Feedback
Copyright 2014, Texas Instruments Incorporated

Design Files

www.ti.com

Table 5. BOM (continued)


ITEM

QTY

VALUE

PART DESCRIPTION

DIGIKEY PARTNUMBER

28

C42

REFERENCE

4.7 u

Capacitor 0603

490-3302-1-ND

29

R16, R19

6.8

Resistor 0603

P6.8GCT-ND

30

R2, R3

10

Resistor 0603

P10GCT-ND

31

C39, C40

10 p

Capacitor 0603

490-1403-1-ND

32

11

C5, C7, C9, C11, C15, C20, C22, C32, C44, C51, C23

10 u

Polarized Capacitor

399-3685-1-ND

33

C16, C19, C28, C29

12 pF

Capacitor 0603

445-1270-1-ND

34

C30, C34, C41

15 nF

Capacitor 0603

445-5102-1-ND

35

R7, R35

27

Resistor 0603

P27GCT-ND

36

R9

33 k

Resistor 0603

P33KGCT-ND

37

R61, R14

47 K

Resistor 0603

P47KGCT-ND

38

C13, C14, C17, C18, C31, C33, C47, C48

47 pF

Capacitor 0603

445-1277-1-ND

39

R50

100

Resistor 0603

P100GCT-ND

40

C36

150 F

Polarized Capacitor

P12917-ND

41

R38, R41, R44

330 K

Resistor 0603

P330KHCT-ND

42

C49

470 n / 300 V~

Polarized Capacitor

P12275-ND

43

R22

470 / 5 W

Resistor

45J470E-ND

44

C4

2200 F

Polarized Capacitor

P5128-ND

45

L15, L16, L17, L18

BLM21BD121SN1D

Inductor

490-1044-1-ND

46

U$2

CUI_XR

Power supply module

102-1801-ND

47

U1

F66XX---PZ100

MSP430F6638 100-pin

TI chip

48

Q1

HCTC_XTL_4

HF Crystal

887-1002-ND

49

ISO1

ISO7420

8-pin DW Isolator chip

296-28742-1-ND

50

ISO2, ISO3

ISO7421

8-pin DW Isolator chip

296-28426-ND

51

D1, D2, D3, D4, D7, D10

LL103A

Diode

LLSD103ADICT-ND

52

U$1

MSP430AFE_24TSSOP

MSP430AFE 24-pin TSSOP

TI chip

53

U2, U5

PS8802

8-pin TSSOP

PS8802-1-F3-AXCT-ND

54

R1, R5

S20K275

Varistor

495-1417-ND

55

LCD1

SBLCDA4

LCD Display

ACD Will provide

56

ZD3

SMAJ5.0ABCT

Diode

SMAJ5.0ABCT-ND

57

D32, D33

SMAJ5.0CA

Diode

SMAJ5.0CABCT-ND

58

OK1, OK2

PS2501-1-A

4-pin Isolator chip

PS2501-1A-ND

59

IC7

TPD4E004

6-pin Chip

296-23618-1-ND

60

IC3

TPS77033

6-pin Chip

296-11051-1-ND

61

XT1

XT1

LF Crystal

300-8341-1-ND

TIDU455 August 2014


Submit Documentation Feedback

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

31

Design Files

www.ti.com

Table 5. BOM (continued)

32

ITEM

QTY

VALUE

PART DESCRIPTION

DIGIKEY PARTNUMBER

62

XT2

REFERENCE

XT2

HF Crystal

887-1233-ND

63

R23

DNP

Resistor 0805

DNP

64

R37

68

Resistor 0805

P68ACT-ND

65

R27

DNP

Resistor 0805

DNP

66

R30

10 k

Resistor 0805

P10KACT-ND

67

R32

220

Resistor 0805

P220ACT-ND

68

C46

470 n

Capacitor 0603

445-3456-1-ND

69

R33

DNP

Resistor 0603

DNP

70

R28

DNP

Resistor 0603

DNP

71

T1, T2

BC860B/BC857B

BC857ASMD

BC857B-TPMSCT-ND

Single-Phase Electric Meter with Isolated Energy Measurement

TIDU455 August 2014


Submit Documentation Feedback
Copyright 2014, Texas Instruments Incorporated

Design Files

www.ti.com

6.3

PCB Layer Plots


To download the layer plots, see the design files at TIDM-METROLOGY-HOST.

Figure 24. Top Layer Plot

Figure 25. Bottom Layer Plot

TIDU455 August 2014


Submit Documentation Feedback

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

33

Design Files

6.4

www.ti.com

CAD Project Files


To download the CAD project files, see the design files at TIDM-METROLOGY-HOST.

6.5

Gerber Files
To download the Gerber files, see the design files at TIDM-METROLOGY-HOST.

6.6

Software Files
To download the software files, see the design files at TIDM-METROLOGY-HOST.

References
1. Energy Measurement Results for CTs and Shunts on a TI Designed Meter Using MSP430AFE2xx
Devices (SLAA536)

About the Author


MEKRE MESGANAW is a system applications engineer in the Smart Grid and Energy group at Texas
Instruments, where he primarily works on electricity metering customer support and reference design
development. Mekre received his bachelor of science and master of science in computer engineering from
the Georgia Institute of Technology.

34

Single-Phase Electric Meter with Isolated Energy Measurement


Copyright 2014, Texas Instruments Incorporated

TIDU455 August 2014


Submit Documentation Feedback

IMPORTANT NOTICE FOR TI REFERENCE DESIGNS


Texas Instruments Incorporated ("TI") reference designs are solely intended to assist designers (Buyers) who are developing systems that
incorporate TI semiconductor products (also referred to herein as components). Buyer understands and agrees that Buyer remains
responsible for using its independent analysis, evaluation and judgment in designing Buyers systems and products.
TI reference designs have been created using standard laboratory conditions and engineering practices. TI has not conducted any
testing other than that specifically described in the published documentation for a particular reference design. TI may make
corrections, enhancements, improvements and other changes to its reference designs.
Buyers are authorized to use TI reference designs with the TI component(s) identified in each particular reference design and to modify the
reference design in the development of their end products. HOWEVER, NO OTHER LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL
OR OTHERWISE TO ANY OTHER TI INTELLECTUAL PROPERTY RIGHT, AND NO LICENSE TO ANY THIRD PARTY TECHNOLOGY
OR INTELLECTUAL PROPERTY RIGHT, IS GRANTED HEREIN, including but not limited to any patent right, copyright, mask work right,
or other intellectual property right relating to any combination, machine, or process in which TI components or services are used.
Information published by TI regarding third-party products or services does not constitute a license to use such products or services, or a
warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual
property of the third party, or a license from TI under the patents or other intellectual property of TI.
TI REFERENCE DESIGNS ARE PROVIDED "AS IS". TI MAKES NO WARRANTIES OR REPRESENTATIONS WITH REGARD TO THE
REFERENCE DESIGNS OR USE OF THE REFERENCE DESIGNS, EXPRESS, IMPLIED OR STATUTORY, INCLUDING ACCURACY OR
COMPLETENESS. TI DISCLAIMS ANY WARRANTY OF TITLE AND ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT, QUIET POSSESSION, AND NON-INFRINGEMENT OF ANY THIRD PARTY
INTELLECTUAL PROPERTY RIGHTS WITH REGARD TO TI REFERENCE DESIGNS OR USE THEREOF. TI SHALL NOT BE LIABLE
FOR AND SHALL NOT DEFEND OR INDEMNIFY BUYERS AGAINST ANY THIRD PARTY INFRINGEMENT CLAIM THAT RELATES TO
OR IS BASED ON A COMBINATION OF COMPONENTS PROVIDED IN A TI REFERENCE DESIGN. IN NO EVENT SHALL TI BE
LIABLE FOR ANY ACTUAL, SPECIAL, INCIDENTAL, CONSEQUENTIAL OR INDIRECT DAMAGES, HOWEVER CAUSED, ON ANY
THEORY OF LIABILITY AND WHETHER OR NOT TI HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, ARISING IN
ANY WAY OUT OF TI REFERENCE DESIGNS OR BUYERS USE OF TI REFERENCE DESIGNS.
TI reserves the right to make corrections, enhancements, improvements and other changes to its semiconductor products and services per
JESD46, latest issue, and to discontinue any product or service per JESD48, latest issue. Buyers should obtain the latest relevant
information before placing orders and should verify that such information is current and complete. All semiconductor products are sold
subject to TIs terms and conditions of sale supplied at the time of order acknowledgment.
TI warrants performance of its components to the specifications applicable at the time of sale, in accordance with the warranty in TIs terms
and conditions of sale of semiconductor products. Testing and other quality control techniques for TI components are used to the extent TI
deems necessary to support this warranty. Except where mandated by applicable law, testing of all parameters of each component is not
necessarily performed.
TI assumes no liability for applications assistance or the design of Buyers products. Buyers are responsible for their products and
applications using TI components. To minimize the risks associated with Buyers products and applications, Buyers should provide
adequate design and operating safeguards.
Reproduction of significant portions of TI information in TI data books, data sheets or reference designs is permissible only if reproduction is
without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. TI is not responsible or liable for
such altered documentation. Information of third parties may be subject to additional restrictions.
Buyer acknowledges and agrees that it is solely responsible for compliance with all legal, regulatory and safety-related requirements
concerning its products, and any use of TI components in its applications, notwithstanding any applications-related information or support
that may be provided by TI. Buyer represents and agrees that it has all the necessary expertise to create and implement safeguards that
anticipate dangerous failures, monitor failures and their consequences, lessen the likelihood of dangerous failures and take appropriate
remedial actions. Buyer will fully indemnify TI and its representatives against any damages arising out of the use of any TI components in
Buyers safety-critical applications.
In some cases, TI components may be promoted specifically to facilitate safety-related applications. With such components, TIs goal is to
help enable customers to design and create their own end-product solutions that meet applicable functional safety standards and
requirements. Nonetheless, such components are subject to these terms.
No TI components are authorized for use in FDA Class III (or similar life-critical medical equipment) unless authorized officers of the parties
have executed an agreement specifically governing such use.
Only those TI components that TI has specifically designated as military grade or enhanced plastic are designed and intended for use in
military/aerospace applications or environments. Buyer acknowledges and agrees that any military or aerospace use of TI components that
have not been so designated is solely at Buyer's risk, and Buyer is solely responsible for compliance with all legal and regulatory
requirements in connection with such use.
TI has specifically designated certain components as meeting ISO/TS16949 requirements, mainly for automotive use. In any case of use of
non-designated products, TI will not be responsible for any failure to meet ISO/TS16949.IMPORTANT NOTICE
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright 2014, Texas Instruments Incorporated

You might also like