Skip to content

2023 · Hardware / Robotics

Maze-Solving Autonomous Robot Car

Graph-theory driven autonomous maze navigation on a Raspberry Pi Pico.

TVSEF 2023 Award Winner · Graph Theory

Autonomous maze navigation testing obstacle avoidance and wall-following algorithms.

The problem

Navigate a maze you've never seen with no GPS and no LiDAR. The car has to walk the walls, remember every cell it maps, and recover from dead ends — all with cheap binary sensors and a microcontroller.

The constraint

The Pi Pico reads forward/left/right/down from distance sensors that bounce unpredictably off angles. Its motors have no encoders, so the car can't trust odometry: it must *calibrate* how far it rolls and infer its position cell-by-cell from sensor events, not from wheel counts.

What I built

The project proves the graph algorithm *before* the hardware. In Pygame, a simulation loads a maze from a text file, runs a breadth-first search from start to goal, and animates the path (stack overlays, visited nodes) over a grid. On the real Pi Pico, MicroPython runs the same idea in three acts: a calibration step measures how long 447 mm of travel takes to derive a block-timing constant, a wall-follow loop drives the maze with the four sensors and a dead-end recovery (buzz and reverse), and a mapping routine builds the collected maze dynamically in memory, growing its grid as the car enters new rows/columns.

The outcome

Demonstrated autonomous exploration, dead-end recovery, and solved-maze traversal on physical hardware, backed by a simulation that proved the algorithm — winning a TVSEF 2023 regional science fair award.

Links