edit

4-Channel 16-Bit ADC for Raspberry Pi (ADS1115)

The analog-to-digital converter(ADC) is a common accessory for Raspberry Pi. This is a 4-channel ADC based on Texas Instrument's ADS1115, which is a precision, low-power, 16-bit ADC chip. We make this ADC into a compact Raspberry Pi Zero form factor and integrated an analog Grove connector so that you can also use analog Grove modules with it.

Version

Product Version Changes Released Date
4-Channel 16-Bit ADC for Raspberry Pi (ADS1115) Initial Sep 2018

Feature

  • LOW current consumption:
    • Continuous Mode: Only 150μA
    • Single-Shot Mode: Auto Shut-Down
  • Wide supply voltage range
  • Input multiplexer (MUX) that provides two differential or four single-ended inputs.
  • Programmable comparator
  • Internal low-drift voltage reference
  • Internal oscillator
  • Internal PGA
  • Programmable data rate: 8SPS to 860SPS
  • I2C-compatible serial interface
  • Support Raspberry Pi 3B/3B+/4

Specification

Item Value
Supply Voltage 3.3V / 5V
Analog input current 100mA(momentary)
10mA(continuous)
Storage temperature -60~150℃
Maximum junction temperature 150℃
Interface I2C
I2C address 0x48(defult)
0x49~0x4B(configurable)
Size L: 65mm W: 30mm H: 20mm
Weight 36.5g
Package size L: 140mm W: 78mm H: 27mm
Gross Weight 37g

There are 4 possible I2C addresses of this grove, from 0x48 to 0x4B. The default I2C address is 0x48. You can change the I2C address by doing some soldering.

Note

If SDA(corresponding address 0x4A) is used as the device address, hold the SDA line low for at least 100 ns after the SCL line goes low to make sure the device decodes the address correctly during I2C communication.

Typical applications

  • Portable instrumentation
  • Consumer goods
  • Battery monitoring
  • Temperature measurement
  • Factory automation and process controls

Hardware Overview

Pin Out

Platforms Supported

Arduino Raspberry Pi BeagleBone Wio LinkIt ONE

Getting Started

Hardware

Materials required

Raspberry pi 4-Channel 16-Bit ADC for Raspberry Pi(ADS1115)
enter image description here enter image description here
Get ONE Now Get ONE Now

Software

In this section, we will introduce you how to install the driver and how to enable I2C.

Enable I2C As I2C is not turned on by default, we need to configure I2C by hand.

  • Step 1. Power up the Raspberry Pi.
  • Step 2. Open raspi-config by typing following command in terminal.
1
sudo raspi-config
  • Step 3. Arrow down to 5 interfacing Options and press "enter" to select.

  • Step 4. Arrow down to P5 I2C and press "enter" to select.

  • Step 4. Select "Yes" to enable it.

  • Step 5. Select "Ok".

  • Step 6. Select "Finish" to save the changes.

Installation

Caution

Please follow the steps strictly when installing, otherwise the installation may failed or even damage the module.

  • Step 1. Power up Raspberry Pi.
  • Step 2. Open the terminal and type the following commands.
1
2
3
4
5
cd ~
git clone https://github.com/Seeed-Studio/pi-hats.git
cd ~/pi-hats/tools
sudo ./install.sh -u adc_ads1115
sync
  • Step 3. Power off Raspberry Pi.
  • Step 4. Insert the HAT to Raspberry Pi
  • Step 5. Power up Raspberry Pi.

List install status

1
 ./install.sh -l

Success

If your installation was successful, you should be able to see the following result.

1
2
3
4
pi@raspberrypi:~/pi-hats $ ./install.sh -l
adc_ads1115   : installed
rtc_ds1307    : not installed
rtc_ds3231    : not installed

Uninstallation

1
sudo ./install.sh -u

ADC Guide

channels 0-3 is differntial voltage, full scale range -2.048V - +2.048V

channels 4-7 is absolute voltage of AIN0-AIN3, full scale range 0 - +2.048V

Read AIN0(channel 4) voltage(unit mV).

1
    cat /sys/devices/platform/soc/*04000.i2c/i2c-1/1-0048/in4_input

INPUT channel /sys/.../XXX
AIN0 4 in4_input
AIN1 5 in5_input
AIN2 6 in6_input
AIN3 7 in7_input

Read all channels the same time.

1
    ./ads1115.sh

Take Grove - Sound Sensor as an example, if you use the grove cable to connect sound sensor with the ADC hat as shown below, it means you are using A0(channel four). Now, run the command ++./ads1115.s++ inside the terminal, you will be able to see the following result if it is reading data from the sound sensor.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
pi@raspberrypi:~/pi-hats $ ./ads1115.sh
3f804000.i2c
four channels' value are :
1024
,
285
,
285
,
285
four channels' value are :
796
,
285
,
285
,
285
four channels' value are :
304
,
286
,
283
,
283
four channels' value are :
366
,
284
,
284
,
283
^Cpi@raspberrypi:~/pi-hats $ 

Success

You will be noticed that channel 5, 6, 7 is about fixed while channel 4 is reading some data.

Resources

Tech Support

Please do not hesitate to submit the issue into our forum or drop mail to techsupport@seeed.cc.