Skip to content

alaeimo/MazeSolverRobot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

🚗 Maze‑Solving Autonomous Robot

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.


🚀 Demo

đź”§ Robot (AI-enhanced, background removed)

Demo


đź§© Features

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

🛠️ Tech Stack

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

đź§  How It Works

1. Directional Scanning

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.


2. Decision‑Making Algorithm (Left‑Hand Rule)

Based on three measurements:

  • front_distance
  • left_distance
  • right_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.


3. Motion Control

Four primary movement functions:

  • move_Forward()
  • move_Backward()
  • move_Left() (pivot)
  • move_Right() (pivot)

All controlled via L293D motor driver outputs.


đź§ľ Example Behavior

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.


👨‍💻 About the Author

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages