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.

ADS1015: ADS1015 set p error?

Part Number: ADS1015

TP27 is 24VDC, AIN0 measured at 2.197V  +/-4.096 FSR (2mV per LSB), ADC is set read  AIN0 re GND.   Should read 1090base10 (0x4420), reads 66base10 (0x1022),  I2C config command is i2cset -y 0 0x49 0x01 0xC383 w,      I2C read command is i2cget -y 0 0x49 0x00 w.

Where did I go wrong?

  • Paul,


    Based on your schematic, it looks like everything is hooked up correctly. The address is such that it should communicate with a 49h address. A setting of C383h sets the input from AIN0 to GND, ±4.096V input range, single-shot mode, and a data rate of 1600SPS.

    If your input is a voltage-divided down 24V to get to 2.197V, you should get a reading of (2.197/4.096)*2^15. This comes out to be 17576d or 44A8h. You say you should get 4420h, which is close enough, if you're making some adjustments for some rounding. Instead, on the output you get 1022h or 4130d, which comes out to be about 4x smaller than expected. This is a reading of about 0.52V.

    To debug this, I would first read back the configuration register to make sure the value you get is correct. You can do this with the 32-bit data transmission cycle. Then, I would use an oscilloscope or logic analyzer to view the SCL and SDA lines. You should make sure the data coming out of the device matches the reading from the computer. The data should come out MSB first, and should have been 0 padded for the LSB. Post a plot of the data coming out of the device. I would check the data formatting as read by the computer. It might be a coincidence, but reading back the LSB of 22h, is the same as an MSB of 44h if you read it in reverse. I'd also check the output data for several different inputs just to see if there's some trend in the output data error.

    I'd check the things I've mentioned above. If you're still having problems, post the oscilloscope plot with the I2C communications and let me know the output data for several different analog input values. That should a good start to debugging.


    Joseph Wu