Skip to main content
Version: FILS English

PeekAlert

A smart light-based alert system with WiFi connectivity.

info

Author: Nour Al Houda Mahfood
GitHub: PeekAlert Repository


Description

PeekAlert is a light-activated alert system that detects unusual lighting conditions (like someone peeking through a door or curtain) and responds by sounding a buzzer, logging the event, and displaying it on an LCD. It also offers wireless connectivity to enable remote access to logs via WiFi.

Motivation

This project is inspired by the idea of privacy and awareness in shared spaces. It provides a simple yet effective way to detect and record potential intrusions or unexpected movement using only light changes.

Architecture

The project uses two Raspberry Pi Pico 2W boards, one as the main microcontroller handling all system logic, and another as a debugger. A photoresistor (LDR) is connected to an analog pin to detect ambient light changes, triggering a buzzer when suspicious activity is detected. An LCD display, connected over SPI, shows system status and alerts, while a DS3231 RTC module communicates over I2C to timestamp events. WiFi functionality is provided through the Pico's onboard CYW43 chip.

Architecture Diagram

Log

  • Week 5 – 11 May: Initial testing of the photoresistor and buzzer modules, and implementing flash logging.
  • Week 12 – 18 May: LCD set up using SPI, and RTC integrated.
  • Week 19 – 25 May: WiFi functionality implemented for remote access to logs.

Hardware

  • Raspberry Pi Pico 2W (x2) – one used as microcontroller, one as debugger
  • 1.8'' SPI LCD (ST7735s, 128x160)
  • DS3231 RTC module (I2C)
  • Active buzzer module
  • 10kΩ resistor
  • Breadboards (400 + 830 points)
  • White 2.54mm pin headers
  • Jumper wires
  • Photoresistor (LDR) sensor
  • 6x6x6 push buttons (2 used)

Hardware

Schematics

Schematics

Bill of Materials

DeviceUsagePrice in RON
Raspberry Pi Pico 2W (x2)Microcontroller + Debugger39.66
Resistor 10KΩVoltage divider0.10
Push Button (x2)Log scroll, Sync0.72
SPI LCD Display 1.8''Visuals28.99
Active Buzzer ModuleAudio alert4.98
Jumper Wire SetConnections7.99
White Pin Header (x2)For the pico1.98
Breadboard HQ 400 PointsPrototyping4.56
Breadboard HQ 830 PointsPrototyping9.98
Photoresistor (LDR)Light detection1.90
DS3231 RTC ModuleReal-time clock18.99

Software

LibraryDescriptionUsage
embassy-rpRP2350 HAL with async supportMain async runtime and peripheral control
mipidsiGeneric TFT driverControls the ST7735s SPI display
embedded-graphicsGraphics primitives for embedded displaysDrawing text and logs
ds323xRTC interfaceInterfacing with DS3231 RTC module
heaplessFixed-size buffer and data structuresFlash log strings and buffers
embassy-syncAsync mutexes and primitivesSPI/I2C bus sharing
embassy-timeTimer and delay utilitiesTimed events and log delay control
embassy-flashFlash memory abstractionPersistent log storage
embassy-net, cyw43WiFi/network stack for remote loggingEnables wireless access to log data
defmt + panic-probeDebug logging and error handlingRTT logging/debug