SLAA494B May   2011  – September 2023 MSP430AFE221 , MSP430AFE222 , MSP430AFE223 , MSP430AFE231 , MSP430AFE232 , MSP430AFE233 , MSP430AFE251 , MSP430AFE252 , MSP430AFE253

 

  1.   1
  2.   Implementation of a Single-Phase Electronic Watt-Hour Meter Using the MSP430AFE2xx
  3. Trademarks
  4. Introduction
  5. Block Diagram
  6. Hardware Implementation
    1. 4.1 Power Supply
      1. 4.1.1 Resistor Capacitor (RC) Power Supply
      2. 4.1.2 Switching-Based Power Supply
    2. 4.2 Analog Inputs
      1. 4.2.1 Voltage Inputs
      2. 4.2.2 Current Inputs
  7. Software Implementation
    1. 5.1 Peripherals Setup
      1. 5.1.1 SD24 Setup
    2. 5.2 Foreground Process
      1. 5.2.1 Formulas
        1. 5.2.1.1 Voltage and Current
        2. 5.2.1.2 Power and Energy
    3. 5.3 The Background Process
      1. 5.3.1 Voltage and Current Signals
      2. 5.3.2 Phase Compensation
      3. 5.3.3 Frequency Measurement and Cycle Tracking
      4. 5.3.4 LED Pulse Generation
    4. 5.4 Energy Meter Configuration
  8. Energy Meter Demo
    1. 6.1 EVM Overview
      1. 6.1.1 Connections to the Test Setup or AC Voltages
      2. 6.1.2 Power Supply Options
    2. 6.2 Loading the Example Code
      1. 6.2.1 Opening the Project
  9. Results
    1. 7.1 Viewing Results on PC
    2. 7.2 Viewing Results During Debug
  10. Important Notes
  11. Schematics
  12. 10References
  13. 11Revision History

Voltage Inputs

The voltage from the mains is usually 230 V or 110 V and must be brought down to a range of 500 mV (see Figure 4-3). The analog front end for voltage consists of spike protection varistors (not shown) followed by a simple voltage divider and an RC low-pass filter that acts as an anti-alias filter.

GUID-2E57C282-1C2B-46B8-A9E2-31577D88C256-low.gifFigure 4-3 Analog Front End for Voltage Inputs

Figure 4-3 shows the analog front end for the voltage inputs for a mains voltage of 230 V. The voltage is brought down to approximately 350 mV RMS, which is 495 mV peak, and fed to the positive input. This level meets the MSP430 SD24 analog limits. A common-mode voltage of zero can be connected to the negative input of the SD24. In addition, the SD24 has an internal reference voltage of 1.2 V that can be used externally and also as a common-mode voltage, if needed.

Note that the anti-alias resistors on the positive and negative sides are different, because the input impedance to the positive terminal is much higher and, therefore, a lower-value resistor is used for the anti-alias filter. If this difference is not maintained, a relatively large phase shift of several degrees would result.