An autonomous maze‑navigation robot built using an Arduino‑compatible microcontroller, ultrasonic distance sensing, servo‑based directional scanning, and L293D‑driven differential motors. This project demonstrates real‑time obstacle detection, adaptive motion control, and a full Left‑Hand Rule maze‑solving algorithm.
- 🔍 180° servo‑based environmental scanning (front, left, right distances)
- 📡 Ultrasonic obstacle detection with adaptive thresholds
- 🤖 Left‑Hand Rule maze‑solving algorithm
- 🔄 Real‑time motion control (forward, pivot left, pivot right, reverse)
- ⚙️ Differential motor driving using L293D
- 🧠Dead‑end detection and escape logic
- 🔌 Fully autonomous operation with no external input
| Category | Technologies / Components |
|---|---|
| Programming | Arduino C / C++ |
| Microcontroller | AVR‑Based Board (ATMega32 / Arduino) |
| Sensors | HC‑SR04 Ultrasonic Sensor |
| Actuators | Servo Motor (Angle Scanning), DC Motors |
| Motor Driver | L293D H‑Bridge |
| Logic Algorithm | Left‑Hand Rule Autonomous Navigation |
The robot rotates a servo from 0° → 180°, capturing distances at key angles:
- 0° → Right side
- 80° → Front
- 170° → Left
Each reading is obtained using ultrasonic echo timing and converted to centimeters.
Based on three measurements:
front_distanceleft_distanceright_distance
The robot selects movement:
| Situation | Behavior |
|---|---|
| All paths open | Turn left and move forward |
| T‑junction | Prefer left turn |
| Right turn only | Turn right |
| Left turn only | Turn left |
| Straight available | Move forward |
| Dead end | Rotate 180° (pivot right twice) |
This logic is implemented in the decide() function.
Four primary movement functions:
move_Forward()move_Backward()move_Left()(pivot)move_Right()(pivot)
All controlled via L293D motor driver outputs.
When the robot detects:
- Front: 12 cm
- Left: 40 cm
- Right: 15 cm
It interprets:
- Left is clear → turn left
- Move forward until front distance ≤ threshold (~20 cm)
The servo keeps the robot centered by continuously re‑scanning after turns.
Mohammad Alaei AI Researcher & Computer Engineer đź”— https://alaeimo.ir
This project integrates robotics, control systems, real‑time sensing, and autonomous navigation, demonstrating algorithmic thinking, embedded programming, and hardware‑software integration.
