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.

MSP430I2040: How to improve the accuracy of the measurements

Expert 4021 points
Part Number: MSP430I2040
Other Parts Discussed in Thread: TIDM-SERVER-PWR-MON, TIDM-TWOPHASEMETER-I2040, MSP-IQMATHLIB

Hi,

I have an MSP430i2040 sub-metering EVM. I followed the design guide to do the calibration. However, after being calibrated, the EVM still give current and power error higher than 0.5% in some test cases, especially at low load current. I want to ask if there is a method to improve the accuracy of current, power and frequency.

  • Hello Kien,

    Thank you for posting your question on E2E.

    First, I'd recommend calibrating the board at the RMS voltage that you'll be measuring. If you have to measure a range of RMS voltages, I've found that you can reduce the error by calibrating at an RMS voltage somewhere in between the min and max values. Finding that point takes additional testing but should help. A similar approach would apply to the RMS current measurements. If you've calibrated the board at 10A, try calibrating at a lower current (e.g. 1A, 5A) since you're seeing larger errors at low RMS currents.

    Next, I'd recommend using an external oscillator resistor (not an external oscillator) with very high tolerance and precision. On the TIDM-SERVER-PWR-MON EVM, this resistor (R31) connects to the ROSC pin and is not populated. However, the pads are there. I've used the following resistor before, but it's pricey. I'd suggest buying resistors at various tolerance levels to find the cheapest resistor that will bring your error within spec.

    This external oscillator resistor is discussed in the User's Guide of the TIDM-TWOPHASEMETER-I2040 design. Please see the screenshot below. Refer to our code examples in CCS for how to select the external oscillator resistor instead of the internal resistor.

    Regards,

    James

    MSP Customer Applications

  • For improving the frequency accuracy, you could manually scale the final result using a scaling factor (e.g. average error is ~1.38% so multiply the final result by 0.9862).

    Regards,

    James

    MSP Customer Applications

  • Hello James,
    Thanks a lot for your prompt help. Unfortunately, the GUI doesn't support the frequency calibration. So I went through the sample code and found the function "int16_t mains_frequency(int ph)" which may be the one that provides the frequency value. Please confirm and may be give me some advices on where I should put the scaling factor.
  • Hello Kien,

    Thanks for searching through the code. In the 'emeter-dlt645.c' file on Line 226, the value returned by the "mains_frequency()" function is placed into the TX packet that gets sent to the GUI. Here, you could multiply the value by the frequency scaling factor. If I remember correctly, this value is an integer that's already scaled up by 100 to give a frequency resolution of 0.01 Hz (e.g. 50.12 Hz = 5012d = 0x1394) in integer representation. You may have to look into using our MSP-IQMATHLIB to convert the (float) scaling factor into a fixed point integer before performing the multiplication. The Qmath data types and the ∗_MPYsoftware_CPU.lib would have to be used on the i2040 because it has the CPU (not CPUX) architecture. As an alternative, perhaps you could just typecast the float result (after multiplication with the frequency scaling factor) back to an integer, which would just truncate the decimal points beyond the hundredths decimal point (e.g. 5012d x 0.9976 = 4999.9712d -> truncated to 4999d = 49.99Hz in the GUI).

    Regards,

    James

    MSP Customer Applications

**Attention** This is a public forum