Micromouse Jeff Bouchard Qian Wang Karla Ananias
Altera DE0 Nano Cyclone IV FPGA 50 MHz clock 3 expansion headers 32 MB SDRAM 2 kB EEPROM 8 LEDs 2 pushbuttons 4 DIP switches 8-bit ADC
System on a Chip (SoC)
Modified Flood Fill Algorithm Applies concept of water always flowing from a higher elevation to a lower one Assigns cells values based on distance to the center Recursively updates cell-values when needed, not every time a new cell is reached Uses less memory and is faster than the standard flood fill algorithm
Push the current cell location (2,1) onto the stack. Pull the cell location (2,1) from the stack. Since the distance at (2,1) – 1 = 0 is not equal to md = 2, the minimum of its open neighbors (2,0) and (1,1), update the distance at (2,1) to md + 1 = = 3. Push all neighbor locations (3,1), (2,0) and (1,1), except the center location (2,2), onto the stack. Cell (2,0) Cell (1,1) Cell (3,1) Stack Top Cell Value Calculations
Motor Drive System H-bridge driver allows full FPGA control of motor Encoder disk & photointerrupter provide feedback Optocoupler outputs square-wave Switchable motor voltage (12 V / 15 V)
Motor Schematics Motor Driver (right) Encoder (top)
H-Bridge Motor Driver Images from:
Motor Torque/Speed (12 Volts) (121, 33.7) Speed = 20 cm / sec
Motor Torque/Speed (15 Volts) (202, 33.7) Speed = 34 cm / sec
Encoder Output 3 V P-P output 32 pulses / rot. 1 pulse ≈ 3 mm 57 pulses ≈ 1 unit square
LCD Used in debugging to display wall distances Longtech Optics LCM1602SK—built-in serial communications module Communication through SPI—less pins (MOSI, CLK), simpler interface than I 2 C
Sensors 4 IR emitter/detector pairs used to detect walls (left, front-left, front-right, right) 6° transmission angle to limit interference from other sensors 30 ° receiver angle to ensure proper detection
Sensor Schematics Transmitters controlled together—limits pins & complexity Receivers controlled individually—limits power consumption
Software/Hardware Designed using Altera Quartus II (C, VHDL) Software modules: modified floodfill algorithm, obtaining sensor distances, counting encoder pulses, motor control (move forward, reverse, U-turn), sending characters/commands to LCD Hardware modules: SPI ADC, SPI LCD