Skip to main content
Version: FILS English

Adaptive Sunrise Alarm & Ambient Monitor

A web-managed, dual-architecture smart clock that features asynchronous timekeeping, environmental sensing and a light-and-sound wake-up sequence.

info

Student: Stuparu Alessia-Ștefania
GitHub Repository: https://github.com/UPB-PMRust-Students/fils-project-2026-alessiastuparu

1. Project Description

I am implementing an internet-connected alarm that features a dashboard for management, an internal asynchronous software RTC and a hardware interface that handles tactile button inputs while triggering a LED ring, a buzzer, and an MP3 audio module.

The system is split into 2 parts: a Wi-Fi-enabled chip that handles networking and UI, while an ARM-Cortex-M33 manages hardware tasks such as turning on the LED ring, sensors and audio outputs.

2. Motivation

I chose to do this project because I wanted to build a practical, daily-use tool while learning about cross-architecture communication and asynchronous embedded Rust. By using the RP2350 and STM32U5, I can better grasp the concepts of memory safety, state synchronization and custom protocol design.

3. Architecture

The system relies on two microcontrollers that work at the same time and communicate via a hardware UART bridge:

  • The Raspberry Pi Pico 2W: Represents the networking layer as it hosts an Embassy-based web server to receive user commands via HTTP.
  • STM32: Represents the control layer as it manages alarm state, local timekeeping, physical button inputs, and peripheral driving.
  • Communication Protocol: To keep the two chips in sync, I am using the postcard serialization format so that commands sent from the Pico 2W to the STM32 are interpreted without data corruption or memory errors.

Architecture Diagram

4. Log

Weeks 1-7

  • Came up with the idea for the project and did needed research.
  • Finished the project proposal and selected hardware components.
  • Made final changes to the hardware part and ordered components.

Week 8

  • Set up the Cargo workspace for both of the architectures so it handles cross-compiling.
  • Designed the behavior of the chips and what each of them handles.
  • Created a shared directory library so that specific commands are understood by both chips.

Week 9

  • Programmed the Pico 2W so that it acts like a Wi-Fi server and created the HTML/JS website.
  • Established the UART serial connection so the Pico W can send data to the STM32.
  • Programmed the STM32 to multitask. It ticks a clock in the background while listening for new commands, all while using a Mutex to share memory between tasks.
  • Completed the Documentation Milestone.

5. Hardware

The system uses a Nucleo STM32U545RE-Q as the main controller, a Raspberry Pi Pico 2W for Wi-Fi networking and web hosting, a 1.8" TFT LCD for time and temperature visualization, a BME280 sensor for environmental monitoring, a WS2812B LED ring for sunrise simulation, an active buzzer and a DFPlayer Mini with a 3W speaker for audible alarms and tactile buttons for manual hardware control.

6. Bill of Materials

DeviceUsagePrice
Raspberry Pi Pico 2WWi-Fi network and web server hub39.66 RON
GroundStudio BME280 3V3Temperature and Humidity monitoring (I2C)32.67 RON
DFPlayer Mini MP3 PlayerDecodes and plays MP3 audio files for the alarm13.98 RON
Mini Speaker 3W 8 OhmAudio output for the DFPlayer16.67 RON
MicroSD Card (8GB-32GB)Stores MP3 files for the DFPlayer32 RON
Active Buzzer KY-012Backup audible alarm trigger13.21 RON
1.8" LCD TFT SPI ST7735Digital clock and UI display19.18 RON
WS2812B LED Ring (16 LEDs)RGB LED ring for sunrise simulation35.80 RON
Tactile Buttons 6x6x5mmPhysical inputs for snooze and alarm cancel17.62 RON
Breadboard 830 puncte MB-102Hardware prototyping base21.18 RON
MB102 Breadboard Power SupplyRegulates 3.3V/5V power for the breadboard rails4.69 RON
9V 1A Power AdapterMain wall power source for the breadboard8.99 RON
Dupont Wires (M-M & M-F)Hardware interconnections19.24 RON
Nucleo STM32U545RE-QMain logic and peripheral controller140 RON

7. Software

LibraryDescriptionUsage
embassy-stm32Hardware abstraction for STM32Used for configuring SPI, I2C, UART, and GPIO (for the tactile buttons) on the Nucleo
embassy-rpHardware abstraction for Pico 2WUsed for configuring the RP2350 peripherals
postcardno_std message serializationUsed to safely pack and unpack UART network commands between the two chips
cyw43Pico W Wi-Fi driverUsed to establish the wireless network connection
embassy-netAsynchronous network stackUsed to serve the HTTP dashboard to the user
st7735-lcdSPI display driverUsed for drawing the clock UI and temperature to the 1.8" TFT screen
bme280-rsI2C sensor driverUsed to read room temperature and humidity
smart-ledsAddressable LED APIUsed to control the WS2812B ring for the sunrise simulation
dfplayerUART driver for DFPlayer MiniUsed to trigger MP3 audio playback for the alarm
  1. Embassy Framework Documentation
  2. Postcard Protocol Specification
  3. The Rust on Embedded Devices Book
  4. DFPlayer Mini Manual & AT Commands
  5. ST7735 Display Datasheet