TIDUEM7A April   2019  – February 2021

 

  1.   Description
  2.   Resources
  3.   Features
  4.   Applications
  5.   5
  6. 1System Description
    1. 1.1 End Equipment
      1. 1.1.1 Electricity Meter
    2. 1.2 Key System Specifications
  7. 2System Overview
    1. 2.1 Block Diagram
    2. 2.2 Highlighted Products
      1. 2.2.1 ADS131M04
      2. 2.2.2 TPS7A78
      3. 2.2.3 MSP432P4111
      4. 2.2.4 TPS3840
      5. 2.2.5 THVD1500
      6. 2.2.6 ISO7731B
      7. 2.2.7 TRS3232E
      8. 2.2.8 TPS709
      9. 2.2.9 ISO7720
    3. 2.3 Design Considerations
      1. 2.3.1 Design Hardware Implementation
        1. 2.3.1.1 TPS7A78 Cap-Drop Supply
        2. 2.3.1.2 TPS3840 SVS
        3. 2.3.1.3 Analog Inputs
          1. 2.3.1.3.1 Voltage Measurement Analog Front End
          2. 2.3.1.3.2 Current Measurement Analog Front End
      2. 2.3.2 Current-Detection Mode
        1. 2.3.2.1 ADS131M04 Current-Detection Procedure
        2. 2.3.2.2 Using an MCU to Trigger Current-Detection Mode
          1. 2.3.2.2.1 Using a Timer to Trigger Current-Detection Mode Regularly
          2. 2.3.2.2.2 MCU Procedure for Entering and Exiting Current-Detection Mode
        3. 2.3.2.3 How to Implement Software for Metrology Testing
          1. 2.3.2.3.1 Setup
            1. 2.3.2.3.1.1 Clock
            2. 2.3.2.3.1.2 Port Map
            3. 2.3.2.3.1.3 UART Setup for GUI Communication
            4. 2.3.2.3.1.4 Real-Time Clock (RTC)
            5. 2.3.2.3.1.5 LCD Controller
            6. 2.3.2.3.1.6 Direct Memory Access (DMA)
            7. 2.3.2.3.1.7 ADC Setup
          2. 2.3.2.3.2 Foreground Process
            1. 2.3.2.3.2.1 Formulas
          3. 2.3.2.3.3 Background Process
            1. 2.3.2.3.3.1 per_sample_dsp()
              1. 2.3.2.3.3.1.1 Voltage and Current Signals
              2. 2.3.2.3.3.1.2 Frequency Measurement and Cycle Tracking
            2. 2.3.2.3.3.2 LED Pulse Generation
            3. 2.3.2.3.3.3 Phase Compensation
    4. 2.4 Hardware, Software, Testing Requirements, and Test Results
      1. 2.4.1 Required Hardware and Software
        1. 2.4.1.1 Cautions and Warnings
        2. 2.4.1.2 Hardware
          1. 2.4.1.2.1 Connections to the Test Setup
          2. 2.4.1.2.2 Power Supply Options and Jumper Settings
        3. 2.4.1.3 Software
      2. 2.4.2 Testing and Results
        1. 2.4.2.1 Test Setup
          1. 2.4.2.1.1 SVS and Cap-Drop Functionality Testing
          2. 2.4.2.1.2 Electricity Meter Metrology Accuracy Testing
          3. 2.4.2.1.3 Current-Detection Mode Testing
          4. 2.4.2.1.4 Viewing Metrology Readings and Calibration
            1. 2.4.2.1.4.1 Viewing Results From LCD
            2. 2.4.2.1.4.2 Calibrating and Viewing Results From PC
              1. 2.4.2.1.4.2.1 Viewing Results
              2. 2.4.2.1.4.2.2 Calibration
                1. 2.4.2.1.4.2.2.1 Gain Calibration
                  1. 4.2.1.4.2.2.1.1 Voltage and Current Gain Calibration
                  2. 4.2.1.4.2.2.1.2 Active Power Gain Calibration
                2. 2.4.2.1.4.2.2.2 Offset Calibration
                3. 2.4.2.1.4.2.2.3 Phase Calibration
        2. 2.4.2.2 Test Results
          1. 2.4.2.2.1 SVS and TPS7A78 Functionality Testing Results
          2. 2.4.2.2.2 Electricity Meter Metrology Accuracy Results
          3. 2.4.2.2.3 Current-Detection Mode Results
  8. 3Design Files
    1. 3.1 Schematics
    2. 3.2 Bill of Materials
    3. 3.3 PCB Layout Recommendations
      1. 3.3.1 Layout Prints
    4. 3.4 Altium Project
    5. 3.5 Gerber Files
    6. 3.6 Assembly Drawings
  9. 4Related Documentation
    1. 4.1 Trademarks
  10. 5About the Author
  11. 6Revision History
Viewing Results

To view the metrology parameter values from the GUI, perform the following steps:

  1. Select whether to use the RS-485 or RS-232 connection for communication to the PC GUI. This selection is done by placing 3 jumpers on jumper headers J16, J17, and J18. To select the RS-485 communication option, put the jumpers on the top two leftmost pins (labeled RS-485 on the board) of these three headers. To select the RS-232 communication option, put the jumpers on the two rightmost pins (labeled RS-232 on the board) of the three headers.
  2. Connect the reference design to a PC
    • RS-232 option: Connect the reference design to a PC using a RS-232 cable. If the PC does not have a RS-232 adapter, use a serial RS-232 adapter. The RS-232 adapter should create a COM port on the PC when it is plugged in.
    • RS-485 option: Use a USB to RS-485 adapter to communicate between the PC GUI and the RS-485 port on this design. The USB to RS-485 adapter should create a COM port on the PC when it is plugged in. The other end of the adapter should have wires for the RS-485 Data A and Data B connections as well as a GND connection and a 5-V power connection., Connect all these wires to the J21 screw terminal block of the design according to the connection labels next to the terminal block pins. For testing this circuit, the following USB to RS-485 adapter is specifically used: http://www.ftdichip.com/Support/Documents/DataSheets/Cables/DS_USB_RS485_CABLES.pdf. For this specific adapter, the Data A connection is orange, the Data B connection wire is yellow, the GND connection is black, and the 5-V power connection is red.
  3. Open the GUI folder and open calibration-config.xml in a text editor.
  4. Change the port name field within the meter tag to the COM port connected to the system. As Figure 2-30 shows, this field is changed to COM7.
    GUID-4BD8E210-C8EE-4BAE-9992-7E03167DA50D-low.pngFigure 2-30 GUI Configuration File Changed to Communicate With Energy Measurement System
  5. Run the calibrator.exe file, which is located in the GUI folder. If the COM port in the
    calibration-config.xml was changed in the previous step to the COM port connected to the reference design, the GUI opens (see Figure 2-31). If the GUI connects to the design properly, the top-left button is green. If there are problems with connections or if the code is not configured correctly, the button is red. Click the green button to view the results.
    GUID-FB87F440-EDF3-4822-9BDC-C2943888655B-low.gifFigure 2-31 GUI Startup Window

Upon clicking on the green button, the results window opens (see Figure 2-32). In the figure, there is a trailing "L" or "C" on the Power factor values to indicate an inductive or capacitive load, respectively. Note that by default, the column in the GUI labeled "Phase A" is actually the shunt channel and the column labeled "Neutral" is actually the CT channel. If the system and shunt is referenced with respect to the neutral, the shunt would actually measure the neutral current and the CT would measure the line current, unlike how the GUI is labeled.

GUID-693687D9-F040-4668-81C8-E6862F408A23-low.pngFigure 2-32 GUI Results Window

From the results window, the total-energy consumption readings can be viewed by clicking the Meter Consumption button. After the user clicks this button, the Meter events and consumption window pops up, as Figure 2-33 shows.

GUID-E738512F-DCE8-4231-A5FD-B47E1450C8F1-low.pngFigure 2-33 Meter Events and Consumption Window

From the results window, the meter settings can be viewed by clicking the Meter features button, view the system calibration factors by clicking the Meter calibration factors button, or open the window used for calibrating the system by clicking the Manual cal. button.