Build it step by step
0 of 8 doneWire the buttons
Four buttons from D2 to D5 to GND.
Wire the lights
Four LEDs with 220 ohm on D6 to D9.
Wire the buzzer
D10 and GND.
Wire the reset
D11 and GND.
Upload the sketch
A ready beep sounds.
Press one button
Its light stays on, others are locked out.
Press the reset
Lights off, new round.
Test fairness
Press two buttons together and see who wins.
How do you build a quiz buzzer box?
Four big buttons and four lights show which player pressed first, lock the others out, beep once, and a reset button readies the next round. You need Arduino Nano, Tactile push button 12 mm with cap × 4, LED 5 mm red × 4, Resistor 220 Ω × 4, Passive buzzer, Tactile push button 6 mm, Jumper wires male to male (40 pcs, 20 cm) and Breadboard 830 Tie Points. It takes 8 steps and about 120 minutes.
- Level
- Beginner
- Time
- About 120 min
- Parts
- 8
Parts list
- Development BoardsBuyArduino Nano × 1
- SwitchesBuy
- SemiconductorsBuyLED 5 mm red × 4
- PassivesBuyResistor 220 Ω × 4
- 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 |
|---|---|---|
| Player 1 button | Nano D2 and GND | Pressed pulls D2 low |
| Player 2 button | Nano D3 and GND | Pressed pulls D3 low |
| Player 3 button | Nano D4 and GND | Pressed pulls D4 low |
| Player 4 button | Nano D5 and GND | Pressed pulls D5 low |
| Player LEDs anodes | 220 ohm to Nano D6, D7, D8, D9 | One light per player |
| All four LED cathodes | Nano GND | Common ground |
| Passive buzzer positive | Nano D10 | Winner beep |
| Passive buzzer negative | Nano GND | Common ground |
| Quiz master reset button | Nano D11 and GND | Clears the lock for the next round |
Code
A quiz buzzer has to decide who pressed first, and the board can do that by checking the four buttons one after another in a very fast loop. The first button found pressed is the winner, its light stays on, a beep sounds, and the loop stops checking the other buttons, so later presses are locked out. Each button goes between an input pin and ground and uses the internal pull-up resistor, so a pin reads high until it is pressed. The loop runs in a few tens of microseconds, so two presses must be closer together than that to be a tie, and in that case the player with the lower pin number wins, which is something to mention to the players. The quiz master's reset button clears the winner, turns the lights off, gives a short ready beep and waits a moment so the button can be released. Use 12 millimetre buttons with caps so they are easy to hit, and keep the wires long enough to place each player at a comfortable distance. Passive buzzers need a tone signal, which the sketch produces with the tone function.
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).
const int BTN[4] = {2, 3, 4, 5};
const int LED[4] = {6, 7, 8, 9};
const int BUZZ = 10, RESET_BTN = 11;
bool locked = false;
int winner = -1;
void armRound() {
locked = false;
winner = -1;
for (int i = 0; i < 4; i++) digitalWrite(LED[i], LOW);
tone(BUZZ, 1500, 60); // short "ready" beep
delay(300); // let the reset button be released
}
void setup() {
for (int i = 0; i < 4; i++) {
pinMode(BTN[i], INPUT_PULLUP);
pinMode(LED[i], OUTPUT);
}
pinMode(RESET_BTN, INPUT_PULLUP);
Serial.begin(9600);
armRound();
}
void loop() {
if (!locked) {
for (int i = 0; i < 4; i++) {
if (digitalRead(BTN[i]) == LOW) { // first button seen wins
winner = i;
locked = true;
digitalWrite(LED[i], HIGH);
tone(BUZZ, 880, 400);
Serial.print("Player "); Serial.print(i + 1); Serial.println(" was first");
break;
}
}
}
if (digitalRead(RESET_BTN) == LOW) {
armRound();
}
}Test checklist
What you should see at each check. If a reading is far off, stop and use the troubleshooting list.
| Check | Expected |
|---|---|
| Power on | Short ready beep, all lights off |
| Player 2 presses first | Light 2 on and a beep |
| Other players press afterwards | Nothing changes |
| Reset pressed | Lights off and ready beep |
| Serial monitor | Player number printed at each win |
If it does not work
No lights
Check LED direction and the 220 ohm resistors.
A button does nothing
Check its wire reaches GND and the correct pin.
Resets by itself
Check the reset wire is not touching a player wire.
No beep
Use a passive buzzer on D10.
Two lights come on
Reset and check there is a locked flag in the sketch.
Still stuck? Find the fault step by step with your multimeter →
Common questions
What parts do I need for the quiz buzzer box?
Arduino Nano, Tactile push button 12 mm with cap × 4, LED 5 mm red × 4, Resistor 220 Ω × 4, Passive buzzer, Tactile push button 6 mm, Jumper wires male to male (40 pcs, 20 cm) and Breadboard 830 Tie Points.
How long does the quiz buzzer box take to build?
About 120 minutes for a beginner maker, in 8 steps.
How do I know the quiz buzzer box works?
Power on: Short ready beep, all lights off. Player 2 presses first: Light 2 on and a beep. Other players press afterwards: Nothing changes.
No lights: what should I check?
Check LED direction and the 220 ohm resistors.
A button does nothing: what should I check?
Check its wire reaches GND and the correct pin.
Resets by itself: what should I check?
Check the reset wire is not touching a player wire.
No beep: what should I check?
Use a passive buzzer on D10.
