Skip to the content
2 layers92.1 × 108.1 mmMinos mouse pcb first iteration, the printed circuit board in 3D

Minos mouse pcb first iteration

epfl-cs358/2024fa-minosmouse5

There's a very specific hobby, and that's micromice. Micromice are little “mice” that are placed in a maze, and the aim is to solve the maze as quickly as possible.

Size
92.1 × 108.1 mm
Copper layers
2
Thickness
1.6 mm
Parts
18
Nets
48
Pads
100
Tracks, vias
414, 86
Routed
Yes
KiCad
KiCad 8.0 (file 20240108)
Created
2 Oct 2024
Updated
23 Dec 2024

Overview

Minos mouse pcb first iteration is an open-source printed circuit board by epfl-cs358, from the epfl-cs358/2024fa-minosmouse repository on GitHub. It is a 2-layer board of 92.1 × 108.1 mm with 18 parts on 48 nets, routed with 414 tracks and 86 vias.

README

README.md

CS-358 Project: MinosMouse 🐭

Yaman Ben Fraj - Yuri Chlebny - Mehdi Alaoui - Rudolf Yazbeck - Georges Azzi - Youssef Neji

Project overview

There's a very specific hobby, and that's micromice. Micromice are little “mice” that are placed in a maze, and the aim is to solve the maze as quickly as possible. This is what our project is all about, and we were motivated to do it after seeing various videos in which competitors design micromice that manage to solve a maze in a matter of seconds. What particularly impressed us was the speed and precision with which these micromice solve the maze.

More precisely, the micromouse solves the maze in two phases, the first of which is the search run 🔎, in which Minosmouse maps the maze, with the aim of finding an optimal path to the goal. Returning to the start, it potentially explores a new, perhaps more optimal path. Once back at the starting cell, the micromouse proceeds to the speed run 🏁, in which it must solve the maze as quickly as possible, explaining the highly competitive nature of micromice!

The aim of our project was to design a micromouse from scratch and achieve performances comparable to those observed in competition. To achieve this, we had to explore and master various fields, including 3D printing, mechanical engineering, microcontroller programming and control theory. This project is a fine example of creativity and technical rigor combined.

⚠️ Please consider consulting the project proposal for more details about MinosMouse :memo:Project proposal:memo:

MinosMouse design

The micromouse is 85x89mm (length x width), and weighs [TBD]g with battery (48g). The micromouse is really small and fits in the hand. To make it even lighter without compromising its solidity, Minosmouse has the particularity of being made in a honeycomb design.

Capture d’écran 2024-12-15 à 13 25 48

MinosMouse, though relatively small, is a concentrate of technology in hardware, software and 3D design. In such a small space, you need to reconcile performance and lightness. To this end, here is a list of the elements that enabled us to make our micromouse and achieve our goals, both from a hardware and software point of view. We've added an OLED screen to the micromouse, to give a real-time view of the walls it sees and the direction it's taking.

Hardware Overview

Our micromouse has the following hardware components:

  • 1x ESP32 Board 36 Pins
  • 2x N20 DC Gear Motor $6V$, 750RPM, with encoders
  • 2x Sensor: Time of flight VL6180X (5mm-200mm)
  • 1x Sensor: Time of flight VL53L4CD (1mm-1300mm)
  • 1x IMU MPU-6050
  • 1x MX1508 Motor Driver
  • 1x $9V$ Battery
  • 1x Switching Regulator Module R-78E5.0-0.5 ($5V$ output)
  • 1x OLED Screen 128x64 SSD1306
  • 1x Ball Caster 1/2"
  • 2x Wheel 32x7mm

Software Overview

While exploring the maze for the first time, Minosmouse uses a floodfill algorithm to give a distance cost to each cell of the maze. In parallel, it makes an internal map of the walls thanks to the ToF sensors. When it reaches the goal, it is then able to compute the shortest path in terms of cell distance with these measurements. In order to achieve precise movement, Minosmouse makes extensive use of control theory, more specifically PID systems. Thanks to this, the micromouse can correct itself in real time using its various sensors. In addition, the micromouse uses a finite-state machine to make a decision after each of its movements. FSM

Challenges

The micromouse is designed to be light and fast, which poses a real challenge throughout its development. We have to constantly bear in mind that every change we make to our micromouse design has a significant effect on micromouse movement.

The main challenges are:

  • A lightweight micromouse. We need to make the micromouse as light as possible, so that the motors can support its weight without difficulty so they can run at full speed.
  • A fast micromouse. Unsurprisingly, the aim of a micromouse is to be as fast as possible, while still delivering reliable movements.
  • A small micromouse. The smaller the micromouse, the more possibilities it has in the maze, such as smoother turns or the ability to cross diagonals like straight lines.

Schematics

These circuits show how all the components are connected:

(Pin connections in this circuit may not be representative of the real circuit Pinout below)

Pinout

ComponentPin NameESP32 Pin
Sensors, IMU, ScreenI2C SDA21
Sensors, IMU, ScreenI2C SCL22
Built-in LEDLED_BUILTIN2
Left MotorINT126
Left MotorINT232
Right MotorINT327
Right MotorINT433
Left Side SensorCE_PIN_LEFT25
Right Side SensorCE_PIN_RIGHT23
Front SensorXSHUT_PIN_CENTER13
Left EncoderSIGNAL_FEEDBACK_YELLOW_LEFT18
Left EncoderSIGNAL_FEEDBACK_GREEN_LEFT19
Right EncoderSIGNAL_FEEDBACK_YELLOW_RIGHT35
Right EncoderSIGNAL_FEEDBACK_GREEN_RIGHT14
Power & Ground5V and GNDV5 and GND

Making MinosMouse

Soldering

Power Connections
  1. Solder the 2-PIN JST female connector to the 9V battery connector.
  2. From the 2-PIN JST male, solder two wires for power (one for the motors, and the rest for the switching regulator, to supply the rest of the components with $5V$) and one wire for ground.
  3. Motor driver: Solder a wire for power and a wire for ground (discussed in step 2.) to the motor driver + and - pins.
  4. Switching regulator: Solder the other wires for power and ground to the VIN and GND pins of the switching regulator.
  5. Motors:
  • Left: Solder the motor + (Red wire) et - (White wire) to the motor driver (pins next to "Motor-A"). Solder the encoder + (Black wire !) and - (Blue wire) to the switching regulator VOUT and GND pins.
  • Right: Solder the motor + (Red wire) et - (White wire) to the motor driver (pins next to "Motor-B"). Solder the encoder + (Black wire !) and - (Blue wire) to the switching regulator VOUT and GND pins.

  1. Sensors, IMU, Screen: Solder wires to VIN and GND pins of these components.
  2. ESP32: Solder wire to V5 and GND pins to supply power to the ESP32.
  3. Solder all power and ground wires from steps 6 & 7 together. Once all the components to be supplied with $5V$ are connected together by two wire harnesses (power and ground), solder these two wire harnesses to the switching regulator's VOUT & GND pins.
Data Connections
  • Encoders
    1. Left motor encoder: Solder the yellow wire of the encoder to the pin 18 of the ESP32 & the green wire of the encoder to the pin 19.
    2. Right motor encoder: Solder the yellow wire of the encoder to the pin 35 of the ESP32 & the green wire of the encoder to the pin 14.
  • Motor Driver
    1. Left motor: Solder a wire between the pin INT1 of the motor driver and the pin 26 of the ESP32 (Forward). Same for the pin INT2 & pin 32 (Backward)
    2. Right motor: Solder a wire between the pin INT3 of the motor driver and the pin 27 of the ESP32 (Forward). Same for the pin INT4 & pin 33 (Backward)

📝 In an ESP32 system, peripherals like ToF sensors, IMUs, and OLED displays communicate with the microcontroller on the same $I^2C$ bus, a multi-device serial protocol. Each device has a unique address, allowing the ESP32 to send commands and receive data.

  • Common $I^2C$ bus:

    First, all these components have to be soldered via 2 common cable harnesses, which are soldered to pins 22 (SCL) and 21 (SDA) of the ESP32 (c.f Pinout).

    ‼️ Ensure proper insulation using heat shrink tubes‼️

  • Sensors:

    We need to switch off the sensors one by one in order to redefine their addresses, because if they use the same addresses on the $I^2C$ bus, they'll send data to the same address and the data read by the ESP will be incorrect.

    The 3 sensors have the same default address: $\texttt{0x29}$, so we redefine 2 addresses so that the 3 sensors have 3 different addresses

    1. Right sensor: Solder a wire between the CE pin & the pin 23 of the ESP32
    2. Left sensor: Solder a wire between the CE pin & the pin 25
    3. Front sensor: Solder a wire between the XSHUT pin & the pin 13
  • IMU:

    Nothing more to do than solder the SCL / SDA pins of the IMU, the IMU default address is $\texttt{0x68}$.

  • OLED Screen:

    Nothing more to do than solder the SCL / SDA pins of the screen, the screen default address is $\texttt{0x78}$.
    ⚠️ You may consider soldering wires with a female pins, so that you can easily remove the screen.

💭 Often, the default $I^2C$ address is written on the rear face of the component.

After all these steps, you should have the following backbone:

Step By Step Assembly

⚠️ Consider uploading the program to the ESP32 before screwing it to the top case ⚠️

  1. 3D-Print the parts in this directory (Chassis.stl, TopCase.stl and 2x MotorBracket.stl).

  1. Mount the wheels on the motors
  2. Screw the ball caster and the motors to the chassis (thanks to the motor brackets printed beforehand)

  1. Screw every hardware components soldered to the top case
  2. Screw the top case to the chassis
  3. Connect motors with 6-pin connector
  4. Mount the screen on the back of the micromouse

Software Installation

Follow this tutorial to install the necessary extension required for this project.

Getting Started !

Once you've uploaded the code to the micromouse and your maze is ready, connect a $9V$ battery to the micromouse.

  1. Place it in the maze, centered in the starting cell.
  2. Press the reset button once
  3. 🔎 Search-run: Move your hand briefly in front of the front sensor. It will start its search-run
  4. 🏁 Speed-run: Once the mouse has returned to the starting point, place it correctly in the starting cell. Once you're ready, briefly move your hand in front of the front sensor to start the speed-run.

Going further: PCB

It is possible to further improve MinosMouse in order to avoid having all that extra cable. One possible way of doing this is with a PCB: all connections will be made in the PCB, with no visible wires.

As a proof of concept, here is the prototype of the PCB version of MinosMouse we did:

image

Parts

18
QtyValueFootprintReferences
4Conn_01x01_SocketConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalJ8, J9, J10, J11
2Conn_01x02_SocketConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ14, J15
2Conn_01x04_SocketConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ12, J13
2Conn_01x19_SocketConnector_PinHeader_2.54mm:PinHeader_1x19_P2.54mm_VerticalJ2, J3
1Conn_01x06_SocketConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ17
1GyroscopeConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ18
1MOTOR RIGHTConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ7
1MOTOR_LEFTConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ6
1center sensorConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ4
1left sensor AConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ1
1right sensor AConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ5
1sensor left BConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ16

Similar boards

  • 2 layers27.9 × 16.5 mmPowerSSO-24 breakout, the printed circuit board in 3D

    PowerSSO-24 breakout

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    18 parts1.2k
  • 2 layers42.7 × 13.7 mmStm32-mini12864, the printed circuit board in 3D

    Stm32-mini12864

    VoronDesign/Voron-Hardware

    Cool Hardware designed by the Voron Design group

    18 parts1.1kGPL-3.0
  • 2 layers41.2 × 46.6 mmThumb cluster left, the printed circuit board in 3D

    Thumb cluster left

    JesusFreke/lalboard

    A 3D-printed keyboard inspired by the DataHand

    18 parts993
  • 2 layers44 × 51.3 mm4272MAVcoder R4, the printed circuit board in 3D

    4272MAVcoder R4

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    18 parts915
  • 2 layers28.3 × 14.3 mmTap Photosensor PCB, the printed circuit board in 3D

    Tap Photosensor PCB

    VoronDesign/Voron-Tap

    Tap is a nozzle-based z-probe for the V2 and Trident printer designs. The entire toolhead moves to trigger an optical switch. Tap offers many advantages:

    18 parts716GPL-3.0
  • 2 layers20.3 × 15.2 mmL0 stepper driver, the printed circuit board in 3D

    L0 stepper driver

    Luos-io/luos_engine

    Open-source and real-time orchestrator for cyber-physical-systems, to easily design, test and deploy embedded applications and digital twins.

    18 parts546MIT
  • 2 layersMooltipass, the printed circuit board in 3D

    Mooltipass

    limpkin/mooltipass

    Github repository dedicated to the mooltipass project

    18 parts531
  • 2 layers42.5 × 28.8 mmC5VRX JACK DIY V2, the printed circuit board in 3D

    C5VRX JACK DIY V2

    Twotoz/C5VRX

    Ultra-minimal, zero-CPU 5.8 GHz analog FPV video receiver using ESP32-C5 Wi-Fi 6 PHY MODEM_DIAG, BitScrambler WBFM demodulation & resistor DAC CVBS

    18 parts515GPL-3.0

Questions

How big is the Minos mouse pcb first iteration PCB?

It measures 92.1 × 108.1 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Minos mouse pcb first iteration use?

18 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Minos mouse pcb first iteration KiCad files?

From the epfl-cs358/2024fa-minosmouse repository on GitHub, at the commit this page was made from: the board is CAD/PCB/minos mouse pcb first iteration.kicad_pcb and its schematic CAD/PCB/minos mouse pcb first iteration.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Minos mouse pcb first iteration design in my own project?

Its repository states no licence, so its author keeps all rights: ask epfl-cs358 before reusing the design.