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.

ADS1118 returns high data from time to time

Other Parts Discussed in Thread: ADS1118

HI

i face the problem where ADS1118 returns to Arduino/STM32duino unexpected hiigh values like below. AIN lines are connected to ground via 10k. Same when i put a signal into in i.e. 1V (i choose 1024mV amplify).

i tested 32 and 16 bit mode as well. Unfortunetelly with same results. I also tested different delayes when CS goes low etc. I use 860SP but tested also other modes - same bad results.

Below also SPI interface. i can not find corelation why it suddenly sends high score - i checked previous frames and all are fine. I checked this on two microcontrolers and always the same. I power the ADS1118 supply from 3,3V or 5V. I use also LC filter to clean voltage, I tested SPI speed from 500kHz up to 4MHz. I used serial 150ohm rezistors and same.

Please give me some hint what is wrong.

Thanks in advance

Tom

  • Hi,


    The ADS1118 returns values in a binary two's complement notation so that the large numbers that you see are really the ADC reporting small negative numbers. A positive full scale reading would be 7FFFh, while a negative full scale would be 8000h. A small explanation of the binary two's complement notation is given in the datasheet on page 23 of the datasheet.

    From your listing of data points you should get the following output values:
    1 = 1
    1 = 1
    0 = 0
    65535 = -1
    65534 = -2
    65533 = -3
    65530 = -6
    0 = 0

    All values are fairly close together. However, if you were expecting values much larger than that, I would check the input multiplexer settings for the device and make sure that the proper inputs are selected.


    Joseph Wu

  • HI

    as you see above on the analyzer screen i always set AIN0 input (X100...) and double checked connections. So these high values shouldn't happen.
    About minus values i also added in code (score & 0x7FFF) but then i was receiving always values like 32760 - as you see also above on the screen there are all "1" in Data from ADS1118.

    i wanted to use it in MPPT converter but these problems make it impossible . I did a lot of tests trying to figure out what is wrong....

    now i get better results using internal ADC of STM32duino and making oversampling....

    Tom
  • Tom,


    Normally, I'd ask to see a longer set of data showing both good and bad results. It would probably be best to use the 32-bit data transmission cycle (as shown on page 24 of the datasheet) to show both the data and the configuration register settings. I'd also like to see a schematic, showing the circuit connections and how you apply an input voltage. One problem that people often have is that the input voltage cannot be floating with respect to the supply voltage.

    If you are putting in a 1.0 V signal with a ±1.024 V range, you would expect to see 7D00h as a result. In the data, that wasn't mentioned in the possible results. If you are getting both regular values and values near 0, then you might have a bad connection.

    If you are able to use the STM32duino ADC and it suits your application, then good luck. However, if you want to continue to debug your circuit, I'm confident that we can figure it out.


    Joseph Wu