Projects / Nano ADC versus ADS1115

Nano ADC versus ADS1115

Intermediate1.3 hGuided buildReviewed

Build it step by step

0 of 7 done
  1. NANOADS1115

    Wire the pot to 5V and GND

    Middle leg to A0 and to ADS1115 A0.

  2. NANOADS1115

    Wire the ADS1115

    VDD, GND, SDA to A4, SCL to A5, ADDR to GND.

  3. NANO

    Install the Adafruit ADS1X15 library

    From the Library Manager.

  4. NANO

    Upload and open the serial monitor at 9600

    Two voltages print twice a second.

  5. NANO

    Set the pot to a point and measure with the meter

    Write all three numbers down.

  6. NANO

    Repeat at ten points across the range

    Include near 0 V and near 5 V.

  7. NANO

    Work out each error against the meter

    Compare the two converters.

In short

How do you build a nano ADC versus ADS1115?

Read the same potentiometer with the Nano's own converter and with an ADS1115 module, and compare both against a multimeter. See the step size, the noise and the error side by side. You need Arduino Nano, ADS1115 16-bit ADC module, Potentiometer 10 kΩ, Digital multimeter, Breadboard 830 Tie Points and Jumper wires male to male (40 pcs, 20 cm). It takes 7 steps and about 80 minutes.

Level
Intermediate
Time
About 80 min
Parts
6

Parts list

Tick what you already own. It saves to My Garage, so “Build with what I have” knows.

Wiring

FromToWhy
Potentiometer outer legsNano 5V and GNDGives a voltage from 0 to 5 V
Potentiometer middle legNano A0 and ADS1115 A0Both converters read the same voltage
ADS1115 VDD and GNDNano 5V and GNDPower
ADS1115 SDA and SCLNano A4 and A5I2C bus
ADS1115 ADDRGNDAddress 0x48

Code

The Nano converts a voltage into one of 1024 steps against its own supply, about 4.9 millivolts a step, and it assumes that supply is exactly 5 volts. The ADS1115 has a much finer 16-bit converter, and at the plus or minus 4.096 volt range each step is 0.125 millivolts, but it uses the supply only as a limit and compares against its own reference. Set the potentiometer to about ten different points, and at each one measure the middle leg with the multimeter and write down the meter value, the Nano value and the ADS1115 value. The ADS1115 should follow the meter closely, while the Nano may be off by a few steps, and will be off more if the USB supply is not exactly 5 volts. Note how steady each reading is by watching the last digit. Remember that the input on the ADS1115 must never go above its supply voltage plus a small margin, so keep the potentiometer on the 5 volt rail only.

Runs on a virtual Arduino Nano in your browser, with sliders for the sensors. Happy with it? Verify and upload to your real board from the same page (Chrome or Edge on a computer).

#include <Wire.h>
#include <Adafruit_ADS1X15.h>

Adafruit_ADS1115 ads;

void setup() {
  Serial.begin(9600);
  if (!ads.begin()) {                       // address 0x48 with ADDR on GND
    Serial.println("ADS1115 not found. Check SDA, SCL, power and ADDR.");
    while (true) {}
  }
  ads.setGain(GAIN_ONE);                    // +/- 4.096 V range, 0.125 mV per step
  Serial.println("nanoV  adsV  (measure the pot with a meter and compare)");
}

void loop() {
  long sum = 0;
  for (int i = 0; i < 16; i++) sum += analogRead(A0);   // average 16 readings
  float nanoV = (sum / 16.0) * 5.0 / 1023.0;           // assumes the rail is exactly 5.00 V

  int16_t raw = ads.readADC_SingleEnded(0);
  float adsV = ads.computeVolts(raw);

  Serial.print(nanoV, 3);
  Serial.print("   ");
  Serial.println(adsV, 4);
  delay(500);
}

What the serial monitor should show

Open the serial monitor at the baud rate in the code. This is what our simulator prints for a virtual Arduino Nano with its sensors at their default values. Your numbers will follow your real readings, but the format should match.

ADS1115 not found. Check SDA, SCL, power and ADDR.

Test checklist

What you should see at each check. If a reading is far off, stop and use the troubleshooting list.

CheckExpected
ADS1115 against the meterWithin a few millivolts
Nano against the meterWithin a few tens of millivolts
Last digit of the ADS1115Steadier than the Nano's
Pot at the endsBoth close to 0 V and the rail
Different USB portThe Nano reading shifts a little

If it does not work

ADS1115 not found

Check the I2C wires, the power and ADDR on GND.

Readings far off the meter

Check the pot's middle leg goes to A0 on both.

Nano reading is higher than the meter

The 5V rail may be below 5.00 V.

Negative ADS1115 values

Check the wiring of A0 and GND.

Library errors

Install Adafruit ADS1X15 and Adafruit BusIO.

Still stuck? Find the fault step by step with your multimeter →

Ask Lark AI

Common questions

What parts do I need for the nano ADC versus ADS1115?

Arduino Nano, ADS1115 16-bit ADC module, Potentiometer 10 kΩ, Digital multimeter, Breadboard 830 Tie Points and Jumper wires male to male (40 pcs, 20 cm).

How long does the nano ADC versus ADS1115 take to build?

About 80 minutes for a intermediate maker, in 7 steps.

How do I know the nano ADC versus ADS1115 works?

ADS1115 against the meter: Within a few millivolts. Nano against the meter: Within a few tens of millivolts. Last digit of the ADS1115: Steadier than the Nano's.

ADS1115 not found: what should I check?

Check the I2C wires, the power and ADDR on GND.

Readings far off the meter: what should I check?

Check the pot's middle leg goes to A0 on both.

Nano reading is higher than the meter: what should I check?

The 5V rail may be below 5.00 V.

Negative ADS1115 values: what should I check?

Check the wiring of A0 and GND.