Build it step by step
0 of 7 doneTest the pots
Read each one directly with analogRead.
Add the 4051
Select channels and print the readings.
Add the LEDs
Light one LED per step.
Map pots to notes
Use the pentatonic scale.
Add the tempo pot
Change the step length.
Add the button
Start and stop.
Label the knobs
Number the steps 1 to 8.
How do you build a 8-step sequencer synth?
Eight pots set the pitch of eight steps, an Arduino plays them in a loop with LEDs, and a tempo knob sets the speed. You need Arduino Nano, Potentiometer 10 kΩ × 9, LED 5 mm red × 8, Resistor 220 Ω × 8, CD4051 analog multiplexer, Passive buzzer, Tactile push button 6 mm, Breadboard 830 Tie Points and Jumper wires male to male (40 pcs, 20 cm). It takes 7 steps and about 150 minutes.
- Level
- Intermediate
- Time
- About 150 min
- Parts
- 9
Parts list
- Development BoardsBuyArduino Nano × 1
- PassivesBuy
- SemiconductorsBuyLED 5 mm red × 8
- PassivesBuyResistor 220 Ω × 8
- Integrated CircuitsBuy
- Motors & ActuatorsBuyPassive buzzer × 1
- SwitchesBuy
- PrototypingBuy
- PrototypingBuy
Tick what you already own. It saves to My Garage, so “Build with what I have” knows.
Wiring
| From | To | Why |
|---|---|---|
| CD4051 pin 16 (VCC) | Nano 5V | Power |
| CD4051 pin 8 (VSS) and pin 7 (VEE) | Nano GND | Ground and negative supply |
| CD4051 pin 6 (INH) | Nano GND | Always enabled |
| CD4051 pins 11, 10, 9 (A, B, C) | Nano D2, D3, D4 | Channel select |
| CD4051 pin 3 (COM) | Nano A0 | Analogue input |
| CD4051 pins 13, 14, 15, 12, 1, 5, 2, 4 (X0 to X7) | Wipers of pots 1 to 8 | Eight step pitches |
| Each pot's ends | 5 V and GND | Pot supply |
| Ninth pot wiper | Nano A2 | Tempo |
| LEDs 1 to 8 with 220 Ω | Nano D5 to D12 and GND | Step lights |
| Passive buzzer + | Nano A1 | Sound (− to GND) |
| Button | Nano D13 and GND | Start and stop |
Code
The CD4051 is an analogue multiplexer: three address pins choose which of eight pots connects to the single output at pin 3, so one analogue input on the Nano reads all eight knobs. The VEE pin is the negative supply and goes to ground here because the signals are only 0 to 5 V. Mapping the pot range onto a pentatonic scale means any setting sounds musical. The tempo pot sets the step length from 80 ms to 600 ms. A passive buzzer plays a clean square tone; to hear more, connect the buzzer pin through a 1 kΩ resistor and a small capacitor to an amplifier's input. Keep the pots' ends on 5 V and ground and the wipers on the 4051 inputs, or the readings will jump. Arduino IDE, board "Arduino Nano" (try the Old Bootloader option if the upload fails).
Runs on a virtual Arduino Nano in your browser, with sliders for the sensors. Happy with it? Verify and upload to your real board from the same page (Chrome or Edge on a computer).
// 8-step sequencer. Board: Arduino Nano. No libraries.
const byte SEL[3] = {2, 3, 4}; // 4051 address pins A, B, C
const byte LED[8] = {5, 6, 7, 8, 9, 10, 11, 12};
const int BUZZ = A1, BTN = 13;
// Pentatonic scale, frequencies in Hz across two octaves (15 notes plus a rest at the bottom).
const int NOTES[15] = {131, 147, 165, 196, 220, 262, 294, 330, 392, 440, 523, 587, 659, 784, 880};
bool running = true; unsigned long lastBtn = 0;
int readStep(byte ch) {
for (byte b = 0; b < 3; b++) digitalWrite(SEL[b], (ch >> b) & 1);
delayMicroseconds(50); // let the multiplexer settle
return analogRead(A0);
}
void setup() {
for (byte i = 0; i < 3; i++) pinMode(SEL[i], OUTPUT);
for (byte i = 0; i < 8; i++) pinMode(LED[i], OUTPUT);
pinMode(BTN, INPUT_PULLUP);
}
void loop() {
for (byte s = 0; s < 8; s++) {
if (!digitalRead(BTN) && millis() - lastBtn > 300) { running = !running; lastBtn = millis(); }
if (!running) { noTone(BUZZ); for (byte i = 0; i < 8; i++) digitalWrite(LED[i], LOW); delay(50); s = 7; continue; }
for (byte i = 0; i < 8; i++) digitalWrite(LED[i], i == s);
int pot = readStep(s); // 0 to 1023
int note = map(pot, 0, 1023, 0, 14);
int stepMs = map(analogRead(A2), 0, 1023, 80, 600); // tempo: step length in milliseconds
tone(BUZZ, NOTES[note], stepMs * 8 / 10); // note lasts 80 percent of the step, then a short gap
delay(stepMs);
}
}Test checklist
What you should see at each check. If a reading is far off, stop and use the troubleshooting list.
| Check | Expected |
|---|---|
| Turn a pot | That step's pitch changes |
| LEDs | A light runs along the eight steps |
| Tempo knob | Faster and slower loop |
| Button | Stops and starts the sequence |
If it does not work
Pots interfere
Check the INH pin goes to ground and the pot ends are on 5 V and GND.
Wrong step order
Check the A, B, C pins against the X0 to X7 order.
Quiet sound
Use a passive buzzer and a short wire.
Notes click
Lengthen the gap between notes.
Still stuck? Find the fault step by step with your multimeter →
Common questions
What parts do I need for the 8-step sequencer synth?
Arduino Nano, Potentiometer 10 kΩ × 9, LED 5 mm red × 8, Resistor 220 Ω × 8, CD4051 analog multiplexer, Passive buzzer, Tactile push button 6 mm, Breadboard 830 Tie Points and Jumper wires male to male (40 pcs, 20 cm).
How long does the 8-step sequencer synth take to build?
About 150 minutes for a intermediate maker, in 7 steps.
How do I know the 8-step sequencer synth works?
Turn a pot: That step's pitch changes. LEDs: A light runs along the eight steps. Tempo knob: Faster and slower loop.
Pots interfere: what should I check?
Check the INH pin goes to ground and the pot ends are on 5 V and GND.
Wrong step order: what should I check?
Check the A, B, C pins against the X0 to X7 order.
Quiet sound: what should I check?
Use a passive buzzer and a short wire.
Notes click: what should I check?
Lengthen the gap between notes.
