
How we won our micromouse competition
Table of Contents
What even is micromouse?
To spare you the details, traditionally, micromouse is a competition where a small robot mouse is placed at a corner of a maze and must find its way to the center. However, in our competition, we had to build a robot that could perform three tasks:
- Follow a line
- Solve a maze
- Communicate with a control station to adjust speed when encountering sharp turns
Parts We Chose
We followed the advice of our seniors and learned from their mistakes. Based on their experiences and our own, we chose the following parts:
- IR Sensors: We chose the TCRT5000 for its reliability. While there are many alternatives, this sensor fits various chassis designs, making it adaptable.
- Microcontroller: We used an Arduino Nano because it is small, affordable, and has sufficient pins for our needs. Additionally, it offers other advantages we’ll mention later.
- Motor Driver: Although the L298N is functional, its size and tendency to overheat led us to use the TB6612FNG instead.
- Motors: TT motors are slow and degrade over time, complicating PID tuning. We opted for N20 motors, which are fast and compact but lack torque for heavier robots.
- Bluetooth Module: We used the HC-05. Despite limited experience with it, it served our purposes well.
The Process
From the beginning, our design was guided by two main principles:
- Minimize the number of things that can go wrong.
- Make the robot as small and as light as possible.
Here’s how we implemented these principles:
- The previous year’s we had a lot of problems with loose connections and bad cables, so we decided to minimize the number of connections by making the entire robot a single PCB.
- Connect the motors to a single timer on the microcontroller. This is to ensure that both motors receive the same frequency.
- Because the robot was designed to be a single PCB, the placement of the sensors was accurate down to the teeth.
First PCB
We designed the first PCB as a prototype to test its line-following capabilities and to identify needs for the final design. The prototype succeeded in line following but failed in maze solving because:
- The sensors were too far from the center of the robot.
- Sensor placement suitable for maze solving differed from that for line following.
We also identified design elements that wouldn’t be part of the final design:
- TT motors, which we used initially, were unreliable and had a tendency to degrade over time.
- The L298N motor driver was too large, leading us to switch to the TB6612FNG.
Second and Final PCB
We designed the second PCB to address the issues of the first.
- Sensors were placed as close to the center of the robot as possible.
- N20 motors replaced TT motors, with additional mounting holes for TT motors as a contingency.
- The motor driver was replaced with the TB6612FNG.
Although the second PCB resolved many issues, it introduced some new ones.
What Problems did we face?
We encountered numerous problems throughout the process. Here are some key issues:
Sensor Placement
Line following requires sensors mounted on an extended arm, whereas maze solving needs sensors as close to the robot’s center as possible.
For maze solving, sensors need precise placement to detect dead ends and enable tight, accurate turns. Due to close and short lines in the maze, we used six sensors instead of the usual three:
- Two for left and right turns.
- Two for the middle and front.
- Two for detecting tight turns and ensuring accurate navigation.
We hadn’t accounted for the front and tight turn sensors in the second PCB, so we added them with adhesive and wires.
Market
The worst challenge was the limited availability of necessary parts.
- We sought a specific gear ratio for the motors but had to settle for a slower one.
- We wanted long rubber wheels for better grip but settled for available ones that fit the motor shaft.
PCB manufacturing time and cost
Designing the PCB was straightforward, but manufacturing took a week per iteration, costing approximately 600 EGP each. We completed two iterations and wanted a third but, due to time and cost constraints, decided the second PCB was sufficient.
What we learned and what we would do differently
Making a PCB Initially Was Not the Best Decision
If money and time are not concerns, feel free to make as many PCBs as needed until you get it right. However, if that’s not the case (and it usually isn’t), I recommend working with acrylic. It’s faster and cheaper, and mistakes can be corrected within hours instead of days. Once you have a clear design, then create a PCB with all the gathered experience.
Don’t Make the Robot a Single PCB
Making the robot a single PCB was also not ideal. During the competition, some classmates created a separate sensor array PCB and connected it to the main robot. This approach allowed for flexible sensor placement. Combining this with a main PCB can result in a cheaper and more flexible robot.
Consider the Weight
Don’t make the robot too light, as it might lose grip on the floor. We had to weigh ours down to improve traction.
Our Performance
- Line Following: We were the fastest in the competition, achieving a time of 9.6 seconds.
- Maze Solving: We secured second place due to a penalty because of a technical error, with a solve time of 26 seconds, The fastest time in the competition.
Here are videos of our robot in action:
Line Following:
Maze Solving:
Finally, many thanks to our seniors, especially Mohab Zaghloul, for their help and advice. I am also grateful to have worked with such a talented team.
Team
Walid Khamees | Mohamed Maher | Mostafa Elsayed | Aly Mohamed Farid | Ahmed Samy | Marwan Emad | Marwan Samy | Mohamed Atef | Omar Said | Seif Hany | Yousef Osama |