Maze Solving Robot
A line-following robot programmed to navigate and solve a maze featuring curved paths, right angles, 4-way and 3-way decision points, and dead ends — the fastest of 20 competing teams.
Overview
Built as part of a university design challenge, this robot had to autonomously navigate a physical maze featuring curved paths, right-angle turns, dead ends, and long straight runs. Working as a 3-person team, we placed 1st out of 20 competing teams — finishing the maze faster than every other group in the class.
Hardware
The robot was assembled from pre-built components — motors, sensor arrays, a microcontroller unit, and a motor driver — and integrated onto a chassis. Rather than building hardware from scratch, the challenge was in characterising and modelling these components accurately enough to build a reliable control system on top of them.
Modelling & Control System Design
The centrepiece of the project was developing a mathematically grounded control system using MATLAB Simulink. We first characterised the physical parameters of the robot — wheel radius, wheelbase, motor response — and used these to derive a dynamic model of how the platform behaves.
From that model, we designed controllers that translated high-level commands into precise physical motion. The result was a system where commanding the robot to move 1 metre forward would produce exactly 1 metre of travel, and commanding a 20-degree turn would yield exactly 20 degrees of rotation — repeatably and without manual tuning guesswork. This model-based approach gave us a level of precision and predictability that was difficult to achieve through empirical calibration alone.
Algorithm
The maze-solving logic was implemented in MATLAB Simulink and deployed to the embedded target. The robot used IR sensors to follow the line and had to correctly handle every topology the maze could present:
- Curved paths: Continuous sensor feedback with differential speed adjustment to keep the robot on the line through bends
- Right-angle turns: Detected by the sensor pattern crossing a junction, executing a precise 90° rotation using the calibrated control system
- 3-way and 4-way decision points: Junction detection logic to classify the intersection type and select the correct path
- Dead ends: Detected when the line disappears entirely, triggering a 180° turn to backtrack
Results
The robot consistently completed the full maze in under 30 seconds during competition runs. Precise motor calibration and aggressive PID tuning were the key factors that differentiated the team's performance from other competitors.
Learnings
The biggest takeaway was the value of model-based design. Rather than tuning behaviour empirically, grounding the system in measured physical parameters made our controller reliable from the start. It also deepened my understanding of how mathematics translates into real-world behaviour — and how small inaccuracies in a model (motor variance, surface friction) can compound in a physical system.