0

ADS1015 Incorrect Raw ADC Values
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

ADS1015 Incorrect Raw ADC Values

by Chandru42 on Thu May 24, 2018 8:16 am

Good day!!!

For my project, I am using an Analog position sensor(0-10 V output) with Raspberry Pi. I am using a voltage divider to convert 0-10 V to 0-3.3 V which will then be given to ADS1015 Analog digital converter. I am getting correct sensor values and correct voltage divider output but the raw ADC values comes in the range from 0 to 1638 for Gain =1 which is incorrect.

I have followed this guide https://learn.adafruit.com/raspberry-pi ... sh-ads1115
and executed simplest.py.

As far as i understood, i should get 0 to 4096 as raw ADC values for Gain =1 and along with single ended input.

I have also tested without sensor input i.e the ADC input same as VDD (reference voltage), which is here 3.3 V from raspberry Pi but the raw ADC values are in the same range. I am not able to proceed further. Can someone please help me?

Chandru42
 
Posts: 4
Joined: Thu May 24, 2018 7:52 am

Re: ADS1015 Incorrect Raw ADC Values

by adafruit_support_bill on Thu May 24, 2018 8:43 am

The ADS1015 is a 12 bit differential ADC. So it will have a raw range of -2048 to 2047
With a gain setting of 1, the measurement range is +/- 4.096V

With that gain setting, the expected reading at 3.3v would be 3.3v/4.096v * 2047 = 1649

adafruit_support_bill
 
Posts: 74326
Joined: Sat Feb 07, 2009 10:11 am

Re: ADS1015 Incorrect Raw ADC Values

by Chandru42 on Thu May 24, 2018 9:18 am

Thanks for the quick reply.

Eventhough your explanation is clear i didnt understand it properly. Sorry I am a begginer.

As you said in differential mode, the raw range value will be from -2048 to 2047. ie for -4.096 V the Raw adc value would be -2048 and for 0v the raw adc value would be 0 and for 4.096 V the Raw adc value would be 2047.

I want to use it only for single ended input from 0 to 3.3 V. So is it possible to get raw adc values as follows by adjusting gain value or by someother way?

Voltage -----> Raw Adc value
0v -----> 0
1.65 V -----> 1650
3.3 V -----> 3300
4.096V -----> 4096

Chandru42
 
Posts: 4
Joined: Thu May 24, 2018 7:52 am

Re: ADS1015 Incorrect Raw ADC Values

by adafruit_support_bill on Thu May 24, 2018 9:41 am

When used only for single-ended readings, the ADS1015 is effectively an 11 bit ADS, so the raw range will be 0-2047.

If you want your raw counts to map to millivolts, you can use a gain setting of 2. That gives you a measurement range of +/- 2.048V where a raw reading of 2047 will correspond to 2.048v.

adafruit_support_bill
 
Posts: 74326
Joined: Sat Feb 07, 2009 10:11 am

Re: ADS1015 Incorrect Raw ADC Values

by Chandru42 on Thu May 24, 2018 9:58 am

Thanks a lot for your very good explanation!!!

i have one last question..

Here i am using a sensor that gives output between 0 - 3.3 V. Can i still use the Gain setting of 2 to measure 3.3 V or i have to stick with the gain setting of 1 and do the further calculation with 0 - 1649 raw adc values. Which one will be better?

Chandru42
 
Posts: 4
Joined: Thu May 24, 2018 7:52 am

Re: ADS1015 Incorrect Raw ADC Values

by adafruit_support_bill on Thu May 24, 2018 10:23 am

To measure voltages up to the full 3.3v, you would need to use a gain setting of 1. But the calculation is not so difficult. Just add 1 and multiply by 2 to get millivolts.

(1649 + 1) * 2 = 3300

adafruit_support_bill
 
Posts: 74326
Joined: Sat Feb 07, 2009 10:11 am

Re: ADS1015 Incorrect Raw ADC Values

by Chandru42 on Thu May 24, 2018 11:22 am

Thanks a lot for all the clarification... This is really helpfull!!!!

Chandru42
 
Posts: 4
Joined: Thu May 24, 2018 7:52 am

Re: ADS1015 Incorrect Raw ADC Values

by mjana on Wed Jul 10, 2019 5:06 am

adafruit_support_bill wrote:The ADS1015 is a 12 bit differential ADC. So it will have a raw range of -2048 to 2047
With a gain setting of 1, the measurement range is +/- 4.096V

With that gain setting, the expected reading at 3.3v would be 3.3v/4.096v * 2047 = 1649


I have been using the same reference (https://learn.adafruit.com/raspberry-pi ... sh-ads1115) as this guy.

Raspberryp Pi 3B+ and ADS 1115. Using simple test example, I am getting output all zeros, I mean just zeros.
Connections are perfect.
Is my circuit blown out ?

Thanks in advance.

mjana
 
Posts: 12
Joined: Sun Jul 07, 2019 11:25 pm

Re: ADS1015 Incorrect Raw ADC Values

by adafruit_support_bill on Wed Jul 10, 2019 6:00 am

@mjana - Please post some photos showing your soldering and connections.

adafruit_support_bill
 
Posts: 74326
Joined: Sat Feb 07, 2009 10:11 am

Re: ADS1015 Incorrect Raw ADC Values

by mjana on Wed Jul 10, 2019 6:17 am

unnamed.jpg
img
unnamed.jpg (244.36 KiB) Viewed 149 times


That's the connection. Thank you

mjana
 
Posts: 12
Joined: Sun Jul 07, 2019 11:25 pm

Re: ADS1015 Incorrect Raw ADC Values

by adafruit_support_bill on Wed Jul 10, 2019 6:45 am

We need to see the soldering too.

Also, I don't see any connections to the input pins.

adafruit_support_bill
 
Posts: 74326
Joined: Sat Feb 07, 2009 10:11 am

Re: ADS1015 Incorrect Raw ADC Values

by mjana on Wed Jul 10, 2019 8:16 am

IMG_1095.jpg
IMG_1095.jpg (403.39 KiB) Viewed 135 times

IMG_1092.jpg
IMG_1092.jpg (368.16 KiB) Viewed 135 times


Output was on 'a3' just a single analog channel.
I was working on it yesterday and I was getting like 4400 | 4432 | 4423 | (7023-31000)(variable-a3)

It stopped working all of sudden from today, I'm afraid if I blew the ADS module.

Thanks for your help.

mjana
 
Posts: 12
Joined: Sun Jul 07, 2019 11:25 pm

Re: ADS1015 Incorrect Raw ADC Values

by adafruit_support_bill on Wed Jul 10, 2019 8:27 am

What is A3 connected to?

adafruit_support_bill
 
Posts: 74326
Joined: Sat Feb 07, 2009 10:11 am

Re: ADS1015 Incorrect Raw ADC Values

by mjana on Wed Jul 10, 2019 8:35 am

a3 is connected to signal pin of emg sensor.

https://plux.info/cables/390-arduino-sensor-cable.html
https://plux.info/cables/226-3-lead-ele ... cable.html

I was able to capture the data yesterday, but it's all zeros today.

mjana
 
Posts: 12
Joined: Sun Jul 07, 2019 11:25 pm

Re: ADS1015 Incorrect Raw ADC Values

by adafruit_support_bill on Wed Jul 10, 2019 8:41 am

There isn't any detail about the sensor output on that page. Do you have a link to the technical specs for the sensor you are using?

Also, I only see one signal wire there. Are there any other connections between your sensor and the board? What is your ground reference?

adafruit_support_bill
 
Posts: 74326
Joined: Sat Feb 07, 2009 10:11 am

Please be positive and constructive with your questions and comments.