ADS1115 giving garbage values

I wanted to measure voltage with ADS1115 module. It is working perfectly on arduino uno (clone), but when I connect it to arduino pro mini (clone) it is giving one value on all channels (-101). I assume the connection must be correct, beacuse the I2c communcation is working and adress finder find's module.

#include "ADS1X15.h"
ADS1115 ADS(0x48);


void setup() {
  Serial.begin(9600);
  
  ADS.begin();
}


void loop() {

  ADS.setGain(0);
  float f = ADS.toVoltage(1);
  int16_t val1 = ADS.readADC(1);
  Serial.print(val1);
  float V = val1 * f;
  Serial.print("  ");
  Serial.println(V,2);

  delay(10);

}

The pro mini clone photo

Sorry, while your camera takes good pictures, the one you provided doesn’t help answer your question. Instead, use it to take a clear, detailed picture of your project setup.

Keep in mind that ADS1115 is partly a generic name, as there are many different modules with the same name. Please post links to technical documentation for each hardware part you're using. Avoid marketplace links (e.g., Amazon or similar), as they often only provide sales information rather than detailed technical specifications.
For better help please post your annotated schematic showing how you have connected this project. Be sure to include all power, grounds, power sources and note any wire over 10"/25cm.

Why Do We Want This:

We can’t accurately assist without knowing the specifics of your setup. Clear, detailed descriptions will allow us to offer the best help possible. Without this information, diagnosing and solving your issues will be much harder.

Give yourself an early Christmas present and pick up these resources, along with the Arduino Cookbook:

Hey, I am facing the exact same issue when trying to work with the ADS1115 with the Uno. Were you able to find any kinda solution?

Rather than hijacking an existing topic, you should start your own.
Provide a wiring diagram and code and explain the problem in detail.

1 Like

from the .h file

#define ADS1X15_ERROR_TIMEOUT             -101

This time out occurs when the conversion takes more time than specified in the datasheet (+ 10 millis extra to be "sure")

you can try to patch this line in .cpp file (462 in _readADC()

    uint8_t timeOut = (128 >> (_datarate >> 5)) + 10;

and change 128 in 256.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.