PicoHome
PicoHome, powered by the Embassy framework, delivers seamless sensor-based automation, secure access control, and real-time monitoring.
Author: Elastal Yahya
GitHub Project Link: https://github.com/UPB-PMRust-Students/project-yahyaelastal
Description
The project centers on PicoHome, a smart home prototype that demonstrates key principles of intelligent automation, environmental monitoring, and secure access control. The system comprises two distinct rooms, each outfitted with temperature and light sensors to track environmental conditions in real time.
To promote energy efficiency, each room is equipped with an intelligent lighting system. Ambient light readings are used to determine the need for artificial lighting, and corresponding LEDs adjust their state automatically. This approach simulates smart lighting behavior by conserving power when natural light is sufficient.
Access control is managed through an RFID-based authentication system located at the main entrance. Upon detecting an authorized RFID tag, a servomotor simulates door actuation, while a buzzer confirms access through a distinctive tone. Unauthorized access attempts trigger a different buzzer pattern, effectively acting as an alert mechanism.
A flame sensor is positioned in the kitchen area to monitor for fire-related hazards. If triggered, the system activates an audible buzzer alert, initiating an emergency response procedure.
System status is displayed in real time on an SPI-connected LCD screen, which continuously presents sensor readings, access events, and room states. This consolidated interface offers a complete overview of the house's current condition at a glance, removing the need for manual interaction or display switching.
All subsystems operate asynchronously using the Embassy framework, enabling efficient, non-blocking task management. This allows for responsive handling of concurrent operations, such as sensor polling, actuator control, and display updates, ensuring stable performance even under simultaneous activity.
Motivation
The idea for PicoHome was inspired by my interest in architecture and my growing passion for technology. I’ve always enjoyed thinking about how spaces are designed and how they can become more comfortable and functional. When I started this course, I saw a chance to combine that curiosity with what I was learning about embedded systems and smart automation.
I wanted to create something that connects the physical structure of a house with the logic of a smart system — something that brings together design, safety, and automation in one project. PicoHome gave me the opportunity to do that in a creative and hands-on way.
This project was also a personal challenge — a way to explore how technology can be used to improve living spaces, while learning to design and build something from the ground up. It helped me see how different fields can come together to create something both useful and meaningful.
Architecture
System Layout and Design
This is the floor plan for the home:
And this is a 3D render of the house showcasing the Physical Layout of all of the sensors:
Components Overview
Room 1 & Room 2
-
Environmental Sensors:
- BMP280 Temperature Sensors (x2): Installed in each room to monitor temperature. Each sensor is connected via a dedicated I²C bus using separate GPIO pins for reliability.
- Light Sensors (x2): Measure ambient light levels to support both automatic and manual lighting control.
-
Smart Lighting System:
- LEDs (x2): Each room has a controllable LED that supports two modes:
- Ambient Mode: Automatically turns on/off based on light sensor readings.
- Manual Mode: Can be manually controlled to simulate standard room lighting.
- LEDs (x2): Each room has a controllable LED that supports two modes:
Entrance Area
- Access Control System:
- RFID RC522: Handles user authentication for entering the smart home.
- Servomotor: Acts as a door mechanism, opening the entrance upon successful tag detection.
- Buzzer: Provides audio feedback:
- Short beep for authorized access.
- Longer distinct warning tone for unauthorized access.
Kitchen Area
- Fire Detection and Alarm System
- IR Flame Sensor: Detects fire in the kitchen area.
The fire alarm system uses the same buzzer and servo from the entrance system to initiate emergency evacuation procedures.
Display Interface
- LCD Screen (SPI-based):
A real-time display presents the status of the entire home , including:
- Temperature and light levels in both rooms
- Access activity
- Fire detection alerts
Connectivity
-
Light Sensors: Connected to the Raspberry Pi Pico W’s ADC (Analog-to-Digital Converter) inputs, providing real-time ambient light readings for smart lighting control.
-
Temperature Sensors (BMP280): Communicate with the Pico W via I²C buses, sending temperature and pressure data.
-
LEDs: Controlled through GPIO and PWM, supporting both ambient brightness adjustment and manual on/off control.
-
RFID: Communicates via SPI with the Pico W, handling secure access authentication.
-
Servo Motor: Driven by PWM signals to simulate door opening during authorized access or fire emergencies.
-
IR Fire Sensor: Connected to a GPIO pin, detects fire and triggers an alarm response.
-
Buzzer: Controlled using PWM, providing both access feedback tones and fire alarm activation.
-
LCD Screen: Connected via SPI, continuously displays real-time sensor data, access status, and fire alerts .
PicoHome will be handmade using cardboard, allowing for a customizable and low-cost structure to represent the physical layout and placment of all system components.
Weekly Log
Week 21 - 27 April
- Entrance System: Integrated the RFID reader with the servo motor and buzzer. The system now unlocks the door and plays a confirmation tone for authorized access, and triggers a warning tone for unauthorized attempts.
- Fire Detection and Alarm System: Implemented a fire detection feature that opens the door and activates an alarm when fire is detected, simulating an emergency response.
- Documentation: Started writing the project documentation, including system descriptions and component overviews.
- Hardware: I bought all the cardboard needed for the build and drew out the floor plan on it.
Week 28 - 4 May
- Cardboard House Construction: This week, I focused on building the cardboard house and successfully completed the main structure. The layout is now ready for installing components and starting the wiring process.
Week 5 - 11 May
- Wiring and GPIO Allocation: Completed all wiring for the sensors, LEDs , Push Buttons , Photoresistors, and display. Careful planning was essential during this stage, as nearly all available GPIO pins on the Raspberry Pi Pico W were used. Pin allocation was done with attention to communication protocols and compatibility.
- Code Testing: Tested some code for the temperature sensors and LCD in order to intergrate them in the project
- KiCad Schematic: Finalized the KiCad schematic for the full system, accurately reflecting all physical connections and components used in the project.
Week 12 - 18 May
- Component Installation: Started mounting components onto the cardboard structure. Fixed the LCD display, LEDs, sensors and RFID in their designated positions.
- Smart Lighting Feature: Completed the implementation of the smart lighting logic. Each LED now adjusts its brightness automatically based on readings from its corresponding LDR sensor, and the system can switch between OFF, ON, and SMART modes using push buttons.
Week 19 - 25 May
- Code Progress: Focused on finalizing the integration of the LCD screen and the temperature sensors.
- Project Polishing: Worked on improving the visual appearance of the cardboard house by adding decorations and details to make the model more presentable for demonstration.
Hardware
-
Infrared Flame Sensor: Used to detect any nearby fire in the kitchen area, triggering an emergency alarm when activated.
-
Active Buzzer Module: Provides audio feedback; it is activated both when a fire is detected and when an unauthorized RFID tag is scanned at the entrance.
-
Servomotor: Simulates a door mechanism, opening automatically when authorized access is granted or during a fire emergency.
-
RFID Module: Handles access control by distinguishing between authorized and unauthorized RFID tags. Authorized tags allow entry, while unauthorized tags trigger an alarm.
-
BMP280 Sensors: Measure temperature inside each room.
-
Light Sensors (Photoresistors): Measure ambient light levels in each room to adjust the brightness of the lighting system dynamically.
- Room LEDs: Installed in each room, the LEDs operate in two modes:
- Manual Mode: Allows direct on/off control.
-
Ambient Mode: Adjusts brightness automatically based on the light sensor readings using PWM.
-
LCD Screen: Continuously displays real-time information about room conditions, access activity, and fire alarm status.
-
This is how the wiring looks :
-
This is how the the cardboard home came out :
-
And this is how to projects looks till now :
Schematics
Bill of Materials
Device | Usage | Price |
---|---|---|
Rapspberry Pi Pico WH | The Microcontroller | 1 x 56.23 RON |
BreadBoard 400 Points | Connectivity | 1 x 4.56 RON |
BMP280 | Temperature sensor (I²C) | 2 x 8.49 RON |
Photoresistor | Light Detection | 2 x 1.90 RON |
White LED 3mm | Room Lighting | 2 x 0.26 RON |
RFID Module + RFID tags | RFID entrance | 1 x 9.99 RON |
IR Flame Sensor | Fire detection sensor | 1 x 2.49 RON |
Servo Motor | Door Simulation | 1 x 11.99 RON |
Buzzer Passive 3.3V | Audio Feedback and alerts | 1 x 0.99 RON |
SPI LCD Display (ST7735) | Real-time system display | 1 x 28.99 RON |
6x6x6 Push Buttons | Physical User Interface | 2 x 0.36 RON |
Set of Resistors | Current Modulation | 1 x 14.99 RON |
Male-Male Wires 10cm | Connectivity | 1 x 4.99 RON |
Female-Male Wires | Connectivity | 1 x 5.99 RON |
Female-Female Wires | Connectivity | 1 x 7.99 RON |
Mucava Cardboard | Building the house | 22 RON |
TOTAL | - | 193.19 RON |
A Raspberry Pi Debug Probe was used during development and debugging but it will not be included in the final build of the project.
Software
Library | Description | Usage |
---|---|---|
embassy-executor | Asynchronous executor for embedded systems | Used to manage concurrent tasks in a non-blocking way |
embassy-time | Time management library | Used for time-based operations such as delays |
embassy-rp | Raspberry Pi Pico-specific HAL for Embassy | Used for PWM, SPI, GPIO, I²C, ADC, and peripheral setup |
embassy-sync | Lightweight async synchronization tools | Used for inter-task communication using Signal , Mutex , and critical sections |
embassy-embedded-hal | Embassy adaptation of embedded-hal traits | Used for shared bus access in screen and sensor drivers |
embedded-hal-async | Async I/O traits for I²C, SPI, UART | Used for BMP280 I²C temperature sensor integration |
static-cell | Safe static allocation support | Used to safely initialize peripherals with 'static lifetime |
defmt | Logging framework for embedded Rust | Used for efficient runtime logging and debugging |
defmt-rtt | Real-Time Transfer backend for defmt | Enables RTT-based log output over USB |
panic-probe | Minimal panic handler for embedded Rust | Provides debug output on panics |
mfrc522 | RFID reader driver | Used to initialize and interact with the MFRC522 RFID module |
mipidsi | Display driver for MIPI-compliant screens like ST7735 | Used to initialize and control the SPI LCD screen |
display-interface-spi | Wrapper for SPI display interfaces | Used to link the display to the SPI bus and simplify communication |
embedded-graphics | Graphics library for embedded displays | Used for rendering shapes, text, and layouts on the LCD screen |
heapless | Fixed-capacity data structures for no_std | Used for String display buffers without dynamic allocation |
fixed | Fixed-point math support for embedded systems | Used for converting floats for servo and display formatting |