MMkit micromouse PORTED sample code

By | January 23, 2018

MMkit is an educational micromouse from Portugal. I first went to the Portuguese micromouse contest in 2016 and had a great time. The organisers, Universidade de Trás-os-Montes e Alto Douro (UTAD), and a local company Globaltronic, had a basic stepper micromouse, MMkit. Designed for students, there were several of these running in the maze. I asked if I could have one to try out and made it run in that contest. Last month, I re-wrote my code for it and now that code is available on Github. The mouse is pretty simple and uses the Arduino Leonardo platform. It uses rechargeable AA cells for its energy source. All the features needed to make a fully working micromouse are there and the ATMega32u4 processor has just enough resources to get the job done.

MMkit micromouse from Globaltronic in Portugal


Most of the pins on the processor are used giving the user two stepper drives, two user LEDs, two switches and four wall sensors. A DC boost converter provides a steady 7.4V for the DRV8834 stepper driver chips. Micro-stepping options allow smooth running of the motors. The standard Arduino serial port is available with a pinout that conveniently matches many bluetooth serial bridges. This makes for easy testing without worrying about trailing cables. Since the design is essentially an Arduino Leonardo, there is also a micro USB connector for programming directly from the Arduino IDE.

MMkit micromouse block diagram


I chose to write the software using the Sloeber version of Eclipse which knows how to build projects for the Arduino and other AVR designs. This is a way better environment than the Arduino IDE which struggles with more complex projects. Sloeber is cross-platform so you can run it on Windows, Mac and Linux machines.

The code is available at There are instructions and other notes in the readme file so I won’t go into too much detail here. It is simple code based largely on stuff from one of my early stepper mouse designs with a couple of ideas about command processing that I found in a Japanese mouse. Sorry – I do not recall which one. It is fully functional in as much as it can search the maze, find a route and return for two speed runs. The first will use in-place turns only, the second run substitutes smooth 90 degree turns.

It is more a demonstrator than a competitor so there are plenty of ways it can be improved even with the existing hardware platform. Some suggestions are given in the readme and others may be found in the comments.

You can find the original firmware for the MMKIT mouse here:

There is a  page about the mouse here:

The Portuguese organisers have a paper about the contest and the mouse

Have a look. Make some improvements. Find some bugs. Let me know.


2 thoughts on “MMkit micromouse PORTED sample code

  1. Peter Harrison Post author

    An oversight. Sorry. I don’t think there is a page about the mouse itself but I have edited the post to include what links I could find.

Leave a Reply