enter image description hereI am using a 16 bit ADC (Adafruit) connected to Arduino UNO through I2C. When I use differential mode to measure water conductivity (I plug jumper wires into pins A0 and A1 on the ADC), my numbers are always fluctuating, and always different. Even if I touch the two pins together I always get crazy values that are always different. Sometimes my values even go past 65,000, for example it'll show one hundred thousand or the digit in the ten thousands place (the 1 in 10,000 for example) will increase while all of the other digits stay the same. For example, it might fluctuate between 9355 and 15355, or sometimes even jump between 10,000 and 100,000. I have tried differential and single ended, neither work. I feel like differential would work better in theory because it would minimize noise but that really hasn't happened in reality.

Is the problem with my design? I have a very simple design, just the arduino connected to the ADC through a breadboard, and two wires going out of A0 and A1. No capacitors, no resistors, etc. The ADC address is 0x48, so I have the ADR pin connected to GND.

Or is the problem with my software? I looked at many other websites and can't seem to find how to change my code. Here is the Arduino code:

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

LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
Adafruit_ADS1115 ads1115  (0x48); 

void setup() {

; }

 void loop() {  
        int16_t results;
        results = ads1115.readADC_Differential_0_1();
        delay(50); //delay before looping'
  • \$\begingroup\$ Please show your schematic including your conductivity cell with approximate resistances. \$\endgroup\$ – Spehro Pefhany May 15 at 22:32
  • \$\begingroup\$ @SpehroPefhany I added the image to the original post above. Please take a look. Thanks \$\endgroup\$ – Revolutionary Citron May 15 at 23:01
  • 2
    \$\begingroup\$ "Sometimes my values even go past 65,000..." - results is a 16 bit signed integer, so it cannot be larger then 32767. If your LCD is displaying larger numbers it is not the fault of the ADC. \$\endgroup\$ – Bruce Abbott May 15 at 23:26
  • \$\begingroup\$ Tie both the input wires to Ground. What is the indication? \$\endgroup\$ – analogsystemsrf May 16 at 1:59
  • \$\begingroup\$ @analogsystemsrf -390 with no gain. But when I switch the positions (even though they're both still in ground) I get -150. And if I change where in the breadboard I plug them in, the numbers change again. And I thought that I can't get negative values with differential? Apparently I'm wrong. \$\endgroup\$ – Revolutionary Citron May 16 at 2:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.