← All parts
MCP3008 8-ch 10-bit ADC
MCP3008
Microchipinterface io display
The MCP3008 is a 10-bit, 8-channel Analog-to-Digital Converter (ADC) that communicates via an SPI serial interface. It supports a wide operating voltage range and low power consumption, making it suitable for various data acquisition applications.
In stock
Specifications
9- Resolution
- 10 bits
- Channels
- 8
- Interface
- SPI
- Operating Voltage
- 2.7 - 5.5 V
- Sampling Rate
- 200 ksps
- Standby Current
- 5 nA
- Active Current
- 500 µA
- Temperature Range
- -40 to +85 °C
- Package
- PDIP, SOIC, TSSOP
Pinout
16| Pin | Name | Functions | Notes |
|---|---|---|---|
| 1 | CH0 | ADC | Analog Input 0 |
| 2 | CH1 | ADC | Analog Input 1 |
| 3 | CH2 | ADC | Analog Input 2 |
| 4 | CH3 | ADC | Analog Input 3 |
| 5 | CH4 | ADC | Analog Input 4 |
| 6 | CH5 | ADC | Analog Input 5 |
| 7 | CH6 | ADC | Analog Input 6 |
| 8 | CH7 | ADC | Analog Input 7 |
| 9 | DGND | GND | Digital Ground |
| 10 | CS/SHDN | SPI | Chip Select/Shutdown Input |
| 11 | DIN | SPI | Serial Data Input |
| 12 | DOUT | SPI | Serial Data Output |
| 13 | CLK | SPI | Serial Clock |
| 14 | AGND | GND | Analog Ground |
| 15 | VREF | — | Reference Voltage Input |
| 16 | VDD | POWER | Power Supply |
Interactive pinout
Highlight:
MCP3008
Click a pin to copy its name · tap a tag above to spotlight a bus.
Logic level & voltage
Operates from 2.7-5.5 V (per the datasheet specs) over SPI and provides eight 10-bit analog channels — a common way to add ADC to a board that lacks one.
Typical uses
- Adding analog inputs to the Raspberry Pi / Pico
- Reading multiple potentiometers or analog sensors
- Low-speed data acquisition
Wiring notes & gotchas
- VREF sets the full-scale; tie it cleanly (often to VDD) and decouple.
- Keep VDD and VREF quiet for accurate conversions.
- Match the SPI logic level to your host (3.3 V hosts: run the chip at 3.3 V).
Commonly used with
3Starter code
Community starter examples — minimal, unofficial, and provided to get you wiring fast. Verify against the manufacturer datasheet before relying on them.
Arduino (C++)
Arduino library: Adafruit MCP3008
arduino
// MCP3008 8-channel 10-bit SPI ADC — community starter example
#include <Adafruit_MCP3008.h>
Adafruit_MCP3008 adc;
#if defined(ESP32)
#define CS_PIN 5
#else
#define CS_PIN 10
#endif
void setup() {
Serial.begin(115200);
adc.begin(CS_PIN); // hardware SPI + this CS pin
}
void loop() {
Serial.println(adc.readADC(0)); // channel 0, 0..1023
delay(200);
}MicroPython
python
# MCP3008 SPI ADC (ESP32) — community starter example
# No driver needed: one 3-byte SPI transaction per single-ended read
from machine import Pin, SPI
import time
spi = SPI(2, baudrate=1000000, sck=Pin(18), mosi=Pin(23), miso=Pin(19))
cs = Pin(5, Pin.OUT, value=1) # CS=GPIO5
def read_adc(ch):
cmd = bytearray([1, (8 + ch) << 4, 0]) # start bit, single-ended, channel
resp = bytearray(3)
cs.value(0)
spi.write_readinto(cmd, resp)
cs.value(1)
return ((resp[1] & 0x03) << 8) | resp[2] # 10-bit result
while True:
print(read_adc(0)) # channel 0, 0..1023
time.sleep_ms(200)Wiring
| Pin | Arduino Uno R3 | ESP32 DevKitC (WROOM-32) | Notes |
|---|---|---|---|
| VDD | +5V | 3V3 | 2.7-5.5 V; also tie VREF to VDD for full scale |
| AGND/DGND | GND | GND | |
| CLK | D13 (SCK) | GPIO18 | |
| DIN | D11 (MOSI) | GPIO23 | |
| DOUT | D12 (MISO) | GPIO19 | |
| CS/SHDN | D10 | GPIO5 | |
| CH0..CH7 | - | - | Analog inputs, 0 to VREF |