← All projects

2021 · ECE 299 · Design Project I · Team of 2

STM32 Alarm Clock — PCB to Enclosure

My first complete product build: a working alarm clock with STM32F4 firmware, a custom two-layer PCB designed in KiCad and fabricated by Seeed, and a Tamagotchi-inspired enclosure modeled in SolidWorks.

SolidWorks render of the alarm clock enclosure with a display window and five side buttons
SolidWorks enclosure — display window, five control buttons, wall-mount keyhole on the back.

Overview

The clock does everything a bedside unit should: it keeps time on the STM32's RTC, shows it on a four-digit 7-segment LED display, and lets you set the time and an alarm through five push buttons — with snooze and off behaviors, and a light-based alarm driven through an N-channel MOSFET. The firmware (~1,300 lines of C on the STM32F4 HAL) handles 12/24-hour formats, display multiplexing, debounced inputs, and the alarm state machine.

The hardware side was the real lesson: current-limit calculations for the display segments, a MOSFET driver for the alarm light, and routing it all on a 99 × 70 mm two-layer board in KiCad. We generated Gerbers, had the board fabricated by Seeed Technology, and assembled and brought it up ourselves — then closed the loop with a SolidWorks enclosure sized to the finished board.

Highlights

KiCad PCB layout of the alarm clock board showing STM32 header rows, button footprints and display connections
Final PCB layout in KiCad — STM32 header, five buttons, display drive, and the MOSFET stage.
STM32F4 · HAL C KiCad PCB bring-up SolidWorks 7-segment display

Files & downloads