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.

ADS1018-Q1: The sampled value does not match the actual voltage.

Part Number: ADS1018-Q1
Other Parts Discussed in Thread: ADS1118, ADS1018

Hi everone, good afternoon.

I encountered several issues while debugging this ADC conversion chip (ADS1018) using the latest ADS1118 driver package from GitHub, as detailed below:

  1. After power-on, I waited 5 seconds for the power supply to stabilize before initializing the chip. I found that the adcStartup() initialization function reads and writes the value of the CONFIG register, but the value read at this time is incorrect. I then modified the code to first write the desired CONFIG register value (with NOP[1:0] = 0b01) before initialization. However, the CONFIG register value read back was still incorrect (random). Analyzing the SPI data with a logic analyzer showed that the SPI write data was correct, but the configuration written did not take effect. This caused subsequent calls to the temperature/AD value read functions to write incorrect CONFIG values, preventing correct temperature/AD value readings.
    The current workaround is to skip this function and directly write the configuration register, after which temperature/AD values can be read normally.

  2. I configured the CONFIG register to 0xC1C3, 0xD1C3, and 0xE1C3 (single-shot mode) and called the ads1118_measure_internal_temperature_example() function to read the AD samples and temperature values from pins AN0, AN1, and AN2. I found that the AD values from the three analog ports were混乱 (chaotic). Suspecting a conversion time delay, I tried calling the Ads1x18_ReadData() function twice within the single-shot mode read function. This resolved the chaotic AD values, but introduced a new issue: reading with these three configurations (0xC1C3 for AN0, 0xD1C3 for AN1, 0xE1C3 for AN2) in single-shot mode resulted in the value for AN0 being the value for AN2, AN1 being AN0, and AN2 being AN1. I suspect this is related to the chip's conversion mechanism. I haven't resolved this channel misalignment issue yet and have temporarily swapped the three read results.

  3. This is the final and most critical issue. I am using a VDD of 5V and AINN connected to GND, so the CONFIG register is set with PGA[2:0] = 0b000 (FSR is ±6.144 V). When reading the AD values, I found a discrepancy between the actual voltage measured with a multimeter at the chip's sampling point and the voltage calculated from the register's AD value. For example, using a 10kΩ resistor, the voltage input to AN2 measured 2.007V with a multimeter, matching the expected design value. However, the register read value was 0x1FD, which converts to 1.527V—a difference of about 0.48V. Testing with different resistances showed a consistent difference of approximately 0.48V between the measured voltage and the converted AD value. I have been unable to resolve this issue and would appreciate a response from TI engineers. Thank you very much.

    ADC Performance Data: Calculated vs. Measured Voltage

    Resistance (Ω) AD Value (HEX) AD Value (DEC) Calculated Voltage (V) Measured Voltage (V) Voltage Difference (V)
    1k A 10 0.030 0.515 0.485
    2k 5D 93 0.279 0.761 0.482
    3k A6 166 0.498 0.979 0.481
    4k E6 230 0.690 1.173 0.483
    5k 121 289 0.867 1.348 0.481
    6k 155 341 1.023 1.505 0.482
    7k 185 389 1.167 1.648 0.481
    8k 1B1 433 1.299 1.778 0.479
    9k 1D8 472 1.416 1.890 0.474
    10k 1FD 509 1.527 2.007 0.480
    20k 2F7 759 2.277 2.754 0.477
    30k 380 896 2.688 3.167 0.479
    40k 3D6 982 2.946 3.427 0.481
    50k 415 1045 3.135 3.608 0.473
    60k 441 1089 3.267 3.739 0.472
    70k 462 1122 3.366 3.841 0.475
    80k 47C 1148 3.444 3.919 0.475
    90k 492 1170 3.510 3.984 0.474
    100k 4A5 1189 3.567 4.037 0.470

    Best regards,

    Fei.

  • Is this a customer that is asking this? If so, can you provide the customer's name and project information?

    Can you point me to what exact driver package that is being referred to here? What is the URL to the repository? I don't believe we have developed a first party driver to date, so I'm unsure if I can provide support into it.

  • I'm sorry, but I'm unable to provide this information at this time. This is a pre-research project, and I need to develop the ADS1018 chip functionality in advance. Here is the link provided under the ADS1018 product page on the TI website: github.com/.../ads1118.

  • Unfortunately I'm having a hard time following the sequence as I did not develop/validate the software. Is the customer able to share the source code (main.c) along with a logic analyzer capture of the output? This will help me more easily determine which parts in the firmware may need improvements.

  • No further response was received,

  • I apologize for the delayed response. Below is the source code I wrote:

    void Ads1x18_MeasureTemperature(float32* tempValue, uint16 configValue)
    {
    float32 temp_C;
    uint16 cValue;
    /* Store current configuration value to restore later */
    uint16 regValue = configValue;

    /* Change configuration to temperature sensor mode */
    Ads1x18_registerMap[CONFIG_ADDRESS] = regValue;
    /* If operating in continuous conversion mode read the data a second time
    * to make sure that the previous data was not with an incorrect configuration
    */
    if(regValue && CONFIG_MODE_SS)
    {
    /* Start conversion and read result */
    cValue = Ads1x18_ReadData();
    cValue = Ads1x18_ReadData();
    }
    else
    { /* Start conversion and read result */
    cValue = Ads1x18_ReadData();
    /* Start conversion and read result */
    cValue = Ads1x18_ReadData();
    }
    #ifdef ADS1018
    /* Temperature is 12-bit left-justified so need to get the correct value */
    cValue = cValue >> 4U;

    /* Use proper coefficient to get the temperature */

    if ((cValue & 0x800U) == TRUE)
    {
    temp_C = -((float32)(cValue & 0x07FFU) * 0.125F);
    }
    else
    {
    temp_C = (float32)cValue * 0.125F;
    }

    #else
    /* Temperature is 14-bit left-justified so need to get the correct value */
    cValue = cValue >> 2U;
    /* Use proper coefficient to get the temperature */
    temp_C = cValue * 0.03125F;
    #endif
    /* Restore the previous configuration */
    Ads1x18_WriteSingleRegister(CONFIG_ADDRESS, regValue);

    *tempValue = temp_C;
    }

    //The function runs within a 10ms task

    void Ads1x18_MainFunction(void)
    {
    static uint8 Ads1x18_ReadTempStep = 0U;

    switch (Ads1x18_ReadTempStep)
    {
    /* The ADC register conversion results exhibit a delay, so the values read here are out of phase. */
    case 0:
    {
    Ads1x18_MeasureTemperature(&ADS1018_ReadTempRaw_AN2, CONFIG_DEFAULT_AN0);
    Ads1x18_ReadTempStep = 1U;
    }break;

    case 1:
    {
    Ads1x18_MeasureTemperature(&ADS1018_ReadTempRaw_AN0, CONFIG_DEFAULT_AN1);
    Ads1x18_ReadTempStep = 2U;
    }break;

    case 2:
    {
    Ads1x18_MeasureTemperature(&ADS1018_ReadTempRaw_AN1, CONFIG_DEFAULT_AN2);
    Ads1x18_ReadTempStep = 0U;
    }break;

    default:
    {

    }break;
    }
    }

  • Please wait for our response

  • I apologize for letting this thread go unanswered for so long.

    With that said, the SPI logic analyzer captures have still not been provided. Can you share those so that I can follow along a little easier and attempt to debug the low level communications?