Course Content
IoT Engineering Course using ESP32 with 12 Real-World Projects

πŸ§ͺ 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

Scroll to Top