Skip to main content
Version: ACS CC

PiBuzz

A multifunctional device which serves as a custom alarm clock, equipped with environmental sensors.

info

Author: Samson Alexandru-Valentin
GitHub Project Link: https://github.com/UPB-PMRust-Students/proiect-sammsonn

Description

A device that has the main functionality of a digital clock displayed on a screen with an alarm function, operated by physical buttons. The alarm has a snooze option and would sing a song loaded from an external audio file. The product is also equipped with a pressure and temperature sensor to observe the environmental conditions surrounding it. Aditionally, a light sensor is used in order to automatically adjust the brightness of the display.

Motivation

This project is inspired by a real world problem of mine, and it probably affects a lot of the current population, especially teenagers and young adults. When going to bed, I always take my phone with me and end up scrolling mindlessly for 1-2 hours. This has a very negative impact on my sleep, which is way more important than most think. But the main reason why I have my phone next to me in bed is because I use it as an alarm in order to wake up. This is also bad because the phone can overheat under the pillow, causing potential damage, and there is also the concern of EMF radiation exposure when keeping your cell phone close to the head for extended periods of time. So, building this clock by hand I can get rid of all these problems, removing the need of my smartphone at night.

Architecture

architecture

Log

Week 5 - 11 May

TODO

Week 12 - 18 May

TODO

Week 19 - 25 May

TODO

Hardware

The main hardware is the Raspberry Pi Pico 2W microcontroller, which provides processing and Wi-Fi connectivity. A DS3231 RTC module is used for precise timekeeping. Environmental sensors include a BMP280 (temperature, pressure) and a BH1750 (ambient light, for automatic display adjustment). The user interface consists of an ILI9341 (2.4 inch) color LCD for display and touch buttons for control. The audio alarm is handled by a DFPlayer Mini module that plays MP3 files from an SD card, with the sound being output through a speaker. The components are interconnected on a breadboard using jumper wires and well powered.

Schematics

TODO: KiCad schematics.

Bill of Materials

DeviceUsagePrice
Raspberry Pi Pico 2WThe microcontroller40 RON x 2
DS3231RTC module19 RON
BMP280Pressure and temperature sensor8.5 RON
BH1750Light intensity sensor10.4 RON
DFPlayer MiniMP3 module14 RON
40mm Speaker8 ohms 0.5W speaker2.75 RON
Button12x12x7.3 button1.31 RON x 4
Button Cap12x12x7.3 button cap, multiple colors0.4 RON x 4
Breadboard HQBreadboard with 830 slots10 RON
Electrolitic Condenser47 uF, 50 V condenser0.5 RON
Pin Header2.54mm (40p) pin header1 RON
Male-Male Wire Set10p, 10cm male-male wires2.85 RON
Female-Male Wire Set40p, 10cm female-male wires6 RON
Female-Male Wire Set40p, 15cm female-male wires8 RON

Software

LibraryDescriptionUsage
rp-pico-hal / embassy-rpHardware Abstraction Layer (HAL) for RP2040 microcontroller.Provides fundamental access to peripherals: GPIO, I2C, SPI, UART, PWM, Timers etc.
embassy-executorAsynchronous runtime executor for embassy.Managing concurrent tasks (e.g., reading sensors, updating display).
panic-probe / panic-haltPanic handler implementation.Defines behavior on program panic.
defmt / defmt-rttEfficient logging framework for embedded systems.Useful for debugging output over a debug probe.
ds3231Driver for DS3231 Real-Time Clock module.Reading/setting current time and date via I2C.
bmp280Driver for BMP280 Pressure & Temperature sensor.Reading temperature and pressure values via I2C.
bh1750Driver for BH1750 Ambient Light sensor.Reading ambient light level (Lux) via I2C.
ili9341Display driver for ILI9341 LCD controller.Sending commands and pixel data to the LCD display via SPI.
(HAL UART)UART communication capability provided by the HAL.Sending serial commands to the DFPlayer Mini module.
(HAL GPIO)GPIO input capability provided by the HAL.Reading the state of the physical buttons.
(HAL PWM)PWM output capability provided by the HAL.Controlling the brightness of the LCD backlight.
embedded-graphics2D graphics library for embedded displays.Drawing shapes, text, and UI elements onto the ILI9341 display.
embedded-graphics-textText rendering capabilities and font data.Displaying time, date, sensor data, and menu text.
debouncrUtility for debouncing digital inputs (buttons).Preventing multiple triggers from a single button press.
embedded-hal / embedded-ioTraits defining hardware abstraction interfaces.Used by most drivers to ensure portability across different HALs.
heaplessStatic data structures without dynamic memory allocation.Useful for buffers, queues, etc., in no_std environments.
  1. Raspberry Pi Pico - Alarm Clock Project
  2. pico-alarm-clock
  3. Raspberry Pi Pico - Alarm Clock