🧪 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