This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADS131M08: Porting from MCP3914B on PIC32CX2051MTC128 with Metrology Library

Other Parts Discussed in Thread: ADS131M08, TMS320F280049C, TIDA-010244, MSPM0G1519, MSPM0G1507, TIDA-010243, MSPM0G1506

Tool/software:

Hello,

I’m interested in using the ADS131M08 as a replacement for the MCP3914B on the PIC32CX2051MTC128 Development Board. I would like to know how to adapt or adjust the integration to work with the Metrology Library.

Are there any specific guidelines or examples for porting support from MCP3914B to ADS131M08 within the Metrology Library framework?

Thank you in advance for your guidance.

  • Thank you, Luke.

    As a review, let me explain the structure of my project. We are developing a metering system to monitor up to 21 lines, configurable as single-phase, two-phase, or three-phase. The architecture includes a slave board for current measurement (via 3 × 8-channel ADCs, totaling 24 channels) and a master board for voltage measurement. All metering calculations are planned on the master board, with current samples sent via Ethernet. The system aims for Class 0.2 accuracy.

    We are considering the ADS131M08 for its ability to support harmonics up to the 61st order. While we've reviewed MSP MCUs, we're currently leaning toward the TMS320F280049C from the C2000 series. We would appreciate any alternative MCU recommendations suitable for this architecture.

    Could you please advise:

    • Whether TI libraries support distributed metering where voltage and current are sampled on separate boards, or if synchronized sampling on a single device is required?

    • If such libraries exist, which MCUs are supported?

    • Does TI provide frameworks that support flexible configuration of multiple lines across different phase groupings?

    Additionally, if the MSPM series is a viable option for this system:

    • Which part number would you recommend?

    • How long does energy parameter calculation typically take?

    • And how much additional time is required for computing harmonics up to the 61st?

    Thank you for your guidance.

    Best regards,
    Maryam

  • Hi Maryam,

    I'll pass this thread along to the C2000 team since the MSPM0 devices won't be able to do the FFT's for the required harmonics. In case C2000 team has some insights.

    The designs I had linked previously were from the MSPM0 Energy Metrology Library and works on all MSPM0 devices.

    In general, with an MCU based implementation as long as the MCU gets the data then it would be able to process it. For example, we have a 3-phase ISO-ADC design (TIDA-010244) which has 4 separate ADCs to do the voltage and current measurements, each of those could've been on a separate board and there's been available bandwidth to do more than 3 phases. 

    Sampling speed and total CPU bandwidth limit the total number of phases but with the energy metrology library you can facilitate different AFE then use the library call the calculation functions. With the split-phase example it demonstrates using different voltage lines with the same current line to provide 2 seperate power calculations.

    For multiple phases I would recommend the MSPM0G1507 devices (MSPM0G1519 if more memory is required). The device has up to 80MHz CPU speed, 7 DMA channels and a math accelerator to help with throughput.

    Regards,
    Luke

  • Hi Luke,
    Thank you for your response. We sincerely appreciate your suggestions and for referring us to the C2000 team.

    In the TIDA-010244 reference design, it is mentioned that THD is calculated for both current and voltage. We would like to know up to which harmonic the MCU is capable of performing this calculation.

    Additionally, considering the need to calculate THD for 24 lines with Class 0.2 accuracy or better, how much time does it take for this MCU to compute all the required energy parameters?

    Best regards,
    Maryam

  • Hi Maryam, Does the same MCU which does metering computations need to support ethernet as well?

  • Pawan,

    Not necessarily. The most important thing is to fully support the energy metrology library to guarantee class 0.2 for all the 24 lines of CT. MSPM0G1507  and MSPM0G1519 suggested do not have FPU. Would you still recommend them?

    Looking forward to hearing from you.

  • Hi Maryam, For the C2000 device we have not tested the metrology library along with the external signal chain. So, I will not be able to guarantee class 0.2.

    Regards, Pawan

  • Hi Luke,

    I’ve reviewed the TIDA-010244 and TIDA-010243 designs more thoroughly. Could you please confirm whether the MCU used in these designs can handle the energy metering calculations for all 24 CT lines simultaneously?

    Additionally, does the MSPM0 Energy Metrology library support harmonic calculation for all CTs at the same time? Up to which harmonic order does the library perform calculations, and are there any limitations I should be aware of?

    Also, in case the MCUs used in the TIDAs are limited in terms of performance or memory, would the MSPM03519—given its higher Flash and SRAM—offer a better solution for my application? If so, I’m curious why it isn’t typically suggested in such scenarios.

    Thank you,
    Maryam

  • Luke,


    Given that MSPM0 MCUs do not have FPU/DSP, are they able to do all these calculations within class 0.1?

    Thanks,
    Maryam

  • Hi Pawan,

    I’m very interested in the C2000 family of MCUs, and I’m considering writing my own code on them for energy metrology and power quality applications.

    Would it be possible to achieve Class 0.2 accuracy with a custom implementation on C2000? And if so, what key considerations or potential challenges should I be aware of before proceeding?

    Additionally, on average, how much time does it take for the calculations of one-phase, two-phase, and three-phase systems? This would help me better understand the real-time performance limits.

    Appreciate your guidance.

    Thanks,
    Maryam

  • Hi Maryam,

    • The device can not do 24 CT lines in total, we've been able to do 6 phases at ~4ksps. (no released design for more than 3 phases, the test was an individual experiment)
    • The MSP devices also don't do individual harmonics, only total harmonic distortion.
    • We've been able to do all the library functions in an MSPM0G1506 device, extra memory can be used if you want to add a couple more functions. The phases are stored in SRAM so the flash size doesn't increase much with additional phases, but it will increase SRAM.
      • Adding security features or in-field firmware upgrades, I would recommend the G1519 though as it has more security offerings and dual-bank allows for simpler in-field updates
    • We are able to get class 0.1 with current transformers using the ADS131M08, with the AMC131M04 and shunts the design was class 0.2. The lower current levels tend to introduce the bounds which based on board creation, the noise performance can differ. You might be able to get a better class accuracy than our design.
  • Hi Luke,

    Thank you very much for your response — I truly appreciate it.

    Would you recommend using the TMS320F280049C as a coprocessor for calculating harmonics? Even though it lacks a dedicated library for this purpose, could it still help speed up the calculations in our specific design, perhaps by implementing some of the required functions manually?

    Thanks again,
    Maryam

  • Hi Maryam,

    We have the dedicated library for metrology on the TMS320F28P650 and the TMS320F28P550. Actually, it is the same library which is there on the MSPM0 devices. It has been modified to work with the FPU from the fixed point implementation. It has also been modified to use FFT for harmonic calculations.

    We have not tested this library with actual hardware. It has been unit tested with sample data in buffer. The accuracy is dominant on the external analog circuitry selection more than the software library. Thus, I will not be able to comment on the accuracy achievable. This would have to be tried out with your sensing circuitry. You would also have to implement the drivers to interface with the sensors selected.

    Thanks and regards, Pawan