SLAA517F May   2012  – August 2021 MSP430F6720A , MSP430F6720A , MSP430F6721A , MSP430F6721A , MSP430F6723A , MSP430F6723A , MSP430F6724A , MSP430F6724A , MSP430F6725A , MSP430F6725A , MSP430F6726A , MSP430F6726A , MSP430F6730A , MSP430F6730A , MSP430F6731A , MSP430F6731A , MSP430F6733A , MSP430F6733A , MSP430F6734A , MSP430F6734A , MSP430F6735A , MSP430F6735A , MSP430F6736 , MSP430F6736 , MSP430F6736A , MSP430F6736A

 

  1.   Trademarks
  2. 1Introduction
  3. 2System Diagrams
  4. 3Hardware Implementation
    1. 3.1 Power Supply
      1. 3.1.1 Resistor Capacitor (RC) Power Supply
    2. 3.2 Analog Inputs
      1. 3.2.1 Voltage Inputs
      2. 3.2.2 Current Inputs
  5. 4Software Implementation
    1. 4.1 Peripherals Setup
      1. 4.1.1 SD24 Setup
    2. 4.2 Foreground Process
      1. 4.2.1 Formulas
        1. 4.2.1.1 Voltage and Current
        2. 4.2.1.2 Power and Energy
    3. 4.3 Background Process
      1. 4.3.1 Voltage and Current Signals
      2. 4.3.2 Phase Compensation
      3. 4.3.3 Frequency Measurement and Cycle Tracking
      4. 4.3.4 LED Pulse Generation
  6. 5Energy Meter Demo
    1. 5.1 EVM Overview
      1. 5.1.1 Connections to the Test Setup for AC Voltages
      2. 5.1.2 Power Supply Options and Jumper Settings
    2. 5.2 Loading the Example Code
      1. 5.2.1 Opening the Project
  7. 6Results and Calibration
    1. 6.1 Viewing Results
    2. 6.2 Calibrating the Meter
      1. 6.2.1 Gain Correction
      2. 6.2.2 Phase Correction
      3. 6.2.3 Metrology Results
  8. 7References
  9. 8Schematics
  10. 9Revision History

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 to report measurement during normal operation. To serve both these tasks efficiently, the microcontroller has to accurately generate and record the 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 would give 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 the foreground process) is accumulated every ΣΔ interrupt. This is equivalent to converting it 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 amount 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.

The threshold determines the energy "tick" specified by the power company and is a constant. For example, this can be in kWh. In most meters, the pulses per kWh decide this energy tick. For example in this 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 by LEDs on the board. Port pins are toggled for the pulses with control over the pulse width for each pulse. Figure 4-5 shows the flow diagram for pulse generation.

GUID-5FF0490B-8E9C-4EF7-8635-21FAA388D481-low.gif Figure 4-5 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