MCP3008 12-bit ADC Tester

8-channel 12-bit SPI ADC reading a potentiometer, an LDR, and a thermistor in real time.

Difficulty: Through-hole. Estimated build time: about 45 minutes. Estimated parts cost: about US$5.50. 6-line bill of materials. Compare supplier offers when available. A bench tool that turns a generic Arduino or Raspberry Pi into an 8-channel 12-bit data acquisition front-end.

Power and SPI

Place the MCP3008 (DIP-16) across the breadboard's center divider. Tie pin 16 (VDD) and pin 15 (Vref) to +3.3 V (or +5 V — the same chip works on both). Pin 9 (DGND) and pin 14 (AGND) both go to ground. Drop a 100 nF ceramic across VDD and another between Vref and AGND for a clean reference.

Wire the host SPI

From the Arduino: pin 13 (SCK) → MCP3008 pin 13 (CLK); pin 11 (MOSI) → pin 11 (DIN); pin 12 (MISO) → pin 12 (DOUT); any free digital pin (pin 10 works) → pin 10 (CS̄). Common-ground the Arduino to the breadboard.

Channel 0 — potentiometer

Wire a 10 kΩ linear potentiometer with one end on +3.3 V, the other on ground, and the wiper on CH0 (pin 1). This is the easiest channel to verify: the reading should sweep cleanly from ~0 to ~4095 as you turn the knob.

Channel 1 — LDR

Connect a 10 kΩ resistor from +3.3 V to CH1 (pin 2), and an LDR from CH1 to ground. In bright light the LDR's resistance drops below 1 kΩ and the divider reads near zero; in darkness it climbs above 100 kΩ and the reading jumps near full-scale.

Channel 2 — NTC thermistor

Connect a 10 kΩ resistor from +3.3 V to CH2 (pin 3), and a 10 kΩ NTC thermistor from CH2 to ground. The thermistor's resistance falls as it warms — pinch it between your fingers and the reading drops within a few seconds.

Read and convert

On the Arduino install the Adafruit MCP3008 library or write the SPI transaction by hand (3 bytes: start bit, single/diff + channel, then read 12 bits back). Print all three channels at 100 Hz. To convert thermistor counts to °C use the Steinhart–Hart equation; for LDR counts to lux a logarithmic curve fit is good enough for a hobby setup.