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 Sub Metering EVM not reporting energy consumption data

Other Parts Discussed in Thread: MSP430I2040, EVM430-I2040S, TIDM-TWOPHASEMETER-I2040, TIDM-SERVER-PWR-MON

I am evaluating the MSP430I2040 EVM for  a wireless single phase metering product.

I  was able to program the MSP430I2040 using IAR (with help from Mars). 

I  am able to get proper response to "GET_READINGS_PHASE_1"  command.  I get the expected  voltage and power values.

   I am now trying to get energy consumption data  by  sending "GET_CONSUMPTION_PHASE_1" to the EVM. I had to fix the max  allowed response  message size  from 34 to 66 to get a  response to "GET_CONSUMPTION_PHASE_1" cmd. I  am getting a  response but all  the energy values are zero. Can you tell me how to get the energy  values ?  Looks like energy calculation is  not supported  in the metrology library.

Thanks

Ram

  • Hi Ram,

    I do not know what specifically you are looking for but I do not think that GET_CONSUMPTION_PHASE_1 will give you the results you are looking for even if it is initialized properly. With the power values you should be able to equate the energy consumption of the system. Otherwise you are correct in stating that the metrology library does not support this functionality.

    I am sorry to inform you that Mars is no longer working at TI and therefore will not be able to provide any further assistance with your MSP430I2040 IAR project.

    Regards,
    Ryan
  • The whole point of evaluating the MSP430i2040 EVM is to measure the energy consumption of the load.
    I am interested in retrieving the energy value being acculumlated on the MSP430I2040 every 4 ac cycles (80 milli-seconds).
    I would like to get this value whenever I send a DL/T645 command to the MSP430I2040.
    Do I have to add the code (on the MSP430I2040) to do this ?

    The DL/T645 command "GET_CONSUMPTION_PHASE_1" should be able to retrieve the energy value.
    If you look at this function "send_consumption_report()" in emeter-dlt645.c, it is returning
    the accumulated energy values to the host.

    static void send_consumption_report(int port, serial_msg_t *rx_msg, int rx_len, int phx)
    {
    serial_msg_buf_t *tx;
    uint8_t *tx8;
    uint16_t *tx16;

    tx = &ports[port].tx_msg;
    tx8 = &tx->buf->uint8[DLT645_PREAMBLE_BYTES + DLT645_MESSAGE_HEADER_BYTES];
    tx16 = (uint16_t *) &tx->buf->uint8[DLT645_PREAMBLE_BYTES + DLT645_MESSAGE_HEADER_BYTES];

    tx8[0] = rx_msg->uint8[DLT645_MESSAGE_HEADER_BYTES];
    tx8[1] = rx_msg->uint8[DLT645_MESSAGE_HEADER_BYTES + 1] | 0x80;
    *((uint64_t *) &tx16[1]) = active_energy(phx, ENERGY_DIRECTION_IMPORT);
    *((uint64_t *) &tx16[5]) = active_energy(phx, ENERGY_DIRECTION_EXPORT);
    *((uint64_t *) &tx16[9]) = reactive_energy(phx, ENERGY_QUADRANT_I);
    *((uint64_t *) &tx16[13]) = reactive_energy(phx, ENERGY_QUADRANT_II);
    *((uint64_t *) &tx16[17]) = reactive_energy(phx, ENERGY_QUADRANT_III);
    *((uint64_t *) &tx16[21]) = reactive_energy(phx, ENERGY_QUADRANT_IV);
    *((uint64_t *) &tx16[25]) = apparent_energy(phx, ENERGY_DIRECTION_IMPORT);
    *((uint64_t *) &tx16[29]) = apparent_energy(phx, ENERGY_DIRECTION_EXPORT);
    prepare_tx_message(port, 66);
    }
  • The Measuring Energy Consumption using the EVM430-I2040S video provided by TI explores the capabilities of this EVM through use of the included PC GUI: www.youtube.com/watch

    To make sure that your firmware build is operating as intended can you confirm that all GUI parameters are displayed correctly? The associated application report (SLAA638) mentions that the EVM does not support the Meter Consumption window.

    Regards,
    Ryan
  • The GUI is getting all the required data (voltage / current / power etc).
    Anyway, I need the updated firmware which reports the energy consumption. Can you send me the new firmware which supports energy consumption ?
    Ram
  • Ram,

    I am not in possession of such firmware, as explained before the engineers working on this design are no longer at TI. Any available updates are already provided on the MSP430-ENERGY-LIBRARY product page.

    Regards,
    Ryan
  • Hi Ryan,
    Can you provide me the source code of the meterology library so that I can add the energy consumption code myself ? I can't just abandon this in the middle after having invested so much time (and money). I have already designed a PCB using the I2040 and bought most of the components.
    Ram
  • Hi Ram,

    I understand your predicament and would definitely advise that this roadblock is much too small to consider project abandonment. The metrology library source code is all available for download on the MSP430-ENERGY-LIBRARY product page.

    Regards,
    Ryan
  • Hi Ryan,
    Are you sure the code is available in the energy library ?

    I am quoting Mars - "We intentionally remove the source code for the metrology as we do not want to distribute it freely on the web. However the metrology functions is already put into a library for customer to use it functionality without the need of the source code. As we only support IAR5.5 we do not have the library for CCS compiled.
    "
    I do not have enough bandwidth to investigate the code in the energy library. Can you can send me the exact project (source code) to build the met library for i2040 ?
    Ram
  • Hi Ram,

    My mistake, I see that the i2040 support is not included in the online release of the metrology code. I will send you a private message.

    Regards,
    Ryan
  • Thx. I just downloaded and noticed this myself.
    Ram
  • Dear,

    I am facing the same problem. Please share the metrology code files for single phase sub metering as well as 2 phase sub metering.

    Regards.
  • Pallav,

    TIDM-SERVER-PWR-MON and TIDM-TWOPHASEMETER-I2040 software resources are available on their respective tools pages.

    Regards,
    Ryan

**Attention** This is a public forum