Arduino B.Tech/Diploma Beginner

How to use ADS1115 16-Bit ADC Module with Arduino

Interfacing ADS1115 16-Bit ADC Module with Arduino to measure 16-Bit resolution & voltages using ADS1115 library & example code accuracy

  • Suitable forB.Tech/Diploma Arduino students
  • Build time1-2 weeks
  • LevelBeginner
  • Available atAjvika Labs, Kakinada

About this project

Overview
In this guide, we will learn how to use
ADS1115 16-Bit ADC Module
with
Arduino
. An ADS1115 breakout board is a 16-bit
analog-to-digital converter (ADC)
that we can use with Arduino, ESP8266/32, STM32, or any other Microcontrollers.
Arduino boards come with a built-in 10-bit ADC that has a somewhat limited capability. The AD1115 has a
16-bit ADC resolution
. This means the smallest voltage that Arduino can measure is
5V / 1024 =
0.0049V
(or 4.9mV)
. Whereas the smallest voltage that ADS1115 can measure is
5V / 65536 =
0.000076V
(76uV)
. Thus compared to Arduino ADC, the ADS1115 can measure a wide range of voltage. If you want more precison up to 0.3uV, you may check
ADS1220 24-Bit ADC
Module.
Bill of Materials
We need the following components to learn about the ADC Module in detail.
S.N.
Components
Quantity
Purchase Link

Arduino Nano Board

Amazon
AliExpress

ADS1115 ADC Module

Amazon
AliExpress

16x2 I2C LCD Display

Amazon
AliExpress

10K Potentiometer

Amazon
AliExpress

Breadboard

Amazon
AliExpress

Connecting Wires

Amazon
AliExpress
ADS1115 Chip
The ADS1115 is a precision, low-power, 16-bit, I2Ccompatible, analog-to-digital converter IC.
Features of ADS1115
16-bit Resolution
Four (4) Channel Single-Ended or Two (2) Channel Differential Inputs
I

C Protocol Interface
Programmable Comparator
Wide Supply Range
Low Current Consumption
Continuous-Conversion Mode
Programmable Data Rate
Programmable Comparator
Single-Cycle Settling
Internal Low-Drift Voltage Reference
Internal Oscillator
Wide Operating Temperature Range
Available in Ultra-Small X2QFN Package
ADS1115 Pin Configuration
The below image shows the pin configuration of the ADS1115 chip.
Pin 1 is the ADDR pin that selects the I2C address for the chip.
Pin 2 is the Alert/Ready pin which serves as a data ready and alert signal.
Pin 3 is the GND terminal.
Pins 4, 5, 6 & 7 are the four (4) ADC input pins. We can use these pins as either four (4) single-ended inputs or two (2) differential inputs.
Pin 8 is the positive power supply pin which accepts 2.0 V to 5.5 V
Pins 9 and 10 are the terminals for the I2C interface, SDA and SCL respectively.
ADS1115 Functional Block Diagram
The below is the functional diagram for the ADS1115 Chip.
Initially a multiplexer selects the input signal. Then, the selected signal feeds into a Programmable Gain amplifier (PGA). The PGA can programmed to provide amplification of small signals prior to conversion.
Subsequently, the input is converted by a 16-bit Delta Sigma converter. The converter uses its own built-in voltage reference and built-in oscillator in measuring the input signal. Finally, the result of the conversion goes into the I2C interface. Also, a comparator provides a signal to the external interface that the result is ready for fetching.
Typical Connections of the ADS1115
The principle I2C connections for the ADS1115 is shown in the image below.
The ADS1115 interfaces directly to standard mode, fast mode, and high-speed mode I2C controllers. Any microcontroller I2C peripheral, including master-only and single-master I2C peripherals, operates with the ADS1115.
For more information refer to
ADS1115 Datasheet
ADS1115 Module or Breakout Board
The ADS1115 comes with X2QFN & VSSOP package which can’t be used for prototyping. Therefore we need the ADS1115 Module or Breakout Board to use it with Arduino or Any other Microcontroller.
These modules are widely available from different manufacturers and are very inexpensive. They are breadboard friendly and can be easily used in prototyping and testing applications.
ADS1115 Module Pinout
The ADS1115 Module has a total number of 10 Pins.
Pin. No.
Pin Name
Pin Description

VDD
Power supply: 2.0V to 5.5V

GND
Ground

SCL
Serial clock input: Clocks data on SDA (used for I2C communication)

SDA
Serial data: Transmits and receives data (used for I2C communication)

ADDR
I2C address select (slave)

ALERT/RDY
Digital comparator output or conversion ready

AIN0
Differential channel 1: Single-ended channel 1 input or Negative input

AIN1
Differential channel 1: Single-ended channel 2 input or Negative input

AIN2
Differential channel 2: Single-ended channel 3 input or Positive input

AIN3
Differential channel 2: Single-ended channel 4 input or Negative input
ADS1115 Module Schematic
The schematic diagram shown above is Adafruit’s version of the ADS1115 module.
It follows the typical connection for the ADS1115 chip. The 10K ohms pull-up resistors are installed on the I2C and Alert pins. Also, there is a 1uF capacitor installed between the VDD pin and the GND which serves as a decoupling capacitor.
Interfacing ADS1115 Module with Arduino
The wiring diagram for interfacing ADS1115 ADC Module with Arduino is very simple.
Connect the VDD & GND Pin of the module to Arduino 5V & GND Pin. Similarly, connect the ADS1115 I2C pin (SDA & SCL) to the I2C pin (SDA & SCL) of Arduino. The ADDR pin of the chip is being pulled down by a 10K resistor to the ground. This means that it is connected to the GND by default.
The ADS1115 default I2C Address is 0x48. In order to use the addresses 0x49, 0x4A, or 0x4B, we can connect the ADDR pin to either VDD, SDA, or SCL, respectively.
The ALERT/READY pin of the ADS1115 module also remains unconnected. To use this pin you need to connect it to Arduino digital pin. This pin has two uses. First, you can use it for interrupt-driven conversion, where it serves as a data READY signal. And second, you can use it with the programmable output comparator for detecting conversion thresholds. In this case, it serves as an ALERT signal.
The A0, A1, A2 & A3 are the 4 ADC output of the sensor. This means you can connect 4 analog sensors to this module. In this example, you can use a potentiometer to test the module reading. Therefore connect the potentiometer as per the circuit diagram above.
ADS1115 Arduino Library Installation
There are multiple libraries available for the ADS1115 Module. While browsing through the Library Manager you will get the library from a different developer.
Out of all the available libraries, we can try using one of the stable libraries for our application. The library is from
RobTillaart
. You can download the library from the following link as well.
Download:
RobTillaart ADS1X15 Library
The library has the functionality to set the I2C clock speed, set Programmable Gain, Operational mode & Data rate. Using this library we can read the sensor ADC Data in Single mode, Differential Mode, and Continuous Mode.
Basic Source Code/Program
Using the basic example code from the ADS1115 example folder, we can test the working of the sensor.
Copy the following code and upload it to the Arduino Nano Board.

#include "ADS1X15.h"
ADS1115
ADS
(
0x48
)
;
void
setup
(
)
{
Serial
begin
(
115200
)
;
Serial
println
(
__FILE__
)
;
Serial
(
"ADS1X15_LIB_VERSION: "
)
;
Serial
println
(
ADS1X15_LIB_VERSION
)
;
ADS
begin
(
)
;
}
void
loop
(
)
{
ADS
setGain
(

)
;
int16_t
val_0
=
ADS
readADC
(

)
;
int16_t
val_1
=
ADS
readADC
(

)
;
int16_t
val_2
=
ADS
readADC
(

)
;
int16_t
val_3
=
ADS
readADC
(

)
;
float
f
=
ADS
toVoltage
(

)
;
// voltage factor
Serial
(
"\tAnalog0: "
)
;
Serial
(
val_0
)
;
Serial
(
'\t'
)
;
Serial
println
(
val_0 *
f

)
;
Serial
(
"\tAnalog1: "
)
;
Serial
(
val_1
)
;
Serial
(
'\t'
)
;
Serial
println
(
val_1 *
f

)
;
Serial
(
"\tAnalog2: "
)
;
Serial
(
val_2
)
;
Serial
(
'\t'
)
;
Serial
println
(
val_2 *
f

)
;
Serial
(
"\tAnalog3: "
)
;
Serial
(
val_3
)
;
Serial
(
'\t'
)
;
Serial
println
(
val_3 *
f

)
;
Serial
println
(
)
;
delay
(
1000
)
;
}
After uploading the code, open the Serial Monitor. The Serial Monitor will show the

Technologies used

ESP8266ArduinoSTM32BLELCDI2CADC

Hardware components

  • ESP8266
  • Arduino
  • STM32

Software & tools

  • Arduino IDE

What you get

  • Working project / hardware kit, tested before delivery
  • Complete source code with explanation
  • Project demo and guidance for your viva
  • Project report, PPT and IEEE paper support (on request)
Delivery & Payment
Delivery takes a minimum of two weeks from the date your inquiry is confirmed. Payment is in two parts: • 50% advance to start the project • Remaining 50% before delivery Note: • Documentation and PPT are not included by default • If you need documentation/PPT, it can be arranged for extra time and cost We'll confirm the exact timeline and cost with you after reviewing your requirements.