Knob + ADC board
The knob + ADC board pairs a potentiometer with an MCP3008 ADC, the wiper on channel 0 and the reference tied to the 3.3 V supply, so the Pi can read a knob at all. It costs $9 and is for any analog control: menus, setpoints, dimmers, thresholds. Wire the four SPI pins plus power and ground, then read channel 0.
What's inside
| Part | Qty | Price each |
|---|---|---|
| Potentiometer | 1 | $1.50 |
| MCP3008 ADC (SPI) | 1 | $4 |
| Total | 2 | $5.50 |
- The potentiometer is a divider across the 3.3 V rail; its wiper delivers 0–3.3 V as you turn it.
- The MCP3008 digitises that voltage to 10 bits over SPI — the Pi itself has no analog inputs.
| Exposed pin | Inside the kit |
|---|---|
| vdd | adc:VDD |
| gnd | adc:DGND |
| clk | adc:CLK |
| dout | adc:DOUT |
| din | adc:DIN |
| cs | adc:CS |
The board joins the ADC's two grounds and ties VREF to VDD, so vdd must be 3.3 V and the full scale is 3.3 V. The kit has no chain ends; the SPI pins are clk, dout, din and cs.
Wiring it in circuit.py
from wiring import *
pi = Pi()
knob = kits.KnobADC()
pi.V3_3 >> knob.vdd
knob.gnd >> pi.GND
pi.SCLK >> knob.clk
pi.MISO >> knob.dout
pi.MOSI >> knob.din
pi.CE0 >> knob.csDriving it in main.py
from gpiozero import MCP3008
from time import sleep
knob = MCP3008(channel=0)
while True:
print(f"knob {knob.value * 100:.0f}%")
sleep(0.5)Why buy the kit
The loose pot and MCP3008 cost $1.50 + $4 = $5.50, against $9 — $3.50 for the five internal wires (wiper, reference, two grounds, power) done correctly. The MCP3008's breadboard wiring is where beginners go wrong: VREF left floating and a ground missed both give nonsense readings, and the kit cannot have either problem.
Simulator vs real hardware
- The knob's position is a datafeed field in percent; the wiper voltage follows it, the ADC quantises to 10 bits with the chip's noise and non-linearity, and
valuecomes back 0.0–1.0. - The stock MCP3008 is powered from 3.3 V here, as the kit intends; running a bare chip from 5 V would put 5 V on the Pi's MISO pin.
- The SPI bus is simulated at the transaction level, so
gpiozero.MCP3008runs unmodified; the same program works on a real Pi wired the same way.
Further reading
- gpiozero: MCP3008 —
channel,value,voltageand the SPI wiring conventions.