Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Sensors
  4. ›MCP3008 8-Channel ADC

Component guide · Intermediate · 3 min read

MCP3008 8-Channel ADC

Pinout, Wiring and Code

By Geekobot Learning Team · Updated 29 Oct 2026

I'm using
Wiring, code and the Run it panels follow your board.
On this page
Short answerWhat the MCP3008 isMCP3008 pinoutWiring the MCP3008Example codeSetup and tuningWhat you needAlternatives and when to choose themTry itCommon mistakesFAQsParts and next steps
Short answer

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)
01

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.

02

MCP3008 pinout

The pins on the MCP3008 and what each one does.

PinFunction
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
PinFunction
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
03

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 pinArduino UnoESP32
VDD + VREF5V3V3
AGND + DGNDGNDGND
CLKD13GPIO 18
DOUTD12GPIO 19
DIND11GPIO 23
CSD10GPIO 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
04

Example code

On Arduino, the Adafruit MCP3008 library gives the same result with adc.begin(10) and adc.readADC(0).

Read channel 0 on a Raspberry Pi with gpiozero · MicroPython
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)
05

Setup and tuning

Enable SPI

on the Raspberry Pi first (raspi-config, Interface Options).

VREF

tie to 3.3 V on a Pi; a lower reference gives finer steps for small signals.

Decoupling

a 100 nF capacitor across VDD and GND close to the chip steadies readings.

Unused inputs

tie them to GND so they do not pick up noise.

06

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
07

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.
08

Try it: Voltage divider calculator

Change the values and the diagram and results update as you type.

09

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.
10

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

  • MCP3008 8-Channel 10-Bit ADC IC, SPI
    ₹312View
  • Solderless Breadboard
    ₹68View
  • Uno R3 Development Board (No Cable)
    ₹359View
  • ESP32-WROOM-32 38-Pin Development Board
    ₹389View
  • 16mm Rotary Potentiometer (Linear)
    ₹14View
  • Dupont Jumper Wires (40 pcs)
    ₹49View
Shop Interface & RF Encoder ICs

Calculators

Voltage divider calculator

Keep learning

Concept explainerBeginnerADCs ExplainedAn analog-to-digital converter (ADC) measures a voltage and returns a number.4 min read · Electronics FundamentalsComponent guideIntermediateADC and DAC ModulesAn external ADC module gives a microcontroller more, better or cleaner analog inputs.3 min read · Semiconductors & ICsConcept explainerIntermediateSPI ExplainedSPI (Serial Peripheral Interface) is a fast four-wire bus: SCK carries the clock, MOSI carries data from the controller, MISO carries data back, and a separate chip-select (CS) line per device chooses who is listening.3 min read · Electronics Fundamentals

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.

On this page
Short answerWhat the MCP3008 isMCP3008 pinoutWiring the MCP3008Example codeSetup and tuningWhat you needAlternatives and when to choose themTry itCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide (Arduino Uno)3 items · ₹584

MCP3008 8-Channel 10-Bit ADC IC, SPI · Solderless Breadboard · Uno R3 CH340G ATmega328p Compatible Development Board

Run itChange the inputs and watch the output

gpiozero gives 0 to 1. Times 3.3 is the voltage with VREF on 3.3 V.

Shell
0.400  (1.32 V)

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question