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
Power Supply Options and Jumper Settings

The MSP432 MCU and ADS131M04 device portion of this design is powered from a single voltage rail (DVCC), which can be derived from two potential methods. In the first method, DVCC can be powered from AC mains by using the TPS7A78-based cap-drop supply of the design. The output of the TPS7A78 device can be connected directly to DVCC by putting a jumper between the DVCC and LDO_OUT pins of the J3 header. Connect the TPS7A78 device indirectly to DVCC through a diode in case there is an auxiliary power source (such as a battery) connected to header J1 that the system can switch to, in case of an AC supply failure. Make this connection by placing a jumper between the DVCC and DIODE options of the J3 header and placing a jumper at the J2 header.

The diode ORs the TPS7A78 power supply with the auxiliary power supply connected at J1. To ensure that the system is powered from the TPS7A78 power supply when Mains is available, the output voltage from the TPS7A78 (3.3 V for this design) should be greater than the output voltage from the auxiliary power supply connected to J1. If the output voltage from the TPS7A78 is not larger than the auxiliary power source output voltage, the design is powered from the auxiliary power source even when Mains is available. It should also be noted that powering DVCC through the diodes results in a lower output voltage than if the diodes are not used because of the voltage drop across the diode. As a result, if an auxiliary power supply is not needed, it is recommended to connect the TPS7A78 directly to DVCC instead of connecting it to DVCC through a diode.

In the second method for deriving power for DVCC, DVCC can be powered from an external power supply by connecting a 3.3-V external power supply at the DVCC header J6 and GND. To support this direct way of driving DVCC, do not place a jumper on jumper header J3.

Various jumper headers and jumper settings are present to add to the flexibility to the board. Some of these headers require that jumpers be placed appropriately for the board to correctly function. Table 2-2 indicates the functionality of each jumper on the board.

Note:

The headers with (WARNING) text in the MAIN FUNCTIONALITY column are not isolated, so do not use measuring equipment there (especially if the system is referenced with respect to the line) when running off the Mains. This applies, unless either isolators external to the board of the design are used to connect at the headers, if the equipment is battery powered and does not connect to Mains, or if AC mains is isolated.

Table 2-2 Header Names and Jumper Settings
HEADER OR HEADER OPTION NAMETYPEMAIN FUNCTIONALITYVALID USE-CASECOMMENTS
J12-pin headerAuxiliary power input (WARNING)Apply 3.2 V between here and GND to create the auxiliary power supply that can be used to power the design when the TPS7A78 is not able to power the design because of an AC supply failure seen at its input.Place a jumper at J2 and another jumper between the DVCC and DIODE options of the J3 header to support using the voltage applied here as a backup power supply. In addition, the voltage applied at this header should be less than the TPS7A78 output voltage.
J22-pin jumper headerAuxiliary power input enable(WARNING)Place a jumper at this header to connect the auxiliary power supply at header J1 to DVCC.A jumper here connects the auxiliary power supply at header J1 to DVCC through a diode. To support using the voltage applied here as a backup power supply, a jumper must be placed between the DVCC and DIODE options of the J3 header to OR the TPS7A78 and auxiliary power supplied together. Note that the output voltage connected to DVCC is smaller than the voltage applied at this header because of the voltage drop across the diode.
J33-pin jumper headerTPS7A78 DVCC connection(WARNING)The LDO_OUT pin of this header can be probed to view the output voltage produced from the TPS7A78. A jumper can be placed here to connect the TPS7A78 directly through DVCC or indirectly to DVCC through a diode.Place a jumper between the DVCC and DIODE option of this header if using the auxiliary power supply at header J1 as a backup power supply when the AC mains input to the TPS7A78 fails. Additionally, place a jumper at J2. By placing these two jumpers, the TPS7A78 device and auxiliary power supplies are ORed together. Note that the output voltage connected to DVCC is smaller than the TPS7A78 output voltage because of the voltage drop across the diode. If an external power supply is to be connected to DVCC instead of using the TPS7A78, do not place a jumper here.
J42-pin headerHeader connected to TPS7A78 PG and PF pins (WARNING)Probe at pin 2 of this header to determine if the TPS7A78 device has detected AC supply failure at its input. Probe at pin 1 to determine if the output voltage from the TPS7A78 has ramped up beyond 90% of the set 3.3-V LDO output voltage.The PF pin is used in this design to trigger the ADS131M04 device to enter current-detection mode. The PG pin is used in this design to trigger the ADS131M04 to exit current-detection mode.
J52-pin headerPM1 header (WARNING)P2.7 GPIO pin and GND.This header has two pins: GND and PM1, where PM1 is the P2.7 GPIO pin of the MSP432 MCU. The P2.7 GPIO pin can be port mapped to different functions, which allows this header to potentially be used to debug multiple items.
J64-pin headerDVCC voltage header (WARNING)Probe here for DVCC voltage. Connect the positive terminal of the bench or external power supply when powering the board externally directly through DVCC.Probe between here and J7 to measure the output voltage used to power the board. If DVCC is powered directly (remove the jumper from header J3), 3.3 V must be applied between here and J7.
J74-pin headerGround voltage header (WARNING)Probe here for GND voltage. Connect negative terminal of bench or external power supply when powering the board externally directly through DVCC.Probe between J6 and here to measure the output voltage used to power the board. If DVCC is powered directly (remove the jumper from header J3), 3.3 V must be applied between J6 and here.
J82-pin headerExtra DVCC and GND connections (WARNING)Header containing DVCC and ground.For more info on the DVCC pin, see the description on J6. For more info on the ground pin, see the description on J7.
J94-pin headerHeader containing MSP432 P7.0, 7.1, P7.2, and P7.3 pins (WARNING)Probe here for P7.0, P7.1, P7.2, and P7.3 GPIO pins.The P7.0, P7.1, and P7.2 pins are used for adjusting the contrast of the LCD. P7.3 is not used in this design. These pins are all port mappable. If the LCD is not needed, it can be disabled in software and R9, R15, R16, and R17 can be removed so that P7.0, P7.1, and P7.2 can be port mapped for other purposes.
J1110-pin 2-row connectorJTAG: MSP432 programming header (WARNING)Connect the MSP-FET- 432ADPTR adapter to this connector to program the MSP432 MCU.The MSP-FET-432ADPTR is used to allow the MSP-FET tool to program the MSP432 device. One connector of the MSP-FET-432ADPTR adapter connects to the FET tool and the other connector connects to the JTAG connector of the MSP432 MCU. Note that the MSP432 has to be powered externally to program the MSP432 MCU. Since this header and the FET tool is not isolated, do not connect to this header when running off Mains and Mains is not isolated.
J132-pin headerActive energy pulses (WARNING)Probe here for active energy pulses based on the shunt active power readings. This header has two pins: GND and ACT, which is where the active energy pulses are actually output.This header is not isolated from AC mains, so do not connect measuring equipment here (especially when referencing the system from line) If it is desired to test the active power pulses, use the "ISO_ACT" pin of J15 instead since it is isolated.
J142-pin headerReactive energy pulses (WARNING)Probe here for active energy pulses based on the shunt active power reading. This header has two pins: GND and REACT, which is where the reactive energy pulses are actually output.This header is not isolated from AC mains, so do not connect measuring equipment here (especially when referencing the system from line) If it is desired to test the reactive power pulses, use the "ISO_REACT" pin of J15 instead since it is isolated.
J154-pin headerIsolated pulses headerProbe here for the isolated active energy pulses and the isolated reactive energy pulses. Using this header for pulses is recommended, especially when referencing the system with respect to line.This header has four pins: ISO_GND, ISO_REACT, ISO_ACT, and ISO_VCC.
ISO_GND is the isolated ground for the energy pulses.
ISO_VCC is the VCC connection for the isolated active and reactive energy pulses.
ISO_ACT is where the isolated active energy pulses are output.
ISO_REACT is where the isolated active energy pulses are output.
This header is isolated from AC mains so it is safe to connect to a scope or other measuring equipment because isolators are already present. However, either 3.3 V or 5 V must be applied between ISO_GND and ISO_VCC to produce the active energy pulses and reactive energy pulses at this header. The produced pulses have a logical high voltage that is equal to the voltage applied between ISO_GND and ISO_VCC.
J163-pin jumper headerRS-232 or RS-485 selection-powerPlace a jumper at either the RS-232 or RS-485 positions depending on which of these two communication options are desired.Put a jumper in the RS-232 position on this header, J17, and J18 to select RS-232 communication.
Put a jumper in the RS-485 position on this header, J17, and J18 to select RS-485 communication.
J173-pin jumper headerRS-232 or RS-485 selection-TXPlace a jumper at either the RS-232 or RS-485 positions depending on which of these two communication options are desired.Put a jumper in the RS-232 position on this header, J16, and J18 to select RS-232 communication.
Put a jumper in the RS-485 position on this header, J16, and J18 to select RS-485 communication.
J183-pin jumper headerRS-232 or RS-485 selection-RXPlace a jumper at either the RS-232 or RS-485 positions depending on which of these two communication options are desired.Put a jumper in the RS-232 position on this header, J16, and J17 to select RS-232 communication.
Put a jumper in the RS-485 position on this header, J16, and J17 to select RS-485 communication.
J192-pin jumper headerTX_EN: RS-232 or RS-485 transmit enable (WARNING)Place a jumper here to enable RS-232 or RS-485 transmissions.
J202-pin jumper headerRX_EN: RS-232 or RS-485 receive enable (WARNING)Place a jumper here to enable receiving characters using RS-232 or RS-485.
J214-pin terminal blockRS-485 connectionConnection point for RS-485To view the GUI using RS-485, connect the USB to RS-485 adapter here. 5 V must be provided externally on pin 1 of this header. Pin 2 of this header is the RS-485 ground, pin 3 is the B bus I/O line, and pin 4 is the A bus I/O line.
J222-pin terminal blockMains voltage input (WARNING)Line and neutral connectionThis terminal block is connected to the line and neutral. Connect the terminal block position on the left (labeled "NEG" on the PCB) to the neutral, if referencing the shunt and system ground with respect to the neutral. Also, connect the terminal block position on the right (labeled "POS" on the PCB) to the line.
Connect the terminal block position on the left (labeled "NEG" on the PCB) to the line, if referencing the shunt and system ground with respect to the line. Also, connect the terminal block position on the right (labeled "POS" on the PCB) to the neutral.
If the system is referenced with respect to the line, note that all voltage samples obtained from the ADS131M04 device should be multiplied by –1 in the software to ensure that the phase shift between voltage and current is properly reflected for the power-related metrology readings. Also, only probe here if using equipment that can measure the Mains voltage.
J232-pin jumper headerADS131M04 AVDD jumper (WARNING)A short (either through jumper of ammeter) must be present at this jumper header for proper operation of the ADS131M04 device.This header along with J24 allow measuring the current consumption of the ADS131M04 device.
J242-pin jumper headerADS131M04 DVCC jumper (WARNING)A short (either through jumper of ammeter) must be present at this jumper header for proper operation of the ADS131M04 device.This header along with J23 allow measuring the current consumption of the ADS131M04 device.
J253-pin terminal blockShunt connection (WARNING)Shunt connectionsThis terminal block is connected to the output terminals of the shunt. This terminal block is a three-position terminal block with positions labeled "POS", "GND", and "NEG". For the gain of 32 used in this design, the differential voltage across the "POS" and "NEG" terminals of this terminal block should be less than ±37.5 mV. Do not connect a CT here since a burden resistor is not present for the circuitry of this channel like it is present for the J26 current circuitry.
J263-pin terminal blockCT connection (WARNING)Current inputs after the CT sensorThis terminal block is a three-position terminal block but only the leftmost and rightmost positions are used. The center position, which is connected to GND, is not connected to the CT. Connect the positive terminal of the CT to the terminal block position on the most right, which is labeled "POS". Connect the negative terminal of the CT to the terminal block position on the most left, which is labeled "NEG". Before performing any test, verify that this terminal block is securely connected to both output leads of the CT.
J278-pin headerADS131M04 MSP432 communication header (WARNING)Probe here for connections to the chip select signal, SPI signals, RST signal, CLKIN signal, and DRDY signal of the ADS131M04 device. The SYNC/ RESET pin of the ADS131M04 device is used to reset the ADS131M04 device. When initializing the ADS131M04, the MSP432 MCU drives this pin to reset the ADS131M04. The DRDY pin of the ADS131M04 device is used to alert the MSP432 MCU that new current samples are available. The CLKIN pin is fed from the SMCLK clock output of the MSP432 MCU to the ADS131M04 device, which divides the clock down to produce the used modulator clock. This header is not isolated from AC mains, so do not connect measuring equipment when running from Mains, unless isolators external to the reference design are available. The pin mappings on this header are as follows:
● Pin 1: SMCLK (ADS131M04 CLKIN pin)
● Pin 2: SPI DOUT (ADS131M04 DIN pin/SIMO)
● Pin 3: SPI DIN (ADS131M04 DOUT/ pinSOMI
● Pin 4: SPI CLK (ADS131M04 SCLK pin)
● Pin 5: ADS DRDY (ADS131M04 DRDY pin)
● Pin 6: SPI CS (ADS131M04 CS pin)
● Pin 7: RST SYNC (ADS131M04 SYNC/ RESET pin)
● GND