An Arduino-powered autonomous firetruck that detects and navigates toward flames, combining circuit design, mechanical assembly, and algorithm development to extinguish fires with a servo-aimed water nozzle.
🎥 Demo video: https://www.youtube.com/watch?v=l2Vn9u5bldI
🏆 Awarded Best Integration Project at Collège Jean-de-Brébeuf
Inspired by major historical and recent fire disasters, our team built a miniature autonomous firefighting vehicle to explore how low-cost embedded systems can assist with detection, navigation, and fire suppression.
The prototype autonomously searches for a flame source, avoids obstacles, and activates a water spraying sequence once it aligns with the fire.
Design a small-scale firetruck that can:
- Detect flames without human intervention
- Navigate toward the fire while avoiding obstacles
- Extinguish the flame efficiently using a limited onboard water reservoir
- Operate reliably despite hardware constraints (water leaks, sensor noise, limited motor torque)
- 4 ultrasonic sensors (Front / Left / Right / Back)
- Stops motors when an obstacle is too close (safety threshold)
- 8 infrared flame sensors positioned around the vehicle to localize fire direction
- Prioritized logic:
- Center flame detection triggers approach + extinguish
- Left/right flame detection triggers alignment turns
- Diagonal/rear detections trigger timed repositioning maneuvers
- Water output pump to spray
- Servo motor sweeps the nozzle to increase coverage
- Siren (buzzer) during firefighting mode
- Analog water level sensor
- 10-LED “fuel gauge” style indicator showing remaining water
- Manual refill button triggers the intake pump for a fixed duration
- Arduino Mega (large I/O for many sensors + actuators)
- Ultrasonic (HC-SR04): obstacle detection
- IR flame sensors: flame localization
- Custom water level sensor: remaining water monitoring
- Differential drive DC motors (motor driver control)
- Two pumps:
- Intake pump (refill)
- Output pump (spray)
- Servo motor for nozzle direction control
- Buzzer for siren feedback
- Read sensors (water level, flame array, ultrasonic distances)
- Update water-level LED bar
- Handle refill button
- Fire response state machine (priority-ordered):
- Center flame → approach + spray + servo sweep
- Left/right flame → align via turns
- Off-axis flame → timed reposition movements
- Safety stop if any ultrasonic reading is below threshold
The project uses two detection thresholds:
threshold1: front sensorsthreshold2: side/rear sensors
These require tuning depending on ambient light and the specific flame sensors used.
- Water level:
46 - Flame:
A1, A3, A5, A6, A7, A8, A9, A10 - Ultrasonic:
- Front: trig
29, echo23 - Left: trig
33, echo31 - Right: trig
37, echo27 - Back: trig
25, echo35
- Front: trig
- Enable:
enALB=5,enBRB=4 - Direction:
49, 51, 47, 45
- Output pump:
enAOUT=8,in1OUT=9,in2OUT=10 - Intake pump:
enBIN=3,in3IN=11,in4IN=12
- Servo:
41 - Fill button:
13(INPUT_PULLUP) - Water LEDs:
22,24,26,28,30,32,34,36,38,40 - Buzzer:
39
- Arduino IDE
- Arduino Mega board
- Libraries:
Servo(built-in)SR04(install via Library Manager or include locally)
- Open the project in Arduino IDE
- Select Board: Arduino Mega
- Select the correct port
- Upload
- 🏆 Won the Best Integration Project award at Collège Jean-de-Brébeuf
- Delivered a functional prototype capable of detecting and extinguishing simulated fires
- Solved real-world build issues:
- Leak-proof water container design
- Sensor reliability and noise in changing light conditions
- Balancing vehicle weight vs motor torque
- Gained hands-on experience in:
- Embedded programming and sensor fusion
- Mechanical assembly and prototyping
- Actuator control (motors, pumps, servo)
- Designing autonomous behavior under constraints
- Replace timed turning with closed-loop alignment (turn until centered flame)
- Improve flame localization using sensor weighting / triangulation
- Add better path planning for obstacles (instead of hard stop)
- Upgrade sensors for higher accuracy and robustness
- Optimize mechanical design (lighter chassis, better motor sizing, improved tank seals)
This project demonstrates how an autonomous vehicle can integrate sensing, navigation, and actuation to support firefighting tasks. While built as a miniature prototype, it highlights the potential of robotics in emergency-response scenarios and provides a strong foundation for future iterations.





