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.

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

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

Posts: 75780
Joined: Sat Feb 07, 2009 10:11 am

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?

0v -----> 0
1.65 V -----> 1650
3.3 V -----> 3300
4.096V -----> 4096

Chandru42

Posts: 4
Joined: Thu May 24, 2018 7:52 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.

Posts: 75780
Joined: Sat Feb 07, 2009 10:11 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

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

Posts: 75780
Joined: Sat Feb 07, 2009 10:11 am

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

Chandru42

Posts: 4
Joined: Thu May 24, 2018 7:52 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 ?

mjana

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

Posts: 75780
Joined: Sat Feb 07, 2009 10:11 am

img
unnamed.jpg (244.36 KiB) Viewed 266 times

That's the connection. Thank you

mjana

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

We need to see the soldering too.

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

Posts: 75780
Joined: Sat Feb 07, 2009 10:11 am

IMG_1095.jpg (403.39 KiB) Viewed 252 times

IMG_1092.jpg (368.16 KiB) Viewed 252 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.

mjana

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

What is A3 connected to?

Posts: 75780
Joined: Sat Feb 07, 2009 10:11 am

a3 is connected to signal pin of emg sensor.

https://plux.info/cables/390-arduino-sensor-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