Arduino with ADS1115 - High-Precision Analog Input

Arduino with ADS1115 - High-Precision Analog Input

Arduino with ADS1115 - High-Precision Analog Input
Save Image

This beginner-friendly project teaches you how to use the ADS1115 module with an Arduino to read precise analog sensor data. The ADS1115 is a 16-bit Analog-to-Digital Converter (ADC) that can measure voltage levels with great accuracy, making it ideal for projects that require precise sensor readings.

Key Features

  • 16-bit high-precision ADC (Analog-to-Digital Converter)
  • Can read up to 4 different analog sensors simultaneously
  • Uses I2C interface for easy communication with Arduino
  • Adjustable gain settings for different voltage ranges
  • Low power consumption

Instructions

### Step 1: Gather Your Components

- Arduino board (e.g., Uno, Nano, or Mega)

- ADS1115 module

- Breadboard and jumper wires

- Analog sensor (e.g., potentiometer or light sensor)


### Step 2: Connect the ADS1115 to the Arduino

- Connect **VCC** of the ADS1115 to 5V on the Arduino.

- Connect **GND** of the ADS1115 to GND on the Arduino.

- Connect **SDA** of the ADS1115 to **A4** (SDA) on the Arduino.

- Connect **SCL** of the ADS1115 to **A5** (SCL) on the Arduino.

- Optionally, connect an analog sensor to the **A0** input of the ADS1115.


### Step 3: Install the ADS1115 Library

- Open Arduino IDE and go to **Sketch > Include Library > Manage Libraries**.

- Search for 'Adafruit ADS1X15' and click Install.


### Step 4: Upload the Code

- Copy the code snippet below or use the example sketch from **File > Examples > Adafruit ADS1X15**.

- Click the **Upload** button and open the Serial Monitor to see sensor readings.

Schematic

Schematic Download Schematic

Code Snippet

// Arduino Code for ADS1115 with a Simple Sensor Reading

        #include <Wire.h>

        #include <Adafruit_ADS1X15.h>


        Adafruit_ADS1115 ads;  // Create an ADS1115 object


        void setup() {

            Serial.begin(9600);

            ads.begin();  // Initialize the ADS1115 module

            Serial.println("ADS1115 Initialized");

        }


        void loop() {

            int16_t sensorValue = ads.readADC_SingleEnded(0);

            float voltage = sensorValue * 0.1875 / 1000;

            Serial.print("Sensor Value: ");

            Serial.print(sensorValue);

            Serial.print(" | Voltage: ");

            Serial.print(voltage, 4);

            Serial.println(" V");

            delay(1000);

        }
Download Full Code
Back to Projects