Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use ADS1118 - ADC: Examples, Pinouts, and Specs

Image of ADS1118 - ADCDesign with ADS1118 - ADC in Cirkit Designer

Introduction

The ADS1118 is a high-precision, 16-bit analog-to-digital converter (ADC) manufactured by Texas Instruments. It features an integrated programmable gain amplifier (PGA) and operates over an I2C-compatible interface. This versatile component is designed for precision measurement applications, offering low power consumption and support for multiple input channels. Its compact VSSOP package makes it ideal for space-constrained designs.

Explore Projects Built with ADS1118 - ADC

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Wi-Fi Enabled Sensor Hub with ESP8266 and ADS1115 ADC: A project utilizing ADS1118 - ADC in a practical application
Wi-Fi Enabled Sensor Hub with ESP8266 and ADS1115 ADC

This circuit features two ESP8266 NodeMCU microcontrollers, each interfaced with a Gravity I2C ADS1115 16-Bit ADC module for analog-to-digital conversion. The microcontrollers communicate with the ADC modules via I2C protocol, with one set of connections for each microcontroller-ADC pair, and are powered through a common 3.3V and ground connection.

Open Project in Cirkit Designer
Image of Arduino UNO and Adafruit ADS1015 Based Analog to Digital Conversion: A project utilizing ADS1118 - ADC in a practical application
Arduino UNO and Adafruit ADS1015 Based Analog to Digital Conversion

This circuit is designed to measure analog voltage levels using a potentiometer and convert them to digital values with an Adafruit ADS1015 12Bit I2C ADC. The Arduino UNO serves as the controller, reading the ADC values via I2C communication and outputting the results to the serial monitor. A 9V battery powers the circuit, and a resistor is used to connect the potentiometer's output to the ADC's analog input channel AIN0.

Open Project in Cirkit Designer

Common Applications

Technical Specifications

Key Features

Pin Configuration and Descriptions

The ADS1118 is available in a 10-pin VSSOP package. Below is the pinout and description:

Pin Name Type Description
1 VDD Power Positive supply voltage (2.0 V to 5.5 V).
2 AIN0 Analog Input Analog input channel 0.
3 AIN1 Analog Input Analog input channel 1.
4 AIN2 Analog Input Analog input channel 2.
5 AIN3 Analog Input Analog input channel 3.
6 GND Ground Ground reference for the device.
7 SCL Digital Input I2C clock line.
8 SDA Digital I/O I2C data line.
9 DRDY Digital Output Data ready signal (active low).
10 NC - No connection.

Usage Instructions

How to Use the ADS1118 in a Circuit

  1. Power Supply: Connect the VDD pin to a stable power source (2.0 V to 5.5 V) and the GND pin to ground.
  2. Analog Inputs: Connect the analog signals to the AINx pins. Configure the input mode (single-ended or differential) in the device's configuration register.
  3. I2C Interface: Connect the SCL and SDA pins to the corresponding I2C lines of your microcontroller. Use pull-up resistors (typically 4.7 kΩ) on both lines.
  4. Data Ready Signal: Optionally, use the DRDY pin to monitor when a conversion is complete.
  5. Configuration: Program the ADS1118 via the I2C interface to set the desired gain, data rate, and input channel.

Important Considerations

Example Code for Arduino UNO

Below is an example of how to interface the ADS1118 with an Arduino UNO to read a single-ended input:

#include <Wire.h>

// ADS1118 I2C address
#define ADS1118_ADDRESS 0x48

// Configuration register settings
#define CONFIG_REGISTER 0x8583  // Single-ended AIN0, ±4.096V, 128 SPS

void setup() {
  Wire.begin();  // Initialize I2C communication
  Serial.begin(9600);  // Initialize serial communication for debugging

  // Configure the ADS1118
  Wire.beginTransmission(ADS1118_ADDRESS);
  Wire.write(CONFIG_REGISTER >> 8);  // Send MSB of configuration register
  Wire.write(CONFIG_REGISTER & 0xFF);  // Send LSB of configuration register
  Wire.endTransmission();
}

void loop() {
  int16_t adcValue;

  // Request conversion result
  Wire.requestFrom(ADS1118_ADDRESS, 2);
  if (Wire.available() == 2) {
    adcValue = (Wire.read() << 8) | Wire.read();  // Combine MSB and LSB
  }

  // Convert ADC value to voltage (assuming ±4.096V range)
  float voltage = (adcValue * 4.096) / 32768.0;

  // Print the voltage to the serial monitor
  Serial.print("Voltage: ");
  Serial.print(voltage, 4);  // Print with 4 decimal places
  Serial.println(" V");

  delay(500);  // Wait 500 ms before the next reading
}

Notes on the Code

Troubleshooting and FAQs

Common Issues

  1. No I2C Communication:

    • Ensure the pull-up resistors (4.7 kΩ) are connected to the SCL and SDA lines.
    • Verify the I2C address (0x48) matches the ADS1118's default address.
    • Check the wiring between the microcontroller and the ADS1118.
  2. Incorrect Voltage Readings:

    • Confirm the input voltage is within the configured PGA range.
    • Verify the configuration register settings for the desired input mode and gain.
    • Ensure proper grounding and shielding to minimize noise.
  3. Device Not Responding:

    • Check the power supply voltage (VDD) and ensure it is within the specified range.
    • Verify the I2C clock frequency does not exceed 400 kHz.

FAQs

Q: Can the ADS1118 measure negative voltages?
A: Yes, in differential mode, the ADS1118 can measure negative voltages relative to the reference input.

Q: What is the maximum sampling rate of the ADS1118?
A: The maximum sampling rate is 860 samples per second (SPS).

Q: How do I use the internal temperature sensor?
A: Configure the ADS1118 to read from the temperature sensor by setting the appropriate bits in the configuration register. The temperature data is returned in the conversion result.

Q: Can I use the ADS1118 with a 3.3 V microcontroller?
A: Yes, the ADS1118 operates with supply voltages as low as 2.0 V, making it compatible with 3.3 V systems.

Q: Is the ADS1118 suitable for battery-powered applications?
A: Yes, the ADS1118's low power consumption (150 µA in active mode) makes it ideal for battery-operated devices.