PROJECT DOSSIER
Zouzou · maze-solving robot
It explores a maze it has never seen, proves which way out is shortest, drives home by itself, then races it. On tape or between walls.
TRY IT
Watch it draw the map.
The same solver as the firmware, loops included. Draw your own maze, then compare with the old turn list.
Interface in English.
In pictures
0 / 6 · Photos of the finished robot and of the sessions are on their way. Each frame is reserved.
In this document
01 · The challenge#
Zouzou is a Club Electro-Power project at EHTP. The brief fits in one sentence: a two-wheeled robot has to get out of an unknown maze, then find the shortest way again, and do it in front of a room of children who must be able to follow what it is doing.
The classic method, remembering a list of turns and erasing dead ends, fails as soon as the maze contains a loop: the left-hand rule can circle forever. So Zouzou measures where it is instead of only remembering what it turned.
02 · One run, one picture#

| Turns | Sequence | |
|---|---|---|
| Exploring | 17 | S R B L L L R R B L L L L B S L L |
| Shortest route | 5 | R S R L L |
This maze has no loops, so writing down the turns would be enough. The map is for the mazes where it is not.
03 · How it thinks#
| Step | What happens |
|---|---|
| Follow | Five reflectance sensors become one line position, from -2000 to +2000. A PD controller steers on it at 250 Hz. |
| Read the junction | The robot creeps across, notes the side roads as its outer sensors cross them, then puts its wheels on the junction before turning. |
| Map | Every turn is 90°, so the robot always faces one of four ways. Road length plus heading give each junction a coordinate. |
| Recognise | Arriving at a coordinate already on the map means: I have been here. That one test makes loops harmless. |
| Stop early | Roads run along two axes, so the exit is never closer than |dx| + |dy|. A road that could not beat the best route even in a straight line is not explored. |
| Race | Dijkstra’s algorithm, where a turn costs as much as 80 mm of road. The route is stored with every road length, so the robot knows when to brake. |

Why it wobbles more at speed
ÿ + kL·ẏ + kv·y = 0
ωₙ = √(kv)
ζ = (L / 2)·√(k / v)
With y the sideways offset of the axle, v the speed and L the distance from the axle to the sensors, damping grows with L and falls as 1/√v. Sensors mounted further forward calm the robot down; more speed needs more Kd.
04 · Hardware#

| # | Part | What it is for |
|---|---|---|
| 1 | 5 × TCRT5000 | See the black line: three steer, two notice side roads |
| 2 | Ball caster | Front support |
| 3 | MAX7219 8×8 matrix | The face |
| 4 | ESP32 DevKit | The brain, and the Wi-Fi for the phone |
| 5 | Motor driver | L298N, TB6612FNG, DRV8833 |
| 6 | 2 × N20 motor with encoder | Drive, and count 0.15 mm steps |
| 7 | 3 × 18650 and 5 V buck | Power |
| 8 | 3 × HC-SR04 | Hear walls and obstacles |

Three lithium cells, four habits
- A 3 A fuse right at the battery.
- The buck converter is set to 5.0 V with a multimeter before anything is connected.
- The battery never goes to VIN directly; every HC-SR04 ECHO returns through a 1 k / 2 k divider.
- One common ground. The firmware limits the PWM for 6 V motors and refuses to start a run below 9.9 V.
05 · The remote, with no app#
Zouzou makes its own Wi-Fi network and serves one page. Any phone works, with no internet. Without a phone, the BOOT button on the ESP32 is enough to calibrate, explore and start the speed run.

| Tab | What is on it |
|---|---|
| Maze | Wake up, explore, speed run; the mode where the children choose at each crossing; every turn tried, the shortest way, both times. |
| Play | Joystick, an 8×8 pad that draws on the face, scrolling messages, an eight-key piano. |
| Map | The maze as the robot has drawn it so far, live. |
| Lab | Sensor bars, ultrasonic distances, encoder ruler, wheel test, every gain and measurement. |
06 · A show for children#
The robot does not need the theatre to solve the maze. The children need it to see what is happening. Five acts, about fifteen minutes.
| Act | They see | They learn |
|---|---|---|
| 1 · Meet the robot | It scrolls its name. A child draws a heart and it appears on the face. | A screen is dots someone switches on. |
| 2 · You are the brain | It stops at each crossing, arrows blink, they shout a direction. | Guessing is slow. Is there a rule? |
| 3 · The robot’s turn | Dead ends, dizzy eyes, and the maze drawing itself on a big screen. | A robot cannot see the maze: it must go and find out, and remember. |
| 4 · Did it learn? | It drives home by itself. | It is using what it remembered. |
| 5 · The race | Straight to the exit. Fireworks on the matrix. | Remembering made it fast. Compare the times. |
The question that makes act 3 land: “What would you tell the robot to always do?” Someone says “always go left”. That is the left-hand rule, and they invented it.
07 · Design decisions#
| Decision | In one line |
|---|---|
| A matrix instead of the OLED | 64 big LEDs read from the back of a room, and the MAX7219 is driven in twenty lines with no library. |
| Encoders from the first version | Planned as an upgrade, they turned out to be the foundation: without distance there is no map. |
| A map and Dijkstra | Knowing where the robot is fixes both loops and route choice at once. |
| Stop exploring early | Proving the route is shortest is cheaper than driving every road. |
| Three ultrasonic sensors, one switch | The solver never needed to know there was a line, so it also works between walls. |
| Software guards the battery and the motors | Three cells are too much for 6 V motors unless something limits them. |
08 · What is verified, and what is not#
- Verified: the solver has no hardware in it, so it runs on a PC. A simulated robot with realistic measurement errors drove 3000 random mazes with loops; every stored route was the true shortest one.
- Verified: the whole firmware is type-checked on a PC against stand-in Arduino headers, and the turn list and the matrix pictures have their own tests.
- In progress: gains, wheel measurements and the wall-maze constants are starting values, to be tuned on the real chassis.
- Not yet demonstrated: wall mode has not run on the finished chassis.