下载

Application Report
SLAA203C – June 2004 – Revised April 2009
Implementing An Electronic Watt-Hour Meter With
MSP430FE42x(A)/FE42x2
Stefan Schauer, Kripasagar Venkat ......................................................................... MSP430 Applications
ABSTRACT
This report shows how to implement an electronic watt-hour meter with the
MSP430FE42x(A)/FE42x2 devices. It contains guidelines and recommendations for
use of the MSP430FE42x(A) and MSP430FE42x2 devices. In addition, a reference
board with hardware details and software examples are included.
Contents
1 Introduction .......................................................................................... 3
2 Hardware ............................................................................................ 3
2.1 Getting Started with the Reference Board ............................................. 3
2.2 Shunt as Current Sensor ................................................................. 4
2.3 CT as Current Sensor ..................................................................... 5
2.4 CT and Shunt as Current Sensor for Tamper Detection (Not Applicable for
FE42x2 Devices) .......................................................................... 6
2.5 CT for the US 1-Phase 3-Wire E-Meter Solution ...................................... 7
2.6 Voltage Input Connections ............................................................... 7
2.7 Current Input Connections ............................................................... 7
2.8 Anti-Aliasing Filter ......................................................................... 8
2.9 Unused ADC Inputs ....................................................................... 8
3 Calculation of the ESP430CE Meter Constants ................................................ 8
3.1 Voltage Ratio ............................................................................... 8
3.2 Current Ratio for Shunt ................................................................... 8
3.3 Current Ratio for Current Transformer .................................................. 8
3.4 Interrupt Level for Energy ................................................................ 8
4 Meter Calibration ................................................................................... 9
4.1 Calibration With Continuous Measurement ........................................... 10
4.2 Calibration With a Host Computer ..................................................... 12
4.3 Self Calibration ........................................................................... 13
5 Capacitor Power Supply.......................................................................... 14
5.1 Power Line Voltage On/Off Detection ................................................. 14
6 Layout Recommendations ....................................................................... 15
6.1 Grounding ................................................................................. 15
6.2 EMI Sensitivity ............................................................................ 16
7 Demo Software .................................................................................... 17
7.1 Analog Front-End Initialization ......................................................... 17
7.2 E-Meter Initialization ..................................................................... 17
7.3 Demo 1 Software ......................................................................... 17
7.4 Energy Pulse Generation ............................................................... 18
7.5 Temperature Compensation for CT Phase Shift ..................................... 19
7.6 Controls .................................................................................... 19
7.7 Demo 2 .................................................................................... 20
8 References ......................................................................................... 23
Appendix A Reference Board Schematic and Layout ............................................. 24
SLAA203C – June 2004 – Revised April 2009 Implementing An Electronic Watt-Hour Meter With MSP430FE42x(A)/FE42x2 1
Submit Documentation Feedback