A Raspi ADC (Analog-to-Digital Converter) is an external integrated circuit that translates continuous, real-world voltage levels into discrete binary numbers the Pi’s digital GPIO pins can process. Unlike the Arduino Uno or the ESP32, the Raspberry Pi’s Broadcom system-on-chip lacks native analog input hardware. Adding a Raspi ADC changes your project from a purely digital logic system into a mixed-signal environment, requiring you to route voltage references (VREF), manage SPI or I2C bus capacitance, and implement voltage dividers to protect the Pi's strictly 3.3V-tolerant GPIO header.

Before wiring up sensors, it is critical to address two common confusions. First, many makers confuse the Pi's PWM (Pulse Width Modulation) capabilities with analog I/O. PWM is a digital square wave that simulates analog output for dimming LEDs or driving motors, but it cannot read an analog voltage from a sensor. Second, beginners often assume the Pi's GPIO pins are 5V-tolerant like an Arduino's. Feeding a 5V analog signal directly into a Pi pin without an ADC or level shifter will permanently destroy the silicon.

Spec-Sheet Table: Choosing the Right Raspi ADC IC

Because the Pi lacks internal analog hardware, you must select an external IC. The choice usually comes down to the communication protocol (SPI vs. I2C) and the resolution (bit-depth) your sensors demand. Below is a data-dense comparison of the most common ADC chips used in the Raspberry Pi ecosystem as of 2026.

IC Model Resolution Interface Channels VCC Range Typical Price Best Application
MCP3008 10-bit (1024 steps) SPI 8 Single / 4 Pseudo-Differential 2.7V - 5.5V $2.50 - $3.50 Joysticks, basic potentiometers, soil moisture
ADS1115 16-bit (65536 steps) I2C 4 Single / 2 Differential 2.0V - 5.5V $4.00 - $6.00 Precision thermistors, load cells, audio envelopes
MCP3208 12-bit (4096 steps) SPI 8 Single / 4 Pseudo-Differential 2.7V - 5.5V $3.00 - $4.50 Higher-res joysticks, wind vanes, light sensors
PCF8591 8-bit (256 steps) I2C 4 Single + 1 DAC Output 2.5V - 6.0V $1.50 - $2.50 Low-res legacy sensors, simple DAC needs
Pro-Tip: If you are wiring an MCP3008 via SPI, keep your jumper wires under 10cm. SPI is highly susceptible to capacitive loading and crosstalk at high clock speeds, which will result in jittery, noisy ADC readings on your breadboard.

Worked Numeric Example: Resolving a 10k Potentiometer

To understand what ADC resolution actually means for your code, let us look at the math behind reading a standard 10kΩ linear potentiometer powered by a 3.3V reference. Think of ADC resolution like the millimeter markings on a ruler; a 10-bit ADC gives you a ruler with 1,024 marks, while a 16-bit ADC gives you one with 65,536 marks over the exact same physical distance.

Scenario A: Using the 10-bit MCP3008
With a 3.3V reference voltage (VREF = 3.3V), the MCP3008 divides that range into 1,024 discrete steps (2^10).
Step Size = 3.3V / 1023 = 3.22 mV per step.
If you turn the potentiometer knob and the wiper outputs exactly 1.85V, the MCP3008 sends the following integer to the Pi:
1.85V / 0.00322V = 574
Your Python script receives 574. If the voltage fluctuates by 2mV due to breadboard noise, the reading might jump between 573 and 574.

Scenario B: Using the 16-bit ADS1115
The ADS1115 divides the same 3.3V range into 65,536 steps (assuming single-ended mode, effectively 15-bit positive range, but we will use the full 16-bit math for scale comparison).
Step Size = 3.3V / 65535 = 0.05 mV (50 µV) per step.
That same 1.85V input yields:
1.85V / 0.0000503V = 36,779
The ADS1115 is vastly more precise, but it is also much more sensitive to electromagnetic interference (EMI). Without a decoupling capacitor, a nearby WiFi transmission can easily cause the ADS1115's reading to swing by hundreds of steps, whereas the MCP3008 would barely register the noise.

Where You Meet This in Practice

You will typically reach for a Raspi ADC when integrating real-world environmental sensors or legacy analog controls into a Pi-based project. Common bench scenarios include:

  • NTC Thermistors: Reading temperature via a voltage divider. A 10k NTC thermistor paired with a 10k fixed resistor creates a non-linear voltage curve that the Pi can map to Celsius using the Steinhart-Hart equation in Python.
  • Resistive Soil Moisture Sensors: These output a varying voltage based on the conductivity of the soil. Because they operate in noisy, damp environments, an MCP3008 with a hardware low-pass RC filter on the input pin is usually sufficient.
  • Analog Joysticks and Faders: DJ controllers or DIY arcade sticks use dual-gang potentiometers. The MCP3008 is the industry standard here because human fingers cannot physically perceive the 3.22mV step jitter of a 10-bit converter.
  • Current Shunt Monitors: Measuring DC current for a solar charge controller or battery management system (BMS). This requires differential measurement to read the tiny millivolt drop across a shunt resistor, making the ADS1115's built-in Programmable Gain Amplifier (PGA) mandatory.
Safety & Hardware Warning: Never connect an analog sensor powered by 5V directly to the VREF or input pins of an ADC that is referenced to the Pi's 3.3V rail. If your sensor outputs up to 5V, you must use a voltage divider (e.g., a 10kΩ and 20kΩ resistor network) to scale the 0-5V signal down to 0-3.3V before it hits the ADC input pin. The Raspberry Pi Foundation's GPIO documentation strictly warns that exceeding 3.3V on the header pins will cause irreversible latch-up and silicon death.

Wiring Realities and Common Pitfalls

Getting the code to run is only half the battle; the physical layer is where most Raspi ADC projects fail. Keep these edge cases in mind when debugging erratic sensor readings:

  1. Floating Inputs: If you are using an 8-channel MCP3008 but only wiring up three sensors, the remaining five input pins are 'floating'. They will act as tiny antennas, picking up 50/60Hz mains hum and injecting noise into the chip's internal sample-and-hold circuitry. Always tie unused ADC input pins to GND via a 10kΩ pulldown resistor.
  2. VREF Decoupling: The voltage reference pin dictates the accuracy of every reading. If your 3.3V rail has 20mV of ripple from the Pi's switching power supply, your ADC readings will ripple identically. Place a 1µF ceramic capacitor and a 10µF electrolytic capacitor in parallel directly across the VREF and GND pins of the ADC IC.
  3. I2C Pull-ups on the ADS1115: The Pi's internal I2C pull-up resistors are relatively weak (around 1.8kΩ to 50kΩ depending on the board revision). If you are running long wires to an ADS1115 breakout board, add external 4.7kΩ pull-up resistors to the SDA and SCL lines to ensure crisp logic transitions.
  4. Sample Rate vs. CPU Load: Polling a 16-bit ADC at 860 samples per second via I2C will consume a noticeable amount of the Pi's CPU cycles if written in a naive Python while True loop. Use hardware interrupts (like the ADS1115's ALERT/RDY pin) or implement a threaded queue to prevent your analog readings from blocking your main application logic.

By selecting the correct IC for your resolution needs, scaling your voltages safely, and managing bus noise, a Raspi ADC setup becomes a rock-solid foundation for any mixed-signal embedded project.