Fire Fighting Car
“Achieving autonomous hazard navigation and suppression through pure hardware logic and analog feedback loops.”
An autonomous mini-vehicle engineered with discrete optical flame sensors, combinational logic gates, and an L293D dual H-bridge—zero microcontrollers.
- Role
- Lead Systems Integrator
- Context
- 2 Weeks (Semester 1 Hardware Lab)
- Team
- 2 Members (UET Taxila)
- Core Stack
- L293D Dual H-Bridge, Flame IR Sensors, TTL Logic Gates, 5V DC Pump
Fig 1.0 — Architecture execution snapshot (Fire Fighting Car)
The Friction
Why build an autonomous vehicle without a microcontroller or software code?
In modern robotics education, students almost immediately reach for an Arduino, ESP32, or Raspberry Pi. They write an if-else statement in software, oblivious to how voltage levels, propagation delays, and motor stall currents interact in the physical world.
Our university laboratory challenge forbade microcontrollers entirely. The vehicle had to sense a flame source in a 2D space, steer towards it autonomously, stop at a safe standoff distance, and activate an onboard fire suppression pump—with the entire decision matrix wired directly into silicon using discrete logic gates.
Deliberate Constraints
The system architecture was not chosen in an unconstrained vacuum. Each structural decision emerged directly from four non-negotiable technical boundaries.
Strict ban on CPUs, Arduinos, microprocessors, or programmable firmware.
The control feedback loop had to be wired completely using discrete analog infrared comparator modules and combinational TTL logic gates.
Must locate fire direction without cameras, ultrasonic radar, or software trigonometry.
Positioned three optical flame sensors with 45-degree angular offsets (Left, Center, Right) to divide the forward field of view into distinct steering zones.
DC drive motors and water pump induce massive inductive voltage spikes and stall-current sags.
Separated the 5V logic supply from the 9V motor drive bus using flyback diodes and decoupling electrolytic capacitors to prevent gate logic brownouts.
The car must stop moving forward before reaching the flame to prevent chassis damage.
Engineered a center sensor threshold lockout: when the center sensor exceeds critical intensity, drive motor enable pins drop to LOW while the pump relay energizes.
System Architecture & Data Pipeline
A closed-loop physical feedback architecture: three directional phototransistor flame sensors feed comparator threshold voltages into a combinational TTL logic gate matrix, which directly drives the dual H-bridge motor controller and pump relay.
Alto, Cultus, Corolla. Standard tiered rental base.
Audi A6, BMW 7, Land Cruiser. Chauffeur insurance rate.
Sportage, Tucson, Fortuner. All-terrain security deposit.
Bolan, Hiace, Coaster. High-capacity commercial rate.
Dynamic Polymorphism at Runtime: The orchestrator holds a single container std::vector<Vehicle*> fleet. When executing reservations or computing quotes, method calls to v->calculateCost(days) dynamically dispatch to the concrete subclass implementation through each instance's vtable pointer.
Subsystem Decomposition
Optical Triangulation Sensor Array
3x Directional IR PhototransistorsDetects infrared radiation in the 760nm–1100nm spectrum across Left (-45°), Center (0°), and Right (+45°) vectors.
Combinational Steering Logic Matrix
TTL 74LS Series Logic GatesEvaluates the 3-bit sensor truth table to determine vehicle motion (Pivot Left, Pivot Right, Forward, Emergency Halt).
Dual H-Bridge Motor Actuation Layer
L293D Motor Driver ICAmplifies low-current logic gate signals to drive two high-torque DC gear motors with bi-directional capability.
Suppression Pump & Relay Trigger
Submersible 5V Pump & NPN SwitchDischarges water extinguisher onto the localized flame source when the center threshold is triggered.
The Hard Part: Inductive Voltage Sag & Ambient Infrared False-Positives
How DC motor stall currents brownout TTL logic gates and ambient sunlight triggers false steering loops.
During initial breadboard tests on the chassis, activating the DC drive motors caused the car to twitch erratically and trigger the water pump spontaneously, even when no flame was present.
Two hardware realities collided: first, DC motors pull large inrush currents upon startup, causing a temporary voltage drop (sag) on the shared power rail that dropped TTL logic inputs below the 2.0V HIGH threshold. Second, ambient fluorescent room lights and sunlight through windows emit infrared wavelengths that saturated the phototransistors.
/* Combinational Steering Truth Table */
Sensor Inputs: [Left (L), Center (C), Right (R)] -> Active LOW
Output States: Motor-Left (ML), Motor-Right (MR), Pump (P)
[L C R] | [ML MR P ] | Motion Action
--------+--------------+---------------------------
1 1 1 | 0 0 0 | Idle (No Flame Detected)
0 1 1 | 0 1 0 | Pivot Left (Fire on Left)
1 1 0 | 1 0 0 | Pivot Right (Fire on Right)
1 0 1 | 1 1 0 | Forward (Fire Ahead)
0 0 0 | 0 0 1 | Proximity Halt & Pump Active!
/* Power Decoupling Solution */
[9V Battery] ---> [Motor Driver Vcc2] ---> [DC Motors]
│
[7805 Reg] ---> [1000uF Electrolytic] ---> [0.1uF Ceramic] ---> [5V Logic Rail]We separated the motor power rail from the logic rail, installed a 1000µF electrolytic buffer capacitor alongside high-frequency 0.1µF ceramic decoupling capacitors across the logic IC pins, and shielded the flame sensors in matte-black collimator tubes to reject ambient diffuse light.
Hardware instills deep respect for physical constraints: in software you can wrap code in a try-catch block, but in hardware you cannot catch an inductive voltage spike that resets your logic gates.
Hardware Logic & Sensor Activation Benchmark
Bench multimeter and logic probe verification of logic gate switching thresholds and motor driver response.
Engineering Reflection
“When you cannot write an npm package or an if-statement, you begin to understand the physical physics of computing.”
Building a robot entirely out of discrete logic gates and analog sensors changes your perspective as a computer scientist. You realize that before software exists, voltage propagation delays, pull-up resistors, and signal noise determine whether a calculation is valid.
The car had no operating system, no clock crystal, and no firmware. Yet it exhibited autonomous goal-seeking behavior purely through the physical laws of electronics.
This project built the foundational intuition for every higher-level system I build: behind every clean software abstraction lies a physical circuit managing energy and signal truth.
Interested in discussing this architecture?
I'm always open to technical dialogue, code reviews, and exploring system constraints.