Skip to content

G6 : Smart Home Control System

Mostafa Gaafar edited this page Apr 20, 2026 · 24 revisions

Project Title: 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

1. The Proposal

Abstract / Elevator Pitch:

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.

Project Objectives & Scope:

Minimum Viable Product (MVP):

  • 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

Stretch Goals:

  • Start an AC using the remote control feature
  • Use humidity sensing to regulate mist output and prevent overuse
  • Multi-room extension by replicating the sensor/actuator setup across more than one room simultaneously

2. System Architecture

2.1 High-Level Block Diagram:

A visual representation of the entire system (inputs, processing, outputs, and power supply). Blank diagram-5

2.2 Subsystem Breakdown:

3. Hardware Design

Component Selection

Sourcing will be through RAM Electronics and the CSCE department primarily.

Component Image Category Purpose
IR Beam Break IR Beam Break Sensor Detect entry/exit direction, count occupants
PIR Sensor PIR Sensor Sensor Supplementary presence detection
DHT22 DHT22 Sensor Monitor ambient temperature and humidity
Photo Resistor LDR LDR Sensor Measure ambient brightness
ESP32 ESP32 Processing Run all logic, FreeRTOS tasks, WiFi/MQTT
STM32 (if needed) STM32 Processing Secondary MCU for distributed control
PowerBank PowerBank Power 5V supply for ESP32 and logic
Relay Module Relay Module Actuator Switch lights and mist maker
TSOP382 IR Receiver TSOP382 Actuator Receive IR signals
TSAL6200 IR Emitter TSAL6200 Actuator Send IR commands to AC unit
Ultrasonic Atomizer Ultrasonic Atomizer Actuator Scent and humidity control
DFPlayer Mini DFPlayer Mini Actuator Welcome/goodbye audio playback via MicroSD
Power Strip Power Strip Actuator Relay-switched lighting load

Schematics & Wiring:

Circuit diagrams, pinout tables, and breadboard layouts.

Bill of Materials (BOM):

A table listing component names, part numbers, quantities, costs, and links to datasheets.

Power Budget:

Calculations ensuring your power supply can handle the peak current draw of all components combined.

4. Software Implementation

4.1 Software Architecture:

Description of the firmware design (e.g., Bare-metal Superloop, Interrupt-driven, or RTOS).

4.2 Flowcharts & State Machines:

Visual diagrams mapping out the core logic, state transitions, and interrupt service routines (ISRs).

4.3 Key Algorithms:

Explanations of any complex logic used (e.g., PID control loops, digital filtering, sensor fusion).

4.4 Development Environment:

Compilers, IDEs, and toolchains used (e.g., Keil, PlatformIO, STM32CubeIDE).

5. Testing, Validation & Debugging

5.1 Unit Testing:

How individual hardware components and software functions were tested in isolation.

5.2 Integration Testing:

How the system was tested as a whole.

5.3 Challenges & Solutions:

A log of major bugs, hardware failures, or design flaws you encountered, and the engineering steps you took to solve them.

6. Results & Demonstration

6.1 Final Prototype:

High-quality photos of the completed build.

6.2 Video Demonstration:

A link to a short video showing the system working in real-time under various conditions.

6.3 Performance Metrics:

Data showing how well the project met its initial objectives (e.g., "Response time was measured at 12ms, well within our 50ms goal").

7. Project Management

7.1 Division of Labor:

Name Contribution
Mostafa Gaafar Project Proposal, Sensors and Actuators needed, Timeline
Omar Saqr System Architecture, Timeline
Farida Bey System Architcture, Project Proposal

7.2 Timeline:

Milestones

April 14 (Milestone 1 — Team Formation)

  • Formed team of three: Mostafa Gaafar, Omar Saqr, and Farida
  • Decided on project idea: Presence-Aware Guest Comfort Management System
  • Submitted team formation through the wiki page

April 15 (Milestone 2 — Proposal Presentation)

  • Deliver in-class proposal presentation
  • Prepare hardware/software block diagram
  • Refine the proposal according to comments and feedback

April 20 (Checkpoint A)

  • Finalize problem statement and proposed solution
  • Prepare component list
  • Define functional and non-functional requirements

April 29 (Milestone 3)

  • Implement guest presence detection
  • Implement ultrasonic mist maker for air freshening
  • Implement LED lighting control
  • Implement temperature regulation using sensors and fan

May 6 (Checkpoint B)

  • Add humidity sensing to regulate mist maker output
  • Implement speaker for guest greeting
  • Implement people counter with entry/exit logic

May 13 (Milestone 4)

  • Add Bluetooth remote control
  • Allow users to remotely adjust environment before arrival
  • Develop a simple mobile app interface for remote control

8. Appendices & References

8.1 Source Code Repository:

Link to your GitHub/GitLab repo.

8.2 References:

Links to datasheets, tutorials, academic papers, and course materials used during development.

Clone this wiki locally