User Tools

Site Tools


amc:ss2025:group-yin:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
amc:ss2025:group-yin:start [2025/08/08 17:47] 24378_students.hsrwamc:ss2025:group-yin:start [2025/08/08 17:51] (current) 24378_students.hsrw
Line 1: Line 1:
-====== Smart Home Monitoring and Automation System ======\\+====== Smart Home Monitoring and Automation System ======
 ''by 24378 - Yin Min Oo'' ''by 24378 - Yin Min Oo''
  
-Abstract\\+====Abstract====
 This project implements a WiFi-based smart home system using an ESP32 microcontroller. The system integrates motion, temperature, humidity, and light sensors to automate a relay and servo mechanism and sends alerts via Pushover app when motion is detected in Away mode. A web interface allows toggling between Home and Away modes. The system prioritizes real-time motion detection using FreeRTOS task scheduling. This project implements a WiFi-based smart home system using an ESP32 microcontroller. The system integrates motion, temperature, humidity, and light sensors to automate a relay and servo mechanism and sends alerts via Pushover app when motion is detected in Away mode. A web interface allows toggling between Home and Away modes. The system prioritizes real-time motion detection using FreeRTOS task scheduling.
  
-1. Introduction\\+====1. Introduction====
 Smart home systems improve security and energy efficiency by automating device control and providing remote notifications. This work focuses on a compact implementation using ESP32 and commonly available sensors, emphasizing responsiveness and minimal false alerts. Smart home systems improve security and energy efficiency by automating device control and providing remote notifications. This work focuses on a compact implementation using ESP32 and commonly available sensors, emphasizing responsiveness and minimal false alerts.
  
-2. System Architecture and Hardware \\ +====2. System Architecture and Hardware==== 
-2.1 System Architecture+===2.1 System Architecture===
 {{ :amc:ss2025:group-yin:system_architecture.png?direct&200 |}} {{ :amc:ss2025:group-yin:system_architecture.png?direct&200 |}}
 Figure 1: System Architecture of the Home Automation System Figure 1: System Architecture of the Home Automation System
Line 22: Line 22:
  
  
-2.1 Hardware Components\\+===2.1 Hardware Components===
 1. ESP32: Central microcontroller with WiFi support. 1. ESP32: Central microcontroller with WiFi support.
 2. PIR Sensor: Detects human movement. 2. PIR Sensor: Detects human movement.
Line 44: Line 44:
 Figure 7: Servo Motor 3.3V Figure 7: Servo Motor 3.3V
  
-2.2 Software Components+===2.2 Software Components===
 • Arduino IDE with FreeRTOS • Arduino IDE with FreeRTOS
 • ESPAsyncWebServer for web interface • ESPAsyncWebServer for web interface
Line 50: Line 50:
 • Servo and sensor libraries (Adafruit, SparkFun) • Servo and sensor libraries (Adafruit, SparkFun)
  
-3. Implementation\\ +====3. Implementation==== 
-3.1 Sensor Integration\\+===3.1 Sensor Integration===
 Other sensors except motion sensor is activated every 5 seconds. Motion sensor is activated every 5 milliseconds when in “Away” mode. Temperature and humidity activate the relay to switch the ventilator, light intensity controls curtain adjustment via a servo. Motion is processed via interrupt and high-priority task. Other sensors except motion sensor is activated every 5 seconds. Motion sensor is activated every 5 milliseconds when in “Away” mode. Temperature and humidity activate the relay to switch the ventilator, light intensity controls curtain adjustment via a servo. Motion is processed via interrupt and high-priority task.
  
-3.2 Network and Pushover Setup\\+===3.2 Network and Pushover Setup===
 ESP32 connects to local WiFi and communicates with push notification with the Pushover APP. Messages are sent only when motion is detected, and the system is in Away mode. ESP32 connects to local WiFi and communicates with push notification with the Pushover APP. Messages are sent only when motion is detected, and the system is in Away mode.
 The system uses the Pushover service to send motion detection alerts to the user’s mobile device. A user account was created on the Pushover platform, and a new application was registered to obtain the required User Key and API Token. These credentials are used in the ESP32 firmware to authenticate with the Pushover API. The system uses the Pushover service to send motion detection alerts to the user’s mobile device. A user account was created on the Pushover platform, and a new application was registered to obtain the required User Key and API Token. These credentials are used in the ESP32 firmware to authenticate with the Pushover API.
Line 60: Line 60:
 When motion is detected and the system is in “Away” mode as described in the table 1, the ESP32 sends an HTTPS POST request to the Pushover API endpoint with the alert message. This integration allows real-time push notifications, ensuring timely alerts directly to the user’s phone. When motion is detected and the system is in “Away” mode as described in the table 1, the ESP32 sends an HTTPS POST request to the Pushover API endpoint with the alert message. This integration allows real-time push notifications, ensuring timely alerts directly to the user’s phone.
  
-3.3 Web Server Interface\\+===3.3 Web Server Interface===
 Users access a web page hosted on ESP32 to toggle between Home and Away mode. The page also displays current sensor values and relay state. Users access a web page hosted on ESP32 to toggle between Home and Away mode. The page also displays current sensor values and relay state.
  
-3.4 FreeRTOS Task Priority and Control Logic \\+===3.4 FreeRTOS Task Priority and Control Logic===
 Table 1: Task Priorities of The Seosor Tasks (3 = Highest, 1 = Lowest) Table 1: Task Priorities of The Seosor Tasks (3 = Highest, 1 = Lowest)
 ^ Tasks            ^ Priority  ^ Interval    ^ ^ Tasks            ^ Priority  ^ Interval    ^
Line 77: Line 77:
 | Light Sensor       | T<25’C or humidity<60    | Servo is triggered           | | Light Sensor       | T<25’C or humidity<60    | Servo is triggered           |
  
-4. Results\\ +====4. Results==== 
-4.1 System Behaviour\\+===4.1 System Behaviour===
 The system connects to WiFi successfully and displays its local IP address for user access. Motion alerts are sent via Pushover only when the system is in Away mode and actual human motion is detected. The servo motor responds to ambient light levels by adjusting the blinds—closing when light is too strong and opening when it drops. The relay is activated when either the temperature exceeds a set threshold or humidity rises above the defined limit, helping manage indoor climate conditions effectively. The system connects to WiFi successfully and displays its local IP address for user access. Motion alerts are sent via Pushover only when the system is in Away mode and actual human motion is detected. The servo motor responds to ambient light levels by adjusting the blinds—closing when light is too strong and opening when it drops. The relay is activated when either the temperature exceeds a set threshold or humidity rises above the defined limit, helping manage indoor climate conditions effectively.
  
-5. Demonstration\\+====5. Demonstration====
 System boots, connects to WiFi, and hosts a web page. Home or away mode can be toggled on the page for the motion sensor detection. The interface also shows the status of light, temperature and humidity.  System boots, connects to WiFi, and hosts a web page. Home or away mode can be toggled on the page for the motion sensor detection. The interface also shows the status of light, temperature and humidity. 
  
Line 97: Line 97:
 The video demonstrates the motion sensor detection when the system is set to away mode and how the push notification is triggered. It furthermore shows how the servo is activated when the light level is above or below the threshold and how the relay is activated based on the humidity level. However, the temperature sensor cannot be manipulated above the threshold and as it is dangerous. Nevertheless, it can be clearly seen in the code attached. The video demonstrates the motion sensor detection when the system is set to away mode and how the push notification is triggered. It furthermore shows how the servo is activated when the light level is above or below the threshold and how the relay is activated based on the humidity level. However, the temperature sensor cannot be manipulated above the threshold and as it is dangerous. Nevertheless, it can be clearly seen in the code attached.
  
-6. Limitations and Areas for Improvement\\+====6. Limitations and Areas for Improvement====
 • Sensitivity of Motion Detection: The motion sensor may sometimes fail to trigger alerts.  • Sensitivity of Motion Detection: The motion sensor may sometimes fail to trigger alerts. 
 • Reliance on Stable WiFi Connection: The system requires a stable WiFi connection to function properly. Interruptions or changes in IP address may disrupt access to the web interface and push notifications. Implementing fixed IP addressing or network reconnection strategies could enhance reliability. • Reliance on Stable WiFi Connection: The system requires a stable WiFi connection to function properly. Interruptions or changes in IP address may disrupt access to the web interface and push notifications. Implementing fixed IP addressing or network reconnection strategies could enhance reliability.
Line 104: Line 104:
 • Servo Movement Optimization: The servo motor moves to preset positions based on light intensity without checking its current state, which may cause unnecessary movement. Adding state checks before actuation could improve efficiency and reduce wear. • Servo Movement Optimization: The servo motor moves to preset positions based on light intensity without checking its current state, which may cause unnecessary movement. Adding state checks before actuation could improve efficiency and reduce wear.
  
-7.  Conclusion\\+====7.  Conclusion====
 This ESP32-based smart home system demonstrates motion-based alerting and light-driven automation. With FreeRTOS prioritization, the system ensures fast response to motion events. The future work includes improving motion detection, enhancing WiFi stability, adding manual test modes, supporting multi-user notifications, and optimizing servo movements based on state checks. This ESP32-based smart home system demonstrates motion-based alerting and light-driven automation. With FreeRTOS prioritization, the system ensures fast response to motion events. The future work includes improving motion detection, enhancing WiFi stability, adding manual test modes, supporting multi-user notifications, and optimizing servo movements based on state checks.
  
amc/ss2025/group-yin/start.txt · Last modified: 2025/08/08 17:51 by 24378_students.hsrw