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

TPS7A78 Cap-Drop Supply

This design uses a TPS7A78 device to create a cap-drop supply with a larger maximum output current than conventional cap-drop LDO-based power supplies without using magnetic components. Figure 2-3 shows the circuit used in this design to implement the cap-drop supply. The TPS7A78 120-mA, Smart AC/DC Linear Voltage Regulator data sheet has details on how to select the optimal values of the components shown in Figure 2-3 for various system requirements.

GUID-27F81499-3665-483B-9CDA-FF69A2E321F0-low.gifFigure 2-3 TPS7A78 Cap-Drop Supply Circuit

In Figure 2-3, capacitor C6 is the high-voltage capacitor that determines the maximum output current possible with this cap-drop supply. Resistor R4 is a resistor that is used to limit the inrush current to the TPS7A78 device. This resistor can be used to protect the device from surge currents in conjunction with transient voltage suppressor (TVS) or a metal-oxide varistors (MOV). If the design is selected to be referenced with respect to neutral, "V+Mains" in Figure 2-3 is connected to the line through resistor R29 (shown in Figure 2-4), and GND is connected to the neutral through resistor R37 (also shown in Figure 2-4). If the design and shunt is selected to be referenced with respect to line instead, GND in Figure 2-3 is connected to the line through resistor R29 (shown in Figure 2-4) and "V+Mains" is connected to the neutral through resistor R37 (also shown in Figure 2-4). In this design, note that R29 and R37 can be replaced with ferrite beads for EMI suppression instead of using the 0-Ω resistors currently populated in the design.

The TPS7A78 device uses an internal active clamp instead of using the external Zener diodes typically used in traditional cap-drop supplies. In addition, the device uses a 4:1 switch-cap stage that divides the clamped voltage by 4, which multiplies the current by 4. As a result, you are able to get a larger output current than conventional cap-drop supplies without having to use magnetic components. The larger output current from the TPS7A78 enables getting more output current from the same capacitor size used in a conventional cap-drop supply, or decreasing the capacitor size to get the same maximum output current as a conventional cap-drop supply, or both. The increased output current allowed by a TPS7A78-based cap-drop supply enables the maximum output current from the power supply to be designed so that it is sufficiently greater than the maximum current consumption of the system, which ensures that the cap-drop supply can still power the meter, even if the value of the capacitor decreases slightly over time. In this design, a 470-nF capacitor is used, which allows powering loads up to 50 mA.

The TPS7A78 device also has an integrated power-fail indication that can be used for an alert of a potential power outage so that the MCU can take any final actions. The power fail indication is done at the input of the switch-cap stage, which allows an early detection of a power failure. The power failure threshold is set using a resistor divider between the SCIN pin, PFD pin, and ground of the TPS7A78 device. In this design, this power failure indication is used to put the ADS131M04 device in current-detection mode before the system is switched to being powered from the backup supply. This design has support for a backup supply, such as a battery, by connecting the negative terminal of the backup supply to pin 2 of J1 in Figure 2-3 and its positive terminal to pin 1 of J1. If a backup power supply is used in this design, an OR of the TPS7A78 output and the backup battery has to be implemented, which can be done with diodes D1 and D9, as Figure 2-3 shows. Note that using diodes to OR the two power supplies results in a voltage drop; however, to reduce the effect of a reduced output voltage, the 3.3-V TPS7A7833 variant used in this design can be replaced with the higher voltage TPS7A7836 3.6-V variant to offset the drop-in voltage from the diode. In this design, it is assumed that the TPS7A78 output voltage is higher than the voltage of the backup supply so that the design is powered from the TPS7A78 when AC Mains is available. If the voltage of the backup supply was larger than the TPS7A78 device, then the design is powered from the backup supply even if AC Mains is available.

In addition to a power-failure indication, the TPS7A78 device has a power good indication, which is asserted when the voltage at the output of the LDO is greater than 90% of the desired LDO output voltage. This power good indication is used to inform the system when power has returned after an outage, which alerts the MCU to tell the ADS131M04 to exit current-detection mode. The TPS7A78 also integrates an LDO on the output stage of the switched cap to regulate VOUT and attenuate ripple.

The reduced capacitor size allowed by the TPS7A78 and the TPS7A78 integrated active clamp, integrated LDO, integrated power failure indication, and integrated power good indication reduces the PCB size taken by this cap-drop supply compared to conventional cap-drop supplies.