-
Notifications
You must be signed in to change notification settings - Fork 4
G6 : Smart Home Control System
| Name | GitHub |
|---|---|
| Mostafa Gaafar | 900214463 |
| Omar Saqr | 900223343 |
| Farida Bey | 900212071 |
Github Repo: https://github.com/mostafa21314/Guest-Comfort-Management-System
- The Proposal
- System Architecture
- Hardware Design
- Software Implementation
- Testing, Validation & Debugging
- Results & Demonstration
- Project Management
- Appendices & References
Walking into a poorly lit, stuffy, cold, or hot room is a common experience, especially if we forgot to open the windows or adjust the thermostat. Adjusting lights, temperature, and air quality manually is inconvenient and slow to take effect. Despite the rise of smart homes, most solutions either require constant manual control or are overly complex and expensive for everyday needs. No unified system handles presence awareness, automated control, and energy savings together.
We propose a Presence-Aware Home Control System that automatically manages the ambience of a space based on occupancy and environmental conditions, with remote control for effects that take time. As soon as someone enters, the system welcomes them, turns on the lights, and activates the air atomizer. When the space is vacated, the system automatically powers down all actuators to conserve energy. Users can also remotely pre-configure the environment(especially temperature) before arrival via a WiFi-connected mobile interface.
- Detect human presence using sensors
- Automatically turn on lights when someone enters
- Play a welcome message/music through a speaker
- Activate an air freshener system upon entry
- Count the number of people entering and leaving the room
- Automatically turn off lights, speaker, and air freshener when the room is empty
- Remote control via Wi-Fi to allow users to set the environment before arriving
- Mobile app interface for user-friendly control
| # | Requirement | Description |
|---|---|---|
| FR-1 | Presence Detection | Detect guest entry/exit and maintain an accurate room occupancy count |
| FR-2 | Automated Lighting | Turn on LED/Desk Lamp when occupied and dim; turn off when empty |
| FR-3 | Climate Control(stretch goal) | Activate AC remotely and report temperature readings from DHT22 |
| FR-4 | Air Quality Control | Activate air atomizer based on occupancy or user command; deactivate when room is empty |
| FR-5 | Audio Feedback | Play welcome sound or music on first entry |
| FR-6 | Remote Control | Allow user to send manual override commands and receive live status updates via WiFi/MQTT |
| FR-7 | Auto Shutdown | Power down all actuators automatically when room is unoccupied |
Stretch Goals:
- Start an AC using the remote control feature
- Multi-room extension by replicating the sensor/actuator setup across more than one room simultaneously
This subsystem detects people entering or leaving the room and maintains an accurate count of occupants. It consists of:
- Two IR transmitter–receiver pairs configured as beam-break sensors, mounted on the door frame, one on the exterior side and one on the interior side. The order in which the beams are broken determines the direction of movement (entry vs. exit).
- A PIR (passive infrared) motion sensor used to validate detections and filter out false triggers, such as pets passing through or accidental beam interruptions.
- An occupancy counter that increments on confirmed entries and decrements on confirmed exits, maintaining a real-time count of people inside the room.
Sourcing will be through RAM Electronics and the CSCE department primarily.
| Component | Image | Category | Purpose |
|---|---|---|---|
| IR Beam Break | ![]() |
Sensor | Detect entry/exit direction, count occupants |
| PIR Sensor | ![]() |
Sensor | Supplementary presence detection |
| DHT22 | ![]() |
Sensor | Monitor ambient temperature and humidity |
| Photo Resistor LDR | ![]() |
Sensor | Measure ambient brightness |
| ESP32 | ![]() |
Processing | Run all logic, FreeRTOS tasks, WiFi/MQTT |
| STM32 (if needed) | ![]() |
Processing | Secondary MCU for distributed control |
| Power Adapter | ![]() |
Power | 12V supply for ESP32 and logic |
| Relay Module | ![]() |
Actuator | Switch lights and mist maker |
| TSOP382 IR Receiver | ![]() |
Actuator | Receive IR signals |
| TSAL6200 IR Emitter | ![]() |
Actuator | Send IR commands to AC unit |
| Ultrasonic Atomizer | ![]() |
Actuator | Scent and humidity control |
| DFPlayer Mini | ![]() |
Actuator | Welcome/goodbye audio playback via MicroSD |
| Power Strip | ![]() |
Actuator | Relay-switched lighting load |
Board layout - entrance/exit and occupancy counting subsystem:

A table listing component names, part numbers, quantities, costs, and links to datasheets.
Calculations ensuring your power supply can handle the peak current draw of all components combined.
Description of the firmware design (e.g., Bare-metal Superloop, Interrupt-driven, or RTOS).
Visual diagrams mapping out the core logic, state transitions, and interrupt service routines (ISRs).
Explanations of any complex logic used (e.g., PID control loops, digital filtering, sensor fusion).
ESP-IDF, Kiel, and STM-CubeMX
How individual hardware components and software functions were tested in isolation.
How the system was tested as a whole.
A log of major bugs, hardware failures, or design flaws you encountered, and the engineering steps you took to solve them.
High-quality photos of the completed build.
A link to a short video showing the system working in real-time under various conditions.
Data showing how well the project met its initial objectives (e.g., "Response time was measured at 12ms, well within our 50ms goal").
| Name | Contribution |
|---|---|
| Mostafa Gaafar | Project Proposal, Sensors and Actuators needed, Timeline |
| Omar Saqr | System Architecture, Timeline |
| Farida Bey | System Architcture, Project Proposal |
- Formed team of three: Mostafa Gaafar, Omar Mokhtar, and Farida Bey
- Decided on project idea: Presence-Aware Guest Comfort Management System
- Submitted team formation through the wiki page
- Delivered in-class proposal presentation
- Prepared hardware/software block diagram
- Refined proposal according to comments and feedback
- Finalize problem statement & proposed solution
- Prepare component list and confirm sourcing
- Define functional and non-functional requirements
- Implement guest presence detection (IR beams)
- Implement ultrasonic mist maker control
- Implement LED lighting control via relay
- Implement DFPlayer speaker for greeting
- Implement temperature regulation using DHT22 and AC IR emitter
- Add humidity sensing to regulate mist output
- Implement temperature regulation using DHT22 and AC IR emitter
- Implement people counter with entry/exit logic
- Report integration status; run scenario tests & power check
- Add WiFi remote control; allow pre-arrival environment adjustment
- Finalize mobile app interface and complete wiki & final presentation
To be added.
| Subsystem | Status |
|---|---|
| Entrance/exit detection and occupancy counting | Done |
| Mist maker control | Partially done |
| Speaker control | To be done |
| Lights control | To be done |
| Wi-Fi connectivity | Partially done |
| Temperature control | To be done |


Refer to Schematics and Wiring for the breadboard layout.
Github Repo: https://github.com/mostafa21314/Guest-Comfort-Management-System
Embedded Project Proposal SP26.pdf
Links to datasheets, tutorials, academic papers, and course materials used during development.












