Module – ADS1115 – 4-Channel 16-Bit ADC Module

Hardware


   BESTELLEN

Informatie (ENG)

Description

The ADS1115 device is a precision, low-power, 16-bit, I2C-compatible, analog-to-digital converters (ADCs) offered in an ultra-small, leadless, X2QFN-10 package, and a VSSOP-10 package. The  device incorporates a low-drift voltage reference and an oscillator. The converter also incorporates a programmable gain amplifier and a digital comparator. These features, along with a wide operating supply range, make the converter well suited for power- and space-constrained, sensor measurement applications.

The ADS1115 perform conversions at data rates up to 860 samples per second (SPS). The PGA offers input ranges from ±256 mV to ±6.144 V, allowing precise large- and small-signal measurements. The converter features an input multiplexer  that allows two differential or four single-ended input measurements. Use the digital comparator in the ADS1115 for under- and overvoltage detection.

The ADS1115 operates in either continuous-conversion mode or single-shot mode. The devices are automatically powered down after one conversion in single-shot mode; therefore, power consumption is significantly reduced during idle periods.

Features

Wide Supply Range: 2.0 V to 5.5 V
Low Current Consumption: 150 µA
(Continuous-Conversion Mode)
Programmable Data Rate: 8 SPS to 860 SPS
Single-Cycle Settling
Internal Low-Drift Voltage Reference
Internal Oscillator
I2C Interface: Four Pin-Selectable Addresses
Four Single-Ended or Two Differential Inputs
Programmable Comparator
Operating Temperature Range: –40°C to +125°C

I2C Interface

The module has an easy to use I2C interface that can be configured to use any one of four different I2C addresses if you want to use multiple modules in the same system or if you run into an address conflict with another device..

The ADDR address pin determines which I2C address to use by connecting it as follows:

  • 0x48 = ADDR connected to Ground
  • 0x49 = ADDR connected to VDD
  • 0x4A = ADDR connected to SDA
  • 0x4B = ADDR connected to SCL

Input Modes

The 4 inputs can be configured to operate in 3 different modes.

Single-Ended Mode

In single-ended mode, the 4 inputs (Ao-A3) can each be used as separate inputs with each referenced to ground.  This mode provides more inputs, but have less electrical noise rejection and provides 15-bits of resolution.

Differential Mode

In differential mode of operation, the inputs act in pairs to measure the difference in voltage between the two inputs.  The channel pairing is A0 – A1 and A2 – A3.  This mode provides differential noise immunity which may be important in some critical measurement situations when very small signals are being measured or there is a lot of electromagnetic noise pickup.

Since the measurement is relative to each other, the full 16-bits of resolution are available.

You will sometimes see it stated that the differential mode allows you to measure negative voltages, but this is somewhat misleading.  No inputs on this device can be negative relative to ground or the device will be damaged.  What it means is that one of the differential inputs can be negative relative to the other differential input, but they will both be positive voltages relative to ground.  See the section below about measuring negative voltages for more info on this.

Comparator Mode

In comparator mode, the input is constantly measured and compared against a value that has be set in the device.  When the signal exceeds the predefined value, the ALRT pin is activated LOW.  This pin can be polled by a MCU or it can be used to drive an interrupt.  The board includes a 10K pull-up on this line.

Measurement Range

The ADS1115 is a 16-bit device, but in single-ended mode the output is a signed integer and one of the bits is used for the sign so in practice it is providing 15-bits of resolution which means there are 32,767 steps of resolution.

The maximum voltage that can be measured and thus the size of the steps of resolution is controlled by the Programmable Gain Amplifier (PGA).  The PGA has 6 full-scale ranges that can be set as shown in the table below.

Full Scale Range LSB (Step) Size
6.144 V 187.5uV
4.096 V 125uV
2.048 V 62.5uV
1.024 V 31.25uV
0.512 V 15.625uV
0.256 V 7.8125uV

The default setting of the PGA is set for the maximum range of 6.144V.  This provides a resolution step size of 6.144V / 32767 steps = 187.5uV.  This is a much smaller step size than the standard Arduino ADC which provides about 4.88mV per step.

Keep in mind that the absolute maximum voltage that can be measured is VDD + 0.3V.  If the device is operating at 5V, the maximum voltage that can be safely measured is 5.3V.  The range above that that is basically wasted.  If higher voltages then the maximum are input, the device can be damaged.

If the voltages to be measured are smaller and it is desired to optimize the resolution of the reading, the PGA can be programmed to have a full range down to as small as 0.256V which gives a resolution of 7.8125uV per step.

Important Note:  If using the device to measure the voltage across a shunt resistor using differential mode, ensure that the 5.5V maximum voltage of the ADS1115 device is not being exceeded.  While the voltage being measured across the shunt may be very small, if the shunt is on the high side of the load in a 12V circuit for instance, the voltage relative to ground will far exceed the rating of the device.  Typically a shunt must be on the low side of a load for this device to be used.

Conversion Modes

Continuous Conversion Mode:

The module normally operates in continuous conversion mode.   In this mode, the ADS1115 is constantly performing conversions.  If a read is made, the last conversion that was completed will be reported.

Single-Shot Mode

The device draws little power, but if you are looking for minimum power draw, the ADS1115 can be put into single-shot mode.  In this mode, the conversion is only run when requested and then the device goes back into a low power mode.  The Alert/Ready pin can optionally be used to determine when the conversion has been completed.

Measuring Negative Voltages

A common point of confusion when using this device is that the spec sheet gives the full scale range in both positive and negative numbers such as ±6.144.  This makes it easy to think that the device can measure both positive and negative voltages relative to ground, but that is not the case.  Any negative voltage relative to ground > -0.3V will damage the device.

The ± is only applicable to the differential mode of operation.  With the A0/A1 differential pair for instance, the A0 input is considered the positive input and A1 is the negative input.  Both inputs must have positive voltages applied to them, but if the voltage on A0 is larger than A1, the difference between them is reported as a positive number while if A1 is larger than A0, the result is reported as a negative number.

For example, if you connect a battery across the two inputs with the positive lead connected to A0 and negative lead to A1, the voltage will be reported as +1.5V.  If you then reverse the battery, the voltage will be reported as -1.5V.  Similarly if A0 is connected to +2V and A1 is connected to +3V, the measurement will be -1V.

If you application requires the measurement of voltages that are negative relative to ground, you will need to provide an offset to make it a positive voltage for measurement.

Module Assembly

This module comes with the header loose.  This allows you to configure the module to meet your particular requirements such as which side of  the board you want the header on or if you want to solder on wires to make the connections.  For use with breadboards, we put the headers on the bottom so that the module can plug directly into the breadboard.

Module Connections

The connections to the module are straight forward.

  1. Supply 3.3 or 5V power and ground
  2. Connect I2C SCL and SDA lines to same on the MCU.  The ADDR and ALRT lines can be ignored for now.
  3. Connect the voltage to be measured to the analog input(s).  Be sure to observe the requirement not to exceed the VDD voltage on the analog inputs.

Pinout

  • VDD  = VDD (2.0V – 5.5V) typically connects to MCU 3.3V or 5V
  • GND =  Ground connects to MCU ground
  • SCL =   I2C SCL connects to MCU I2C SCL
  • SDA =  I2C SDA connects to MCU I2C SDA
  • ADDR = I2C Address.  Default if left unconnected is 0x48.
  • ALRT= Alert / Ready.  Alert output for comparator or Ready output for conversion complete in single-shot mode
  • A0 = Analog input 0
  • A1 = Analog input 1
  • A2 = Analog input 2
  • A3 = Analog input 3

Arduino

Sluit de module aan volgens onderstaand schema.

Script

Needed: Adafruit ADS1015 library @ https://github.com/adafruit/Adafruit_ADS1X15

Adafruit_ADS1X15-1.0.0

Adafruit_ADS1X15-1.0.1

Adafruit_ADS1X15-1.0.2

Adafruit_ADS1X15-1.1.0

Adafruit_ADS1X15-1.1.1

Bron(nen):

http://arduinolearning.com/amp/code/ads1115-analog-to-digital-converter-and-arduino.php

Raspberry Pi

Sluit de module aan volgens onderstaand schema.

Standaard heeft deze module I2C adres 0x48:


Script

Library: https://github.com/adafruit/Adafruit_Python_ADS1x15

Adafruit_Python_ADS1x15-master (DL @ 2020-12-18)

Install the Adafruit ADS1115 library for ADC

With the update done, we are now ready to install the dependencies starting with the Adafruit python module for the ADS115 chip. Ensure you are in the Raspberry Pi home directory by running;

then install the build-essentials by running;

Next, clone the Adafruit git folder for the library by running;

Change into the cloned file’s directory and run the setup file;

After installation, your screen should look like the image below:

Test the library and 12C communication.

Before we proceed with the rest of the project, it is important to test the library and ensure the ADC can communicate with the raspberry pi over I2C. To do this we will use an example script that comes with the library.

While still in the Adafruit_Python_ADS1x15 folder, change directory to the examples directory by running;

Next, run the sampletest.py example which displays the value of the four channels on the ADC in a tabular form.

Run the example using:

If the I2C module is enabled and connections good, you should see the data as shown in the image below.

Bron(nen):

https://circuitdigest.com/microcontroller-projects/raspberry-pi-based-oscilloscope

http://www.getmicros.net/ads1115-analog-to-digital-converter-and-raspberry-pi-example-in-c.php

Schema

Teardown

GEEN GEGEVENS

Datasheet

Fritzing

Downloads

GEEN GEGEVENS