A Differential-Drive Mobile Robot designed to autonomously navigate through an unknown maze using real-time sensor feedback and decision-making algorithms. The robot perceives its environment through proximity sensors, maps the maze, and determines the optimal path to the goal — all without human intervention.
Course: Embedded Systems
Team: 2101031 · 2101041 · 2101042
- 🤖 Autonomous Navigation — No manual control; the robot decides its own path
- 📡 Sensor Fusion — Ultrasonic and/or IR sensors for real-time obstacle detection
- 🧭 Maze Mapping — Builds an internal map of the maze as it explores
- 🔄 Differential Drive Kinematics — Independent left/right wheel control for precise turning
- 🧠 Decision-Making Algorithms — Wall-following and/or graph-based pathfinding (BFS/DFS)
- 📊 Real-Time Feedback Loop — Continuous sensor → decision → actuator cycle
┌──────────────────────────────────────────────┐
│ ROBOT SYSTEM │
│ │
│ ┌──────────┐ ┌──────────┐ │
│ │ Sensors │───▶│ MCU │ │
│ │(Ultrasonic│ │(Arduino/ │ │
│ │ / IR) │ │ RPi) │ │
│ └──────────┘ └────┬─────┘ │
│ │ │
│ ┌───────▼────────┐ │
│ │ Decision │ │
│ │ Algorithm │ │
│ │ (Wall-follow / │ │
│ │ BFS/DFS) │ │
│ └───────┬────────┘ │
│ │ │
│ ┌────────▼──────────┐ │
│ │ Motor Driver │ │
│ │ (L298N / L293D) │ │
│ └────────┬──────────┘ │
│ │ │
│ ┌──────────▼──────────┐ │
│ │ Differential Drive │ │
│ │ (Left & Right DC │ │
│ │ Motors) │ │
│ └─────────────────────┘ │
└──────────────────────────────────────────────┘
| Component | Description |
|---|---|
| Microcontroller | Arduino Uno / Raspberry Pi |
| Motor Driver | L298N or L293D H-Bridge |
| Drive Motors | DC Gear Motors (x2) |
| Sensors | Ultrasonic (HC-SR04) / IR Proximity |
| Chassis | 2-Wheel Differential Drive + Caster |
| Power Supply | Li-Po Battery / 9V–12V Supply |
| Frame | Custom / Acrylic Robot Chassis |
The robot maintains a fixed distance from one wall (left or right), navigating the maze by hugging the boundary.
if (front_clear AND left_clear):
turn_left()
elif (front_clear):
go_straight()
elif (left_clear):
turn_left()
else:
turn_right()
The robot builds a grid map as it explores, then applies Breadth-First Search (BFS) or Depth-First Search (DFS) to find the shortest path.
1. Represent maze as graph G(V, E)
2. Current cell = start node
3. Explore neighbors → update map
4. Apply BFS/DFS → find path to goal
5. Execute path via motor commands
The robot uses differential drive — two independently controlled wheels. Turning is achieved by varying the speed of each wheel:
| Motion | Left Wheel | Right Wheel |
|---|---|---|
| Forward | Speed v | Speed v |
| Turn Left | Speed 0 (or reverse) | Speed v |
| Turn Right | Speed v | Speed 0 (or reverse) |
| Rotate in Place | Speed -v | Speed v |
📦 Differential-Drive-Robot/
┣ 📄 2101031_2101041_2101042_Project_Report.pdf # Full project report
┣ 📄 2101031_2101041_2101042_project_presentation.pptx # Presentation slides
┗ 📄 Embedded Systems project proposal.pdf # Initial project proposal
- Arduino IDE or Python 3.x
- L298N Motor Driver Library
- HC-SR04 Ultrasonic Sensor Library
# Clone the repository
git clone https://github.com/naimurhamim/Differential-Drive-Robot-for-Autonomous-Maze-Solving-and-Mapping.git
# Open the project
cd Differential-Drive-Robot-for-Autonomous-Maze-Solving-and-Mapping- Open the
.inosketch in Arduino IDE - Select the correct board and COM port
- Upload the code
- Place the robot at the maze entrance and power on
- ✅ Successfully navigated multiple maze configurations
- ✅ Real-time obstacle detection with < 5 cm accuracy
- ✅ Mapped maze layout during traversal
- ✅ Identified and executed optimal path to goal
- Embedded Systems Design — Course Materials
- HC-SR04 Ultrasonic Sensor Datasheet
- L298N Motor Driver Datasheet
- Maze Solving Algorithms — IEEE Robotics Literature
MD Naimur Rashid
Department of Internet of Things and Robotics Engineering
University of Frontier Technology, Bangladesh (UFTB)
This project was developed for academic purposes as part of an Embedded Systems course. All rights reserved by the respective authors.
Made with ❤️ for Robotics & Embedded Systems