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
| Qty | Part | What it does |
|---|---|---|
| 1 | Arduino Uno | the microcontroller board |
| 1 | 16-Bit ADC ADS1115 | Four precise analog inputs on I²C (0x48): ads.begin(), ads.readADC_SingleEnded(0). At the default gain 1 bit = 0.1875 mV. |
Wiring
| # | From | To |
|---|---|---|
| 1 | Arduino Uno 5V | 16-Bit ADC ADS1115 VDD |
| 2 | Arduino Uno GND | 16-Bit ADC ADS1115 GND |
| 3 | Arduino Uno A4 | 16-Bit ADC ADS1115 SDA |
| 4 | Arduino Uno A5 | 16-Bit ADC ADS1115 SCL |
| 5 | Arduino Uno 3.3V | 16-Bit ADC ADS1115 A0 |
Step by step
- Open the simulator. Open the BitForBytes Embedded Lab in your browser and start from the Arduino Uno. No install or account is needed.
- Add the parts. Add a 16-bit ADC ADS1115 from the parts palette.
- Wire 1. Connect Arduino Uno 5V to 16-Bit ADC ADS1115 VDD.
- Wire 2. Connect Arduino Uno GND to 16-Bit ADC ADS1115 GND.
- Wire 3. Connect Arduino Uno A4 to 16-Bit ADC ADS1115 SDA.
- Wire 4. Connect Arduino Uno A5 to 16-Bit ADC ADS1115 SCL.
- Wire 5. Connect Arduino Uno 3.3V to 16-Bit ADC ADS1115 A0.
- Paste the Arduino C++ code. Paste the Arduino C++ code below into the code editor.
- 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
- Arduino LED Blink: Wiring, Code and Simulator
- Arduino LDR Light Sensor: Wiring, Code and Simulator
- Arduino NTC Thermistor Thermometer: Wiring, Code and Simulator
- Arduino PWM to Analog RC Filter: Wiring, Code and Simulator
- Arduino Capacitance Meter: Wiring, Code and Simulator
- Arduino DC Motor PWM Speed Control with MOSFET: Wiring, Code and Simulator