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.

MSP430I2031: Is it possible to shorten the power measurement time?

Part Number: MSP430I2031

Hello,

i am developing a power measurement and over current (and over voltage) shutdown solution using MSP430I2031.

The current measurement works fine, but the problem is that the measurement time is too long, it takes about 2 seconds.

For over current or over voltage cutoff, we need the measurement to be done in at least 200ms.

When we look at the source code, it seems that the data is measured when the number of samplings equals the sampling rate (Hz)*2.

(In the SD24_ISR function in the hal_adc.c file...)

Because of this, even if I increase the sampling frequency, the value always takes 2 seconds.

Is it possible to shorten the power measurement time to 200ms or less?

thank you

  • Hello,

    Are you using the Energy Measurement Design Center GUI?

    Thank you,

    Susan

  • Hello, Susan,
    Yes, i am using EMDC GUI.

    Is it possible to change via emdc?

    Thank you

  • Hello, Susan,

    https://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/EnergyMeasurementDesignCenter/1_40_00_03/release/EnergyMeasurementDesignCenter_1_40_00_03/docs/users_guide/html/Energy_Measurement_Technology_Guide_html/markdown/ch_designcenter.html#application-code

    In the link above, I saw the following statement:

    The application code initializes the system and library and then starts the communication and measurement processes. The foreground process repeats approximately every second (or two seconds if no zero crossings are detected on the voltage channels). The background process depends on the ADC sampling rate and repeats based on the number of active ADC channels.

    currently, the sampling count is set at twice the sampling rate.

    (In the SD24_ISR function in the hal_adc.c file...)

    If I change it to the following, I can read the measured value in 100ms.

    Are there any issues that could arise with this change?

    If you lower this value, you can reduce the measurement time enough. I would like to get a hint on how low it can be used.

    Thank you

  • Hello,

    It looks like what you changed was the speed of the foreground process. My concern would be if the foreground process is shorter than the background process and you miss samples. Which, in that case, it would depend on the speed of the background process (which is dependent on the ADC sampling rate + number of ADC channels) as well as the data transfer rate (about ~1ms per byte according to the Communication Protocol Spec). Theoretically, that would be how you calculate the lowest measurement time.

    Thank you,

    Susan

  • Hello,

    I changed the SD24_ISR routine.

    The routine of SD24_ISR sets "Set data ready flag" when "Sampling Count" is twice the "sampling frequency" rather than "Set data ready flag" immediately after "Check energy & generate pulses (per phase).

    That's why it sends measurement data every two seconds.
    Am I right in my understanding?

    Is this just setting a cycle of 2 seconds because sending UART data too often takes a lot of load?

    If what I understand is correct, I think it is okay to set "Set data ready" right away without checking "sampling count" after "check energy & generate pulse".
    Is that right? Can I say that the value measured by the background processor is when it is available?

    Of course,when you exclude the issue of time to transmit outside, as you said.

    For your information, we are developing with I2C Slave, not UART.
    After "Set data ready", it is stored in a separate variable and the data is delivered when the I2C master requests it.

    Thank you

  • Hello,

    Yes, that sounds correct. It should be possible to set "Set data ready" right after "check energy & generate pulse." I would recommend testing that, and making sure you are getting accurate values. If not, I would just lower the "sampling count" value to around your "sampling frequency" to make sure you are reading samples correctly.

    Using I2C should make your data transfer rate faster.

    Thank you,

    Susan

**Attention** This is a public forum