Hello,
Today I tried to use an ADS1115 module. everything works fine but the values i get, are not increasing 1 by 1, they increase like 0,16,32,50,64,80,128 and so on and the measured voltage literally has no difference with the Arduino built-in 10Bit ADC.
To making the voltage I use a multi-turn potentiometer as a voltage divider, and for like each turn of the nob I get a value change and that's not enough for me.
Because I need to read really small resistance changes from a PT100 temperature sensor, I need these values to increase one by one, otherwise my resolution is not enough for my application.
I'm using the Adafruit ADS1x15 library and I set the gain to 2/3 which means +- 6.144V and the wiring is just as you all already know, just an Arduino, the module and a voltage divider, but if you want to see the schematics anyway ,tell me (I'm at work now, I cant make the pictures and stuff now, you know).
It sounds like a code problem. Where is the code? If you are using a particular Adafruit example, can you please link to it? Did you make any changes to the code?
How can the wiring be, "as you all already know"? Do you think with the thousands of posts here, people memorize your circuits?
There have been reports of phony ADS1115 modules that have the 12 bit version of that ADC.
With anything you buy on the cheap, for example from Amazon, eBay, Alibaba, etc. there is a very high risk of reject, recycled or outright counterfeit chips.
The rule is never buy semiconductors from unknown sources, only from reputable electronics
distributers, otherwise you WILL get fakes. Its organized fraud on a massive scale - don't
fund it!
MarkT:
The rule is never buy semiconductors from unknown sources, only from reputable electronics
distributers, otherwise you WILL get fakes. Its organized fraud on a massive scale - don't
fund it!
This considerably overstates the fact. Of course I don't support thievery, but it is actually a very small part of the "budget" electronics market. If you are making some simple project for fun, the ramifications of a 0.001% chance that a part is substandard are quite limited.
Buying from "reputable" distributors is only feasible if you happen to live in continental USA or some parts of Europe. For the rest of us, the inflexible and pricey international shipping options that those distributors insist on, don't allow this approach.
I support my local electronic stores, I'm not buying the overpriced modules but they're making some money by me. I've become familiar enough with the Asian mail order suppliers than I don't get burned very often. When I do, I still am way ahead financially from all the money I saved on other items.
A lot of the stuff isn't really discounted, it's just that the parts are, in reality, really cheap. The main reason the prices are so low is because of mass production and mastery of bulk marketing and distribution. It's true that some of the money in the "reputable" distributor supply chain is in the verification and QA processes, but not all of it. A lot is just skimming the cream. In truth, it wouldn't be so bad if they would just agree to ship by USPS. But they won't... to be honest, I believe that they truly don't care about international customers.
So I will happily continue buying parts from mail order Asian suppliers. It is simply not true that the risk is very high. It is present, but it is very low if you pick and choose your suppliers and don't just jump at the lowest price.
If I ordered say, 5 IC's from one of those USA suppliers and they accepted a return for some reason, I would still be out several times the cost of the IC's for the original shipping, and several times again for the return.
Perhaps. However, my main point is that for large parts of the world, the Asian online vendors are the only feasible source for things like that. Just to make the reason clear...
I have bought several ADS1115 modules from Ali Express and have not had any problems with them.
All Arduinos and periphery modules (100+ units) is bought from Ali Express. Except from some bad LCD1602 and 2004 modules, all have worked as expected.
I have not had any problem with getting refund for the faulty LCDs.
aarg:
It sounds like a code problem. Where is the code? If you are using a particular Adafruit example, can you please link to it? Did you make any changes to the code?
How can the wiring be, "as you all already know"? Do you think with the thousands of posts here, people memorize your circuits?
Yes sir your right but when I was writing the topic I was at work and couldnt draw an schematic, anyway this is how I connected everything:
#include <Wire.h>
#include <Adafruit_ADS1015.h>
Adafruit_ADS1115 ads; /* Use this for the 16-bit version */
//Adafruit_ADS1015 ads; /* Use thi for the 12-bit version */
void setup(void)
{
Serial.begin(9600);
Serial.println("Hello!");
Serial.println("Getting single-ended readings from AIN0..3");
Serial.println("ADC Range: +/- 6.144V (1 bit = 3mV/ADS1015, 0.1875mV/ADS1115)");
// The ADC input range (or gain) can be changed via the following
// functions, but be careful never to exceed VDD +0.3V max, or to
// exceed the upper and lower limits if you adjust the input range!
// Setting these values incorrectly may destroy your ADC!
// ADS1015 ADS1115
// ------- -------
ads.setGain(GAIN_TWOTHIRDS); // 2/3x gain +/- 6.144V 1 bit = 3mV 0.1875mV (default)
// ads.setGain(GAIN_ONE); // 1x gain +/- 4.096V 1 bit = 2mV 0.125mV
// ads.setGain(GAIN_TWO); // 2x gain +/- 2.048V 1 bit = 1mV 0.0625mV
// ads.setGain(GAIN_FOUR); // 4x gain +/- 1.024V 1 bit = 0.5mV 0.03125mV
// ads.setGain(GAIN_EIGHT); // 8x gain +/- 0.512V 1 bit = 0.25mV 0.015625mV
// ads.setGain(GAIN_SIXTEEN); // 16x gain +/- 0.256V 1 bit = 0.125mV 0.0078125mV
ads.begin();
}
void loop(void)
{
int16_t adc0, adc1, adc2, adc3;
adc0 = ads.readADC_SingleEnded(0);
Serial.print("AIN0: "); Serial.println(adc0);
Serial.println(" ");
float ADCint = analogRead(A0); //Read the Arduino A0 for comparsion
Serial.print("ADC0: "); Serial.println(ADCint);
Serial.println(" ");
delay(1000);
}
MarkT:
The rule is never buy semiconductors from unknown sources, only from reputable electronics
distributers, otherwise you WILL get fakes. Its organized fraud on a massive scale - don't
fund it!
I bought the module from a trusted local shop, its NOT Adafruit original, but I never had any problem with the store I bought it from and I saw the seller guy telling other customers if some parts are fake or original, like big transistors and other important parts, so I don't think that the module is broken (its fake anyway so I consider a 10bit IC as broken), but sadly its still a scenario...
I live in Iran and my country is under heavy sanctions from all the world-_- so no one "Can not" buy anything from the companies directly, we have to wait for local stores to buy them with their connections and stuff and then we can buy from them, which not just increase the cost of everything a lot, but also many many many times we cant find a module or a part we want at time and many projects will be delayed like a YEAR OR MORE because of this.
@thehardwareman, multiplying by a scale factor won't fix an issue with granularity. It has no bearing on the raw readings. The OP code prints the raw reading, which should be okay, printing 0,1,2,3... not 0, 16,32, 48... if you really wanted to scale it, the preferred way would be to shift the bits like
rawValue = rawValue >>4;
It looks to me like the chip is behaving like an ADS1015 12 bit ADC. The difference between a 12 and 16 bit ADC is 4 bits, and that is exactly the difference that is showing up! I would look closely at the IC markings...
Depending on the final application, I suggest that you could simply configure the software for the ADS1015 instead of the ADS1115. The resolution will be less but it will work.
It looks to me like the chip is behaving like an ADS1015 12 bit ADC. The difference between a 12 and 16 bit ADC is 4 bits, and that is exactly the difference that is showing up! I would look closely at the IC markings...
Depending on the final application, I suggest that you could simply configure the software for the ADS1015 instead of the ADS1115. The resolution will be less but it will work.
97 BOGI
its written on the IC with the TI logo, and if you search it you'll get the ADS1115 IC datasheet.
I run the same code, I just removed the other 3 channels because their grounded and just show 0 anyway.
In the code I posted before, I also read the potentiometer output with the Arduino ADC to compare the outputs, I didn't changed anything in the example code. I already tried the code without Arduino ADC too just to be safe, but there's no difference.