Post Go back to editing

I am using LTC2497 ADC to measure voltage of TMCS1107B-Q1 and convert it into current for measuring the AC load current. However, I am not obtaining accurate readings.

Category: Hardware
Product Number: LTC2497

Hello,

I am currently used LTC2497  ADC  and TMCS1107B-Q1 an IC for current measuring. By connecting  the output voltage of TMCS1107B-Q1  to an ADC channel. Voltage is obtained through an ADC which is then converted into current. While measuring dc ,I obtained accurate results. However, when measuring AC, I didn't  get accurate readings. I also tested the onboard  ADC(12 bit) on the ESP32 S3 and obtained accurate current measurements for AC.

Thanks,

  • Hi,


    I will contact the product owner and get back to you.

    Regards,
    Jo

  • Hello  ,

    How much inaccuracy are you seeing when you measure AC? And at what frequencies are you trying to measure?

    Regards,

    Yugel

  • Thanks Yugel,

    I noticed  inaccuracy when measuring AC current using the TMCS1107B-Q1 output of IC is analog, which is connected to the LTC2497  ADC. When measuring with a clamp on meter, I obtained a reading of 0.27.However, when using an AC, I recorded a minimum of 0.033 and a maximum of 0.050.I obtained the same output when testing the load in both on and off conditions. For this measurements I used a bulb as AC load and AC signal is of 50HZ.

    Please find the images and code provided below for  your reference.

    The  image depicts an  LTC2497 ADC  that reads the analog voltage of TMCS1107B-Q1 and converted into current and measured by clamp on meter.

    LTC2497 Code

    #define SENSITIVITY 0.05
    #define RESOLUTION 8388608.0
    #define VRF 3.3

    void read_register_data(uint8_t reg, uint8_t *buffer, size_t len)
    {

    esp_err_t err = i2c_master_write_read_device(I2C_PORT, LTC2497, &reg, 1, buffer, len, 1000 / portTICK_PERIOD_MS);
    if (err != ESP_OK)
    {
    printf("Error occurred during Reading Register 0x%02X\n", reg);
    }

    }

    This function read ADC value and convert into current.


    float getCurrentAC()
    {
    uint32_t Isum = 0, measurements_count = 0;
    int32_t Inow;

    for (int i = 0; i < 100; i++)
    {
    // Extract the ADC value from the buffer
    read_register_data(reg, buffer, sizeof(buffer));

    // check -1LSB bit for negative
    if ((buffer[0] & 0b01111111) == 0b01111111)
    {
    buffer[0] = 0x00;
    }

    // Extract the ADC value from the buffer

    int32_t adc_value = ((((buffer[0] & 0x3F)) << 16)) + ((buffer[1] << 8)) + (((buffer[2] & 0xE0)));
    Inow = zero - adc_value;
    Isum += Inow * Inow;
    measurements_count++;
    vTaskDelay(200 / portTICK_PERIOD_MS);
    }

    float Irms = sqrt(Isum / measurements_count) / Res * vrf / sensitivity;
    return Irms;
    }

    int calibrate()
    {
    int _zero = 0;
    for (int i = 0; i < 20; i++)
    {
    read_register_data(reg, buffer, sizeof(buffer));

    // check -1LSB bit for negative
    if ((buffer[0] & 0b01111111) == 0b01111111)
    {
    buffer[0] = 0x00;
    }
    // Extract the ADC value from the buffer
    int Zero_value = ((((buffer[0] & 0x3F)) << 16)) + ((buffer[1] << 8)) + (((buffer[2] & 0xE0)));
    _zero += (Zero_value / 20);
    vTaskDelay(200 / portTICK_PERIOD_MS);
    }
    _zero /= 20;
    zero = _zero;
    printf(" zero value: %d\n", zero);
    return _zero;
    }

    During off condition TMCS1107B-Q1 IC give 1.65V(0.5*Vref).calibrate() this function is used because IC give 1.65V in off condition so to minus off condition adc value from on condition adc value then i obtained actual voltage. I also tested without averaging adc samples but results is same. While measuring dc  using  LTC2497,I obtained accurate results. Below images are of dc current measurement.

    The  image depicts an  on board adc of ESP 32 S3 that reads the analog voltage of TMCS1107B-Q1 and converted into current and measured by clamp on meter.

    On borad Adc Code

    #define SENSITIVITY 0.05
    #define RESOLUTION 4095.0
    #define VRF 3.3

    float getCurrentAC()
    {

    uint32_t Isum = 0, measurements_count = 0;
    int32_t Inow;
    for (int i = 0; i < 100; i++)
    {
    Inow = zero - analogRead(Adc_Pin);
    Isum += Inow * Inow;
    measurements_count++;
    delay(200);
    }
    float Irms = sqrt(Isum / measurements_count) / RESOLUTION * VRF / SENSITIVITY;

    return Irms;
    }

    int calibrate()
    {
    int _zero = 0;
    for (int i = 0; i < 10; i++)
    {
    _zero += analogRead(Adc_Pin);
    delay(200);
    }
    _zero /= 10;
    zero = _zero;
    return _zero;

    }

    I  have a query regarding the speed of ADC which is 6.8sps.This is why I am unable to measured the AC load current ?

  • Hello  ,

    The LTC2497 is designed to convert DC signals, hence the low SPS output. It also has simultaneous 50/60Hz rejection, which in this case is the signal you are trying to measure. The measurements you are seeing is highly attenuated because of poor frequency response of the part to AC and also the simultaneous 50/60Hz rejection. If you want to measure AC signals with accuracy, you could use higher speed sigma-delta parts such as AD7768 or AD4170.

    Regards,

    Yugel

  • Hello Yugel,

    I am using TMCS1107B-Q1 IC for current measuring whose output in dc voltage(1.65).Using this IC  I am measuring current of an ac load connected  between the(IN+) and (IN-) pins of TMCS1107B-Q1 IC. Whatever current measured by this  IC gives proportional voltage at output pin and output of IC is connected CH0 of  LTC2497. The ADC continuously read the voltage of output pin  of the IC and then converted it into corresponding current using equation voltage /0.05(0.05 is sensitivity which is mention in datasheet of TMCS1107B-Q1).

    AS per datasheet by using an external crystal with a frequency of 1MHz, it is possible to increase 3X output data rate and achieve perfect current measurement of an ac load?

    The AC signal has a voltage of 230V and 50Hz.

  • Hello  ,

    The 3x output data rate is approximately equal to 20 SPS which is still way less than the Nyquist frequency. It would be difficult to get an accurate reconstruction of the AC signal with this output data rate, not even with 100 SPS (LTC2497 maximum) considering other intricacies in the system. So, no, the LTC2497 still cannot measure 50 Hz signals faithfully.

    Regards,

    Yugel

  • Hello Yugel,

    Can you recommend a 16-channel,I2c based ADC that is capable of measuring ac load current?

  • Hello  ,

    With I2C being a slow communication protocol, it would be basically impossible to create a device that could accommodate at least a 200 SPS maximum output data rate on each of the 16 channels.

    You can see here that the options for I2C parts that might satisfy your needs are very limited.

    www.analog.com/.../11008

    Are you open on trying SPI-communicated devices?

    Regards,

    Yugel