Skip to content

Repository files navigation

🗺️ Differential-Drive Robot — Autonomous Maze Solving & Mapping


📌 Overview

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


🎯 Key Features

  • 🤖 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

🏗️ System Architecture

┌──────────────────────────────────────────────┐
│               ROBOT SYSTEM                   │
│                                              │
│  ┌──────────┐    ┌──────────┐               │
│  │ Sensors  │───▶│  MCU     │               │
│  │(Ultrasonic│   │(Arduino/ │               │
│  │  / IR)   │    │ RPi)     │               │
│  └──────────┘    └────┬─────┘               │
│                       │                      │
│               ┌───────▼────────┐             │
│               │  Decision      │             │
│               │  Algorithm     │             │
│               │ (Wall-follow / │             │
│               │  BFS/DFS)      │             │
│               └───────┬────────┘             │
│                       │                      │
│              ┌────────▼──────────┐           │
│              │  Motor Driver     │           │
│              │  (L298N / L293D)  │           │
│              └────────┬──────────┘           │
│                       │                      │
│            ┌──────────▼──────────┐           │
│            │  Differential Drive │           │
│            │  (Left & Right DC   │           │
│            │   Motors)           │           │
│            └─────────────────────┘           │
└──────────────────────────────────────────────┘

🔧 Hardware Components

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

🧠 Algorithms

1. Wall-Following Algorithm

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()

2. Graph-Based Search (BFS/DFS)

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

⚙️ Differential Drive Kinematics

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

📁 Repository Structure

📦 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

🚀 Getting Started

Prerequisites

  • Arduino IDE or Python 3.x
  • L298N Motor Driver Library
  • HC-SR04 Ultrasonic Sensor Library

Setup

# 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

Upload to Arduino

  1. Open the .ino sketch in Arduino IDE
  2. Select the correct board and COM port
  3. Upload the code
  4. Place the robot at the maze entrance and power on

📈 Results & Performance

  • ✅ 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

📚 References

  • Embedded Systems Design — Course Materials
  • HC-SR04 Ultrasonic Sensor Datasheet
  • L298N Motor Driver Datasheet
  • Maze Solving Algorithms — IEEE Robotics Literature

👨‍💻 Author

MD Naimur Rashid
Department of Internet of Things and Robotics Engineering
University of Frontier Technology, Bangladesh (UFTB)

GitHub


📄 License

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

About

A mobile robot designed to navigate through a maze using sensor feedback and decision-making algorithms.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors