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.

ADS1231: Load cell some random reading

Part Number: ADS1231

Hi,

I am using ADS 1231 at 80 samples per second. Out of 24 bits I consider only 14 MSB and ignore other bits. Some time what happens is that I get weird values of (2 power 15)-4 i.e. 32764 , (2 power 13) -4 i.e 16380 and ((2 power 12) -4) i.e 8188 randomly once in like 5000 readings.

Is there any reason I should be getting?

Thanks,

Sagar

  • Hi Sagar,

    How are you determining when to read data? It appears that you may be reading data at the same time a conversion update appears.

    The best way to read the conversion result is to do so as quickly as possible after DRDY/DOUT transitions from high to low state. I recommend using a GPIO interrupt to read the data when this transition takes place. I think the easiest method is to connect the DRDY/DOUT pin to two input pins on the micro. One is used for SPI MISO, and the other to be used as the interrupt pin. Code process would be as follows:
    Enable the interrupt.
    Wait for DRDY/DOUT to trigger the interrupt (falling edge of DRDY/DOUT).
    Enter the interrupt service routine, disable the interrupt and read the conversion result.
    Clear the interrupt flag and re-enable the interrupt and repeat.

    Polling the DRDY/DOUT pin can also work, but other processes often take a priority over the polling process which can be delayed and the conversion result is not read out quick enough.

    A timer can be used to read from the micro device at specific intervals, but the timing of either the micro clock or the ADS1231 can also create a timing issue where the contents are not read at the optimum time. This can again cause an issue where the result is read during an update.

    Best regards,
    Bob B
  • I am using the same strategy of using Falling interrupt. it seems that because of some kind of noise my external interrupt isr is called and it is reading data even when data is not ready. thanks for making things clear.