I basically want to connect a high precision potentiometer to measure the rotation, up to 3600 degrees accurately. And Arduino only supports 10bit ADC which will give me a very low resolution (aprox 3.5 degrees). So I decided to use ADS1115 16bit to increase the resolution of ADC to read the rotation from the potentiometer.
As I want to use ADS1115 16-Bit ADC with Arduino.... I saw the Arduino library for this but it says that it is for ADS1015 12-Bit ADC. Will this library work with ADS1115 16-Bit ADC?
ADS1115 16-Bit ADC - 4 Channel with Progrmmable Gain Amplifier
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- umar khalid
- Posts: 11
- Joined: Sun Nov 11, 2012 9:00 am
- adafruit_support_bill
- Posts: 88091
- Joined: Sat Feb 07, 2009 10:11 am
Re: ADS1115 16-Bit ADC - 4 Channel with Progrmmable Gain Amplifier
The ADS1115 board is very new and we are still working on the library and tutorial. The communication with the chip is the same as the ADS1015. The only difference is the size of the result. The library does a 4-bit right-shift on the output register to return a 12-bit result. You can simply omit the right-shift to have it return the full 16-bit result.
Change:
To:
Change:
Code: Select all
return readRegister(ADS1015_REG_POINTER_CONVERT) >> 4;
Code: Select all
return readRegister(ADS1015_REG_POINTER_CONVERT);
- sellensr
- Posts: 47
- Joined: Tue Nov 06, 2012 9:41 pm
Re: ADS1115 16-Bit ADC - 4 Channel with Progrmmable Gain Amplifier
I've run into some problems with the ADS1115 using the ADS1015 library and the single ended example program. It works fine with the 1015. When I swap out the board for the 1115 the program runs, but reports only the data from A0 for all 4 channels, e.g.
AIN0: 1098
AIN1: 1098
AIN2: 1098
AIN3: 1098
for 3.3 volts on AIN0 and any input on the others. It is likewise identical on all 4 at about 181 for AIN0 floating.
A little searching shows it's a timing problem in the library.
// Wait for the conversion to complete
delay(1);
is not a long enough wait. A little trial and error suggests delay(8) is long enough, but I don't know if that extends to the other acquisition modes. That's a lot slower than the 860 Hz in the catalog, but that's probably for continuous conversion mode.
AIN0: 1098
AIN1: 1098
AIN2: 1098
AIN3: 1098
for 3.3 volts on AIN0 and any input on the others. It is likewise identical on all 4 at about 181 for AIN0 floating.
A little searching shows it's a timing problem in the library.
// Wait for the conversion to complete
delay(1);
is not a long enough wait. A little trial and error suggests delay(8) is long enough, but I don't know if that extends to the other acquisition modes. That's a lot slower than the 860 Hz in the catalog, but that's probably for continuous conversion mode.
- adafruit_support_bill
- Posts: 88091
- Joined: Sat Feb 07, 2009 10:11 am
Re: ADS1115 16-Bit ADC - 4 Channel with Progrmmable Gain Amplifier
Thanks for the heads up. We are currently working on the ADS1115 support in the library and will make sure this is addressed.
- adafruit_support_bill
- Posts: 88091
- Joined: Sat Feb 07, 2009 10:11 am
Re: ADS1115 16-Bit ADC - 4 Channel with Progrmmable Gain Amplifier
The library has been updated. There is an ADS1115 class now that takes care of both the data size and timing differences. It also supports addressing for multiple boards. A full tutorial and library reference should be up shortly also.
https://github.com/adafruit/Adafruit_ADS1X15
https://github.com/adafruit/Adafruit_ADS1X15
Please be positive and constructive with your questions and comments.