Build it step by step
0 of 8 doneInstall the library
Search for TM1637Display in the Library Manager.
Wire the display
CLK to D7, DIO to D8, power from 5V and GND.
Wire the three buttons
D3, D4 and D5 to GND.
Wire the buzzer
Plus to D6, minus to GND.
Upload the sketch
Display shows 00:00.
Press minutes twice and seconds once
Display shows 02:10.
Press start
It counts down each second.
Let it reach zero or pause midway
Alarm sounds at zero, pause stops the count.
How do you build a kitchen countdown timer?
A four-digit display counts down minutes and seconds, set with two buttons, and a buzzer sounds when time is up. You need Arduino Nano, TM1637 4-digit display, Tactile push button 6 mm × 3, Passive buzzer, Breadboard 830 Tie Points and Jumper wires male to male (40 pcs, 20 cm). It takes 8 steps and about 90 minutes.
- Level
- Beginner
- Time
- About 90 min
- Parts
- 6
Parts list
- Development BoardsBuyArduino Nano × 1
- DisplaysBuy
- SwitchesBuy
- Motors & ActuatorsBuyPassive buzzer × 1
- PrototypingBuy
- PrototypingBuy
Tick what you already own. It saves to My Garage, so “Build with what I have” knows.
Wiring
| From | To | Why |
|---|---|---|
| TM1637 CLK and DIO | Nano D7 and D8 | Display |
| TM1637 VCC and GND | Nano 5V and GND | Display power |
| Minutes button | Nano D3 to GND | Internal pull-up, adds a minute |
| Seconds button | Nano D4 to GND | Internal pull-up, adds ten seconds |
| Start and pause button | Nano D5 to GND | Starts, pauses and stops the alarm |
| Passive buzzer plus and minus | Nano D6 and GND | Alarm tone |
Code
The sketch is a small state machine with four states: setting, running, paused and done. In the setting state each press of the minutes button adds a minute and each press of the seconds button adds ten seconds. The start button begins the countdown, which uses millis() and steps lastTick by exactly 1000 each time, so small delays do not make the timer drift. The display shows minutes and seconds with the colon lit using the 0x40 flag. When the time reaches zero the buzzer beeps on and off until you press start or 30 seconds pass, then the timer returns to the setting state. Install the TM1637Display library by Avishay Orpaz from the Library Manager. A passive buzzer plays whatever tone you give it, while an active buzzer would make a fixed tone and ignore the frequency.
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).
#include <TM1637Display.h>
TM1637Display disp(7, 8); // CLK, DIO
const uint8_t B_MIN = 3, B_SEC = 4, B_GO = 5, BUZ = 6;
enum State { SETTING, RUNNING, PAUSED, DONE };
State state = SETTING;
long remaining = 0; // seconds left
unsigned long lastTick = 0;
unsigned long alarmStart = 0;
bool pressed(uint8_t pin, uint8_t idx) {
static bool prev[8] = {HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH};
bool now = digitalRead(pin);
bool hit = (prev[idx] == HIGH && now == LOW);
prev[idx] = now;
if (hit) delay(25); // simple debounce
return hit;
}
void show() {
int mins = remaining / 60;
int secs = remaining % 60;
disp.showNumberDecEx(mins * 100 + secs, 0x40, true); // 0x40 lights the colon
}
void setup() {
pinMode(B_MIN, INPUT_PULLUP);
pinMode(B_SEC, INPUT_PULLUP);
pinMode(B_GO, INPUT_PULLUP);
pinMode(BUZ, OUTPUT);
disp.setBrightness(5);
show();
}
void loop() {
switch (state) {
case SETTING:
if (pressed(B_MIN, 3) && remaining < 99 * 60) remaining += 60;
if (pressed(B_SEC, 4)) remaining = min(remaining + 10, 99L * 60 + 59);
if (pressed(B_GO, 5) && remaining > 0) { state = RUNNING; lastTick = millis(); }
show();
break;
case RUNNING:
if (millis() - lastTick >= 1000) {
lastTick += 1000;
remaining--;
show();
if (remaining <= 0) { state = DONE; alarmStart = millis(); }
}
if (pressed(B_GO, 5)) state = PAUSED;
break;
case PAUSED:
if (pressed(B_GO, 5)) { state = RUNNING; lastTick = millis(); }
if (pressed(B_MIN, 3)) { remaining = 0; state = SETTING; show(); } // minutes button clears
break;
case DONE: {
bool on = ((millis() - alarmStart) / 300) % 2 == 0;
if (on) tone(BUZ, 2000); else noTone(BUZ);
if (pressed(B_GO, 5) || millis() - alarmStart > 30000) {
noTone(BUZ);
state = SETTING;
show();
}
break;
}
}
}Test checklist
What you should see at each check. If a reading is far off, stop and use the troubleshooting list.
| Check | Expected |
|---|---|
| Press minutes once | 01:00 |
| Press seconds three times | 00:30 added |
| Start and wait 10 seconds | Display falls by 10 |
| Pause and wait | Time does not change |
| Reach 00:00 | Buzzer beeps until start is pressed |
If it does not work
Display blank
Check CLK and DIO are not swapped and the library is installed.
Timer runs fast or slow
Check that no long delay() calls were added to the loop.
Buttons add more than one step
Increase the 25 ms debounce delay.
Buzzer silent
Use a passive buzzer with tone(), and check its polarity.
Colon missing
Use showNumberDecEx with the 0x40 flag as shown.
Still stuck? Find the fault step by step with your multimeter →
Common questions
What parts do I need for the kitchen countdown timer?
Arduino Nano, TM1637 4-digit display, Tactile push button 6 mm × 3, Passive buzzer, Breadboard 830 Tie Points and Jumper wires male to male (40 pcs, 20 cm).
How long does the kitchen countdown timer take to build?
About 90 minutes for a beginner maker, in 8 steps.
How do I know the kitchen countdown timer works?
Press minutes once: 01:00. Press seconds three times: 00:30 added. Start and wait 10 seconds: Display falls by 10.
Display blank: what should I check?
Check CLK and DIO are not swapped and the library is installed.
Timer runs fast or slow: what should I check?
Check that no long delay() calls were added to the loop.
Buttons add more than one step: what should I check?
Increase the 25 ms debounce delay.
Buzzer silent: what should I check?
Use a passive buzzer with tone(), and check its polarity.
