All Projects

Case Study

Multi-Functional Light Source

STM32-controlled multi-functional light source with white LED flashlight/emergency modes and RGB mood lighting. Buttons, slider, and trackpad input with UART communication and a custom PCB in KiCAD.

EmbeddedSTM32KiCAD
01

Problem

Second-year embedded systems project: design, build and program a useful consumer-style device end-to-end. Goal wasn't just to get an LED blinking on a devkit — it was to take a full product from schematic to PCB to firmware, with a real user interface and multiple operating modes.

02

Approach

Designed a multi-mode lamp: a white-LED flashlight and emergency-strobe mode for utility, plus an RGB channel for mood lighting. Interaction uses three input modalities — tactile buttons for mode switching, a slider for brightness, and a capacitive trackpad for colour selection in RGB mode — all feeding into an STM32 acting as the brain.

The whole thing runs on a custom PCB designed in KiCAD so the project covered schematic capture, layout, manufacture and bring-up — not just software.

03

Technical Details

STM32 microcontroller reading buttons (GPIO), slider (ADC) and trackpad (I2C) on its input side; driving RGB and white LED channels via PWM on its output side; and speaking UART to a host for debug and command input. Custom two-layer PCB designed in KiCAD with power regulation, LED current-limiting, decoupling and header breakouts for reprogramming.

Firmware written in C against the STM32 HAL. State machine manages mode transitions; PWM duty cycles drive brightness and colour; I2C polling reads the trackpad; UART commands provide a serial console for testing.

04

Outcome

Hand-assembled the PCB, flashed and debugged the firmware, and demonstrated all three modes (flashlight, emergency, RGB mood) working from the same hardware. The project was the first time I had sole ownership of a PCB from schematic to solder joint — the workflow carries through to the embedded Linux board-bring-up work I did later at BATTALION.

Tech Stack

STM32CSTM32 HALKiCADI2CPWMUARTADCPCB Design