TIDUFB8 December   2024

 

  1.   1
  2.   Description
  3.   Resources
  4.   Features
  5.   Applications
  6.   6
  7. 1System Description
    1. 1.1 Key System Specifications
    2. 1.2 End Equipment
    3. 1.3 Electricity Meter
  8. 2System Overview
    1. 2.1 Block Diagram
    2. 2.2 Design Considerations
      1. 2.2.1 Voltage Measurement – Analog Front End
      2. 2.2.2 Current Measurement Analog Front End
      3. 2.2.3 Input Voltage
      4. 2.2.4 Clock
    3. 2.3 Highlighted Products
      1. 2.3.1 AMC130M02
      2. 2.3.2 MSPM0G1106
      3. 2.3.3 LMK6C
      4. 2.3.4 TLV76133
  9. 3Hardware, Software, Testing Requirements, and Test Results
    1. 3.1 Hardware Requirements
    2. 3.2 Software Requirements
      1. 3.2.1 Formulas
      2. 3.2.2 Metrology Software Process
        1. 3.2.2.1 UART for PC GUI Communication
        2. 3.2.2.2 Direct Memory Access (DMA)
        3. 3.2.2.3 ADC Setup
        4. 3.2.2.4 Foreground Process
        5. 3.2.2.5 Background Process
        6. 3.2.2.6 Software Function per_sample_dsp ()
        7. 3.2.2.7 Frequency Measurement and Cycle Tracking
        8. 3.2.2.8 LED Pulse Generation
    3. 3.3 Test Setup
      1. 3.3.1 Power Supply and Jumper Settings
      2. 3.3.2 Viewing Metrology Readings and Calibration
      3. 3.3.3 Calibration
        1. 3.3.3.1 Voltage and Current Offset Calibration
        2. 3.3.3.2 Voltage and Current Gain Calibration
        3. 3.3.3.3 Active Power Gain Calibration
        4. 3.3.3.4 Offset Calibration
        5. 3.3.3.5 Phase Calibration
    4. 3.4 Test Results
      1. 3.4.1 Electricity Meter Metrology Accuracy Results
  10. 4Design and Documentation Support
    1. 4.1 Design Files
      1. 4.1.1 Schematics
      2. 4.1.2 BOM
      3. 4.1.3 PCB Layout Recommendations
        1. 4.1.3.1 Layout Prints
      4. 4.1.4 Altium Project
      5. 4.1.5 Gerber Files
      6. 4.1.6 Assembly Drawings
    2. 4.2 Tools and Software
    3. 4.3 Documentation Support
    4. 4.4 Support Resources
    5. 4.5 Trademarks
  11. 5About the Author

Hardware Requirements

This reference design can be powered by J1(up to 16V) and then through an LDO (TLV76133) to output the voltage to 3.3V, for MCU and ADC power supplies.

The MSPM0G1106 device provides the minimum resources for running the metrology library and has the required peripherals to interface to the standalone ADCs and the PC GUI.

The required MCU peripheral modules include:

  • HF Clocking subsystem using external oscillator
  • SPI with DMA (data transfer between stand-alone ADCs and MSPM0 MCU)
  • UART with DMA (data transfer between external PC GUI and MSPM0 MCU for calibration and metrology values read out)
  • GPIOs (inputs with interrupts or outputs for LEDs and ADCs control)
  • RTC (calendar mode based off 32.768kHz from internal LFOSC)

All the previously-listed peripherals or MCU modules are configured through the TIDA-010960.syscfg file in the MSPM0-SDK middleware, utilizing the graphical SysConfig tool, which enables intuitive MCU configuration changes over a GUI interface.

  1. The M0+ clocking scheme is derived from the external 8.192MHz oscillator, which is feeding the PLL module and is being multiplied and divided with specific factors to generate the MCLK frequency (the CPU clock speed) of 79.87MHz.
  2. The SPI bus runs at 8MHz data rate with DMA support using two channels, one for transmit and one for receive.
  3. The MSPM0G1106 is configured to communicate to the PC GUI through a non-isolated UART connection at maximum 115,200 baud with 8N1. The UART driver supports a bidirectional transfer (two DMA channels are used, one for transmit and one for receive) with a minimum MCU interrupt load.
  4. The DRDY lines are wired to GPIO inputs of MSPM0+ MCU with interrupt enabled on the falling edge. Three MCU GPIO outputs are needed: the SYNC_RESET line to trigger ADCs, and ACT and REACT outputs. These pulsed outputs are for the Active and Reactive energy, being calculated by the metrology middleware and are used to measure the TIDA-010960 accuracy using an external test system, which reads the pulses.
  5. The RTC module supports calendar mode, which is a common requirement for an electricity meter. The M0+ MCU internal 32.768kHz LFOSC is used as the clock source for the auxiliary clock (RTCCLK) of the device.