implementation of a single-phase electronic watt-hour meter using
TRANSCRIPT
Application ReportSLAA517E–May 2012–Revised August 2015
Implementation of a Single-Phase Electronic Watt-HourMeter Using the MSP430F6736(A)
Bart Basile, Stefan Schauer, Kripasagar Venkat
ABSTRACTThis application report describes the implementation of a single-phase electronic electricity meter usingthe Texas Instruments MSP430F673x(A) metering processor. It also includes the necessary informationwith regard to metrology software and hardware procedures for this single-chip implementation.
WARNINGFailure to adhere to these steps and/or not heed the safetyrequirements at each step may lead to shock, injury, and damageto the hardware.
The MSP430F6736 source code that is described in this application report can be downloaded fromwww.ti.com/lit/zip/slaa517.
The MSP430F6736A source code along with the EVM430-F6736 design files that are described in thisapplication report can be downloaded from www.ti.com/tool/TIDM-1PHMTR-ESD.
Contents1 Introduction ................................................................................................................... 22 System Diagrams ............................................................................................................ 33 Hardware Implementation .................................................................................................. 44 Software Implementation ................................................................................................... 75 Energy Meter Demo........................................................................................................ 146 Results and Calibration.................................................................................................... 207 References .................................................................................................................. 258 Schematics.................................................................................................................. 26
List of Figures
1 Typical Connections Inside Electronic Meters ........................................................................... 32 1-Phase 2-Wire Star Connection Using MSP430F6736(A) ............................................................ 43 A Simple Capacitive Power Supply for the MSP430 Energy Meter................................................... 54 Analog Front End for Voltage Inputs ...................................................................................... 65 Analog Front End for Current Inputs ...................................................................................... 66 Foreground Process......................................................................................................... 87 Background Process ....................................................................................................... 108 Phase Compensation Using PRELOAD Register...................................................................... 119 Frequency Measurement.................................................................................................. 1210 Pulse Generation for Energy Indication ................................................................................. 1311 Top View of the Single Phase Energy Meter EVM .................................................................... 14
MSP430 is a trademark of Texas Instruments.All other trademarks are the property of their respective owners.
1SLAA517E–May 2012–Revised August 2015 Implementation of a Single-Phase Electronic Watt-Hour Meter Using theMSP430F6736(A)Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
Introduction www.ti.com
12 Top View of the EVM With Blocks and Jumpers....................................................................... 1513 Top View of the EVM With Test Setup Connections .................................................................. 1614 Source Folder Structure ................................................................................................... 1815 Toolkit Compilation in IAR................................................................................................. 1916 Metrology Project Build in IAR............................................................................................ 2017 E-Meter Mass Calibration ................................................................................................. 2118 Meter Status ................................................................................................................ 2219 Meter 1 Features ........................................................................................................... 2220 Meter 1 Errors (for manual correction) .................................................................................. 2321 Meter Calibration Factors ................................................................................................. 2422 Measurement Accuracy Across Current................................................................................. 2523 Schematics (1 of 5) ........................................................................................................ 2624 Schematics (2 of 5) ........................................................................................................ 2725 Schematics (3 of 5) ........................................................................................................ 2826 Schematics (4 of 5) ........................................................................................................ 2927 Schematics (5 of 5) ........................................................................................................ 30
List of Tables
1 Header Names and Jumper Settings on the F6736(A) EVM ......................................................... 172 Energy Measurement Accuracy With Error in (%) Calibrated at 230 V, 15 A, 50 Hz ............................. 25
1 IntroductionThe MSP430F6736(A) device is the latest metering system-on-chip (SoC), that belongs to theMSP430F67xx family of devices. This family of devices belongs to the powerful 16-bit MSP430F6xxxplatform and includes new features and flexibility to support robust 1-phase, 2-phase, and 3-phasemetrology solutions. This application report, however, discusses the implementation of a 1-phase solutiononly. These devices find their application in energy measurement and have the necessary architecture tosupport them.
The F6736(A) has a powerful 25-MHz CPU with MSP430CPUX architecture. The analog front endconsists of up to three 24-bit ΣΔ analog-to-digital converters (ADC) based on a second-order sigma-deltaarchitecture that supports differential inputs. The sigma-delta ADCs (ΣΔ24) operate independently and canoutput 24-bit results. They can be grouped together for simultaneous sampling of voltage and currents onthe same trigger. In addition, the ADCs have an integrated gain stage that supports gains up to 128 foramplification of low-output sensors. A 32-bit x 32-bit hardware multiplier on this chip can be used to furtheraccelerate math-intensive operations during energy computation. The software supports calculation ofvarious parameters for 1-phase energy measurement. The key parameters calculated during energymeasurements are: RMS current and voltage, active and reactive power, active and reactive energy,power factor, and frequency.
Complete metrology source code is provided and can be downloaded from www.ti.com/lit/zip/slaa517 forthe MSP430F6736-based software and from www.ti.com/tool/TIDM-1PHMTR-ESD for theMSP430F6736A software.
2 Implementation of a Single-Phase Electronic Watt-Hour Meter Using the SLAA517E–May 2012–Revised August 2015MSP430F6736(A) Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
www.ti.com System Diagrams
2 System DiagramsFigure 1 shows typical connections of electronic electricity meters (also called energy meters or e-meters)in real-life applications. The supported ac voltages and associated currents are 230 V or 120 V at 50 Hz or60 Hz. The labels LINE and NEUTRAL indicate low-voltage ac coming from the utilities.
Figure 1. Typical Connections Inside Electronic Meters
More information on the current and voltage sensors, ADCs, and other hardware is provided in thefollowing sections.
Figure 2 shows a block diagram of the high-level interface that is used for a single-phase energy meterapplication using the F6736(A). A single-phase two-wire star connection to the mains is shown withtamper detection. Current sensors are connected to each of the current channels, and a simple voltagedivider is used to measure the corresponding voltages. The CT has an associated burden resistor thatmust be connected at all times to protect the measuring device. The choice of the CT and the burdenresistor is done based on the manufacturer and current range required for energy measurements. Thechoice of the shunt resistor value is determined by the current range, gain settings of the SD24, and thepower dissipation at the sensors. The voltage divider resistors for the voltage channel are selected tomake sure that the mains voltage is divided down to the normal input ranges that are valid for theMSP430™ SD24. For these values, see the MSP430x5xx and MSP430x6xx Family User's Guide(SLAU208) and the device-specific data sheet (SLAS731 for the MSP430F6736 and SLASE46 for theMSP430F6736A).
3SLAA517E–May 2012–Revised August 2015 Implementation of a Single-Phase Electronic Watt-Hour Meter Using theMSP430F6736(A)Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
USCIA1
UART or SPI
V1-/Vref(O) USCIA0
Vref(I)USCIA2
LF Crystal 32kHzXIN
XOUT
24-bit SD
Analog to Digital
I In
V In
From utility
CT
V1+
I1+
I1-
I2+
I2-
N(L) L(N)
RST
VSS
VCC
MSP430F6736(A)
Application interfaces
LOAD
V1-
VREF
PULSE1
PULSE2
USCIB0
UART or SPI
UART or SPI
I2C or SPI
Sx,COMx
MAX
AB
CkWhREACTEST kW
Hardware Implementation www.ti.com
Figure 2. 1-Phase 2-Wire Star Connection Using MSP430F6736(A)
L and N refer to the line and neutral voltages, respectively, and are interchangeable as long as the deviceis subject to only one voltage and not both simultaneously at its pins. The other signals of interest are thePULSE1 and PULSE2. They are used to transmit active and reactive energy pulses used for accuracymeasurement and calibration.
3 Hardware ImplementationThis section describes the hardware for the design of a working 1-phase energy meter using theF6736(A).
3.1 Power SupplyThe MSP430 devices are ultra-low-power microcontrollers from Texas Instruments. These devices supporta number of low-power modes and improved power consumption during active mode when the CPU andother peripherals are active. The low-power features of this device family allow the design of the powersupply to be extremely simple and cheap. The power supply allows the energy meter to be powereddirectly from the mains. The following sections describe the various power supply options that areavailable to support your designs.
4 Implementation of a Single-Phase Electronic Watt-Hour Meter Using the SLAA517E–May 2012–Revised August 2015MSP430F6736(A) Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
www.ti.com Hardware Implementation
3.1.1 Resistor Capacitor (RC) Power SupplyFigure 3 shows a simple capacitor power supply for a single output voltage of 3.3 V directly from themains voltage of 110 V and 220 V and 50 Hz and 60 Hz VRMS ac.
Figure 3. A Simple Capacitive Power Supply for the MSP430 Energy Meter
Appropriate values of resistor R20 and capacitor C28 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 rectificationcircuitry to provide a dc voltage for the operation of the MSP430. This dc voltage is regulated to 3.3 V forfull-speed operation of the MSP430. For the circuit in Figure 3, the drive provides approximately 12 mA.The design equations for the power supply are shown in the Capacitor Power Supplies section of MSP430Family Mixed-Signal Microcontroller Application Reports (SLAA024). If there is a need to slightly increasethe current drive (up to 20 mA), the capacitor values of C28 can be increased. If drive higher than 20 mAis required, especially to drive RF technology, additional drive can be used either with an NPN outputbuffer or a transformer and switching-based power supply.
3.2 Analog InputsThe MSP430 analog front end that consists of the ΣΔ ADC is differential and requires that the inputvoltages at the pins do not exceed ±920 mV (gain = 1). To meet this specification, the current and voltageinputs need to be divided down. In addition, the SD24 allows a maximum negative voltage of -1 V,therefore, ac signals from mains can be directly interfaced without the need for level shifters. Section 3.2.1and Section 3.2.2 describe the analog front end used for voltage and current channels, respectively.
3.2.1 Voltage InputsThe voltage from the mains is usually 230 V or 110 V and needs to be brought down to a range of 1 V.The analog front end for voltage consists of spike protection varistors (not shown in this figure) followed bya simple voltage divider and a RC low-pass filter that acts like an anti-alias filter.
Figure 4 shows the analog front end for the voltage inputs for a mains voltage of 230 V. The voltage isbrought down to approximately 700 mV RMS, which is 990 mV peak and fed to the positive input,adhering to the MSP430 ΣΔ analog limits. A common-mode voltage of zero can be connected to thenegative input of the ΣΔ. In addition, the ΣΔ has an internal reference voltage of 1.2 V that can be usedexternally and also as a common-mode voltage if needed. GND is referenced to the neutral voltage or linevoltage, depending on the placement of the current sensor.
5SLAA517E–May 2012–Revised August 2015 Implementation of a Single-Phase Electronic Watt-Hour Meter Using theMSP430F6736(A)Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
13ohm
13ohm
3.0K
Hardware Implementation www.ti.com
Figure 4. Analog Front End for Voltage Inputs
It is important to note that the anti-alias resistors on the positive and negative sides are different, becausethe input impedance to the positive terminal is much higher and, therefore, a lower value resistor is usedfor the anti-alias filter. If this is not maintained, a relatively large phase shift of several degrees wouldresult.
3.2.2 Current InputsThe analog front-end for current inputs is a little different from the analog front end for the voltage inputs.Figure 5 shows the analog front end used for the current channels I1 and I2.
Figure 5. Analog Front End for Current Inputs
Resistors R14 and R18 are the burden resistors that would be selected based on the current range usedand the turns-ratio specification of the CT (not required for shunt). The value of the burden resistor for thisdesign is around 13 Ω. The anti-aliasing circuitry consisting of R and C follows the burden resistor. Theinput signal to the converter is a fully differential input with a voltage swing of ±920 mV maximum with gainof the converter set to 1. Similar to the voltage channels, the common mode voltage is selectable to eitheranalog ground (GND) or internal reference on channels connected to LSP3 and LSP4.
6 Implementation of a Single-Phase Electronic Watt-Hour Meter Using the SLAA517E–May 2012–Revised August 2015MSP430F6736(A) Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
fmfsOSR
=
www.ti.com Software Implementation
4 Software ImplementationThe software for the implementation of 1-phase metrology is discussed in this section. The first subsectiondiscusses the set up of various peripherals of the MSP430. Subsequently, the entire metrology software isdescribed as two major processes: foreground process and background process.
4.1 Peripherals SetupThe primary peripherals used for this application are the 24-bit sigma delta (SD24) ADC, clock system,timer, LCD, and watchdog timer (WDT).
4.1.1 SD24 SetupThe F673x(A) family has up to three independent sigma delta data converters. For a single phase systemat least two ΣΔs are necessary to independently measure one voltage and current. The codeaccompanying this application report addresses the metrology for a 1-phase system with limiteddiscussion to anti-tampering, however, the code supports the measurement of the neutral current. Theclock to the SD24 (fM ) is derived from the DCO running at 16 MHz. The sampling frequency is defined as
, the OSR is chosen to be 256 and the modulation frequency, fM, is chosen as 1 MHz(1048576 Hz), resulting in a sampling frequency of 4.096 ksps. The SD24s are configured to generateregular interrupts every sampling instant.
The following are the ΣΔ channels associations:• SD0P0 and SD0N0 → Voltage V1• SD1P0 and SD1N0 → Current I1• SD2P0 and SD2N0 → Current IN (Neutral)
4.2 Foreground ProcessThe foreground process includes the initial set up of the MSP430 hardware and software immediately aftera device reset. Figure 6 shows the flowchart for this process.
7SLAA517E–May 2012–Revised August 2015 Implementation of a Single-Phase Electronic Watt-Hour Meter Using theMSP430F6736(A)Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
RESET
HW setup
Clock, SD24_B, Port pins, Timer,
USCI, LCD
Calculate RMS values for current,
voltage; Active and Reactive
Power
Main Power OFF?
1 second of Energy
accumulated? Wait for
acknowledgement from
Background process
Go to LPM0Y
N
Y
N
Wake-up
Send Data out through SPI/
UART to PC
Software Implementation www.ti.com
Figure 6. Foreground Process
The initialization routines involves the set up of the analog to digital converter, clock system, generalpurpose input/output (GPIO) port pins, timer, LCD and the USCI_A1 for universal Asynchronousreceiver/transmitter (UART) functionality. A check is made to see if the main power is OFF and the devicegoes into LPM0. During normal operation, the background process notifies the foreground processthrough a status flag every time a frame of data is available for processing. This data frame consists ofaccumulation of energy for 1 second. This is equivalent to accumulation of 50 or 60 cycles of datasamples synchronized to the incoming voltage signal. In addition, a sample counter keeps track of howmany samples have been accumulated over the frame period. This count can vary as the softwaresynchronizes with the incoming mains frequency. The data samples set consist of processed current,voltage, active and reactive energy. All values are accumulated in separate 48-bit registers to furtherprocess and obtain the RMS and mean values.
4.2.1 FormulasThis section briefly describes the formulas used for the voltage, current, and energy calculations.
8 Implementation of a Single-Phase Electronic Watt-Hour Meter Using the SLAA517E–May 2012–Revised August 2015MSP430F6736(A) Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
E P Sample countACT ACT= ´
( ) ( )901
Sample
countv n i n
nP KREACT p
Sample count
´å=
=
( ) ( )1
Sample
countv n i n
nP KACT p
Sample count
´å=
=
( )2
1
Sample
counti n
nI KRMS i
Sample count
å=
= *
( )2
1
Sample
countv n
nV KRMS v
Sample count
å=
= *
www.ti.com Software Implementation
4.2.1.1 Voltage and CurrentAs discussed in the previous sections simultaneous voltage and current samples are obtained from threeindependent ΣΔ converters at a sampling rate of 4096 Hz. Track of the number of samples that arepresent in 1 second is kept and used to obtain the RMS values for voltage and current for each phase.
v(n)= Voltage sample at a sample instant ‘n’
I(n)= Current sample at a sample instant ‘n’
Sample count= Number of samples in 1 second
Kv = Scaling factor for voltage
KI = Scaling factor for current
4.2.1.2 Power and EnergyPower and energy are calculated for a frame’s worth of active and reactive energy samples. Thesesamples are phase corrected and passed on to the foreground process that uses the number of samples(sample count) and use the formulae listed below to calculate total active and reactive powers.
v90 (n) = Voltage sample at a sample instant ‘n’ shifted by 90°
Kp = Scaling factor for power
The consumed energy is then calculated based on the active power value for each frame in similar way asthe energy pulses are generated in the background process except that:
For reactive energy, the 90° phase shift approach is used for two reasons:• This allows us to measure the reactive power accurately down to very small currents.• This conforms to international specified measurement method.
Since the frequency of the mains varies, it is important to first measure the mains frequency accuratelyand then phase shift the voltage samples accordingly. This is discussed in Section 4.3.3.
The phase shift consists of an integer part and a fractional part, the integer part is realized by providing anN samples delay. The fractional part is realized by a fractional delay filter (refer to: Phase compensation).
9SLAA517E–May 2012–Revised August 2015 Implementation of a Single-Phase Electronic Watt-Hour Meter Using theMSP430F6736(A)Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
SD24_B Interrupts @
4096/sec
Read Voltages V1
Read Currents I1, and I2
a. Remove residual DC
b. Accumulate samples for instantaneous Power
c. Accumulate for IRMS for both currents and VRMS
Store readings and notify foreground
process
Pulse generation in accordance to
power accumulation
Calculate frequency
Calculate power factor
Return from Interrupt
1 second of energy
calculated?N
Y
Y
Software Implementation www.ti.com
4.3 Background ProcessThe background process uses the ΣΔ interrupt as a trigger to collect voltage and current samples (threevalues in total). These samples are further processed and accumulated in dedicated 48-bit registers. Thebackground function deals mainly with timing critical events in software. Once sufficient samples (1second worth) have been accumulated then the foreground function is triggered to calculate the finalvalues of VRMS, IRMS, power and energy. The background process is also wholly responsible for energyproportional pulses, frequency and power factor calculation for each phase. Figure 7 shows the flowdiagram of the background process.
Figure 7. Background Process
10 Implementation of a Single-Phase Electronic Watt-Hour Meter Using the SLAA517E–May 2012–Revised August 2015MSP430F6736(A) Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
360 360f fIN INDelay resolutionDegOSR f fS M
° ´ ° ´= =
´
SD24GRP0SC Set by SW
Conversion Conversion Co Conversion Conv
Rest by SWSet by SW
Conversion
Channel 0
SD24SCSx=100bSD24SNGL=0SD24PREx=00h
Channel 0
SD24SCSx=100bSD24SNGL=1SD24INTDLYx=11bSD24PREx=PRE1
SD24SC Set by GRP0SCReset by GRP0SC
Set by GRP0SC
Rest by SW
Set by SW
ConversionPRE1 ConversionPRE1 Convers
SD24SC Set by GRP0SCAuto-clear
Set by GRP0SCAuto-clear
Set by SW
= Result written into SD24BMEMH/Lx
www.ti.com Software Implementation
The following sections discuss the various elements of electricity measurement in the backgroundprocess.
4.3.1 Voltage and Current SignalsThe Sigma-Delta Converter has a fully differential input; therefore, no added dc offset is needed toprecondition a signal, which is the case with most single ended converters.
The output of the Sigma Delta is a signed integer. Any stray dc offset value is removed independently forV and I by subtracting a long term dc tracking filter’s output from each ΣΔ sample. This long term dctracking filter is synchronized to the mains cycle to yield a highly stable output.
The resulting instantaneous voltage and current samples are used to generate the following information:• Accumulated squared values of voltage and current for VRMS and IRMS calculations.• Accumulated energy samples to calculate Active Energy.• Accumulated energy samples with current and 90° phase shifted voltage to calculate Reactive Energy.
These accumulated values are processed by the foreground process.
4.3.2 Phase CompensationThe Current Transformer (CT) when used as a sensor and the input circuit’s passive components togetherintroduces an additional phase shift between the current and voltage signals that needs compensation.The ΣΔ converter has built in hardware delay that can be applied to individual samples when grouped.This can be used to provide the phase compensation required. This value is obtained during calibrationand loaded on to the respective PRELOAD register for each converter. Figure 8 shows the application ofPRELOAD (SD24PREx).
Figure 8. Phase Compensation Using PRELOAD Register
The fractional delay resolution is a function of input line frequency (fIN), OSR and the sampling frequency(fS).
In the current application for input frequency of 60 Hz, OSR of 256 and sampling frequency of 4096, theresolution for every bit in the preload register is about 0.02° with a maximum of 5.25° (maximum of 255steps). Since the sampling of the 3 channels are group triggered, an often method used is to apply 128steps of delay to all channels and then increasing or decreasing from this base value. This allows ± delaytiming to compensate for phase lead or lag. This puts the practical limit in the current design to ± 2.62°.When using CTs that provide a larger phase shift than this maximum, an entire sample delay along withfractional delay must be provided. This phase compensation can also be modified on the fly toaccommodate temperature drifts in CTs.
11SLAA517E–May 2012–Revised August 2015 Implementation of a Single-Phase Electronic Watt-Hour Meter Using theMSP430F6736(A)Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
noise corrupted samples
good samples
linear interpolation
Software Implementation www.ti.com
4.3.3 Frequency Measurement and Cycle TrackingThe instantaneous I and V signals for each phase are accumulated in 48 bit registers. A cycle trackingcounter and sample counter keep track of the number of samples accumulated. When approximately onesecond’s worth of samples have been accumulated, the background process stores these 48-bit registersand notifies the foreground process to produce the average results like RMS and power values. Cycleboundaries to trigger the foreground averaging process are used since it gives very stable results.
For frequency measurements, a straight line interpolation is created between the zero crossing voltagesamples. Figure 9 depicts the samples near a zero cross and the process of linear interpolation.
Figure 9. Frequency Measurement
Because noise spikes can also cause errors, therefore, the rate of change check to filter out the possibleerroneous signals is used and make sure that the two points interpolated from are genuine zero crossingpoints. For example, if you have two negative samples, a noise spike can make one of them positive andtherefore making the negative and positive pair looks as if there is a zero crossing.
The resultant cycle to cycle timing goes through a weak low pass filter to further smooth out cycle to cyclevariations. This results in a stable and accurate frequency measurement tolerant of noise.
4.3.4 LED Pulse GenerationIn 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 to report measurement during normaloperation. To serve both these tasks efficiently, the microcontroller has to accurately generate and recordthe number of these pulses. It is a general requirement to generate these pulses with relatively little jitter.Although, time jitters are not an indication of bad accuracy, as long as the jitter is averaged out it wouldgive a negative indication on the overall accuracy of the meter.
The average power to generate the energy pulses is used. The average power (calculated by theforeground process) is accumulated every ΣΔ interrupt. This is equivalent to converting it to energy. Oncethe accumulated energy crosses a threshold, a pulse is generated. The amount of energy above thisthreshold is kept and new energy amount is added on top of it in the next interrupt cycle. Since theaverage power tends to be a stable value, this way of generating energy pulses is very steady and free ofjitter.
The threshold determines the energy "tick" specified by the power company and is a constant. Forexample, this can be in kWh. In most meters, the pulses per kWh decide this energy tick. For example inthis application, the number of pulses generated per kWh is set to 6400 for active and reactive energies.The energy "tick" in this case is 1 kWh or 6400. Energy pulses are generated and also indicated via LEDson the board. Port pins are toggled for the pulses with control over the pulse width for each pulse.Figure 10 shows the flow diagram for pulse generation.
12 Implementation of a Single-Phase Electronic Watt-Hour Meter Using the SLAA517E–May 2012–Revised August 2015MSP430F6736(A) Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
SD interrupts @
4096 Hz
Energy
Accumulator+=
Average Power
Energy Accumulator >
1KWh threshold?
Energy Accumulator -
=1KWh threshold?
Generate 1
pulse
Proceed to other
tasks
Y
N
www.ti.com Software Implementation
Figure 10. Pulse Generation for Energy Indication
The average power is in units of 0.01 W, and the 1-kWh threshold is defined as:
1 kWh threshold = 1/0.01 * 1 kW * (Number of interrupts/second) * (number of seconds in 1 hour)= 100000 * 4096 * 3600 = 0x15752A00000
13SLAA517E–May 2012–Revised August 2015 Implementation of a Single-Phase Electronic Watt-Hour Meter Using theMSP430F6736(A)Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
Energy Meter Demo www.ti.com
5 Energy Meter DemoThe energy meter evaluation module (EVM) associated with this application report has theMSP430F6736(A) and demonstrates energy measurements. The complete demonstration platformconsists of the EVM that can be easily hooked to any test system, metrology software, and a PC GUI thatis used to view results and perform calibration.
5.1 EVM OverviewThe following figures of the EVM describe the hardware. Figure 11 is the top view of the energy meter.Figure 12 discuses the location of various pieces of the EVM based on functionality.
Figure 11. Top View of the Single Phase Energy Meter EVM
14 Implementation of a Single-Phase Electronic Watt-Hour Meter Using the SLAA517E–May 2012–Revised August 2015MSP430F6736(A) Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
www.ti.com Energy Meter Demo
Figure 12. Top View of the EVM With Blocks and Jumpers
5.1.1 Connections to the Test Setup for AC VoltagesAC voltage or currents can be applied to the board for testing purposes at these points.• LINE and NEUTRAL for voltage inputs, connect to Line and Neutral voltages, respectively. This can be
up to 240 V ac, 50 Hz and 60 Hz. Currently available on top of the terminal block.• CUR1+ and CUR1- are the current inputs after the sensors. When CT or shunts are used, make sure
the voltages across CUR1+ and CUR1- does not exceed 920 mV. Not currently used on the EVM.• CUR2+ and CUR2- can also be used as current inputs after the sensors. When CT or shunts are used,
make sure the voltages across CUR2+ and CUR2- does not exceed 920 mV. Currently connected to aCT.
15SLAA517E–May 2012–Revised August 2015 Implementation of a Single-Phase Electronic Watt-Hour Meter Using theMSP430F6736(A)Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
Energy Meter Demo www.ti.com
To read active energy pulses for accuracy measurements, there are several options available on theboard. The related pulse rate is 6400 pulses per kWh by default, but is configurable using the energylibrary.• Optical output via LED1.• Non-isolated electrical pulse via ACT header. The left pin is the signal, and the right pin is GND.• Isolated pulses through JP7. The opto-isolator that is used closes the circuit between these two pins
on an active pulse.
Figure 13 shows the various connections that need to be made to the test set up for proper functionality ofthe EVM.
Figure 13. Top View of the EVM With Test Setup Connections
16 Implementation of a Single-Phase Electronic Watt-Hour Meter Using the SLAA517E–May 2012–Revised August 2015MSP430F6736(A) Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
www.ti.com Energy Meter Demo
If a test setup needs to be connected, the connections have to be made according to the EVM design.Figure 13 shows the connections from the top view. L and N correspond to the voltage inputs from the testsetup. I+ and I- corresponds to one set of current inputs and I’+ and I’- corresponds to the second set ofcurrent inputs. Although the EVM hardware and software supports measurement for the second current,the EVM obtained from Texas Instruments do not have the second sensor and any current inputs must beconnected to I+ and I- only. If additional sensor needs to be placed, please use the two bottom left slotsclose to terminals I’+ and I’-. Additional connections need to be made to connect the output of thesesensors to points CUR1+ and CUR1- on the PCB.
5.1.2 Power Supply Options and Jumper SettingsThe entire board and the UART communication is powered by a single dc voltage rail (DVCC). DVCC canbe derived either via JTAG, external power or the ac mains through the capacitive power supply. Variousjumper headers and jumper settings are present to add to the flexibility to the board. Headers JP1 to JP15constitute the entire headers on the EVM shown above. Some of these headers require that jumpers beplaced appropriately for blocks to function correctly. Table 1 indicates the functionality of each jumper onthe board and the associated functionality.
Table 1. Header Names and Jumper Settings on the F6736(A) EVM
Header Name Main Functionality Valid Use-case CommentsJumper on "INTERNAL" selects JTAG voltage
Jumper placed during JTAG from the attached USB FET. Jumper onJP1 JTAG power selection programming "EXTERNAL" selects JTAG voltage from anexternal source.Jumper on "VCC_PL" selects voltage from the
Jumper placed during cap drop power supply on board, and jumperJP4 DVCC Power Selection operation on "VCC_EXT" selects an external input fromJP3.When using an external source for DVCC,JP3 External power input Not a jumper header attach VCC and GND here.Place a jumper if Current transformers areConnects the -ve input of the used. Do not place jumper if shunt is used.JP2 Current Sensor Reference current sensor sigma delta to Needs to be placed on the EVM if used asAGND provided
Connects AUXVCC1 to GND Jumper must be present if AUXVCC1 is notAUX1 AUXVCC1 selection and input of external supply of used. When removed, it can be used to supply
AUXVCC1. an external voltage to AUXVCC1.Connects AUXVCC2 to GND Jumper must be present if AUXVCC2 is not
AUX2 AUXVCC2 selection and input of external supply of used. When removed, it can be used to supplyAUXVCC2. an external voltage to AUXVCC2.Connects AUXVCC3 to DVCC Jumper can be placed if AUXVCC3 needs to be
AUX3 AUXVCC3 selection and input of external supply of used; when removed it can be used to supplyAUXVCC3. an external voltage to AUXVCC3.
Isolated output to probe the active energyJP7 Isolated active energy pulses Not a jumper header output pulses using external equipment.Isolated reactive energy Isolated output to probe the reactive energyJP8 Not a jumper headerpulses output pulses using external equipment.
Used to measure DVCC or connect power to anSV1 DVCC Power Tap Not a jumper header external module.Used to measure DGND or connect power toSV2 DGND Power Tap Not a jumper header an external module.Used to connect a standard TI Wireless
RF1 + RF2 TI EMK Headers Not a jumper header Evaluation Module Kit (EMK) such as theCC2530 or CC3000Not isolated from ac voltage. Do not connect
Non-isolated active energy external equipment if external isolation is notACT Not a jumper headerpulses + GND present. The left pin is the signal, and the rightpin is GND.
17SLAA517E–May 2012–Revised August 2015 Implementation of a Single-Phase Electronic Watt-Hour Meter Using theMSP430F6736(A)Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
Energy Meter Demo www.ti.com
Table 1. Header Names and Jumper Settings on the F6736(A) EVM (continued)Header Name Main Functionality Valid Use-case Comments
Not isolated from ac voltage. Do not connectNon-isolated reactive energy external equipment if external isolation is notREACT Not a jumper headerpulses + GND present. The left pin is the signal, and the right
pin is GND.
5.2 Loading the Example CodeThe source code is developed in the IAR environment using IAR compiler version 6.x. If earlier versions ofIAR are used, the project files will not open. If later than 6.x versions are used when project is loaded, aprompt to create a back-up will be issued and you can click YES to proceed. There are two parts to theenergy metrology software: the toolkit that contains a library of mostly mathematics routines and the maincode that has the source and include files.
There are two software options available: one for the MSP430F6736 and one for the MSP430F6736A.The chosen software should be selected based on the device that is in use. Section 5.2.1 describes howto compile a project for the MSP430F6736 option. A similar set of instructions could be followed to compilea project for the MSP430F636A option.
5.2.1 Opening the ProjectThe "source" folder structure is shown in Figure 14.
Figure 14. Source Folder Structure
The folder "emeter-ng" contains multiple project files. For this application, the emeter-6736.ewp project fileis to be used. The folder "emeter-toolkit" has corresponding project file emeter-toolkit-6736.ewp. Chooseonly the projects that have the succeeding terms 6736 for this application. For first time use, it isrecommended that both the projects be completely rebuild.1. Open IAR window.2. find and load the project emeter-toolkit-6736.ewp.3. Rebuild all.4. Close the existing workspace and open the main project emeter-6736.ewp.5. Rebuild all and load this on to the MSP430F6736, which is shown in Figure 15.
18 Implementation of a Single-Phase Electronic Watt-Hour Meter Using the SLAA517E–May 2012–Revised August 2015MSP430F6736(A) Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
www.ti.com Energy Meter Demo
Figure 15. Toolkit Compilation in IAR
19SLAA517E–May 2012–Revised August 2015 Implementation of a Single-Phase Electronic Watt-Hour Meter Using theMSP430F6736(A)Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
Results and Calibration www.ti.com
Figure 16. Metrology Project Build in IAR
6 Results and CalibrationIf the procedures and configurations are complete in the previous two sections, the results can beobserved and based on these; calibration can be performed. Calibration is key to any meter’s performanceand is absolutely necessary for every meter to go through this process. Initially every meter would exhibitdifferent accuracies due to silicon-silicon differences, sensor accuracies and other passive tolerances. Tonullify their effects, every meter should be calibrated. Simple procedures to accomplish this process areshown in this section. For any calibration to be performed accurately there should be an accurate sourceavailable. The source should be able to generate any desired voltage, current and phase shifts (betweenV and I) or power factors. In addition to an accurate source, there should also be a reference meter thatacts as an arbitrator between the source and the meter being calibrated. This section discusses a simpleand effective method of calibration of this 1-phase EVM.
A PC GUI is included in the zip file that can be downloaded from http://www.ti.com/lit/zip/slaa517. Afterdecompressing the zip file, a folder named GUI has all of the files that are necessary to run thisapplication.
20 Implementation of a Single-Phase Electronic Watt-Hour Meter Using the SLAA517E–May 2012–Revised August 2015MSP430F6736(A) Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
www.ti.com Results and Calibration
6.1 Viewing ResultsOnce the meter is turned ON, the results can be easily viewed using this GUI by connecting the RS-232header to the PC. Run calibrator.exe in the GUI folder.
Figure 17. E-Meter Mass Calibration
Under correct connections, you should see the GREEN filled button under "Comms". If there are problemswith connections or if the code is not configured correctly, the button will be RED in color. Click on thegreen button to see the meter results immediately on the GUI.
21SLAA517E–May 2012–Revised August 2015 Implementation of a Single-Phase Electronic Watt-Hour Meter Using theMSP430F6736(A)Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
Results and Calibration www.ti.com
Figure 18. Meter Status
The configuration of the meter can also be viewed by clicking on "Meter features" (Example only) to getthe screen shown in Figure 19.
Figure 19. Meter 1 Features
Results can also be viewed as pulses fed back to any energy meter test setup. Energy pulses for totalactive and total reactive energies are available at JP9 and JP12 (ACT) and JP14 and JP13 (REACT). Inaddition, the pulses go through on-board opto-couplers that might be necessary for interface to any testequipment. Look at Table 1 and choose the right header for energy pulses.
22 Implementation of a Single-Phase Electronic Watt-Hour Meter Using the SLAA517E–May 2012–Revised August 2015MSP430F6736(A) Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
%
1 100VObserved
VALVdesired
æ ö= - ´ç ÷
è ø
www.ti.com Results and Calibration
6.2 Calibrating the MeterThe meter can be calibrated easily using the included GUI. Gain correction for voltage, current and activepower can be done simultaneously. However, phase correction for active power is an additional step.
6.2.1 Gain CorrectionGain correction for voltage, current and active power can be done simultaneously and the procedure isdiscussed below.1. Connect the meter to the test setup with known voltage and currents.2. Connect GUI to view results for voltage, current, active power, and so forth.3. Click on Manual cal seen in Figure 18 to give you this screen.
Figure 20. Meter 1 Errors (for manual correction)
4. The values that need to be entered are in % and these values are calculated by the formula inEquation 1. For any particular voltage, the value will be:
(1)5. Negative values are accepted in the voltage and current fields and the same procedure is applicable
for other voltages and currents. For voltages, enter in field "Voltage" and for currents, enter in fieldCurrent (low). After these values are entered, click on Update meter.
6. Gain correction for active power is done differently; the accuracy obtained from any test system whenpulses are fed from the meter is the most accurate method.
7. Measure accuracy in the reference meter of the test system. This gives the true accuracy of the meterfor active energy.
8. Enter the "% accuracy" seen as-is in the Active (low) field. Click on update meter to do a gaincorrection on Phase A.
6.2.2 Phase CorrectionPhase correction has to be done differently and the following is the procedure.1. Set voltage and current values to the same as Gain correction and introduce a known phase shift
between voltage and current to +60°.2. See % error on the test setup. If errors are not acceptable, enter correction factors in the Phase (low)
field. Only increments and decrements should be entered in this field and preferably start with 1 or -1to determine the direction of correction. Click "Update meter".
23SLAA517E–May 2012–Revised August 2015 Implementation of a Single-Phase Electronic Watt-Hour Meter Using theMSP430F6736(A)Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
Results and Calibration www.ti.com
3. Measure error again to see if error has increased or decreased. If error has decreased, continue toadd desired increments until you arrive at an error close to zero, else add decrements.
4. Click on "Update meter" every time a modification is made to this field.5. Change the phase now to -60° and check if this error is still acceptable. If not, fine tune the values of
Phase (low) again. Ideally, errors should be symmetric for same phase shift on lag and lead conditions.
After the meter has been calibrated, it is possible to see these calibrated values for reference. Click "Metercalibration factors" to open this screen (sample values only).
Figure 21. Meter Calibration Factors
If the calibration procedure goes wrong, such that the calibration values are either negative or zero, furthercalibration of the meter should be stopped and code must be reloaded on to the device and the calibrationroutine repeated.
24 Implementation of a Single-Phase Electronic Watt-Hour Meter Using the SLAA517E–May 2012–Revised August 2015MSP430F6736(A) Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
www.ti.com References
6.2.3 Metrology ResultsIn this discussion, metrology results are shown. Current transformers have been used, however, the codesupports shunt resistors as well. Figure 22 shows the results for current that is varied from 50 mA to 100A exhibiting a 2000:1 dynamic range. Table 2 shows the values for the error at room temperature.
Table 2. Energy Measurement Accuracy With Error in(%)
Calibrated at 230 V, 15 A, 50 Hz
Current 0° 60° -60°(Amps)0.05 -0.045 0.058 -0.070.1 -0.019 0.083 -0.070.25 -0.019 0.0575 -0.05750.5 0.006 0.083 -0.0451 0.0147 0.0663 -0.06172 -0.007 0.058 -0.075 0.0043 0.022 -0.01910 -0.007 -0.024 0.00320 -0.015 -0.0533 0.049330 0.0003 -0.079 0.074740 -0.0067 -0.096 0.0750 0.011 -0.106 0.102360 0.0006 -0.099 0.120370 0.0167 -0.096 0.118780 0.0263 -0.098 0.14390 0.0367 -0.096 0.1563100 0.0387 -0.0943 0.16
Figure 22. Measurement Accuracy Across Current
7 References1. MSP430 Family Mixed-Signal Microcontroller Application Reports (SLAA024)2. MSP430x5xx and MSP430x6xx Family User's Guide (SLAU208)
25SLAA517E–May 2012–Revised August 2015 Implementation of a Single-Phase Electronic Watt-Hour Meter Using theMSP430F6736(A)Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
47K
0.0
1u
F
100
100
10
oh
m
4.7
uF
0.1
uF
0.1
uF
0.1
uF
32
.76
8
0.1uF
4.7uF
0.47uF
4.7uF
0.47uF
0.1uF
0.1uF
0.1uF
4.7uF
4.7uF
4.7uF
4.7uF
4.7uF
DG
ND
DG
ND
DG
ND
DG
ND
DG
ND
DG
ND
DG
ND
DG
ND
DG
ND
DG
ND
DG
ND
DV
CC
DV
CC
DG
ND
AG
ND
AG
ND
AG
ND
AG
ND
10K10K Thermistor
DG
ND
DV
CC
JTAG
135
246
79
11
810121413
JP1
123
R3
C1
5
LED1
LED2
R4
R5
S1
3 124
AU
XV
CC
119
AU
XV
CC
218
AUXVCC326
AV
CC
9A
VS
S8
COM032
COM133
COM234
COM335
DV
CC
21
DV
SS
22
DV
SS
275
DV
SY
S74
LCDCAP29
NC
111
NC
212
NC
313
P1.0
14
P1.1
15
P1.2
16
P1.3
17
P1.427
P1.528
P1.636
P1.737
P2.038
P2.139
P2.243
P2.344
P2.445
P2.546
P2.647
P2.748
P3.049
P3.150
P3.2
51
P3.3
52
P3.4
53
P3.5
54
P3.6
55
P3.7
56
P4.0
57
P4.1
58
P4.2
59
P4.3
60
P4.4
61
P4.5
62
P4.6
63
P4.7
64
P5.0
65
P5.1
66
P5.2
67
P5.3
68
P5.4
69
P5.5
70
P5.6
71
P5.7
72
P6.0
73
P6.176
P6.277
P6.378
P6.479
P6.580
P6.681
P6.782
P7.083
P7.184
P7.285
P7.386
P7.487
P7.588
P7.689
P7.790
P8.091
P8.192
P8.293
P8.394
P8.430
P8.531
P8.640
P8.741
P9.042
PJ.0/SMCLK/TDO96
PJ.1/MCLK/TDI/TCLK97
PJ.2/ADC10CLK/TMS98
PJ.3/ACLK/TCK99
RST/NMI/SBWTDIO100
SD
0N
02
SD
0P
01
SD
1N
04
SD
1P
03
SD
2N
06
SD
2P
05
TEST/SBWTCK95
VA
SY
S10
VD
SY
S20
VR
EF
7
XIN
24
XO
UT
25
XV
CO
RE
23
R2
C8
C5
C1
3
C7
Q1
11
22
33
C12
C10
C14
C9
C16
C4
C2
C18
C1
C6
C3
C11
C17
AUX11 2
AUX21 2
AUX31 2
LC
D1
12345678910
11
12
13
14
15
16
17
18
19
20
21
22
44
43
42
41
40
39
38
37
36
35
34
33
32
31
30
29
CO
M0
CO
M1
CO
M2
CO
M3
24
23
SV
1
1234
SV
2
1234
R1RTH
SEG0
SE
G0
AV
CC
AV
CC
DV
CC
DV
CC
SEG1
SE
G1
SEG2
SE
G2
SEG3
SE
G3
SEG4
SE
G4
SEG5
SE
G5
SEG6
SE
G6
SEG7
SE
G7
SEG8
SE
G8
SEG9
SE
G9
SEG10
SE
G1
0
SEG11
SE
G11
SEG12
SE
G1
2
SEG13
SE
G1
3
SEG14
SE
G1
4
SEG15
SE
G1
5
SEG16
SE
G1
6
SEG17
SE
G1
7
SEG18
SE
G1
8
SE
G1
9
SE
G1
9
SE
G2
0
SE
G2
0
SE
G2
1
SE
G2
1
SE
G2
2
SE
G2
2
SE
G2
3
SE
G2
3
SE
G2
4
SE
G2
4
SE
G2
5
SE
G2
5
SE
G2
6
SE
G2
6
SE
G2
7
SE
G2
7
SE
G2
8
SE
G2
8
SE
G2
9
SE
G2
9
SE
G3
0
SE
G3
0
SE
G3
1
SE
G3
1
SE
G3
2
SE
G3
2
SE
G3
3
SE
G3
3
SE
G3
4
SE
G3
4
SE
G3
5
SE
G3
5
SE
G3
6
SE
G3
6
SE
G3
7
SE
G3
7
SE
G3
8
SE
G3
8
SE
G3
9
SE
G3
9
COM0
CO
M0
COM1
CO
M1
COM2
CO
M2
COM3
CO
M3
RESET
SCLSDA
VS
EN
SE
ACT
ACT
REACT
REACT
VR
EF
V1
+V
1-
I1+
I1-
IN+
IN-
TX
0R
X0
IR_SD
LCDCAP
VC
OR
E
VD
SY
S
VD
SY
S
VDSYS
VA
SY
S
TDOTDITMSTCK
TEST
RS232_RXDRS232_TXD
RF_SOMI
RF_CSRF_CLK
BT1BT2
RF_VREG_ENRF_RESETCC
RF
_G
PIO
1R
F_
GP
IO2
AU
XV
CC
1A
UX
VC
C2
DG
ND
DG
ND
RF_SIMO
RF_SFDRF_CCA
VT
EM
P
VT
EM
P
+
+
Schematics www.ti.com
8 SchematicsThe following pages show the schematics for the EVM430-F6739.
Figure 23. Schematics (1 of 5)
26 Implementation of a Single-Phase Electronic Watt-Hour Meter Using the SLAA517E–May 2012–Revised August 2015MSP430F6736(A) Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
1N
4148
1N
4148
1N
4148
1N
4148
1N
4148
1N
4148
1N
4148
1N
4148
BL
M2
1B
D121S
N1D
BL
M2
1B
D121S
N1D
BL
M2
1B
D121S
N1D
BLM
21
BD
121S
N1D
13R
1K
1K
13R
1K
1K
47pF
47pF
15nF
47pF
47pF
15nF
DNP0R
330K
330K
330K
1K
1003K
47pF
47pF
15nF
AG
ND
AG
ND
AGND
AGND
AGNDAGND
S20K275
EX
CM
L20A
EX
CM
L20A
D1D2D3D4D5D6D7D8
L3
L4
L5
L6
R9
R12
R13
R10 R14
R15
C19
C20
C23
C21
C22
C24
11
22
11
22
R7R8
R11
R16
R17
R20
R19
R18
C25
C26
C27
JP2
12
R6
LIN
E
NE
UT
RA
L
L1L
2
AV
CC
I1+
I1-
IN+
IN-
V1+
V1-
LIN
E-V
AV
1
NE
UT
RA
L
www.ti.com Schematics
Figure 24. Schematics (2 of 5)
27SLAA517E–May 2012–Revised August 2015 Implementation of a Single-Phase Electronic Watt-Hour Meter Using theMSP430F6736(A)Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
5K
5K Vsupply
DV
CC
DG
ND
DG
ND
0.22uF/305VAC
56
0R
/3W
0
1N
4004
1N4728
220
uF
/100
V2.2
uF
1.8M59k
332k
0.0
47uF
TP
S5401_D
GQ
_10
DG
ND
DG
ND
Vsupply
0.047uF
332k
0.0
47uF
0.0
47uF
2.2
uF
DG
ND B150
EL
LC
TV
51316k100kDG
ND
DG
ND
R31
R30
JP
4123
JP
3
1 2
C28
R21
R22
D12
D11
C29
C3
0R23R24
R25C
31
U1
BO
OT
1
VIN
2
EN
3
SS
/TR
4
RT
/CL
K5
PW
RG
D6
VS
EN
SE
7C
OM
P8
GN
D9
PH
10
C32
R26
C33
C34
C35
D13
L7
R27R28R29
LIN
E-V
A
VS
EN
SE
PL_V
CC
PL_V
CC
EX
T_V
CC
EX
T_V
CC
NE
UT
RA
L
Schematics www.ti.com
Figure 25. Schematics (3 of 5)
28 Implementation of a Single-Phase Electronic Watt-Hour Meter Using the SLAA517E–May 2012–Revised August 2015MSP430F6736(A) Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
EZ
-RF
CO
NN
EC
T
24C
02C
SN
10K
10K
0.1
uF
100k
100k
0.1
uF
0.1
uF
TIL
191
TIL
191
1K
1K
GN
D
GN
DG
ND
GN
D
0.1
uF
47
4.7
uF
DV
CC
DV
CC
DV
CC
DV
CC
DV
CC
GN
DG
ND
DV
CC
DG
ND
DG
ND
10uF
0.1uF
DV
CC
0000
00000000
000
00 0
VC
C
GN
D
IC2
84
SC
L6
SD
A5
A0
1A
12
A2
3
WP
7
R32
R35
C37
S2
3 124
S3
3 124
R33
R34
C3
6C
38
OK
112
3 4
OK
212
3 4
JP7
12
JP8
12
R41
R50
12 AC
TR
EA
CT
12
SV
3
123456
VC
C2
TX
DR
XD
SD
VC
C1
GN
DC
40
R36
C39
RF
1R
F1
12
34
56
78
91
011
12
13
14
15
16
17
18
19
20
RF
2R
F2
12
34
56
78
91
011
12
13
14
15
16
17
18
19
20
C41
C42
R37
R38
R39
R40
R42
R43
R44
R45
R46
R47
R48
R49
R52
R53
R56
R51
R55
R54
12
JP
5
12
JP
6
DG
ND
DV
CC
DV
CC
SC
L
SD
A
BT
2
AC
TR
EA
CT
TX
0
TX
0
RX
0R
X0
BT
1
IR_S
D
RF
_F
IFO
RF
_F
IFO
RF
_F
IFO
RF
_F
IFO
PR
F_F
IFO
P
RF
_F
IFO
P
RF
_S
FD
RF
_C
CA
RF
_S
OM
I
RF
_S
OM
I
RF
_S
IMO
RF
_S
IMO
RF
_C
LK
RF
_C
S
RF
_G
PIO
2
RF
_R
ES
ET
CC
RF
_R
ES
ET
CC
RF
_V
RE
G_E
N
RF
_G
PIO
1
ArrayEEPROM
IRD
A
www.ti.com Schematics
Figure 26. Schematics (4 of 5)
29SLAA517E–May 2012–Revised August 2015 Implementation of a Single-Phase Electronic Watt-Hour Meter Using theMSP430F6736(A)Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
GN
D
-
BC860B/BC857B
DNP
1k
10k
1.5
k
220
1k
68
2.2
k
2.2
k
GN
D
0.1
u
BC
860B
/BC
857B
LL103A
LL103A
LL
10
3A
LL
10
3A
PS
8802
PS
8802
10u
10u
DV
CC
DV
CC R58
T2
R61
R6
3
R64
R6
5
R66
R6
2
R6
0
R5
9
R5
7
C4
3
T1
D14
D15
D1
6
D1
7
23
7 85 6
U3
23
7 85 6
U2
C44
C45
RS
1
16
27
38
49
5
G1
G2
RS
23
2_
RX
D
RS
23
2_
TX
D
GN
D1
RX
D
+1
2V
-12
V
TX
D
Schematics www.ti.com
Figure 27. Schematics (5 of 5)
30 Implementation of a Single-Phase Electronic Watt-Hour Meter Using the SLAA517E–May 2012–Revised August 2015MSP430F6736(A) Submit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
www.ti.com Revision History
Revision History
Changes from D Revision (March 2015) to E Revision .................................................................................................. Page
• Changed the modulation frequency from "1.1 MHz" to "1 MHz (1048576 Hz)" in Section 4.1.1, SD24 Setup .............. 7
NOTE: Page numbers for previous revisions may differ from page numbers in the current version.
31SLAA517E–May 2012–Revised August 2015 Revision HistorySubmit Documentation Feedback
Copyright © 2012–2015, Texas Instruments Incorporated
IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, enhancements, improvements and otherchanges to its semiconductor products and services per JESD46, latest issue, and to discontinue any product or service per JESD48, latestissue. Buyers should obtain the latest relevant information before placing orders and should verify that such information is current andcomplete. All semiconductor products (also referred to herein as “components”) are sold subject to TI’s terms and conditions of salesupplied 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 TI’s termsand conditions of sale of semiconductor products. Testing and other quality control techniques are used to the extent TI deems necessaryto support this warranty. Except where mandated by applicable law, testing of all parameters of each component is not necessarilyperformed.TI assumes no liability for applications assistance or the design of Buyers’ products. Buyers are responsible for their products andapplications using TI components. To minimize the risks associated with Buyers’ products and applications, Buyers should provideadequate design and operating safeguards.TI does not warrant or represent that any license, either express or implied, is granted under any patent right, copyright, mask work right, orother intellectual property right relating to any combination, machine, or process in which TI components or services are used. Informationpublished by TI regarding third-party products or services does not constitute a license to use such products or services or a warranty orendorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of thethird party, or a license from TI under the patents or other intellectual property of TI.Reproduction of significant portions of TI information in TI data books or data sheets is permissible only if reproduction is without alterationand is accompanied by all associated warranties, conditions, limitations, and notices. TI is not responsible or liable for such altereddocumentation. Information of third parties may be subject to additional restrictions.Resale of TI components or services with statements different from or beyond the parameters stated by TI for that component or servicevoids all express and any implied warranties for the associated TI component or service and is an unfair and deceptive business practice.TI is not responsible or liable for any such statements.Buyer acknowledges and agrees that it is solely responsible for compliance with all legal, regulatory and safety-related requirementsconcerning its products, and any use of TI components in its applications, notwithstanding any applications-related information or supportthat may be provided by TI. Buyer represents and agrees that it has all the necessary expertise to create and implement safeguards whichanticipate dangerous consequences of failures, monitor failures and their consequences, lessen the likelihood of failures that might causeharm and take appropriate remedial actions. Buyer will fully indemnify TI and its representatives against any damages arising out of the useof any TI components in safety-critical applications.In some cases, TI components may be promoted specifically to facilitate safety-related applications. With such components, TI’s goal is tohelp enable customers to design and create their own end-product solutions that meet applicable functional safety standards andrequirements. 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 partieshave executed a special agreement specifically governing such use.Only those TI components which TI has specifically designated as military grade or “enhanced plastic” are designed and intended for use inmilitary/aerospace applications or environments. Buyer acknowledges and agrees that any military or aerospace use of TI componentswhich have not been so designated is solely at the Buyer's risk, and that Buyer is solely responsible for compliance with all legal andregulatory 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 ofnon-designated products, TI will not be responsible for any failure to meet ISO/TS16949.
Products ApplicationsAudio www.ti.com/audio Automotive and Transportation www.ti.com/automotiveAmplifiers amplifier.ti.com Communications and Telecom www.ti.com/communicationsData Converters dataconverter.ti.com Computers and Peripherals www.ti.com/computersDLP® Products www.dlp.com Consumer Electronics www.ti.com/consumer-appsDSP dsp.ti.com Energy and Lighting www.ti.com/energyClocks and Timers www.ti.com/clocks Industrial www.ti.com/industrialInterface interface.ti.com Medical www.ti.com/medicalLogic logic.ti.com Security www.ti.com/securityPower Mgmt power.ti.com Space, Avionics and Defense www.ti.com/space-avionics-defenseMicrocontrollers microcontroller.ti.com Video and Imaging www.ti.com/videoRFID www.ti-rfid.comOMAP Applications Processors www.ti.com/omap TI E2E Community e2e.ti.comWireless Connectivity www.ti.com/wirelessconnectivity
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265Copyright © 2015, Texas Instruments Incorporated