Alarm Clock
An embedded alarm clock using Raspberry Pi Pico that displays time/date and lets you set alarms/timer using buttons.
Author: Anastasia Luca
GitHub Project Link: https://github.com/UPB-PMRust-Students/proiect-anastasia-luca
Description
An intelligent alarm clock that greets your mornings with a warm message, gently raises the volume of your wake-up melody, and transforms the “Wake up!” moment into a more pleasant experience. It allows easy alarm setting through a minimalist interface and clearly signals when the alarm is set, also includes a basic countdown timer.
Motivation
I chose to build an alarm clock because it solves a common student need: waking up reliably and gently each day. But most importantly: it helps us develop practical skills like planning, prioritizing, and turning an idea into a real, useful product — skills we’ll need in our future careers.
Architecture
The intelligent alarm clock is driven by the Raspberry Pi Pico, which coordinates the system's behavior through a continuous loop of reading inputs, updating outputs, and managing time-based events. Here's how they operate with each other:
- Raspberry Pi Pico: The core of the system. It reads inputs from the buttons and the RTC, processes the logic for display, and controls the outputs: the screen, buzzer, and LED.
- RTC DS3231 – Continuously tracks the current time and provides it to the Pico via the I2C interface, even when the system is powered off.
- The LCD display - Displays time, date, and other information such as setting screens or messages, based on Pico’s commands.
- Four Buttons – Used for user input:
- Mode → switches between modes (Clock – displays current time/date, Set Timer, Set Alarm, Set Clock & Date)
- Up / Down → modifies the values (minutes, hours, etc.)
- Confirm → saves the current value and moves to the next step (e.g., from hour to minute)
- Red LED is turned on by the Pico when the alarm is active.
- Alarm Alert – The Pico activates the buzzer to produce an audible signal when the current time matches the set alarm, using PWM to gradually increase the sound's intensity until the alarm is turned off.
- Battery Pack – Provides power to the entire system, making it portable.
Log
Week 5 - 11 May
Week 12 - 18 May
Week 19 - 25 May
Hardware
The hardware used in this project includes the following essential compnpm audit fix --forceonents:
- 2x Raspberry Pi Pico 2W (one for debugging)
- 1x DS3231 RTC Module
- 1x LCD Display 1602 wih I²C Module and Yellow-Green Backlight
- 4x Push Buttons
- 1x Passive Buzzer (5V)
- 1x Red LED (5mm)
- 1x 3×AA R6 Battery Supply
Schematics
Bill of Materials
Device | Usage | Price |
---|---|---|
Raspberry Pi Pico 2W (2x) | The microcontroller | 79.32 RON |
RTC Module | Real Time Clock | 15.98 RON |
LCD Display 1602, I²C, Yellow-Green Backlight | Display with I²C interface | 14.99 RON |
Push Button (4x) | User input controls | 1.80 RON |
Passive Buzzer 5V | Audible alarm output | 1.40 RON |
Red LED 5mm (1x) | Indicates active alarm state | 0.39 RON |
3×AA R6 Battery Case | Holds 3 AA batteries | 8.00 RON |
3×AA Batteries | Powers the system (4.5 V total) | 10.00 RON |
Breadboard | For assembling the prototype | 14.28 RON |
Resistor 220Ω (1x) | Current limiter for the LED | 0.10 RON |
Colored 40p 2.54 mm Pitch Male Pin Header - Yellow (2x) | For mounting the PICO on breadboard | 1.98 RON |
Jumper Wires (Male to Male, 10pcs - 20cm, 10pcs - 10cm) | Connections on breadboard | 5.38 RON |
Jumper Wires (Male to Female, 20pcs, 20cm) | Connections breadboard - components | 3.99 RON |
Software
Library | Description | Usage |
---|---|---|
ds323x | DS3231 RTC Rust library | For reading/writing time over I2C |
ag-lcd | LCD driver library | To control LCD via I2C |
embassy-rp | Peripheral access library | Access to GPIOs, I2C, PWM, clocks, etc. |
embassy-time | Async timers and delays | Used for delays, alarms, and countdown logic |