Home » An ADS1115 ADC Module for The Raspberry Pi

An ADS1115 ADC Module for The Raspberry Pi

by shedboy71

In this article we look at an ADS1115 add on board for a Raspberry Pi 4. It has an NTC thermistor on board for testing. First lets look at the board and then a bit of information about the ADS1115

ADS115 Information

The ADS1113, ADS1114, and ADS1115 devices (ADS111x) are 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 ADS111x devices incorporate a low-drift voltage reference and an oscillator.

The ADS1114 and ADS1115 also incorporate a programmable gain amplifier (PGA) and a digital comparator. These features, along with a wide operating supply range, make the ADS111x well suited for power- and space-constrained, sensor measurement applications.

The ADS111x 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 ADS1115 features an input multiplexer (MUX) that allows two differential or four single-ended input measurements. Use the digital comparator in the ADS1114 and ADS1115 for under- and overvoltage detection.

The ADS111x operate 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.

Now lets look at the board

Board Description:

The ADS1115 are precision analog-to-digital converters (ADCs) with 16 bits of resolution offered in an ultra-small, an MSOP-10 package.
Data are transferred via an I2C-compatible serial interface, four I2C slave addresses can be selected, it operate from a single power supply at 3.3V.
It can be used to detect analog signal and convert it to digital signal.
You can attach a joystick or other analog sensor such as NTC, temperature, dust sensor and so on.

Specifications:

Power Supply: 3.3V
Analog Input Voltage: GND to VDD
Programmable Data Rate: 8SPS to 860SPS
Internal low-drift: Voltage Reference
Internal PGA: Available
Resolution: 16-Bit
i2c™ Interface: Pin-selectable addresses
Channels Number: 4 single-ended or 2 differential inputs
Programmable Comparator: 2/3~16
Internal NTC Support: Available

Parts

The ADS1115 module comes in at under $5

Name Link
Raspberry Pi 4 Aliexpress product link

Amazon. com link

Ebay search

ADS1115 ADC Module for Raspberry Pi Aliexpress product linkAmazon link

Ebay link

 

Software

I used the adafruit circuitpython ADS1x15. Open a command prompt on your Raspberry Pi

Installing from PyPI

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:

pip3 install adafruit-circuitpython-ads1x15

To install system-wide (this may be required in some cases):

sudo pip3 install adafruit-circuitpython-ads1x15

Example:

I start Thonny IDE on my Raspberry PI and typed in the following and ran it

[codesyntax lang=”python”]

import time
import board
import busio
import adafruit_ads1x15.ads1115 as ADS
from adafruit_ads1x15.analog_in import AnalogIn

# Create the I2C bus
i2c = busio.I2C(board.SCL, board.SDA)

# Create the ADC object using the I2C bus
ads = ADS.ADS1115(i2c)

# Create single-ended input on channel 0
chan = AnalogIn(ads, ADS.P0)

# Create differential input between channel 0 and 1
#chan = AnalogIn(ads, ADS.P0, ADS.P1)

print("{:>5}\t{:>5}".format('raw', 'v'))

while True:
    print("{:>5}\t{:>5.3f}".format(chan.value, chan.voltage))
    time.sleep(0.5)

[/codesyntax]

In the shell part of the IDE you should see something like this

ads1115 output

ads1115 output

You may also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More