Bulebule: the making of a micromouse robot 🐭

Clara Casas Castedo & Miguel SΓ‘nchez de LeΓ³n Peque

2018-02-16

Introduction

Micromouse

Hardware

Prototyping

Schematic

Soldering

Robot physics

Goals

  • Straight lines
  • Turns
  • πŸ‘ πŸ˜‚

Limitations πŸ˜…

  • Acceleration

System

Angular velocity

\displaystyle \begin{aligned} \overline{v_2} &= \overline{v_1} + \overline{w} \wedge \overline{r_{21}} \\ v_2 \overline{u} &= v_1 \overline{u} + (w \overline{u_z}) \wedge (2d \overline{t}) \\ v_2 &= v_1 + 2dw \\ \\ w &= \frac{v_2 - v_1}{2d} \end{aligned}

Linear velocity

\displaystyle \begin{aligned} \overline{v_M} &= \overline{v_1} + \overline{w} \wedge \overline{r_{M1}} \\ v_M \overline{u} &= v_1 \overline{u} + (w \overline{u_z}) \wedge (d \overline{t}) \\ v_M &= v_1 + wd \\ &= v_1 + \left(\frac{v_2 - v_1}{2d}\right)d \\ \\ v_M &= \frac{v_1 + v_2}{2} \end{aligned}

Mechanical design

Wheels... but how many?

Image taken from micromouseusa.com

Image taken from micromouseonline.com

Image taken from micromouseonline.com

Image taken from micromouseonline.com

Better start with 4...

More about "tetra" designs.

CAD designs

Control

Approach

  • Neural networks?
  • State space control?
  • ...

PID! πŸ‘ πŸ˜‚

Image taken from micromouseusa.com (Futura Project)

Characteristics

Speed profile

Calculating turns

From the motion equations:

\displaystyle \begin{aligned} \dot{x} &= v_m cos \theta \\ \dot{y} &= v_m sin \theta \end{aligned}

Considering \dot{w} \equiv cte. and v_m \equiv cte.:

\displaystyle \theta = w_0 t + \frac{k}{d} t^2

Discrete integration approximation

Notebook in GitHub

Maze-solving algorithm

Flood fill 🐭

Image taken from micromouseusa.com (Futura Project)

Implementation details

Software design

Peripheral Use
ADC1 Phototransistors
ADC2 Battery
TIM1 Sensors state machine
TIM2 Left motor quadrature encoder
TIM3 PWM signals for left and right motors
TIM4 Right motor quadrature encoder
USART Serial, Bluetooth
GPIOS Infrarred emitters, LEDs, buttons
SYSTICK Control

Sensors state machine

  • 16 KHz trigger
  • Sequentially power on and off
  • 4 states * 4 sensors

Systick

  • 1 KHz trigger
  • Update ideal speed, encoder, distances
  • Motor control

Main

  • Setup
  • Buttons, debug LEDs
  • Side sensors calibration
  • Algorithm
  • Communication
  • Collision detection

Required tools

Hardware

  • Battery charger
  • Power supply
  • Programmer
  • Soldering station
  • Polimeter
  • Logic analyzer
  • Oscilloscope

Software

  • C language - libopencm3, gcc, clang format
  • Python - notebooks, scripts, communication
  • Continuous integration - github, travis
  • Reviews & management - github
  • Documentation - doxygen, sphinx
  • Board design - upverter

Maze

Errors, debugging...

Eye-opening experience

\displaystyle y = e^{\frac{a}{x+b}}

More on micromouseonline.com

Costs

Very optimistic costs

  • Around 60 €
  • Half is just for motors+encoders (second hand)
  • Electronic parts and boards are really cheap (carefully selected)

Realistic costs

  • Lots
  • Replacements
  • Shipping costs
  • More than 100 €
  • Not counting tools, maze...

And then...

Time... πŸ˜‚

Next stop: Portugal πŸŽ‰

Current state

Done

  • Functional micromouse
  • 0.8 ~ m/s (straight)
  • 0.666 ~ m/s (turn)
  • 5 ~ m/s^2
  • Only search speed
  • Flood fill

TODO

  • Gyroscope integration (PCB redesign)
  • More complete maze exploration
  • Path selection
  • Fast run
  • Diagonals
  • New wheels (maybe)
  • ~60 issues in GitHub πŸ’ͺ πŸ’ͺ

Thanks ❀️

Green Ye

Who shares details about his micromice and posts many useful resources in micromouseusa.com

Peter Harris

Who posts many useful and detailed resources in micromouseonline.com

Kato-san

Who shares details about his micromice and posts some useful resources