Totoro Micromouse banner

Totoro Micromouse

19 devlogs
16h 51m 25s

A maze-solving robot based on the UKMARS Gemini platform

This project uses AI

Used Google Gemini, Claude, and Qwen Chat to help me write some functions & debug

Demo Repository

Loading README...

nirvaannn

Shipped this project!

Hours: 16.86
Cookies: 🍪 361
Multiplier: 17.87 cookies/hr

I made a micromouse robot that can solve a 16x16 maze autonomously, and has competed in the 2026 national UKMARS competition!

It was very challenging and I learned a lot, including how to build reliable hardware, software & hardware accuracy, debugging skills, accurate positioning and more!

I’m proud it was able to complete the full-size micromouse maze and I highly recommend anyone interested in robotics to look into micromouse!

nirvaannn

What have I done since last devlog?

  • Made it use the MPU6050 gyroscope to go straight
  • Made it go only 95% of the cell if there was a wall in the front but then removed this due to error building up
  • Tweaked the values for optimal balance between PID and sensing points
  • Lots of testing in the maze with a variety of configurations (parking garage/blind driving, spirals, zigzag etc.)

Tomorrow is the real UKMARS national competition!

0
nirvaannn

What did I do today?

  • Used a spreadsheet to measure how much to go in the cell
  • Used #define to make it easier to store these values in the code
  • Changed the values and tested in the maze
  • (with AI’s help) found out that it was going short due to braking compensation being applied every time compared to just at the end
  • Added a bool to the calculateCellPulses() function specifying whether to apply braking compensation or not (learned about default arguments in functions)
  • Found that the values from 1 cell to another in my spreadsheet don’t add to 100%
  • Recalculated the values and tested (it worked!)
0
nirvaannn

What have I done this time (a lot…):

  • Tuned the drive distance in the flood fill loop
  • Added back the 3rd sensor value at 20% of the cell from the sensing point
  • Tested the robot in the maze
  • 3D printed a back support to stop the robot tilting when starting drive
  • Tested on a variety of cell distances and compared encoder counts in a spreadsheet
  • Found that it overshot by a constant braking distance of around 60 counts each time
  • More testing in the maze with updated cell calculation function incorporating braking distance
  • Measured distance travelled with expected distance in a spreadsheet & tweaked the value
0
nirvaannn

What did I do in this session:

  • Revert a change from last time which caused malfunction
  • Tuned Kp and Kd values
  • Add a cell driving test
  • Measured how much to drive in the cell
Attachment
0
nirvaannn

What have I been up to?

  • Made it PID drive on both left and right alls
  • It now only uses PID drive after 2 confirmed wall readings
  • Calibrated the Kp and Kd values for the shorter distance
Attachment
0
nirvaannn

What did i just do?

  • Restructure the PID drive flag to be an int instead of bool
  • Added PID for the right wall

So now it drives smoothly as long as 1 wall is present

0
nirvaannn

I made it use the wall sensor to improve driving in a straight line using PID controller!

0
nirvaannn

What did I do during this session?

  • Wrote a cell-based distance driving function
  • Redid it because the first one had issues
  • Switched from Pico 2 to normal Pico to improve reliability
Attachment
0
nirvaannn

What did I do today?

  • Got the mouse to bump into wall when turning 180Âş - this helps it calibrate itself and stay straight!
  • Got the mouse to be able to return to the goal

Next I need to add a fast mode!

0
nirvaannn

What did I do today?
i worked more on the maze solving loop, trying to fix some issues with wall detection

turns out, it has to go to the sensing point before reading the side walls which interferes with the sense-think-act loop!

so now it reads walls of the next cell while moving from the previous to next cell!

0
nirvaannn

I did a lot today:

  • Implemented positioning for the robot
  • Thought about the maze loop algorithm
  • Created the maze loop algorithm

I also vibe-coded an app to watch the floodfill loop from the mouse (but that’s not included in this time bc it’s AI)

Attachment
0
nirvaannn

What did I do today?

I wrote the floodfill algorithm in Arduino after finishing the learning slides!
I added multiple functions & it compiles!
I learned about how to structure code efficiently & also the std:queue system

Next steps: implement this with the movements of the robot to make it solve a maze!

Attachment
0
nirvaannn

What did I do just now?

  • Learned about floodfill through UCLA IEEE document
  • Made a presentation to learn about it
  • Wrote the base algorithm in pseudocode, next i have to do wall checking!
Attachment
0
nirvaannn

I got the MPU to work and added it to the turning
Now it uses encoder-based turning with MPU for checking/compensation

0
nirvaannn

What did I do today?

  • Used an I2C scan to make sure my MPU shows up
  • Tested the MPU with help from Claude
  • integrated this into my main code
  • got it to log through the Serial
  • tried to use it for turning but don’t know where to put it (interrupt, loop(), core 2 etc.)
Attachment
0
nirvaannn

I tried to add the MPU 6050 gyroscope in, but it just hangs & doesn’t give any readings so i don’t know why!

Attachment
0
nirvaannn

A quick session where I:

  • Hardcoded the maze to see how well it drives without PID
  • Added a config menu so I don’t need to keep recompiling to change mode!
Attachment
0
nirvaannn

I worked for 1 hour to:

  • get wall following to work
  • rewrite the stateful wall following function
  • calibrate different turning compensation and Kp/Kd values

and now it works (kind of…)

0
nirvaannn

I added Bluetooth-based configuration to my robot - no more recompiling just to change Kp or Kd values!

Attachment
0