# Adafruit ADS7128 8-Channel ADC and GPIO Expander

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/144/622/medium800/adafruit_products_6494-04.jpg?1782390396)

The **Adafruit ADS7128 8-Channel ADC and GPIO Expander** is a bit of a Platypus of the I2C expander world: hard to categorize as just an ADC or a GPIO expander since it combines the capabilities of both with great capabilities! Usually, you only get ADC or I/O, so it's nice to see this combo product.

Featuring the aforementioned ADS7128, it can run on 3.3 or 5V logic and power, and all 8 I/O pins can individually configured to perform either 12-bit SAR analog input, push-pull or open drain digital output, or digital input. This makes it great as a general-purpose glue chip when you want to add more pins or analog/open-drain outputs to a microcontroller or microcomputer.

![](https://cdn-learn.adafruit.com/assets/assets/000/144/623/medium800/adafruit_products_6494-02.jpg?1782390430)

The ADS7128 also has a lot of fancy extras that make it a good ADC companion even if your main core already has analog inputs. It can run in standalone mode with zero-crossing detection or RMS computation. Not only can it count and track threshold crossings, but it also has an alert trigger output.

Unlike many ADC/expanders, it has two power supplies: the DVDD digital supply and AVDD analog supply are separate, so you can use 3V logic for the digital I/O and I2C communications while the analog inputs and digital outputs can be as high as 5V. Or vice versa!

![](https://cdn-learn.adafruit.com/assets/assets/000/144/624/medium800/adafruit_products_6494-01.jpg?1782390457)

Interfacing is easy - this sensor uses plain, universal I2C. We put this sensor on a breakout board with all the extras needed so you can use it with 3.3V or 5V power/logic microcontrollers. [We have written libraries for Arduino (C/C++) as well as CircuitPython (Python 3)](https://github.com/adafruit/?q=ads7128&type=all&language=&sort=)so you can use this sensor with just about any kind of device, even a Raspberry Pi!

As if that weren't enough, we've also added [SparkFun qwiic](https://www.sparkfun.com/qwiic) compatible **[STEMMA QT](https://learn.adafruit.com/introducing-adafruit-stemma-qt)** connectors for the I2C bus **so you don't even need to solder.** Just wire up to your favorite micro with a plug-and-play cable to get analog inputs and digital I/Os ASAP. For a no-solder experience, [just wire up to your favorite micro, like the ESP32 V2&nbsp; Feather](https://www.adafruit.com/product/5400) using a [STEMMA QT adapter cable](https://www.adafruit.com/?q=stemma%20qt%20cable). The Stemma QT connectors also mean the ADS7128 can be used with our [various associated accessories](https://www.adafruit.com/?q=JST%20SH%204). [QT Cable is not included, but we have a variety in the shop](https://www.adafruit.com/?q=stemma+qt+cable&sort=BestMatch).

# Adafruit ADS7128 8-Channel ADC and GPIO Expander

## Pinouts

![](https://cdn-learn.adafruit.com/assets/assets/000/144/631/medium800/adafruit_products_double.jpg?1782399261)

The default I2C address is **0x10**.

## Power Pins

- **VIN** &nbsp;- this is the power pin. Since the ADC chip uses 3-5 VDC to power the board, give it the same power as the logic level of your microcontroller - e.g. for a 5V micro like Arduino, use 5V.  
- **AVDD** - this is the ADC reference voltage pin. By default it is connected to VIN and the ADC will use the voltage level of VIN.
- **AVDD Jumper** - On the left side of the front of board is the **AVDD jumper**. If you cut this jumper, it disconnects **AVDD** from **VIN**. You can then connect the **AVDD** pin to a different voltage level between 3-5 VDC for the ADC.
- **GND** &nbsp;- common ground for power and logic.

## I2C Logic Pins

- **SCL** - I2C clock pin, connect to your microcontroller I2C clock line. This pin can use 3-5V logic, and there's a **10K pullup** on this pin.
- **SDA** - I2C data pin, connect to your microcontroller I2C data line. This pin can use 3-5V logic, and there's a **10K pullup** on this pin.
- **[STEMMA QT](https://learn.adafruit.com/introducing-adafruit-stemma-qt) -** These connectors allow you to connectors to dev boards with **STEMMA QT** connectors or to other things with [various associated accessories](https://www.adafruit.com/?q=JST%20SH%204)

## ADC/GPIO Expander Pins

- **A0-A7** - The 8 pins to the ADC and GPIO expander. Each pin can be configured as either an analog input, digital input or digital output. The ADS7128 has no internal pull resistors, so you will want to add a pull-up or pull-down resistor when using a pin as an digital input.

Warning: The ADS7128 has no internal pull resistors, so you will want to add a pull-up or pull-down resistor when using a pin as an digital input.

## Address Pin and Jumpers

On the front of the board is the I2C address pin, labeled&nbsp; **ADDR**. The I2C address is set by connecting external resistors to the ADDR pin. The address is set based on the resistor values at power-up. The table below is Table 2 from the ADS7218 datasheet and shows the resistor values and the corresponding addresses.

![](https://cdn-learn.adafruit.com/assets/assets/000/144/637/medium800/adafruit_products_Screenshot_2026-06-25_124145.png?1782405867 Table 2 from the ADS7128 datasheet)

On the back of the board are **two address jumpers** , labeled **0x11** and **0x17**. These jumpers allow you to set the I2C address to either **0x11** or **0x17**. To do so, you solder the jumper "closed" by connecting the two pads.&nbsp;

## Interrupt Pin

- **ALRT** - This is the interrupt pin. By default it is an open-drain output.

## Power LED and Jumper

- **Power LED -** In the upper left corner, above the STEMMA connector, on the front of the board, is the power LED, labeled **on**. It is the green LED.
- **LED jumper** - In the upper right corner on the back of the board is a jumper for the power LED. If you wish to disable the power LED, cut the trace on this jumper.

# Adafruit ADS7128 8-Channel ADC and GPIO Expander

## CircuitPython and Python

It's easy to use the **ADS7128** &nbsp;with Python or CircuitPython, and the [Adafruit\_CircuitPython\_ADS7128](https://github.com/adafruit/Adafruit_CircuitPython_ADS7128) module. This module allows you to easily write Python code to read the 8 analog inputs, digital inputs or digital outputs on the expander.

You can use this driver with any CircuitPython microcontroller board or with a computer that has GPIO and Python [thanks to Adafruit\_Blinka, our CircuitPython-for-Python compatibility library](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux).

## CircuitPython Microcontroller Wiring

First wire up the breakout to your board exactly as follows. The following is the breakout wired to a Feather RP2040 using the STEMMA connector along with a potentiometer connected to analog input 0 ( **A0** ) on the ADC:

- **Board STEMMA 3V** to **breakout** **VIN (red wire)**  
- **Board STEMMA GND** to **breakout** **GND (black wire)**  
- **Board STEMMA SCL** to **breakout** **SCL (yellow wire)**  
- **Board STEMMA SDA** to **breakout** **SDA (blue wire)**
- **Breakout VIN** to **potentiometer positive (red wire)**
- **Breakout A0** to **potentiometer wiper (green wire)**
- **Breakout GND** to **potentiometer negative (black wire)**

![](https://cdn-learn.adafruit.com/assets/assets/000/144/638/medium640/adafruit_products_feather_stemma_bb.jpg?1782407766)

### Potentiometer with Built In Knob - 10K ohm

[Potentiometer with Built In Knob - 10K ohm](https://www.adafruit.com/product/4133)
_Oh say can you see_  
_By the knob's early light..._

Sorry - we thought that was clever. &nbsp;And while it wasn't really, this potentiometer definitely is! We've seen these in miniature synthesizers. They're bigger than a trim-pot but smaller than a...

In Stock
[Buy Now](https://www.adafruit.com/product/4133)
[Related Guides to the Product](https://learn.adafruit.com/products/4133/guides)
![Potentiometer with Built In Knob](https://cdn-shop.adafruit.com/640x480/4133-03.jpg)

The following is the breakout wired to a Feather RP2040 using a solderless breadboard:

- **Board 3V** to **breakout** **VIN (red wire)**  
- **Board GND** to **breakout** **GND (black wire)**  
- **Board SCL** to **breakout** **SCL (yellow wire)**  
- **Board SDA** to **breakout** **SDA (blue wire)**
- **Breakout VIN** to **potentiometer positive (red wire)**
- **Breakout A0** to **potentiometer wiper (green wire)**
- **Breakout GND** to **potentiometer negative (black wire)**

![](https://cdn-learn.adafruit.com/assets/assets/000/144/639/medium640/adafruit_products_feather_bb_bb.jpg?1782407803)

## Python Computer Wiring

Since there are _dozens_ of Linux computers/boards you can use, we will show wiring for Raspberry Pi. For other platforms, [please visit the guide for CircuitPython on Linux to see whether your platform is supported](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux).

Here's the Raspberry Pi wired with I2C using the STEMMA connector:

- **Pi 3V** to **breakout** **VIN (red wire)**  
- **Pi GND** to **breakout** **GND (black wire)**  
- **Pi SCL** to **breakout** **SCL (yellow wire)**  
- **Pi SDA** to **breakout** **SDA (blue wire)**
- **Breakout VIN** to **potentiometer positive (red wire)**
- **Breakout A0** to **potentiometer wiper (green wire)**
- **Breakout GND** to **potentiometer negative (black wire)**

![](https://cdn-learn.adafruit.com/assets/assets/000/144/640/medium640/adafruit_products_piStemma_bb.jpg?1782407832)

Here's the Raspberry Pi wired with I2C using a solderless breadboard:

- **Pi 3V** to **breakout** **VIN (red wire)**  
- **Pi GND** to **breakout** **GND (black wire)**  
- **Pi SCL** to **breakout** **SCL (yellow wire)**  
- **Pi SDA** to **breakout** **SDA (blue wire)**
- **Breakout VIN** to **potentiometer positive (red wire)**
- **Breakout A0** to **potentiometer wiper (green wire)**
- **Breakout GND** to **potentiometer negative (black wire)**

![](https://cdn-learn.adafruit.com/assets/assets/000/144/641/medium640/adafruit_products_piBB_bb.jpg?1782407851)

## Python Installation of ADS7128 Library

You'll need to install the **Adafruit\_Blinka** library that provides the CircuitPython support in Python. This may also require enabling I2C on your platform and verifying you are running Python 3. [Since each platform is a little different, and Linux changes often, please visit the CircuitPython on Linux guide to get your computer ready](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux)!

Once that's done, from your command line run the following command:

- `pip3 install adafruit-circuitpython-ads7128`

If your default Python is version 3, you may need to run 'pip' instead. Just make sure you aren't trying to use CircuitPython on Python 2.x, it isn't supported!

## CircuitPython Usage

To use with CircuitPython, you need to first install the **Adafruit\_CircuitPython\_ADS7128** &nbsp;library, and its dependencies, into the **lib** folder on your **CIRCUITPY** drive. Then you need to update **code.py** with the example script.

Thankfully, we can do this in one go. In the example below, click the **Download Project Bundle** button below to download the necessary libraries and the **code.py** file in a zip file. Extract the contents of the zip file, and copy the **entire**  **lib**  **folder** and the **code.py** file to your **CIRCUITPY** drive.

Your **CIRCUITPY/lib** folder should contain the following folders:

- **adafruit\_bus\_device/**
- **adafruit\_ads7128/**

![CIRCUITPY drive](https://adafruit.github.io/Adafruit_CircuitPython_Bundle/ads7128_ads7128_simpletest.py.png )

## Python Usage

Once you have the library `pip3` installed on your computer, copy or download the following example to your computer, and run the following, replacing **code.py** with whatever you named the file:

`python3 code.py`

## Example Code

**If running CircuitPython:** Once everything is saved to the **CIRCUITPY** drive, [connect to the serial console](https://learn.adafruit.com/welcome-to-circuitpython/kattni-connecting-to-the-serial-console) to see the data printed out!

**If running Python:** The console output will appear wherever you are running Python.

https://github.com/adafruit/Adafruit_CircuitPython_ADS7128/blob/main/examples/ads7128_simpletest.py

The ADS7128 is initialized over I2C. Then in the loop, the analog input on A0 is read and printed to the serial monitor. As you adjust the potentiometer connected to A0, you'll see the values change.

Warning: To make code from different ADC's all compatible, we always return a 16-bit value (0 to 65535) even though, in this case, the underlying hardware is 12-bit!

![](https://cdn-learn.adafruit.com/assets/assets/000/144/699/medium800/adafruit_products_Screenshot_2026-06-29_165041.png?1782766258)

# Adafruit ADS7128 8-Channel ADC and GPIO Expander

## Python Docs

# Adafruit ADS7128 8-Channel ADC and GPIO Expander

## Arduino

Using the ADS7128 breakout with Arduino involves wiring up the breakout to your Arduino-compatible microcontroller with a potentiometer, installing the [Adafruit\_ADS7128](https://github.com/adafruit/Adafruit_ADS7128) library, and running the provided example code.

### Potentiometer with Built In Knob - 10K ohm

[Potentiometer with Built In Knob - 10K ohm](https://www.adafruit.com/product/4133)
_Oh say can you see_  
_By the knob's early light..._

Sorry - we thought that was clever. &nbsp;And while it wasn't really, this potentiometer definitely is! We've seen these in miniature synthesizers. They're bigger than a trim-pot but smaller than a...

In Stock
[Buy Now](https://www.adafruit.com/product/4133)
[Related Guides to the Product](https://learn.adafruit.com/products/4133/guides)
![Potentiometer with Built In Knob](https://cdn-shop.adafruit.com/640x480/4133-03.jpg)

## Wiring

Wire as shown for a **5V** board like an Uno. If you are using a **3V** board, like an Adafruit Feather, wire the board's 3V pin to the breakout VIN.

Here is an Adafruit Metro wired up to the breakout using the STEMMA QT connector. A potentiometer is connected to input 0 ( **A0** ) on the ADC:

- **Board 5V** to **breakout** **VIN (red wire)**  
- **Board GND** to **breakout** **GND (black wire)**  
- **Board SCL** to **breakout** **SCL (yellow wire)**  
- **Board SDA** to **breakout** **SDA (blue wire)**
- **Breakout VIN** to **potentiometer positive (red wire)**
- **Breakout A0** to **potentiometer wiper (green wire)**
- **Breakout GND** to **potentiometer negative (black wire)**

![](https://cdn-learn.adafruit.com/assets/assets/000/144/642/medium640/adafruit_products_metro_stemma_bb.jpg?1782407886)

Here is an Adafruit Metro wired up using a solderless breadboard:

- **Board 5V** to **breakout** **VIN (red wire)**  
- **Board GND** to **breakout** **GND (black wire)**  
- **Board SCL** to **breakout** **SCL (yellow wire)**  
- **Board SDA** to **breakout** **SDA (blue wire)**
- **Breakout VIN** to **potentiometer positive (red wire)**
- **Breakout A0** to **potentiometer wiper (green wire)**
- **Breakout GND** to **potentiometer negative (black wire)**

![](https://cdn-learn.adafruit.com/assets/assets/000/144/643/medium640/adafruit_products_metro_bb_bb.jpg?1782407909)

## Library Installation

You can install the **Adafruit\_ADS7128** library for Arduino using the Library Manager in the Arduino IDE.

![](https://cdn-learn.adafruit.com/assets/assets/000/144/644/medium800/adafruit_products_Arduino_Open_Library_Manager.png?1782407922)

Click the **Manage Libraries ...** menu item, search for **Adafruit\_ADS7128** , and select the **Adafruit ADS7128** library:

![](https://cdn-learn.adafruit.com/assets/assets/000/144/678/medium800/adafruit_products_Screenshot_2026-06-29_093337.png?1782740899)

If asked about dependencies, click "Install all".

![](https://cdn-learn.adafruit.com/assets/assets/000/144/679/medium800/adafruit_products_Screenshot_2026-06-29_093346.png?1782740906)

If the "Dependencies" window does not come up, then you already have the dependencies installed.

Warning: If the dependencies are already installed, you must make sure you update them through the Arduino Library Manager before loading the example!

## Example Code
https://github.com/adafruit/Adafruit_ADS7128/blob/main/examples/01_adc_simpletest/01_adc_simpletest.ino

Upload the sketch to your board and open up the Serial Monitor ( **Tools -\> Serial Monitor** ) at 115200 baud. You'll see the ADS7128 recognized over I2C. As you turn the potentiometer attached to A0, you'll see the raw value and voltage reading change.

Info: The remaining 7 channels (A1 through A7) are 'floating' - not connected to anything, so you will see varying random values.

![](https://cdn-learn.adafruit.com/assets/assets/000/144/677/medium800/adafruit_products_arduinoSerial.png?1782740547)

# Adafruit ADS7128 8-Channel ADC and GPIO Expander

## Arduino Docs

# Adafruit ADS7128 8-Channel ADC and GPIO Expander

## Downloads

## Files

- [ADS7128 Datasheet](https://cdn-learn.adafruit.com/assets/assets/000/144/625/original/ads7128.pdf?1782390673)
- [EagleCAD PCB files on GitHub](https://github.com/adafruit/Adafruit-ADS7128-8-Channel-ADC-and-GPIO-Expander-PCB)
- [3D models on GitHub](https://github.com/adafruit/Adafruit_CAD_Parts/tree/main/6494%20ADS7128%20ADC%20GPIO%20Expander)
- [Fritzing object in the Adafruit Fritzing Library](https://github.com/adafruit/Fritzing-Library/blob/master/parts/Adafruit%20ADS7128%208-Channel%20ADC%20and%20GPIO%20Expander.fzpz)

## Schematic and Fab Print
![](https://cdn-learn.adafruit.com/assets/assets/000/144/626/medium800/adafruit_products_schem.png?1782390948)

![](https://cdn-learn.adafruit.com/assets/assets/000/144/627/medium800/adafruit_products_fab.png?1782391007 dimensions are in inches)

## 3D Model
![](https://cdn-learn.adafruit.com/assets/assets/000/144/764/medium800/adafruit_products_6494_ADS7128_ADC_GPIO_Expander.jpg?1783022672 )


## Primary Products

### Adafruit ADS7128 8-Channel ADC and GPIO Expander

[Adafruit ADS7128 8-Channel ADC and GPIO Expander](https://www.adafruit.com/product/6494)
The&nbsp; **Adafruit ADS7128 8-Channel ADC and GPIO Expander** is a bit of a Platypus of the I2C expander world: hard to categorize as just an ADC or a GPIO expander since it combines the capabilities of both with great capabilites! Usually, you only get ADC or I/O so it's nice...

In Stock
[Buy Now](https://www.adafruit.com/product/6494)
[Related Guides to the Product](https://learn.adafruit.com/products/6494/guides)

## Featured Products

### Potentiometer with Built In Knob - 10K ohm

[Potentiometer with Built In Knob - 10K ohm](https://www.adafruit.com/product/4133)
_Oh say can you see_  
_By the knob's early light..._

Sorry - we thought that was clever. &nbsp;And while it wasn't really, this potentiometer definitely is! We've seen these in miniature synthesizers. They're bigger than a trim-pot but smaller than a...

In Stock
[Buy Now](https://www.adafruit.com/product/4133)
[Related Guides to the Product](https://learn.adafruit.com/products/4133/guides)
### STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long

[STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long](https://www.adafruit.com/product/4399)
This 4-wire cable is&nbsp;50mm / 1.9" long and fitted with JST SH female 4-pin connectors on both ends. Compared with the chunkier JST PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and remove.

<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/4399)
[Related Guides to the Product](https://learn.adafruit.com/products/4399/guides)
### STEMMA QT / Qwiic JST SH 4-pin Cable - 100mm Long

[STEMMA QT / Qwiic JST SH 4-pin Cable - 100mm Long](https://www.adafruit.com/product/4210)
This 4-wire cable is a little over 100mm / 4" long and fitted with JST-SH female 4-pin connectors on both ends. Compared with the chunkier JST-PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and remove.

<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/4210)
[Related Guides to the Product](https://learn.adafruit.com/products/4210/guides)
### STEMMA QT / Qwiic JST SH 4-pin Cable with Premium Female Sockets

[STEMMA QT / Qwiic JST SH 4-pin Cable with Premium Female Sockets](https://www.adafruit.com/product/4397)
This 4-wire cable is a little over 150mm / 6" long and fitted with JST-SH female 4-pin connectors on one end and premium female headers on the other. Compared with the chunkier JST-PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and...

In Stock
[Buy Now](https://www.adafruit.com/product/4397)
[Related Guides to the Product](https://learn.adafruit.com/products/4397/guides)
### STEMMA QT / Qwiic JST SH 4-pin to Premium Male Headers Cable

[STEMMA QT / Qwiic JST SH 4-pin to Premium Male Headers Cable](https://www.adafruit.com/product/4209)
This 4-wire cable is a little over 150mm / 6" long and fitted with JST-SH female 4-pin connectors on one end and premium Dupont male headers on the other. Compared with the chunkier JST-PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert...

In Stock
[Buy Now](https://www.adafruit.com/product/4209)
[Related Guides to the Product](https://learn.adafruit.com/products/4209/guides)
### JST SH 4-pin Cable with Alligator Clips - STEMMA QT / Qwiic

[JST SH 4-pin Cable with Alligator Clips - STEMMA QT / Qwiic](https://www.adafruit.com/product/4398)
This cable will make it super easy to use our plug-and-play STEMMA QT boards with boards like Circuit Playground. On one end you get a Qwiic / STEMMA QT connector (technically known as a JST SH 4-pin plug)&nbsp; into 4 individual wires with grippy alligator clips. We're carrying these to...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4398)
[Related Guides to the Product](https://learn.adafruit.com/products/4398/guides)

## Related Guides

- [Adafruit Prototyping Pi Plate](https://learn.adafruit.com/adafruit-prototyping-pi-plate.md)
- [Adafruit AHT20 Temperature & Humidity Sensor](https://learn.adafruit.com/adafruit-aht20.md)
- [Mini LED Matrix Audio Visualizer](https://learn.adafruit.com/mini-led-matrix-audio-visualizer.md)
- [PicoDVI Adafruit IO Feed Dashboard](https://learn.adafruit.com/dvi-io.md)
- [Magic Band Reader](https://learn.adafruit.com/magic-band-reader.md)
- [Adafruit TCA8418 Keypad Matrix and GPIO Expander Breakout](https://learn.adafruit.com/adafruit-tca8418-keypad-matrix-and-gpio-expander-breakout.md)
- [Adafruit STEMMA Reflective Photo Interrupt Sensor](https://learn.adafruit.com/adafruit-stemma-reflective-photo-interrupt-sensor.md)
- [Adafruit SEN54 or SEN55 Adapter Breakout](https://learn.adafruit.com/adafruit-sen54-or-sen55-adapter-breakout.md)
- [Adafruit Proto Tripler PiCowbell](https://learn.adafruit.com/adafruit-proto-tripler-picowbell.md)
- [Adafruit VCNL4020 Proximity and Light Sensor](https://learn.adafruit.com/adafruit-vcnl4020-proximity-and-light-sensor.md)
- [HalloWing Interactive Cat Toy](https://learn.adafruit.com/hallowing-cat-toy.md)
- [CircuitPython Hardware: MPR121 Capacitive Touch Breakout](https://learn.adafruit.com/circuitpython-hardware-mpr121-capacitive-touch-breakout.md)
- [4x4 Rotary Encoder MIDI Messenger](https://learn.adafruit.com/4x4-rotary-encoder-midi-messenger.md)
- [DC, Servo, Stepper Motors and Solenoids with the Pico](https://learn.adafruit.com/use-dc-stepper-servo-motor-solenoid-rp2040-pico.md)
- [Adafruit STEMMA Analog SPDT Switch](https://learn.adafruit.com/adafruit-stemma-analog-spdt-switch.md)
