Arduino ADS1115 16-bit ADC: Wiring, Code and Simulator

To build this Arduino ADS1115 16-bit ADC project you need an Arduino Uno and a 16-bit ADC ADS1115. A 16-bit ADC measures the Uno's 3.3 V pin far more finely than analogRead(). Make the 5 connections in the wiring table, upload the Arduino C++ code, and wire A0 to a potentiometer instead and read it with 0.1 mV steps.

Open this circuit in the free Arduino Uno simulator

Parts list

QtyPartWhat it does
1Arduino Unothe microcontroller board
116-Bit ADC ADS1115Four precise analog inputs on I²C (0x48): ads.begin(), ads.readADC_SingleEnded(0). At the default gain 1 bit = 0.1875 mV.

Wiring

#FromTo
1Arduino Uno 5V16-Bit ADC ADS1115 VDD
2Arduino Uno GND16-Bit ADC ADS1115 GND
3Arduino Uno A416-Bit ADC ADS1115 SDA
4Arduino Uno A516-Bit ADC ADS1115 SCL
5Arduino Uno 3.3V16-Bit ADC ADS1115 A0

Step by step

  1. Open the simulator. Open the BitForBytes Embedded Lab in your browser and start from the Arduino Uno. No install or account is needed.
  2. Add the parts. Add a 16-bit ADC ADS1115 from the parts palette.
  3. Wire 1. Connect Arduino Uno 5V to 16-Bit ADC ADS1115 VDD.
  4. Wire 2. Connect Arduino Uno GND to 16-Bit ADC ADS1115 GND.
  5. Wire 3. Connect Arduino Uno A4 to 16-Bit ADC ADS1115 SDA.
  6. Wire 4. Connect Arduino Uno A5 to 16-Bit ADC ADS1115 SCL.
  7. Wire 5. Connect Arduino Uno 3.3V to 16-Bit ADC ADS1115 A0.
  8. Paste the Arduino C++ code. Paste the Arduino C++ code below into the code editor.
  9. Run it. Press Run. Wire A0 to a potentiometer instead and read it with 0.1 mV steps.

Arduino C++ code

// Adafruit ADS1X15: a 16-bit ADC. Channel A0 is wired to the Uno's 3.3 V pin.
#include <Adafruit_ADS1X15.h>

Adafruit_ADS1115 ads;

void setup() {
  Serial.begin(9600);
  if (!ads.begin()) {
    Serial.println("ADS1115 not found.");
    while (true) {}
  }
}

void loop() {
  int16_t raw = ads.readADC_SingleEnded(0);
  Serial.print("A0 = ");
  Serial.print(ads.computeVolts(raw), 3);
  Serial.println(" V");
  delay(500);
}

What to try

Wire A0 to a potentiometer instead and read it with 0.1 mV steps.

Frequently asked questions

How do I wire the ADS1115 16-bit ADC project on an Arduino Uno?

Make 5 connections: Arduino Uno 5V to 16-Bit ADC ADS1115 VDD; Arduino Uno GND to 16-Bit ADC ADS1115 GND; Arduino Uno A4 to 16-Bit ADC ADS1115 SDA; Arduino Uno A5 to 16-Bit ADC ADS1115 SCL; Arduino Uno 3.3V to 16-Bit ADC ADS1115 A0.

What parts do I need for this Arduino project?

An Arduino Uno and a 16-bit ADC ADS1115.

Can I simulate this Arduino project online for free?

Yes. The BitForBytes Embedded Lab runs this exact circuit and Arduino C++ code in your browser for free, with no install and no hardware. The sketch is compiled with the real Arduino toolchain and runs on an emulated ATmega328P.

What does the code do?

A 16-bit ADC measures the Uno's 3.3 V pin far more finely than analogRead().

More Arduino Uno projects