Micromouse from scratch | Sensors and Motors | Piccola

Selecting suitable sensors and motors

Isuru Dissanayake
Analytics Vidhya
5 min readOct 28, 2019

--

Precision and speed are two parameters that we should highly consider when building a micromouse. High precision and high speed would be ideal! However, in practice there’s usually a trade-off between these two. Selecting suitable sensors and motors will help you to build a micromouse with good precision and speed. In this article we will discuss about the things that you should consider selecting sensors and motors. Also we will be discussing about their effects on different parameters of your micromouse.

Also, consider reading our first article of this series by following this link. Micromouse from scratch | Introduction | Piccola

Selecting sensors for your micromouse

Sensors are used in micro-mouses to find the distances to the walls around the mouse without touching them. In the market, there are few categories of sensors that can do this.

  • sonar sensors
  • IR distance measuring sensors — sharp IR
  • Time of Flight(ToF) sensors

When you consider these sensors individually, they all have their own ups and downs and that makes us difficult to take a decision. Therefore, we decided to compare these sensors under few parameters that are more relevant to our application.

  • Reaction time — speed
  • Accuracy
  • Range
  • Physical size
  • Price

The ideal case was to find a small, high speed, low cost sensor that can take the reading in the expected range(10mm — 300mm is fine) with higher accuracy .

From the above chart we can clearly identify, sharp IR and ToF sensors are more suitable for our application. However, sharp IR sensor is little bit fast than ToF sensor, but it’s more costly. Since both of the sensors are suitable for our application, by considering the price we decided to go with ToF sensors. But, it’s worthy noting that if your intention is to run your micro-mouse in really high speeds, sharp IR would be the one to select.

ToF sensor we selected — VL6180X by Pololu (10mm — 200mm)

Sensors defines the limits of precision and speed of the mouse, why ?

Generally, all the movements of a micro-mouse are directly or indirectly depend on the reading you get from the distance sensors. Therefore, the time taken by the sensors to give the distance readings and their accuracy also affects the motion of the micro-mouse. If your sensors are too slow, then sometimes you might have to reduce the speed of the mouse. If your sensor reading are not are accurate, then there’s a possibility of taking a wrong move by the mouse. Finally, spending more money on sensors is not always a waste but make sure that rest of your hardware match the sensors.

Take Advantage by taking reading early

Most of the mouses have two sensors(sensor 2 and 4) facing the walls diagonally(45 degrees angled to the wall) and there’s very specific reason for that. Since these sensors are angled, we can take the distances to the side walls from the robot even before robot coming to the particular place. Therefore, now you have more time to react to the reading and also this allows robot to take early decisions. This will be really helpful if your sensors are slow.

General rule is to have the motors and sensors apart from each other as much as possible. This gives you more freedom in tuning PID’s since you get the particular reading before arriving to the particular position.

Selecting motors for your micromouse

Motors will affect your micro mouse in almost all the aspects and good motors will make you win! In general micro mouse designs, the width of the micro mouse is decided by the length of the motors. Since the practice is to make the mouse small as possible, designers tend to use small motors and they end up picking micro-metal gear motors. Interesting fact is, there are so many different micro-metal gear motors with different RPM values.

The most common micro-metal gear motor in the market is the well known N-20 motor. Also, developers have specifically made encoders for these motors. Also, since the sizes of the motors of different RPM’s are almost same, switching between motors is easy.

Even though we have decided to use N-20 motors, we are not yet done. Now we have to decide the RPM value that we are going to use. Since micro mouses are supposed to run fast the tendency is to go for higher RPMs. But, higher the RPM, difficult to control. Also, there’s no point of using high RPM motors, if your sensors are slow. Other than that, in practice when the speed is high the robot tends to do lot of mistakes. But on the other hand, using slow motors is not a good practice in this case.

So the actual situation is, there’s no such perfect motor for a micro mouse. Finally, it comes to the experience that you have with motors and basic robotics. However, if you are a beginner we would suggest you to go with 200–400 RPM. But in general a motor with 600RPM is fine and it’s definitely fast enough. Also, if you want to either increase or decrease the speed after buying motors, try changing the diameter of the wheels.

Stay focused for rest of the article series!

For all the codes, schematic diagrams and pcb design visit our GitHub repository.

--

--