π§ͺ Lesson 3.5 β Testing & Project Verification
In this lesson, we will test the complete IoT-Based Fire Alert System and verify that all components are working correctly. We will check the Flame Sensor, LED, Buzzer, ESP32, Wi-Fi connection, and Blynk Dashboard.
π― Objective of Testing
The purpose of testing is to ensure that:
β Flame Sensor detects fire properly
β LED turns ON when fire is detected
β Buzzer activates during fire detection
β ESP32 sends data to Blynk Cloud
β Mobile Dashboard displays correct status
β Complete system works reliably
π Pre-Testing Checklist
Before uploading the code, verify the following:
Hardware Check
β ESP32 connected properly
β Flame Sensor connected to GPIO 27
β LED connected to GPIO 26
β Buzzer connected to GPIO 25
β All GND connections are common
β USB cable connected properly
Software Check
β Correct Wi-Fi Name entered
β Correct Wi-Fi Password entered
β Correct Blynk Template ID
β Correct Blynk Template Name
β Correct Auth Token
β Code uploaded successfully
π Step 1 β Upload the Program
1οΈβ£ Connect ESP32 to your computer.
2οΈβ£ Open Arduino IDE.
3οΈβ£ Select:
Board β ESP32 Dev Module
4οΈβ£ Select the correct COM Port.
5οΈβ£ Click Upload.
β Successful Upload
If upload is successful, Arduino IDE will display:
Done Uploading.
This means the code has been transferred to the ESP32 successfully.
π Step 2 β Open Serial Monitor
After uploading:
1οΈβ£ Open Serial Monitor.
2οΈβ£ Set Baud Rate:
115200
You should see messages like:
=================================
π₯ Fire Alert System Starting...
=================================
π Step 3 β Verify Wi-Fi Connection
After startup, ESP32 will connect to Wi-Fi.
Expected Output:
Connected to WiFi
Connected to Blynk Cloud
If these messages appear, the internet connection is working correctly.
π± Step 4 β Check Blynk Device Status
Open the Blynk Mobile App.
Navigate to:
Devices
Locate:
ESP32 Fire Monitor
Expected Status:
β Online
If the device appears online, ESP32 is successfully connected to Blynk Cloud.
π₯ Step 5 β Test Fire Detection
Now test the Flame Sensor.
Testing Method
Use:
π―οΈ Candle
or
π₯ Lighter
Bring the flame near the sensor.
Expected Results
LED
LED = ON
Buzzer
Buzzer = ON
Serial Monitor
π₯ FIRE DETECTED!
Blynk Dashboard
Fire Status = 1
β Step 6 β Remove the Flame
Move the flame away from the sensor.
Expected Results:
LED
LED = OFF
Buzzer
Buzzer = OFF
Serial Monitor
β
No Fire
Blynk Dashboard
Fire Status = 0
π Testing Results Table
| Condition | LED | Buzzer | Blynk Status |
|---|---|---|---|
| No Fire | OFF | OFF | 0 |
| Fire Detected | ON | ON | 1 |
βοΈ Sensor Sensitivity Adjustment
The Flame Sensor contains a blue potentiometer.
Increase Sensitivity
Turn Clockwise:
π More Sensitive
The sensor can detect fire from a greater distance.
Decrease Sensitivity
Turn Anti-Clockwise:
π Less Sensitive
The sensor becomes less responsive to distant flames.
β Common Problems and Solutions
Problem 1 β ESP32 Not Connecting to Wi-Fi
Possible Causes
β Wrong Wi-Fi Name
β Wrong Password
β Weak Signal
Solution
β Recheck SSID and Password
β Restart Wi-Fi Router
β Move ESP32 closer to Router
Problem 2 β Device Offline in Blynk
Possible Causes
β Wrong Auth Token
β Wrong Template ID
β No Internet Connection
Solution
β Copy Auth Token again
β Verify Template Information
β Check Internet Connectivity
Problem 3 β Flame Not Detected
Possible Causes
β Loose Wiring
β Incorrect GPIO Pin
β Low Sensitivity
Solution
β Verify Wiring
β Verify GPIO 27 Connection
β Adjust Potentiometer
Problem 4 β LED Not Turning ON
Possible Causes
β LED Reversed
β Loose Connection
Solution
β Check LED Polarity
β Check Resistor Connection
Problem 5 β Buzzer Not Working
Possible Causes
β Wrong Wiring
β Faulty Buzzer
Solution
β Check GPIO 25 Connection
β Test Buzzer Separately
π Complete System Verification Flow
Power ON
β
ESP32 Starts
β
Wi-Fi Connected
β
Blynk Connected
β
Read Flame Sensor
β
Fire Detected?
β
βββββββββββββ¬ββββββββββββ
β YES β NO β
βΌ βΌ
LED ON LED OFF
Buzzer ON Buzzer OFF
V0 = 1 V0 = 0
β β
βββββββ¬ββββββ
βΌ
Dashboard Updated
π― Mini Project Demonstration
After successful testing, the system should perform the following actions:
Normal Condition
β No Fire
β LED OFF
β Buzzer OFF
β Dashboard Shows Safe Status
Fire Condition
π₯ Flame Detected
π‘ LED ON
π Buzzer ON
π± Blynk Dashboard Updated
π Real-Time Monitoring Available
π Key Points to Remember
β Always verify wiring before testing.
β Use a candle or lighter for flame testing.
β Set Serial Monitor baud rate to 115200.
β Ensure ESP32 is connected to Wi-Fi.
β Device should appear Online in Blynk.
β Adjust sensor sensitivity if required.
β Verify both local alerts and cloud monitoring.
π Module 3 Summary
Congratulations! You have successfully completed the IoT-Based Fire Alert System project.
In this module, you learned:
β Flame Sensor Fundamentals
β ESP32 Hardware Connections
β Blynk Cloud Setup
β IoT Programming with ESP32
β Fire Detection Logic
β Real-Time Cloud Monitoring
β Testing and Troubleshooting