ADS1115 problems or fake?

Hey guys, I am new to coding and trying to set up the ADS1115 (± 16-bit analog digital converter) with various codes and libraries from the internet.

For test purposes, I tried to measure a 140mV voltage from a potentiometer. On the left side of the picture I have declared the ADS1115 as ADS1015 (± 12-bit analog digital converter) and everything works as desired -> 0.125mV / step.
It does not work as ADS1115 (right side picture), it always jumps directly by 16 (2^4) steps which results in the same accuracy -> 0.125mV/step (changing the programmable-gain-amplifier does not help with this issue). Since 2^4 is 4 bit and equals the difference between ADS1115 and ADS1015, I have the suspicion that the promised ADS1115 in reality is an ADS1015.

Any thoughts pls?

My code is:

#include <Wire.h>
#include <Adafruit_ADS1015.h>

Adafruit_ADS1115 ads(0x48);  /* Use this for the 16-bit version */

float voltage = 0;
float ha = 0;

void setup(void) 
{
  Serial.begin(9600);
  Serial.println("Hello!");
  
  Serial.println("Getting single-ended readings from AIN1");
  Serial.println("ADC Range: +/- 0.256V (1 bit = 0,125mV/ADS1015, 0.0078125mV/ADS1115)");
  
  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;


  adc1 = ads.readADC_SingleEnded(1);
  ha = adc1;
  voltage = (ha/128);

  Serial.print("AIN1: "); Serial.print(adc1);Serial.print("-> mV:");Serial.print(voltage,4);
  Serial.println(" ");
  
  delay(1000);
}

I am using an "old" Arduino UNO and tried 2 different ADS1115 for the same manufacturer.

Did you try printing the digital output (0-32767) of the ADS1115.
Did it change in one digit steps.

Did you try
voltage = ha / 128.0;

Leo..

Where did you buy the chip? These days its very probably fake unless you buy from a reputable supplier...

Thank you for your replies! :slight_smile:

@Wawa

Yes, iam printing the digital output (0-32767) in the serial monitor as you can see in the picture (AIN1: XXXX).
No, it is changing in 16 digit steps.

I just tried "voltage = ha / 128.0;" but it did not change anything.

@MarkT
I bought them from Amazon "AZDelivery 3 x ADS1115 ADC Modul 16bit" for 10€ for all 3. On trustpilot they got a very bad rating.

Mouser, Digikey, Element14, etc are the places to get chips these days, the counterfeit scourge is extremely
bad these days. There a vast illegal cottage industry re-marking chips, some are recycled (and actually the
right chip, but used/untested), some are the wrong but similar chip, some are just empty packages. These
are offloaded onto eBay and Amazon associate sellers in vast numbers.

yes, but the shipping is more expensive than the actual item^^ so i went for amazon

thanks a lot guys

I bought a 3 pack of them from Amazon. All three work fine. Everything I have bought through Amazon which was HiLetgo was always reasonably priced and worked fine. That said there is no shortage of garbage coming in and distributed. For what I consider novelty stuff I am fine with Amazon but if it is a serious project I go with any of the reputable distributors. Before I retired I dealt quite a bit with Allied Elect so I frequently still use them.

Ron

ferdifuchs1:
I bought them from Amazon "AZDelivery 3 x ADS1115 ADC Modul 16bit" for 10€ for all 3. On trustpilot they got a very bad rating.

So the cheap modules you bought, are suspicously cheap, and get a bad rating.

These devices are £4.99 each from Farnell, shipping is free if the order is over £25.

So you bought them (from Amazon) just because they are cheap.