Component guide · Intermediate · 3 min read
MCP3008 8-Channel ADC

Pinout, Wiring and Code
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
The MCP3008 is a 16-pin chip that adds eight 10-bit analog inputs over SPI. It is the usual way to read potentiometers, light sensors and other analog parts on a Raspberry Pi, which has no analog inputs of its own. It runs from 2.7 to 5.5 V, uses VREF as its full-scale voltage and samples up to 200,000 times a second at 5 V.
Key specs at a glance
- Resolution
- 10-bit (0 to 1023)
- Channels
- 8 single-ended or 4 pseudo-differential
- Sample rate
- Up to 200 ksps at 5 V (75 ksps at 2.7 V)
- Interface
- SPI
- Supply
- 2.7 to 5.5 V
- Package
- DIP-16 (breadboard friendly)
What the MCP3008 is
Channels CH0 to CH7 are on one side of the chip and the supply and SPI pins are on the other. The reading is (input / VREF) × 1023, so tie VREF to the supply you want as full scale, usually 3.3 V on a Raspberry Pi.
On a Pi, power it from 3.3 V so the data line back to the Pi is 3.3 V too.
MCP3008 pinout
The pins on the MCP3008 and what each one does.
| Pin | Function |
|---|---|
| CH0 to CH7 (pins 1-8) | Analog inputs |
| VDD (16) | Supply, 2.7 to 5.5 V |
| VREF (15) | Reference voltage (full scale) |
| AGND (14) / DGND (9) | Analog and digital ground |
| CLK (13) | SPI clock |
| DOUT (12) | SPI data out (MISO) |
| DIN (11) | SPI data in (MOSI) |
| CS/SHDN (10) | Chip select |
- CH0 to CH7 (pins 1-8)
- Analog inputs
- VDD (16)
- Supply, 2.7 to 5.5 V
- VREF (15)
- Reference voltage (full scale)
- AGND (14) / DGND (9)
- Analog and digital ground
- CLK (13)
- SPI clock
- DOUT (12)
- SPI data out (MISO)
- DIN (11)
- SPI data in (MOSI)
- CS/SHDN (10)
- Chip select
Wiring the MCP3008
On a Raspberry Pi: VDD and VREF to 3.3 V (pin 1), CLK to GPIO 11 (SCLK), DOUT to GPIO 9 (MISO), DIN to GPIO 10 (MOSI), CS to GPIO 8 (CE0). Enable SPI in raspi-config. Add a 100 nF capacitor from VDD to GND near the chip.
| MCP3008 pin | Arduino Uno | ESP32 |
|---|---|---|
| VDD + VREF | 5V | 3V3 |
| AGND + DGND | GND | GND |
| CLK | D13 | GPIO 18 |
| DOUT | D12 | GPIO 19 |
| DIN | D11 | GPIO 23 |
| CS | D10 | GPIO 5 |
- VDD + VREF
- Arduino Uno:
- 5V
- ESP32:
- 3V3
- AGND + DGND
- Arduino Uno:
- GND
- ESP32:
- GND
- CLK
- Arduino Uno:
- D13
- ESP32:
- GPIO 18
- DOUT
- Arduino Uno:
- D12
- ESP32:
- GPIO 19
- DIN
- Arduino Uno:
- D11
- ESP32:
- GPIO 23
- CS
- Arduino Uno:
- D10
- ESP32:
- GPIO 5
Example code
On Arduino, the Adafruit MCP3008 library gives the same result with adc.begin(10) and adc.readADC(0).
from gpiozero import MCP3008
from time import sleep
pot = MCP3008(channel=0) # uses SPI0, CE0
while True:
print(f"{pot.value:.3f} ({pot.value * 3.3:.2f} V)")
sleep(0.5)Setup and tuning
on the Raspberry Pi first (raspi-config, Interface Options).
tie to 3.3 V on a Pi; a lower reference gives finer steps for small signals.
a 100 nF capacitor across VDD and GND close to the chip steadies readings.
tie them to GND so they do not pick up noise.
What you need
Shop this list4 of 6 found in our store · ₹818
MCP3008 8-Channel 10-Bit ADC IC, SPI: the part this guide coversMCP3008 8-Channel 10-Bit ADC IC, SPI₹312
Solderless breadboard: to fit the DIP-16 chipSolderless Breadboard₹68- Uno R3 development board: the controller used in the wiring tableFind this part
ESP32-WROOM-32 38-pin development board: for Wi-Fi logging and dashboardsESP32-WROOM-32 38-Pin Development Board₹389- 16 mm rotary potentiometer: to test the inputsFind this part
Dupont jumper wires: for the connectionsDupont Jumper Wires (40 pcs)₹49Closest match, check the specs
Alternatives and when to choose them
- ADS1015 ADC: 4 channels, 12-bit, gain stage, I2C.
- ADS1115 ADC: 16-bit for precise readings.
- PCF8591 ADC/DAC: 4 inputs and one analog output on I2C.
Try it: Voltage divider calculator
Change the values and the diagram and results update as you type.
Common mistakes to avoid
- Leaving VREF unconnected, so all readings are random.
- Powering it from 5 V on a Raspberry Pi, so DOUT sends 5 V into a 3.3 V pin.
- Forgetting to enable SPI on the Pi.
- Swapping DIN and DOUT.
Frequently asked questions
Why use an MCP3008 with a Raspberry Pi?
The Pi has no analog inputs; the MCP3008 adds eight.
Is it 10-bit or 12-bit?
10-bit. The MCP3208 is the 12-bit version with the same pinout.
What voltage should I use?
3.3 V on a Raspberry Pi or ESP32, 5 V on an Arduino Uno.
How fast is it?
Up to 200,000 samples a second at 5 V, far faster than most projects need.
Can it read 12 V?
Not directly. Use a voltage divider so the input stays below VREF.
Parts for this guide
Calculators
Keep learning
Sources
- MCP3004/3008 2.7 V 4/8-channel 10-bit A/D converter with SPI datasheet (Microchip)
- gpiozero MCP3008 documentation
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.


