Home - CSULB-EATS/micromouse_template GitHub Wiki

๐Ÿญ CSULB Micromouse

Welcome to the CSULB Micromouse Project, part of the Embedded Applications and Technology Society (EATS) at California State University, Long Beach.
This program teaches students how to design, build, and program a fully autonomous robot capable of solving a 16ร—16 maze using sensors, motor control, and intelligent algorithms.


๐Ÿš€ Purpose

Micromouse gives hands-on experience in:

  • Embedded systems and firmware (STM32, C/C++)
  • Circuit and PCB design (power, sensors, motor drivers)
  • Real-time control and PID tuning
  • Maze-solving algorithms (Floodfill, Dead Reckoning)
  • System integration and debugging

No prior experience is required โ€” just curiosity and a willingness to learn.


Learning Resources

Topic Video
Motors & Encoders Watch
IR Sensors Lecture Watch
Altium PCB Designs Watch
CSULB Altium Workshop (2024) Watch
STM32 Programming Watch

Project Modules

1. Power System

  • Li-Po battery regulation (3.7 V โ†’ 3.3 V)
  • Decoupling capacitors for stability
  • On/off power switch and charging safety

2. Motors & Encoders

  • Dual DC motors with H-Bridge driver (L293D/TB6612FNG)
  • PWM control for speed and direction
  • Magnetic encoders for feedback (360 counts/rev)
  • Introduces hardware timers and interrupts

3. IR Sensors

  • IR emitter + phototransistor pairs detect walls
  • ADC reads reflected light intensity
  • Requires calibration for thresholds
  • Enables wall detection for navigation

4. Microcontroller Integration

  • STM32 Nucleo-F411RE microcontroller
  • Schematic with 2ร—19 headers for Nucleo board
  • SWD header for ST-Link debugging and flashing

5. STM32CubeIDE Setup

  • Configure GPIO, ADC, and timers
  • Write basic firmware (button โ†’ LED example)
  • Build, flash, and debug using CubeIDE

6. Floodfill Algorithm

  • Maze-solving algorithm using Manhattan distance
  • C implementation with a 2D distance array
  • Simulate using Mackoroneโ€™s Micromouse Simulator
  • Optional: Implement reverse-path optimization

Development Tools

  • STM32CubeIDE โ€” main firmware IDE
  • Fusion 360 / KiCad โ€” schematic and PCB layout
  • GitHub โ€” team collaboration and version control
  • Logic Analyzer / Oscilloscope โ€” debugging signals

โš™๏ธ Recommended Components

Component Example Source
MCU STM32 Nucleo-F411RE Digi-Key / Mouser
H-Bridge TB6612FNG Dual Driver Pololu / Adafruit
Motors Pololu 30:1 Micro Metal Gearmotor w/ Encoder Pololu
Sensors INL-5AMIR15 + SFH313FA Mouser / Digikey
Battery 3.7 V Li-Po 2S Pack Amazon / Adafruit

๐Ÿงญ Typical Timeline

Phase Focus Deliverable
Weeks 1โ€“3 Power & PCB Basics Power schematic + PCB review
Weeks 4โ€“6 Motors & Encoders Motor test via PWM
Weeks 7โ€“9 IR Sensors Wall detection readings
Weeks 10โ€“12 PID Control Straight motion + turns
Weeks 13โ€“15 Floodfill Algorithm Maze-solving simulation

๐Ÿ Competitions

CSULB Maze Trials

End-of-spring-semester in-house event for testing hardware and control code.

AAMC โ€“ All-American Micromouse Competition

Intercollegiate competition hosted by UCLA each May.
Robots from CSULB, UCLA, UCSD, and UCI compete on a standardized 16ร—16 maze.


๐Ÿ’ฌ Resources


๐Ÿง  Acknowledgments

Adapted from the open-source resources of IEEE at UCLA Micromouse and community guides from Pololu and Mackoroneโ€™s Micromouse Simulator.
Maintained and developed by CSULB EATS Micromouse Team.


Last Updated: October 2025