top of page

Maze Solving Robot

May 9, 2016
1 min read

Updated: Jul 23

An autonomous robot that doesn't just escape a maze — it maps the whole track first, then computes and drives the fastest route from start to finish. Steering is handled by a PID control loop that can be tuned live over Bluetooth.


The track

The maze is laid out as 3 cm-wide black lines on a white background, with the start and end points each marked by a solid black square.

How it solves the maze

  1. Survey: on the first pass the robot explores the entire track, building a comprehensive internal map of every junction.

  2. Wait: with the map stored on-board, it returns to the start and waits for the run command.

  3. Solve: placed at the start again, it computes and follows the fastest path from beginning to end using a left-hand-rule algorithm.

Sensing and control

  • Line sensing: 6 IR transmitter/receiver pairs track the robot's position across the line.

  • Control: a PID loop keeps it centered and smooth through the turns.

  • Live tuning: an HC-05 Bluetooth module lets the PID constants be fine-tuned from a PC on the fly — no reflashing between test runs.

  • Path-finding: left-hand-rule maze solving over the mapped track.

Why it's interesting

Mapping the maze once and then optimizing the route turns a reactive line-follower into something closer to a planner — it separates "learning the maze" from "running it fast."

Comments


bottom of page