Version 1 marked our very first attempt at designing and building a fully functional micromouse from scratch.
The project began with research into sensors, drive train options, power systems, and suitable MCUs. After shortlisting multiple options, we finalized the components and moved into implementing basic systems.
- Sharp IR Sensors were selected for wall detection, paired with an STM32 microcontroller (our first time working with STM32).
- Learned and implemented:
- Timers, DMA, and Interrupt Handling.
- ADC controls (sampling times, cycles, and modes).
- Software-based Low Pass Filters to smooth sensor readings.
- Started with basic encoders.
- Upgraded to quadrature encoders using STM32’s encoder mode.
- Developed code for distance calculations.
- Integrated an IMU to fill data gaps, enabling sensor fusion for more accurate distance and turning measurements.
- Experimented with different PWM signals to find the optimal frequency range for the chosen motors and motor controllers.
- Implemented center-aligned PWM for smoother motion.
- Used interrupts for consistent motor performance.
- Implemented PID control for motion stability.
- Adopted the Flood Fill algorithm for maze solving, both in simulation and on the actual robot.
- Chose a 4-wheel mechanical structure.
- Designed and 3D printed gears and wheels.
- Produced custom grippy silicone wheels using 3D-printed molds.
- PID tuning proved tricky, especially for Kd and Ki parameters.
- Mouse control was unpredictable at times; flood fill overflow caused MCU crashes.
- Mechanical design was robust but dust buildup affected control.
- ADC mappings and PWM behavior changed over time due to environmental and hardware factors.
- Exposed circuitry on dot board prototypes led to occasional erratic behavior.
- Gained hands-on experience with STM32 peripherals and real-time embedded control.
- Understood the trade-offs between mechanical reliability and maintenance.
- Learned the importance of modular and shielded circuitry for consistent performance.
- Identified areas for major improvement in control stability, algorithm safety, and sensor calibration — all addressed in Version 2.
Version 2 focused on addressing the major challenges faced in V1 and improving the micromouse’s reliability, control, and maintainability.
The goal was to create a more robust hardware design, predictable control system, and better user configurability.
- Designed and implemented a fully functional custom PCB as the base for the robot.
- Provided clean, shielded, and modular circuitry compared to the exposed dot board in V1.
- Reduced wiring complexity and improved reliability.
- Robot now runs at a fixed control loop frequency of 400 Hz.
- Made PID tuning much easier and predictable.
- Ensured all control systems and filters operate consistently.
- Added closed-loop control for motors, using encoder feedback to regulate speed.
- Improved acceleration and deceleration handling for better maze navigation.
- Combined IMU and encoder data for more accurate and reliable distance and turning measurements.
- Reduced reliance on individual sensor readings that might drift or fail.
- Implemented a user-friendly menu on an OLED display with two navigation buttons.
- Allowed:
- Configuration of settings.
- PID tuning.
- Real-time display of sensor data.
- Added Bluetooth connection to tune and control the mouse remotely.
- Enabled quick parameter changes without stopping the robot.
- ADC curve drift over time still persists.
- Dust buildup in gears continues to affect precision — to be addressed in future iterations.
- PCB Design: Altium Designer
- MCU: STM32 series
- Programming Languages: C/C++, Python
- Firmware Development: STM32CubeIDE
- Simulation & Testing: Micromouse Simulator 🐭
- Control & Algorithms: PID, Flood Fill Algorithm
- Extra: Bluetooth modules, OLED display integration





