ADS1115 16bit ADC - Full-Scale Range to Vcc
Moderators: adafruit_support_bill, adafruit

ADS1115 16bit ADC - Full-Scale Range to Vcc

by jonathanl100 on Fri Jan 25, 2013 8:22 am

Hello everyone,

Recently I recieved my ads1115. It's a replacement for the mcp3008 because it comunicates over I2C.
I want to hook up 4 10K thermistors (single-ended connections).

I followed the discription on http://learn.adafruit.com/thermistor/using-a-thermistor

It seems to me that it's not possible to cancel out Vcc when combining the 2 equations.

(1) Vo = R / (R + 10K) * Vcc
Where Vcc is the power supply voltage (3.3V in my case for the RPi)

(2) ADC-value = Vi * 65535 / Vcc
for the ads1115 with PGA SETTING 1 (+-4.096V) Vcc would be 8.192

My questions:
1. Is it possible to cancel out Vcc (when combining those 2 equations) ór
2. Is it possible not to use the PGA so the Full-Scale Range ends at Vcc (Vcc = Vref)?

Now if I want to calculate the resistance of the thermistor I have to use the following equation:

R = 10K / (65535/ADC - 1)
with ADC = ADC-value * 8.192/3.3
jonathanl100
 
Posts: 3
Joined: Tue Oct 02, 2012 3:22 pm

Re: ADS1115 16bit ADC - Full-Scale Range to Vcc

by adafruit_support_bill on Fri Jan 25, 2013 8:40 am

1. You are correct. Since full scale does not correspond to VCC on this ADC, the terms do not cancel out.
2. No. The range is a function of the converter itself, the "1" setting is equivalent to no gain.

Available gain settings are:
2/3 ±6.144V(1)
1 ±4.096V(1)
2 ±2.048V
4 ±1.024V
8 ±0.512V
16 ±0.256V
User avatar
adafruit_support_bill
 
Posts: 31033
Joined: Sat Feb 07, 2009 10:11 am

Re: ADS1115 16bit ADC - Full-Scale Range to Vcc

by jonathanl100 on Fri Jan 25, 2013 12:31 pm

Thanks for the quick reply.

So this is where a good power supply results in a better accuracy?
jonathanl100
 
Posts: 3
Joined: Tue Oct 02, 2012 3:22 pm

Re: ADS1115 16bit ADC - Full-Scale Range to Vcc

by adafruit_support_bill on Fri Jan 25, 2013 12:40 pm

That's pretty much true of all ADCs. But it is more of an issue for high resolution converters. No sense having 16 bits of resolution if you have 4-5 bits of noise and power supply ripple.
User avatar
adafruit_support_bill
 
Posts: 31033
Joined: Sat Feb 07, 2009 10:11 am

Re: ADS1115 16bit ADC - Full-Scale Range to Vcc

by rbardsley on Thu Jun 13, 2013 4:07 pm

Is there any way to programmatically modify the gain? Right now, I modify the following line in the library:
Code: Select all | TOGGLE FULL SIZE
config |= ADS1015_REG_CONFIG_PGA_0_256V;


I would love to be able to do something in the code that says:
Code: Select all | TOGGLE FULL SIZE
#define  ADS1015_REG_CONFIG_PGA = 0_256;

Though, I don't know if this is possible. Or is it?
rbardsley
 
Posts: 28
Joined: Fri Jan 06, 2012 11:09 am
Location: Manchester, MA

Re: ADS1115 16bit ADC - Full-Scale Range to Vcc

by adafruit_support_bill on Thu Jun 13, 2013 4:17 pm

Currently, no. But if you post an issue on Github, we can add it to the list of improvements.
User avatar
adafruit_support_bill
 
Posts: 31033
Joined: Sat Feb 07, 2009 10:11 am

Re: ADS1115 16bit ADC - Full-Scale Range to Vcc

by borud on Thu Jul 11, 2013 6:35 pm

I stumbled across a library on github that looks promising: https://github.com/jrowberg/i2cdevlib

The ADS1115 library is in https://github.com/jrowberg/i2cdevlib/t ... no/ADS1115 and has a better API which will allow you to set the gain without having to muck about changing the library.
borud
 
Posts: 5
Joined: Wed Jan 09, 2013 9:24 pm