![status](https://img.shields.io/badge/status-complete-brightgreen) ![MCU](https://img.shields.io/badge/MCU-TMPM4KNF10AFG-blue) ![core](https://img.shields.io/badge/Arm-Cortex--M4-0091BD) ![language](https://img.shields.io/badge/language-C-A8B9CC) ![IDE](https://img.shields.io/badge/IDE-Keil%20µVision-CC0000) ![PCB](https://img.shields.io/badge/PCB-4--layer%20KiCad-663399) ![license](https://img.shields.io/badge/license-MIT-blue)
# 🐭 Toshiba Micromouse **Autonomous 16×16 Maze-Solving Robot** *Register-level firmware on Arm Cortex-M4* Micromouse *Robot exploring and solving the maze*
--- ## Overview Micromouse is a classic robotics competition: an autonomous palm-sized robot explores a 16×16 grid maze, maps the walls, & solves for the center. This project implements the entire stack from scratch: custom 4-layer PCB, mechanical chassis, and register-level firmware, with no reliance on external HAL libraries. --- ## Platform
Toshiba ### **Toshiba TMPM4KNF10AFG**, Arm Cortex-M4 with FPU
The TMPM4KNF10AFG comes from the **[M4K Group](https://toshiba.semicon-storage.com/us/semiconductor/product/microcontrollers/txz4aplus-series/m4k-group.html)** of Toshiba's **[TXZ+™4A Series](https://toshiba.semicon-storage.com/us/semiconductor/product/microcontrollers/txz4aplus-series.html)**, a line of 160 MHz Arm Cortex-M4 microcontrollers built for motor and inverter control. It pairs a fast floating-point core with dedicated on-chip hardware for driving motors, reading encoders, and sampling analog sensors. The same parts show up in BLDC/PMSM drives, HVAC compressors, power tools, and factory automation, and they carry IEC 60730 self-diagnosis support for appliance functional safety. | Capability | Role in this build | |-----------|--------------------| | Cortex-M4 @ 160 MHz + FPU | Navigation, PID, and flood-fill maze solving | | On-chip motor & encoder hardware | Wheel feedback and PPG-generated motor PWM | | High-speed analog sensing | IR wall detection | Here the same silicon runs a much smaller problem: a 1 kHz driven by an interrupt and closed-loop PID over two brushed DC gear-motors. Dedicated hardware handles encoder counting and motor PWM, so the CPU stays free for navigation and flood-fill maze solving. --- ## Built With
| ARM | Keil µVision | KiCad | Fusion 360 | Git | MATLAB | |:---:|:---:|:---:|:---:|:---:|:---:| | **Arm Cortex-M4** | **Keil µVision** | **KiCad** | **Fusion 360** | **Git** | **MATLAB** | | Register-level C | IDE / Build / Flash | 4-layer PCB | Chassis CAD | Version Control | Data Analysis |
## Gallery
Custom PCB    *Custom PCB*
Fusion 360 Robot Render (Outdated Version) *(Outdated Version) Fusion 360 render of the full mechanical assembly*
--- ## Documentation | Path | Contents | |------|----------| | [`src/README.md`](src/README.md) | Firmware architecture, control loops, pin map, timer config | | [`hardware/README.md`](hardware/README.md) | Hardware overview: chassis (Fusion) + PCB (KiCad) | | [`hardware/pcb/README.md`](hardware/pcb/README.md) | Board specs, layout, schematic, component list | | [`docs/README.md`](docs/README.md) | Docs index: assets, evidence, and analysis tooling | | [`docs/evidence/README.md`](docs/evidence/README.md) | Module-test checklist and captured evidence | --- ## Quick Start ```text IDE: Keil µVision Target: TMPM4KNF10AFG (Arm Cortex-M4) Debug: CMSIS-DAP Flash: 512 KB on-chip ``` [`Quick Start`](docs/README.md) ---
**Kevin Le**  •  2026