Skip to the content
2 layers80 × 100 mmKevinYan FinalMicromouse, the printed circuit board in 3D

An award-winning, STM32F205-based autonomous Micromouse featuring a custom 2-layer PCB, 9-DOF IMU motion tracking, and C-based flood-fill navigation algorithms.

Size
80 × 100 mm
Copper layers
2
Thickness
1.6 mm
Parts
109
Nets
99
Pads
337
Tracks, vias
710, 153
Pours
2
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
14 Sep 2026
Updated
16 Sep 2026

Overview

KevinYan FinalMicromouse is an open-source printed circuit board by kevinyan0620, from the kevinyan0620/Micromouse_Gen1_ClubProject repository on GitHub. It is a 2-layer board of 80 × 100 mm with 109 parts on 99 nets, routed with 710 tracks and 153 vias.

Its parts include 33 resistors, 31 capacitors, 11 diodes, 9 ICs and 7 connectors. It belongs with the STM32 boards of this library.

README

README.md

Autonomous Micromouse (Generation 1)

This repository details the hardware and firmware design of a Generation 1 autonomous Micromouse. Built from scratch, the project encompasses component selection, schematic capture, 2-layer PCB layout, and embedded C programming.

Here is some pictures of our PCB design and our Micromouse!

Our Group LogoFinal Micromouse
Design_PicturesMicromouse_Pictures

We are actively iterating on this design to compete again in the upcoming AAMC!

Repository Structure

  • /Micromouse_STM32ApplicationCode: Contains the embedded C firmware and project files configured for the STM32 environment.

  • /The Mouse: The master KiCad project directory. Includes the full system schematics (wiring) and the 2-layer PCB layout files.

  • /Micromouse_Parts: Custom KiCad footprint and symbol libraries created for this project. These can be directly imported into KiCad for viewing or reuse.

  • /Pictures: Photographic documentation of the hardware assembly, revisions, and competition runs.

  • Final Pinout.png: A comprehensive STM32 pin mapping reference diagram required to understand the hardware-firmware interface.

  • Micromouse_BillOfMaterials_AssemblyVersion.xlsx: A detailed assembly BOM mapped by reference designator (e.g., R10) and subsystem, used for manufacturing guidance and population.

  • Micromouse_BillOfMaterials_SubmitVersion.xlsx: A consolidated purchasing BOM with grouped components and quantities, optimized for vendor procurement (e.g., Digi-Key).

  • Test_Run_With_Small_Maze.MOV: Video demonstration of the maze-solving algorithm in a scaled-down test environment prior to the competition.

Hardware Architecture

The electrical hardware was designed to balance form factor with sensor coverage and ease of routing. Components were carefully sourced via Digi-Key, maintaining a strict Bill of Materials (BOM) throughout the project lifecycle.

  • Microcontroller: STM32 MCU (STM32F205RET7) serving as the core processor, with pinouts optimized during the layout phase to minimize trace crossings and accommodate physical wiring constraints.
  • PCB Design: A fully hand-soldered, custom 2-layer board. Components were sourced via Digi-Key with a comprehensive Bill of Materials (BOM) managed throughout the project lifecycle.
  • Sensor Array: Custom 45-degree angled IR sensor placement for superior wall-detection accuracy compared to standard orthogonal layouts.
  • Inertial Measurement: Adafruit BNO085 9-DOF IMU (Gyroscope/Accelerometer) integrated to ensure highly accurate, drift-compensated turns.
  • User Interface: 4 onboard user LEDs and 2 tactile buttons for rapid field-diagnostics and mode switching.

Firmware and Control Systems

The software stack is written entirely in bare-metal C, focusing on real-time control and algorithmic efficiency.

  • Navigation: Implemented a flood-fill algorithm for autonomous maze solving and optimal path calculation.
  • Motor Control: Closed-loop PID control utilizing encoder feedback to maintain precise velocities.
  • Traction Management: Engineered acceleration and deceleration profiles to prevent wheel slip, ensuring accurate encoder tick counts.
  • Physical Realignment: The mouse was designed to purposefully "tap" the wall during the run once every 10 actions (forward or turning), when appropriate. This is done by moving forward to tap the front wall, then slightly back up to the center of the maze. This helps realign the micromouse in the maze and avoid tiny errors from accumulating and ruining the run.
  • Operational Modes: Designed a dual-mode system allowing a seamless transition from "Search Mode" (active IR and flood-fill) to "Speed Run Mode" (sensorless execution of the stored optimal path).

Assembly, Debugging, and Rework

Building the physical hardware required extensive hands-on debugging, microscope soldering, and creative problem-solving.

ChallengeRoot CauseEngineering Solution
Broken PCB PadMechanical stress / heatReworked using a microscope and microscopic gauge wire to bridge the broken connection.
MCU AssemblyFine-pitch footprintSuccessfully hand-soldered the tiny MCU using heavy flux, a microscope, and drag-soldering techniques within two attempts.
IR Sensor VerificationInvisible IR spectrumUtilized a smartphone camera to detect the IR emitter's dim purple glow, and a phone flashlight (which emits IR) to stimulate and test the IR receivers.

Lessons Learned & Generation 2 Roadmap

This first iteration provided invaluable lessons in Design for Manufacturability (DFM) and edge-case software handling. The following improvements are slated for the Generation 2 Micromouse:

  • Component Selection: Transitioning from Surface Mount (SMD) IR sensors to Through-Hole (THT) alternatives. SMD optoelectronics proved highly susceptible to thermal damage during hand-soldering.
  • Connector Standardization: Replacing the non-standard ST-Link header with a standard 0.1-inch pitch 1x4 connector to streamline firmware flashing.
  • Firmware Edge Cases: Patching a known bug that occasionally causes indefinite looping turns under extreme, undocumented maze conditions.
  • Path Optimization: Upgrading the Speed Run mode algorithm to calculate and execute diagonal movements, significantly reducing cornering time.

Parts

109
QtyValueFootprintReferences
160.1uF0.1uF Capacitor (VJ0805Y104JXAAT):CAPC2012X145NC5, C8, C10, C12, C14, C17, C18, C19, C21, C22, C24, C25, C26, C27, C29, C31
84.7uF4.7uF Capacitor (GRT21BR61H475KE13L):CAPC2012X140NC4, C6, C7, C9, C11, C13, C28, C30
61.8kΩ1.8kΩ Resistor (ERA_6AEB182V):RES_ERA6AEB182VR5, R9, R13, R17, R29, R33
6100Ω100Ω Resistor (ERA_6AEB101V):RC0805N_PANR2, R6, R10, R14, R26, R30
647kΩ4.7kΩ Resistor (ERA_6AEB473V):RES_ERA6AEB473VR3, R7, R11, R15, R27, R31
651Ω51Ω Resistor (ERA_6AEB510V):RES_ERA6AEB510VR4, R8, R12, R16, R28, R32
6IR EmitterIR Emitter (VSMY2853SL):DIO_VSMY2853SLD1, D2, D3, D4, D5, D6
6IR ReceiverIR Receiver (VEMT2523SLX01):XDCR_VEMT2523SLX01Q1, Q2, Q3, Q4, Q5, Q6
6MOSFETMOSFET (MMBF170LT1G):SOT-23_ONSU3, U4, U5, U6, U8, U9
5220Ω220Ω Resistor (ERA_6AEB221V):RES_ERA6AEB221VR1, R20, R21, R22, R23
310uF10uF Capacitor (GRM21BR61C106KE15L):CAPC2012X135NC1, C3, C20
3LOGOLOGOG***, G***, G***
210kΩ10kΩ Resistor (ERA-6AEB103V):RESC2012X60NR18, R19
22.2uF2.2uF Capacitor (GRM21BD72A225KE01L):MURATA_GRM21BD72A225KE01L_0C15, C16
24.7kΩ4.7kΩ Resistor (ERA_6AEB473V):RES_ERA6AEB473VR24, R25
2JST Battery ConnectorJST Connector (B2B_PH_K_S):JST_B2B-PH-K-SJ1, J2
2~Pololu_Motor:Pololu_MotorMotorLeft1, MotorRight1
11uF1uF Capacitor (GRM21BC72A105KE01L):CAPC2012X145NC23
122uF22uF Capacitor (CL21A226KOQNNNE):CAPC2012X140NC2
1Blue LEDGreen LED (LTST_C170GKT):LED_LTST-C170GKT_LTOLED5
1GNDTest Point (5095):KEYSTONE_5095TP2
1Green LEDGreen LED (LTST_C170GKT):LED_LTST-C170GKT_LTOLED4
1Gyro_Down_SocketGyro Socket (D01-9970642):HARWIN_D01-9970642J7
1Gyro_Up_SocketGyro Socket (D01-9970642):HARWIN_D01-9970642J6
1H BridgeH Bridge (L293DD):SOIC127P1032X265-20NU2
1Left ConnectorConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ3
1Power LEDGreen LED (LTST_C170GKT):LED_LTST-C170GKT_LTOLED1
1Red LEDGreen LED (LTST_C170GKT):LED_LTST-C170GKT_LTOLED2
1Reset ButtonReset Pin (ul_TR1-01):SPST_TR1_NDCSW1
1Right ConnectorConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ4
1STM32 MicrocontrollerPackage_QFP:LQFP-64_10x10mm_P0.5mmU7
1SocketSocket (M22-7130442):HARWIN_M22-7130442J5
1SwitchSwitch (EG1218):SW_EG1218S1
1User Black Push ButtonUser Button (KS11R23CQD):SW_KS11R23CQDSW2
1User Red Push ButtonUser Button (KS11R23CQD):SW_KS11R23CQDSW3
1V_BATTest Point (5095):KEYSTONE_5095TP1
1Voltage RegulatorVoltage Regulator (AZ1117IH-3.3TRG1):SOT230P700X185-4NU1
1Yellow LEDGreen LED (LTST_C170GKT):LED_LTST-C170GKT_LTOLED3

The 108 most common of 109 parts.

Similar boards

  • 2 layers208.8 × 393.9 mmFerris, the printed circuit board in 3D

    Ferris

    pierrechevalier83/ferris

    A low profile split keyboard designed to satisfy one single use case elegantly

    109 parts1.3k
  • 2 layers89 × 100 mmHub16, the printed circuit board in 3D

    Hub16

    joshajohnson/Hub16

    A macro pad with 16 keys, two rotary encoders, a four port USB hub, and plenty of LEDs!

    109 parts388
  • 2 layers191.8 × 121.3 mm8-Bit CPU 32k, the printed circuit board in 3D

    8-Bit CPU 32k

    slu4coder/Minimal-UART-Computer-1-2

    Legacy: Version 1 and 2 of my TTL-only CPU featuring UART I/O, an expansion port, 512KB SSD at up to 10MHz clock speed

    109 parts184
  • 2 layers77.4 × 128.5 mmOak, the printed circuit board in 3D

    Oak

    tpcarlson/synth-diy

    Mostly Eurorack projects

    109 parts107
  • 2 layers110 × 97.2 mmPcbBot, the printed circuit board in 3D

    PcbBot

    BerkeleyHCI/PolymorphicBlocks

    A Python-based hardware description language for PCBs for higher-level (block-diagram / system-architecture level) PCB design through libraries of directly reusable subcircuit generators.

    109 parts94BSD-3-Clause
  • 2 layers126.5 × 103.6 mmInput, the printed circuit board in 3D

    Input

    jamessa/Pragmatic

    A modular split keyboard kit.

    109 parts73MIT
  • 2 layers55 × 100 mmESP32AY, the printed circuit board in 3D

    ESP32AY

    djspawnbrest/ESP32AY

    ZxPod - ESP32 based AY multiformat player

    109 parts59GPL-3.0
  • 2 layers70.5 × 128.3 mmAttenuator Offset II, the printed circuit board in 3D

    Attenuator Offset II

    Blinken-Lights/ASCII

    ASCII Modular hardware and software repo

    109 parts50MIT

Questions

How big is the KevinYan FinalMicromouse PCB?

It measures 80 × 100 mm and has 2 copper layers, 1.6 mm thick.

What parts does the KevinYan FinalMicromouse use?

109 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 KevinYan FinalMicromouse KiCad files?

From the kevinyan0620/Micromouse_Gen1_ClubProject repository on GitHub, at the commit this page was made from: the board is The Mouse/KevinYan_FinalMicromouse.kicad_pcb and its schematic The Mouse/KevinYan_FinalMicromouse.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the KevinYan FinalMicromouse design in my own project?

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