Arduino 74HC4051 Multiplexer with Multiple Potentiometers
Level 46 · Many Knobs · 30 minutes
One analog pin, three knobs: a 74HC4051 multiplexer lets the Arduino read them all, one at a time.

Preview the project free; a course seat is required to run and submit. No hardware kit needed.
Your project challenge
Read three knobs through one analog pin, using a 74HC4051 multiplexer. Each knob has its own LED and its own mark. Light LED 1 when knob 1 reads above 256, LED 2 above 512, LED 3 above 768. Keep the LEDs up to date as the knobs turn.
Components you’ll use
- Arduino Uno
- 74HC4051 Analog Multiplexer
- Potentiometer × 3
- LED (Light-Emitting Diode) × 3
What you’ll build
Three knobs and three LEDs, with the knobs read through one analog pin.
How it works
- The 74HC4051 is a multiplexer: eight inputs, Y0 to Y7, and one output, Z.
- Three select pins, S0, S1 and S2, make a number from 0 to 7. That number picks the input joined to Z.
- Z goes to
A0. Pick channel 1 andanalogRead(A0)reads knob 2. - Pick a channel, read it, pick the next one. Round and round, many times a second.
- Each knob has its own mark: a quarter, a half and three quarters of the way round.
The key idea
An Uno has only six analog pins. One multiplexer turns one analog pin into eight. Mixing desks and game controllers use this trick for dozens of knobs.
⚠ Watch out
Pick the channel first, then read. Read first and each value lands on the wrong LED. You do not need a delay: the chip switches in less than a millionth of a second.
The interactive editor includes the wiring guide, code editor and simulation controls.