Skip to the content
2 layers71.5 × 73.5 mmPomodoro, the printed circuit board in 3D

A Pomodoro timer built on an ESP32: 25 min focus, 5 min short break, and a 10 min long break every 4th cycle. Progress is shown on a TM1637 MM:SS display, a focus/break LED pair, a single 7-segment digit showing the…

Size
71.5 × 73.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
11
Nets
40
Pads
70
Tracks, vias
141, 0
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
23 Jul 2026
Updated
23 Aug 2026

Overview

Pomodoro is an open-source printed circuit board by oguzmum, from the oguzmum/esp32-pomodoro repository on GitHub. It is a 2-layer board of 71.5 × 73.5 mm with 11 parts on 40 nets, routed with 141 tracks and 0 vias.

It is built around the KCSC02-105. Its parts include 2 resistors and 1 IC.

Main components

1

README

README.md

ESP32 Pomodoro Timer

A Pomodoro timer built on an ESP32: 25 min focus, 5 min short break, and a 10 min long break every 4th cycle. Progress is shown on a TM1637 MM:SS display, a focus/break LED pair, a single 7-segment digit showing the current cycle (1-4), and a passive buzzer on phase changes.

Pomodoro hardware with ESP32

Features

  • Centisecond-resolution countdown per phase, displayed as MM:SS
  • Standard Pomodoro cycle: FOCUS (25min) -> SHORT_BREAK (5min), repeating; every 4th FOCUS is followed by a LONG_BREAK (10min) instead, then the cycle count wraps back to 1
  • Start/Stop button toggles between running and paused
  • Reset button returns to FOCUS, cycle 1 (only while stopped)
  • No auto-advance: when a phase's countdown hits zero, it pauses in the next phase and waits for Start/Stop to be pressed again
  • Phase LED pair shows focus vs. break at a glance
  • A single common-cathode 7-segment digit shows the current cycle (1-4) in decimal
  • Passive passive buzzer beeps on every phase change: 2 short beeps when focus ends (break starting), 1 longer beep when a break ends (focus starting)
  • Timekeeping runs on a hardware timer interrupt (esp_timer, ~10 ms tick), not millis() polling in loop(), so display refresh or button handling can never skew the measured time
  • Both buttons are read via GPIO interrupts (attachInterrupt) with timestamp-based debouncing done inside the ISR

StopwatchCore (the original count-up stopwatch) is still in the repo under lib/StopwatchCore/ but is no longer wired up in main.cpp -- PomodoroCore replaced it as the active timer.

Hardware

ComponentNotes
ESP32 DevKit (generic)Any generic ESP32 dev board
TM1637 4-digit display2-wire protocol (CLK/DIO), not I²C
2x momentary push buttonWired to GND, using internal pull-ups
2x LED + 330Ω resistorFocus / Break phase indicator
1x 7-segment digit (common cathode, e.g. 5161AS)Cycle number (1-4)
1x passive passive buzzerPhase-change beep, driven via tone()

Wiring

SignalESP32 GPIONotes
TM1637 CLK22PIN_TM1637_CLK in include/PinConfig.h
TM1637 DIO23PIN_TM1637_DIO in include/PinConfig.h
TM1637 VCC3V3
TM1637 GNDGND
Start/Stop button18PIN_BTN_START_STOP; other leg to GND
Reset button4PIN_BTN_RESET; other leg to GND
LED Focus2PIN_LED_FOCUS; short leg to GND via resistor
LED Break15PIN_LED_BREAK; short leg to GND via resistor
7-seg segment a5PIN_SEG_A
7-seg segment b16PIN_SEG_B
7-seg segment c32PIN_SEG_C
7-seg segment d26PIN_SEG_D
7-seg segment e25PIN_SEG_E
7-seg segment f19PIN_SEG_F
7-seg segment g21PIN_SEG_G
7-seg segment dp33PIN_SEG_DP
7-seg COM (both)GNDcommon cathode, not a GPIO
Buzzer +27PIN_BUZZER; - leg to GND

Buttons need no external resistors, both are configured with the ESP32's internal pull-ups (INPUT_PULLUP), so they read HIGH when idle and LOW when pressed. Avoid GPIO34-39 for buttons (and for anything else that needs to be an output, like the 7-segment segments): those pins are input-only and have no internal pull-up/output driver on the ESP32.

The 2 discrete LEDs: short leg (cathode) to GND, long leg (anode) through a 330Ω resistor to the GPIO pin. For yellow I removed the resistor, as the LED didn't lit up. But you can also go lower (150-220Ω) if a color looks too dim.

7-segment digit: it's common cathode, so both COM pins go straight to GND; each segment pin (a-g, dp) goes through its own ~330Ω resistor to its GPIO, driven HIGH to light up.

All pin numbers live in one place: include/PinConfig.h.

Architecture

PomodoroCore owns an esp_timer periodic callback (~10 ms) that decrements a centisecond countdown, plus the phase/cycle state machine:

mermaid
stateDiagram-v2
    [*] --> IDLE
    IDLE --> RUNNING: start
    RUNNING --> PAUSED: stop
    PAUSED --> RUNNING: start
    RUNNING --> PAUSED: countdown hits 0 (auto, advances phase)
    PAUSED --> IDLE: reset

Phase transitions themselves:

mermaid
stateDiagram-v2
    FOCUS --> SHORT_BREAK: focus ends, cycle < 4
    FOCUS --> LONG_BREAK: focus ends, cycle == 4
    SHORT_BREAK --> FOCUS: break ends, cycle += 1
    LONG_BREAK --> FOCUS: break ends, cycle = 1

The timer callback does the absolute minimum (decrement the countdown) and is the only writer of the countdown value, so plain volatile is enough there without a mutex. Phase/cycle/state changes, however, are only ever applied from PomodoroCore::update(), which must be called once per loop() iteration -- this keeps those fields single-writer from the main loop's perspective, same as toggleStartStop()/reset().

ButtonHandler wraps one GPIO pin each: attachInterrupt fires on the falling edge, and the ISR itself only compares timestamps and sets a volatile flag, with no debounce delays or business logic running in interrupt context. main.cpp polls consumePress() once per loop iteration and forwards debounced presses to PomodoroCore.

PomodoroIndicators drives the focus/break LED pair and owns a CycleSevenSegment (raw GPIO-per-segment driver for the common-cathode digit) to show the cycle number. It has no knowledge of PomodoroCore's internals beyond the PomodoroPhase enum and the current cycle number -- main.cpp detects phase changes (comparing the current phase against the last one shown) and pushes updates to it.

Buzzer wraps tone() for two short blocking beep patterns (focus-end vs. break-end). Only called on phase transitions, a few times per hour, so the brief blocking delay for the beep pattern doesn't affect responsiveness elsewhere.

Display is accessed only through the abstract IDisplay interface (showTime(uint32_t centiseconds), begin(), setBrightness(), clear()). Tm1637SegmentDisplay is the only concrete implementation today; adding e.g. an OledDisplay means writing one new class, PomodoroCore and main.cpp's control flow don't change. showTime() works unchanged for a countdown -- it just renders whatever centisecond value it's given as MM:SS.

Program Flow (loop())

mermaid
flowchart TD
    Start([loop iteration]) --> BtnStart{Start/Stop pressed?}
    BtnStart -- yes --> Toggle[pomodoro.toggleStartStop]
    BtnStart -- no --> BtnReset
    Toggle --> BtnReset{Reset pressed?}

    BtnReset -- yes --> DoReset[pomodoro.reset]
    DoReset --> SyncLeds["sync lastPhase + LEDs immediately (no beep)"]
    SyncLeds --> Update
    BtnReset -- no --> Update[pomodoro.update]

    Update --> ReadPhase[phase = pomodoro.getPhase]
    ReadPhase --> Changed{phase != lastPhase?}

    Changed -- yes --> IsFocus{phase == FOCUS?}
    IsFocus -- yes --> BeepBreakEnd[buzzer.beepBreakEnd]
    IsFocus -- no --> BeepFocusEnd[buzzer.beepFocusEnd]
    BeepBreakEnd --> ShowLeds["indicators.showPhase + showCycle"]
    BeepFocusEnd --> ShowLeds
    ShowLeds --> UpdateLast[lastPhase = phase]
    UpdateLast --> ShowTime
    Changed -- no --> ShowTime["display.showTime(remaining)"]

    ShowTime --> Delay["delay(50ms)"]
    Delay --> Start

pomodoro.update() is what actually drives auto-pausing at the end of a phase (see the state diagram above); the phase-change check right after it is only there to trigger the LEDs/buzzer exactly once per transition, whether that transition came from update() (countdown hit 0) or from a manual reset.

Building

This is a PlatformIO project.

bash
# Build
pio run

# Build and upload
pio run --target upload

# Serial monitor
pio device monitor

Parts

11
QtyValueFootprintReferences
2Conn_01x19Connector_PinSocket_2.54mm:PinSocket_1x19_P2.54mm_VerticalEsp32, Esp3222
2RResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR5, R6
2SW_PushButton_Switch_THT:SW_PUSH_6mmReset1, Start/Stop1
1BuzzerBuzzer_Beeper:Buzzer_12x9.5RM7.6BZ1
1Conn_01x04Connector_PinSocket_2.54mm:PinSocket_1x04_P2.54mm_VerticalTM167Timer1
1KCSC02-105Display_7Segment:5161asU2
1LED_GreenLED_THT:LED_D5.0mmFokus1
1LED_RedLED_THT:LED_D5.0mmPause1

Similar boards

  • 2 layers482.6 × 35.6 mmPrecision clock, the printed circuit board in 3D

    Precision clock

    mitxela/PrecisionClock-Hardware

    PCB design for the Precision Clock Mk III

    49 parts41
  • 2 layers152.9 × 74.9 mmClock, the printed circuit board in 3D

    Clock

    erikvanzijst/clock

    24H digital quartz clock from scratch

    82 parts21
  • 2 layers196.7 × 31.5 mmClock, the printed circuit board in 3D

    Clock

    Matir/hacks

    Miscellaneous Hacks

    90 parts18BSD-2-Clause
  • 2 layers76.2 × 50.8 mmLathe RPM Display, the printed circuit board in 3D

    Lathe RPM Display

    bytesizedengineering/Lathe_RPM_Display

    DIY Digital Readout For Wood Lathe

    25 parts5
  • 4 layersEXWatch retrodigital, the printed circuit board in 3D

    EXWatch retrodigital

    bsastudio601/RetroDigitalWristWatchO1

    A Retro Futuristic wrist watch inspired from nixie tube wrist watch.

    18 parts
  • 4 layers51.9 × 108.5 mmESP 32 Battle 4h, the printed circuit board in 3D

    ESP 32 Battle 4h

    samcwitte/PCB-Design-Battle

    This is a repository containing my PCB designs for a 2-hour PCB battle I participated in with Predictable Designs on YouTube.

    70 partsMIT

Questions

How big is the Pomodoro PCB?

It measures 71.5 × 73.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Pomodoro use?

11 parts, built around the KCSC02-105. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Pomodoro KiCad files?

From the oguzmum/esp32-pomodoro repository on GitHub, at the commit this page was made from: the board is PCB-Design-pomodoro/pomodoro.kicad_pcb and its schematic PCB-Design-pomodoro/pomodoro.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Pomodoro design in my own project?

Its repository states no licence, so its author keeps all rights: ask oguzmum before reusing the design.