You are on page 1of 21

1

MightyMouse: An Autonomous Maze Solving Robot


Kelly Ridge, Sanjeev Giri, Peter Shaw, Jason Flynn
and challenging senior design project. 1) Objectives: The primary objective of this project is to build an autonomous vehicle, a micromouse, according to IEEE specifications which is able to navigate to the center of a maze. A secondary objective is to design a full size maze also in accordance to IEEE specifications. 2) Constraints: Constraints for the micromouse come from regulatory competition rules. The mouse size, time allowed to solve the maze, methods for solving the maze, and a monetary limit placed on the final prototype are all constraints imposed by IEEE competition rules. a) Size: The mouse is can be no larger than 25cm square. b) Time Limit to solve maze: During a IEEE competition the micromouse has 10 minutes to solve the maze and complete the run. c) Battery life: The batteries must supply power to the micromouse for at least 10 minutes. d) Micromouse expenses: The total cost for Micromouse must not exceed $500. e) Maze: The maze consists of 16 x 16 cells; each cell is 18 cm square. The southwest corner is the starting cell. The four center cells are the destination. B. Solution Method 1) Brief Description: There are two fundamental phases to our design process. The first phase was to design individual components of the micromouse and get them to operate according to individual specifications independent of one another. The second phase was to interface the individual components and have the micromouse operate as one autonomous unit. The first semester of the Senior Design course was dedicated to working on the individual components. The goal of the second semester was to integrate the individual components. The individual working components include the navigation sensor array, mapping algorithm, distance and bearing devices, motor control, and chassis design An effective micromouse design must perform the following functions in order to find the center of a maze a) b) c) d) e) Recognize walls and openings Stay centered within each cell Know position and bearing within the maze Control the distance needed to travel Make precise 45 and 90 turns

AbstractThe IEEE micromouse competition has been a popular event among engineering students and engineers. A micromouse is an autonomous vehicle whose objective is to find the center of a 16 by 16 cell maze within 10 minutes. After exploring the maze for some time, the micromouse will attempt to make its fastest run from the starting point to the destination cells. This report summarizes the design and implementation of the MightyMouse project for the spring and fall semesters of 2005. The design method of the MightyMouse project consisted of two stages. The first stage was to design and construct individual components. The second stage of the design process was to interface the components to form the final prototype. The individual components of micromouse system consist of the motor control system, navigation sensor array, digital compass for detecting orientation, and a mapping system for navigating the maze intelligently. A test plan was developed in order to validate the overall performance of the micromouse. A life product life cycle and reliability reports have also been written in hopes to encourage and aid future micromouse teams.
Index Termsmicromouse, competition autonomous, maze, IEEE

HE micromouse is an autonomous vehicle whose goal is to find the center of a maze. The official IEEE Micromouse Competitions began in 1987 at the World Micromouse Competition, where David Otten of MIT captured first and second place with his MITEE Mouse. This competition used a new scoring system design to reward intelligence, efficiency, and self reliance. Micromouse competitions have become a popular event among engineering students and engineers. II. PROJECT DESCRIPTION A. Problem Statement Design and construction of a micromouse requires a broad range of engineering skills. This combined with an open design process makes the micromouse project a very practical
Manuscript received December 12, 2005. This senior design project was sponsored by Dr. Herb Hess of the Electrical Engineering Department, University of Idaho.

I. INTRODUCTION

2 f) Perform mechanically g) Navigate the maze intelligently 2) Overview of Micromouse functions: The mouse must recognize walls and openings in order to navigate the maze and prevent crashes. The navigation sensor array provides the mouse with this information. The navigation sensor array consists of a combination of four short-range and two longrange infrared sensors. The mouse must stay centered within the maze to prevent compounding errors in distance and position calculations. A digital compass determines if the deviates from its desired bearing. This information is sent to the motor control system to make proper corrections, either speeding up or slowing down one wheel. The motor control portion of the project is responsible for safely moving the micromouse through the maze. There are two maximum speeds, one for the mapping portion of the competition and one for the racing portion of the competition. The motor control code is given a distance to travel as input. It is then the responsibility of the motor control to accelerate and decelerate the mouse during travel. The rate of acceleration is fixed based upon the traction of the wheels on the maze surface. In order to ensure that the mouse is not slipping, the motors are controlled with PI feedback. The shaft encoders (built into the motors) read in the speed of the wheels and send this data to the motor control code that adjusts the speed of each wheel accordingly. The mouse must keep track of position and bearing during each run to provide navigation information to the mapping system. The shaft encoders that are built in to the motors monitor the distance the micromouse travels. The electronic compass determines which direction the micromouse is facing. The combination of these two systems provides the data needed by the mapping and navigation systems. To move efficiently through the maze the micromouse must be able to make precise 90 turns. The digital compass is polled during turns to provide control feedback to the motors and navigation systems. The mechanical soundness of the micromouse design is an important factor. The chassis needs to keep the systems stable during operation so accurate data is recorded. The chassis also keeps the drive train in line in order to reduce the number of path corrections made. To successfully and efficiently solve the maze the mouse must make intelligent navigation decisions based on its current position. The mapping system utilizes a modified flood-fill algorithm to determine the best solution as the maze is discovered. C. Component Descriptions 1) Sharp GP2D Sensor Array: The short-range sensor array consisting of two Sharp GP2D120 infrared sensors is interfaced to the microcontroller and can determine when there is an opening to the left or the right of the mouse. These sensors are positioned so that the angle of incidence with a sidewall is 90 degrees. The side sensors crossfire across the body of the mouse thus keeping the sensors outside the minimum firing range of 4cm. The side sensors are mounted directly to main circuit board of the mouse. The long-range sensor array, consisting of two Sharp GP2D12 infrared sensors, determines walls in front of or behind the mouse and outputs their approximate distances. The long-range sensors cross-fired across the length of the micromouse preventing the sensors from exceeding the minimum sensing range of 10cm.

Fig.1 Navigation Sensor Array

2) Devantech Digital Compass: The Devantech electronic compass is interfaced to the microcontroller via an I2C interface. It returns values between 0 and 255 indicating its rotational orientation. A one-time calibration is performed that improves accuracy when the compass is moved to new latitude. The compass experiences strong electromagnetic interference when it is in close proximity to the DC motors. The minimum distance required to yield accurate readings is approximately three inches. The compass is also most accurate when it is positioned horizontal to the ground. These constraints forced the compass to be mounted on a pole well above the rest of the micromouse. 3) Mapping System: The mapping system solves a full 16x16 maze using input from the sensor array, shaft encoders, and digital compass. The modified flood filled algorithm used to solve the maze is explained in detail in the method of solution section for the Mapping System. 4) Motor Drive System: The motor drive system consists of two DC motors with built in shaft encoders that are powered by two monolithic H-bridge ICs. The ICs contains all of the free-wheel diodes and power transistors necessary for driving the motors. Also, the input to the ICs is CMOS and TTL compatible. These properties allow us to minimize the size of the circuitry necessary to power the mouse. The Zilog project for controlling the H-bridge also incorporates the shaft encoders, I2C compass, and the serial HyperTerminal output. This integration was done to help ensure that the code for controlling the motors will not interfere with these other functions. The built in shaft encoders are 16 count and output a square wave. These magnetic encoders rely on hall-effect sensors and are used for indication and control of both, shaft velocity

3 and direction of rotation as well as for positioning. The encoders provide the feedback for the motor drive system. 6) Chassis: The final prototype chassis was made out of carbon fiber. This allowed the chassis to be strong and rigid but also lightweight. The chassis has a skid-plate design with motor mounts incorporated into the carbon fiber. 7) Maze: The final maze design involved creating a maze that was transportable as well as one that would last, thus providing a solid testing and competition platform for future micromouse projects. The maze base consists of 4-5x5 ft interlocking pieces of inch ACX plywood. The walls were cut into 18cm long by 3cm high strips from 12mm thick plywood. The walls come in four different configurations: perimeter, double-post, single-post, and no-post. The wall sides were painted white and the tops red. The base was painted flat black. Paint colors are specified by IEEE micromouse competition rules. D. Method of Solution large change in range. For the micromouse to make decisions based on sensor input there must be a direct correlation between the A/D value and the actual range. To find this correlation a linear regression was performed on the averaged short-range sensor data producing an equation relating the A/D value to actual range. The function of the short-range sensors is to determine side openings. The short-range sensors are continuously sampled by the A/D converter to determine side openings. Taking into account that the side sensors crossfire across the body of the mouse: to still be able to determine an opening, the mouse would have to read a range value greater than approximately 18 cm (corresponding to an A/D value of 323). The function of the long-range sensors is to determine the mouses proximity to front and rear walls. This information is useful in mapping the maze as well as providing the motor control algorithm with information on deceleration to avoid front and rear crashes. Regression data from the manufacturers website was used for the purposes of testing the Sharp GP2D12 long-range sensors. Data was taken to find linearization equations for each long-range sensor in order to increase the absolute accuracy of their readings. The navigation sensors act as the eyes of the mouse. They provide the mouse with topographical information of the maze. The mapping algorithm relies on the sensors to determine openings and walls in order to map the maze and make decisions on the best path to the center. The long-range sensors also provide the motor control algorithm with information on front and rear walls in order to avoid crashes. 2) Devantech Digital Compass: The electronic compass helps the micromouse keep its bearings while navigating the maze. Our micromouse design will use the compass module to make accurate 45 and 90 degree turns as well as to ensure that the micromouse travels in a straight line The compass uses two Philips KMZ51 magnetic field sensors to detect the earths magnetic field. The sensors are sampled by a PIC microcontroller and supporting circuitry which compute the compass direction and provides an interface to the host Zilog system. The compass module requires a 5V supply at a nominal 15mA and provides data via two output methods, I2C and a PWM signal.

Fig.2 MightyMouse

1) Sharp GP2D Sensor Array: The Sharp GP2D Infrared Sensors consist of an LED emitter and receiver and can be used to determine the distance to an object based on the angle of reflected light. The sensors are insensitive to ambient light and are reliable in detecting the reflected LED beam on a number of different surfaces varying in both color and sheen. The sensors have an analog voltage output that corresponds to the measured distance. These analog outputs are sampled by the onboard Analog to Digital Converters of the Zilog microcontroller, providing a digital value that can be used for range calculations. Drawbacks of the GP2D sensors are that the relationship between the actual ranges and the A/D converted values is nonlinear and there are also slight differences in the outputs between sensors. The Sharp GP2D120 short-range sensors had to be normalized in order to ensure accurate and repeatable readings from all four sensors. To normalize the short-range sensors, 20 readings were taken at each centimeter within the manufacturer specified range (4-30 cm) and then the readings from each sensor at each range were averaged. A plot of these A/D readings vs. the range produces a nonlinear curve (data and graph available in Appendix C). This means that a large change in the A/D value did not necessarily correspond to a

Fig.3 Devantech Digital Compass Pin Out

4 Pin 9 must be connected to the ground bus of the host microcontroller Pin 1 must be connected to a 5V supply Pin 7 is an input to select either a 50Hz (low) or a 60Hz (high) operating environment. This is used to reduce output jitter caused by the mains power supply frequency. The compass module has an onboard pull-up resistor and pin 7 can be left floating for a 60Hz (U.S.) operating environment. Pin 4 is the PWM output, which is not used in our implementation. It has in onboard pull-up resistor and can be left floating. Pin 6 enables a calibration mode, which is also available via the I2C bus. It has in onboard pull-up resistor and can be left floating. Pin 2 & 3 provide an I2C bus capable of communication at up to 1 MHz. Pull-up resistors of approximately 2 K are required on both the SDA and SCL lines. bearing reading and defines that direction as North. All compass navigation for the current run is then referenced from this initial value. To make a precise 45 turn the microcontroller would count 32 ticks one direction or the other; a 90 turn would be 64 ticks. Moving the micromouse in a straight line simply means maintaining a constant value on the compass. To operate as precisely as possible the compass needs to be calibrated to the latitude that it is operating at. This can either be done via Pin 6 or through the I2C interface. We decided to use the I2C interface as the software and hardware were already implemented. It is important to keep the compass level and away from any magnetic fields during the calibration sequence. To start the calibration via software, first write 255 to register 15. Next continuously read register 14 while slowly rotating the compass through a full 360. Register 14 will change from 0 to 255 when the compass is calibrated. Finally, write a 0 to register 15 to store the calibration data to the compass EEPROM. The motor control algorithm relies on the digital compass to determine when the mouse is off centered and by how much in order to make appropriate corrections. The mapping algorithm relies on the digital compass for accurate feedback on current bearing within the maze. 3) Mapping System: The below task control flow shows the sequence of control and assignment statements within a module. The module uses a stack for updating the weighted values of each cell. The stack is last in first out (LIFO) structured within the memory of the processor. The following is the task control flow for the mapping algorithm module implemented for this project. a) Initialize the maze, micromouse, and the stack. b) Update wall map based on data obtained from sensors attached to the micromouse. c) Update the distance values of each cell. d) Make decisions about progress to next cell based on the wall map, weighted values and current mouse direction. e) Virtually move micromouse to next cell (the motor control system moves the micromouse physically to the next cell). f) Repeat steps 2 through 5 until a path is completed from the starting cell to the destination cell. The basic flow chart of the micromouse mapping module as well as a detailed description of the mapping process can be found in Appendix C. 4) Motor Drive System: The motor drive system is comprised of three main components: H-bridge, motors, and encoders. The H-bridge accepts 4 control signals from the microcontrollers GPIO pins. These 4 signals provide a direction and speed controls for each of the two motors. The H-bridge provides the actual power to the motors in the form of a 6 volt PWM differential signal. The motors drive the micromouse and also provide a 5 volt quadrature encoded pulse 16 times for each revolution of the wheels. This pulse is

Fig.4 I2C Timing Diagram

The I2C interface used by the compass is the same as that of many popular EEPROMS. To read the current bearing value, first send a start bit, followed by the compass address with the r/w bit low (0xC0). Next send the register number you want to read from. The compass has 14 registers whose functions are documented in the table below. Send another start bit, followed by the compass address again this time with the r/w bit set high (0xC1). Finally read one or more data register and send the stop bit. Register 0 1 2,3 4,5 6,7 8,9 10,11 12 13 14 15 Function Software Revision Number Compass Bearing as a byte. 0-255 Compass Bearing as a word. 0-3599 Internal Test Sensor 1 Internal Test Sensor 2 Internal Test Calibration Value 1 Internal Test Calibration Value 2 Unused Unused Unused Calibrate Command Write 255 to perform calibration

Table 1 Compass Register Functions

In our current implementation we are reading register 1 which contains the current compass bearing as a value of 0 to 255. When the micromouse is initialized it takes one initial

5 used in the closed loop feedback system that allows us to control the speed, direction, and distance the mouse travels. 5) Chassis: The final chassis was constructed by creating a wooden mold to press multiple layers of carbon fiber fabric and an epoxy hardener into the final shape. Mounting posts and holes were then built into the chassis to mount the motors and circuit boards. grooves to prevent breakage and the walls were painted according to the IEEE rules.

Fig.7 Full size micromouse maze Fig.5 Chassis bottom

The carbon fiber is very smooth providing a good sliding surface for the skid plate design. The carbon fiber also makes the chassis very resilient against full speed crashes and accidental drops by team members. The final benefit of using carbon fiber is that it makes an excellent heat sink. Our power and H-bridge circuit boards are mounted directly to the chassis to take advantage of this characteristic. The wheels were constructed from 3cm diameter faucet washers with rubber o-rings acting as tires. The holes around the wheel shown in figure 6 were used by optical encoders on an early prototype and have no effect on the final micromouse.

7) Circuit Board Design: Three separate circuit boards were design for the micromouse: a main circuit board, an Hbridge board, and a power board. Eagle 4.09r2 was used for the circuit board layout. The boards each have two layers, a ground layer and a power layer. The layers were defined using the polygon tool in Eagle. Schematics and Layouts for all circuit boards are in Appendix B.
a) Main Circuit Board

The main circuit board houses the Z8 Encore! processor as well as the peripherals needed to support it, and the IR sensors. The peripherals for the processors include a serial IC, Zilog up-link interface, LEDs, GPIO pins, and the 18 MHz crystal. The circuitry for these components was taken from the Z8 Encore development board schematics. The IR sensors are attached directly to the main circuit board. The serial IC was included to allow for serial interfacing between the mouse and a PC for debugging purposes. This circuit required a MAX3222 chip. The send, receive, and ground pins of this chip were used for a serial connection. A six-pin header on the main board allows for code to be uploaded to the Z8 processor. The housing for the programming cable was removed to eliminate bulk so it could be connected directly to the main circuit board.

Fig.6 Wheels

6) Maze: The most difficult design aspect of the maze was the need for the walls to be reconfigurable. The solution was to design three types of interlocking walls that also locked into the base of the maze with posts at each cell corner. The three types of wall differ in the number of posts that they have, zero, one, or two. The walls interlock using a vertical tongue and groove system which was made by multiple passes on a router table. Finally wood hardener was applied to the

Fig.8 Programming cable connected to mouse

6 Dual-pack LEDs were placed on the circuit board as a tool for debugging. The dual-packs are in combinations of red/green, red/yellow, or yellow/green. 8 GPIO pin headers on the circuit board provide for extra debugging ports. The 18MHz half-can crystal was placed on the underside of the main circuit board so it would not interfere with the cross firing of the IR sensors. The IR sensors get their 5V input voltage from the main circuit board. The 10uF filtering capacitors are also on the main circuit board. The main circuit board has two power regions on the power plane. One region is 3.3V for the microprocessor and its peripherals, the other region is 5V which is needed by the IR sensors and the digital compass. Power for these two regions is supplied separately from the power board.
b) H-bridge Board

enters a cell with an opening the mouse will light an LED indicating an opening on the correct side of the mouse.

B. Stay Centered within the maze:


1) Specifications: The digital compass must give accurate data for the motor control algorithm to determine when the mouse is off-centered within the current cell. 2) Metrics: The mouse must not veer by more than 6 degrees from its intended heading. 3) Test Plan: An LED will light up on the corresponding side if the mouse veers by more than 6 degrees in heading to one side or another. This test assumes that the correct bearing whether it is relative N, S, E, or W is correctly given to the compass from the mapping algorithm.

We design three different H-bridge boards, but ended up using the one with the TI H-bridge. The H-bridge board gets both the 6V it needs to power the motors and the 5V it needs for logic directly from the power board.
c) Power Board

C. Know position and bearing with in the maze.


1) Specifications: Motor encoders must be able to provide data on the current cell location while exploring the maze. The digital compass must provide accurate data to determine absolute bearing with respect to north (north is the direction the mouse faces at the start). 2) Metrics: Identify the current cell by its exact row and column number. Accurately identify the current bearing in relative N, S, E, and W. 3) Test Plan: To test the mouses position in the maze, we will use 8 LEDs to indicate the absolute position in the maze by assigning a number to each cell. By knowing the cell numbers we will track the progress of the mouse by eye and compare the known cell position to the LED readout. To test the bearing, we will use 2 LEDs to represent relative N, S, E, and W. While watching the mouse travel through the maze, we will compare the known direction the mouse is pointing to the direction on the LEDs. D. Control the distance and direction needed to travel. 1) Specifications: The motor control system must be able to move the mouse for a set distance. The motor control system must be able to used data from compass to make precise 45 and 90. The motor control system must be able to use data from IR sensors and the encoders to maintain a given speed over a range of distances. 2) Metrics: The motor control algorithm must control the distance the mouse travels to within one standard deviation of the measured distance error from the motor encoders. The standard deviation can be

The power board supplies three different voltage levels, 3.3V, 5V, and 6V. 6V and 5V go to the H-bridge board, and 5V and 3.3V go to the main circuit board. The power board uses a 3.3V Voltage Regulator and a 5V Voltage Regulator.

III. TEST PLAN Below is a test plan based on the functions the micromouse must perform in order to meet its objectives.

A. Recognize Walls and Openings


1) Specifications: The long-range sensors must be able to determine the approximate distance to the front and rear walls. The short-range sensors must determine openings within the maze independent of whether the mouse is centered within the current cell or not. 2) Metrics: The front and rear distance measurements must be within 3cm of accuracy. The two side sensors must be able to determine that a side opening is present if a range value greater than 18cm (an A/D value less then 323) is read. 3) Test Plan: To test that the long range sensors see front and rear walls to within the prescribed 3cm of accuracy, we will observe the decision the mouse makes as it approaches the front or rear wall. To meet the 3cm requirement the mouse must stop within 3cm of the center of a cell (front to back) when it stops. To test the detection of wall openings, a LED will represent a wall opening for each side of the mouse. When the mouse

7 measured by running the micromouse for a several given distances and calculating the deviation from the given distances. The design speed may range from 0.1m/sec to 0.25 m/sec. The micromouse must be able to travel with the design speed within 5% error. The micromouse must be able to make precise 45 and 90 turns within 5% error. 3) Test Plan: To test the distance traveled we will first need to establish the standard deviation for distance. In any open area we will layout several horizontal lines parallel to each other. We will then measure the distance from the first line to each of the other lines. Next we will program the mouse to travel each of these distances several times measuring the actual distance traveled after each run. The measured data will be compared to the desired distances to establish a standard deviation for distance. After having found the standard deviation, we will change the distance of the horizontal lines. Again we will measure the distance from the first line to each of the other lines. We will then instruct the mouse to run these distances. The actual distance the mouse travels should then be within one standard deviation of the desired distance. To test the mouses ability to maintain a given speed we will measure off a set distance. We will place the mouse an adequate distance from the starting line to achieve a preset constant velocity. We will then use a stopwatch to time how long it takes the mouse to travel the given distance. We will use the time to calculate the actual velocity and calculate a percent error against the set value. The test will be repeated over a range of desired running speeds. To test the mouses ability to make 45 and 90 we will attach a bamboo skewer pointer. We will then measure two points along the skewer as an initial reference. Next we will program the mouse to make a 45 turn. We will repeat the marking process where the mouse stops. We will connect the dots from each position and determine the angle between the lines. This test will then be repeated for the 90 turn. E. Navigate the maze intelligently. 1) Specifications: The mapping system must be able to make intelligent navigation decisions based on modified flood fill algorithm, the available wall data, and mouses current position. 2) Metrics: Identify the current cell by its exact row and column number. Accurately identify the current bearing. 3) Test Plan: The navigation system can be tested by observing the motion of the mouse in a known maze configuration. The mouse is expected make motion decisions based on modified flood algorithm. NOTE: %error= (design variable experimental variable)/design variable * 100

IV. PRODUCT LIFE CYCLE REPORT A. Introduction The micromouse is an autonomous robot, designed to find the center of a 16 by 16 cell maze within 10 minutes. The micromouse senior design project was proposed and sponsored by Dr. Herb Hess. The design and construction of a micromouse encompasses many aspects of both Electrical and Computer Engineering and was therefore a viable yet challenging option for a senior design project. A goal of the design and construction of the micromouse is to generate interest among University of Idaho engineering students as well as students from other engineering departments. The micromouse can also be viewed as an opportunity to generate interest in engineering field among high school students. Yearly micromouse competitions sponsored by IEEE provide the opportunity for students to showcase their micromouse as well as learn about new design methods. B. Design 1) Micromouse design: The micromouse is designed according the IEEE micromouse competition specifications. These specifications constrain the size of the mouse, require that it be fully autonomous while solving the maze, and it cannot use methods such as jumping over walls to solve the maze. Other than the IEEE constraints the design of the micromouse is open. Our micromouse design has four main components: the mapping system, motor control system, the sensor system, and the compass system. We choose the wheel configuration for our design. This configuration is fairly easy to implement because it requires the control of only two wheels, as opposed to four wheels. Monitoring motor speed is simplified along with implementing turns. The wheelchair configuration is an optimal architecture for first time micromouse designers. The two popular choices for micromouse motors are dc and stepper. We decided to use 1224 series Micromo DC motors to drive the mouse wheels. DC motors are much lighter than stepper motors, which considerably decreases the required torque for running. Compared to stepper motors, DC motors are slightly more complicated to implement because they rely on a feedback loop to control speed. Once the feedback loop is defined, however, dc motors provide for more precise motor control. Starting the design with DC motors allows for future improvements that could make the mouse more competitive. For our design we used Sharp GP2D12 (long distance) and GP2D120 (short distance) infrared side-looking sensors. Another popular option for first time designers is the antenna configuration, using digital sensors. The Sharp GP2D sensors were chosen because they are fairly cheap, reliable, and readily available in the market. The side-looking sensors give

8 analog voltage values corresponding to distance. This information is used to detect walls and openings as well as aligning the mouse within the maze cells. The GP2D12 and GP2D120 sensors are relatively insensitive to ambient light, making the sensor array more robust and reliable. Another important design consideration is the type of algorithm used to solve the maze. For our design we used the modified flood-fill algorithm. This algorithm is very popular among micromouse designers. The advantage of using this algorithm is that it does not require the mouse to explore the entire maze in order to solve for the optimum path from the starting point to the center. This allows for more time to be allocated towards speed runs to improve performance during competition. During speed runs the mouse is designed to travel at a relatively faster speed than during the initial mapping run. The micromouse utilizes the Devantech Electronic Compass this purpose. The compass interacts with the micromouse processor through the I2C pins. The Devantech Electronic Compass was chosen for its accuracy. C. Implementation and Testing Tools 1) ZDS II Software development package: The firmware for micromouse was developed by using ZDS II software development tools provided by Zilog Inc. ZDS II was our choice of development package because the micromouse uses Zilogs Z8F6423 microprocessor for I/O, data processing and necessary computations. The development package is free of cost and can be downloaded from Zilogs official website. Zilog provides good support for the development tools and also provides additional libraries for implementing several microprocessor resources. The ZDS II program files are written in C programming language. The package includes tools for managing projects, loading, debugging, and simulating a firmware. 2) Micromouse firmware: The firmware consists of necessary program codes for implementing the functionalities required by the four main components of micromouse system: the mapping system, motor control system, the sensor, and the compass system. The firmware is downloaded and stored in the non volatile processor flash memory. These program files will be provided to micromouse users in a library package. The users may use modules within the library to control the micromouse activity. D. Release Plans 1) Potential Customers: The micromouse may be sold to departments within high schools and colleges for generating interest in the field of engineering among students. 2) Hardware and software cost for micromouse users: The hardware costs for the user may range from $400-$500. The major contributor to this cost is the good quality DC motors which by itself cost about $70 per unit. The firmware for the micromouse may be provided free of cost in a library package. At least a quarter of a competition scale maze is necessary for testing and debugging. New designers can build there own or buy pre-manufactured maze kits. Schools and departments are encouraged to share the cost and labor of acquiring a micromouse maze. E. Support and Maintenance New micromouse designers will inevitably encounter hardware and software breakdowns. As representatives of the UI micromouse project, we must be able to provide technical support for the firmware and hardware problems new micromouse designers may face. The firmware may contain faulty code segments that have not yet discovered due to insufficient unit and integration testing. The design of our micromouse, as with any, provides for many potential hardware failures. One potential hardware failure could be from ineffective shielding of the micromouse motors to protect the digital compass from magnetic field interference. The Devantech Electronic Compass utilizes the earths magnetic field to compute the orientation of the micromouse. The magnetic radiation from the poorly shielded motors may cause the digital compass to send faulty data to the micromouse processor. Through testing and analysis we have determined a method for reducing this potential failure and would be able to give support to future users with similar design issues. F. End of Life 1) Hardware: The hardware life of a micromouse is dependent on the quality of its components and construction. As with any electronic part, reliability and efficiency deteriorates over time. The shelf life of a micromouse is a function of use and maintenance. With proper support and maintenance a well-constructed micromouse is estimated to operate efficiently for 8-10 years. 2) Software: Software life is reliant on the Zilogs support of the development platform as well as a new designers proper implementation of the provided firmware. The micromouse designer must continually check Zilog support for updates on development tools. Because the development tools are provided free of charge on Zilogs website, a designer is not restricted by licensing time limits. V. RELIABILITY REPORT A. Potential Failure Modes While considering the effects of each potential failure mode we came up with two possible outcomes: failures resulting in a crash, or failures resulting in the mouse becoming lost in the maze. In either scenario the main objective of solving the maze is not met, and the outcome can be considered an overall system failure. The micromouse must operate autonomously. This means failure modes due to human factors are essentially obsolete once the mouse enters the maze. Because the mouse must rely on nothing other than its own artificial intelligence to solve the maze, failure modes are inherently interdependent. 1) Failure Mode Interdependence: The decision the mouse makes, which corresponds to software performance, is a direct

9 result of measurements taken by hardware components as well as the mechanical performance of the mouse design. Conversely, the mechanical performance of the mouse is dependent on the accuracy of commands from the software algorithms. Because of the interdependency of software performance on hardware performance the micromouse crashing or becoming lost within the maze will be a combination of hardware and software failures. For example, if an infrared sensor fails to detect a side opening, the mapping algorithm will then have an inaccurate data representation of the maze and may not be able to solve the maze. Another example would be improper wheel alignment (a mechanical failure) causing a compounding error in distance calculations. If the motor control algorithm fails (a software failure) to correct this error, the mapping algorithm will once again receive an inaccurate data representation of the maze (compared to the ideal maze layout that the mapping algorithm expects) and the mouse will become lost and eventually crash. 2) Fault Tree Representation: Because of this interdependency a fault tree logic evaluation of system failure would have redundancy as you travel towards the base of the tree. After brainstorming potential failure modes we categorized them into five different regions. Within each of these five main fault regions there are minor faults. The five regions in which potential failures can occur are software, component, mechanical, electrical, and power supply. Failures within these regions would be towards the top of the fault tree, because a failure in any one of these regions would most likely result in an overall system failure. Our potential failure modes and there minor failures are listed in Table 1 below. The ratings of severity, occurrence, and detestability are based on the FMEA scale provided in ECE 481, Senior Design class.
Potential Failure Software Fails to Make Correct Decision Incorrect data from compass Incorrect data from sensors Incorrect data from shaft encoders Faulty implementation of flood-fill algorithm RPN 168 64 224 64 280 30 30 40 40 50 60 30 70 70 4 4.1 4.2 4.3 4.4 5 5.1 Electrical Malfunction Wire connection failure Circuit board failure Electromagnetic Interference Cross-talk interference Power Region Failure Battery Life Inadequate 160 200 200 120 120 50 50

Table 2. Potential Failure Modes

3) Software Region Failures: Failures in the software region are interdependent on failures of hardware components. This is because the software algorithms rely on data from the compass, sensors, and encoders to make decisions. Software failure may also be a function of poor code implementation. 4) Component Region Failures: Component failure is a separate region due to the fact that our components were bought pre-assembled from a vendor. The failure of our micromouse components is therefore a function of the quality of their manufacture as well as our implementation. 5) Mechanical Region Failures: Mechanical failure encompasses our mouses performance based on the physical conditions of the given maze. The main mechanical failure that can occur is wheel slippage. Wheel slippage can occur due to the texture of the maze surface, wheel quality, or design acceleration. 6) Electrical Region Failures: Electrical failures can cause severe damage to the system. Poor solder contacts, circuit board malfunctions, as well as EMI and cross talk are the major areas for potential electrical failures. 7) Power Region Failures: Failures in the power region would be due to insufficient battery life to complete the 10 minutes allotted for solving the maze. This is an obvious failure to detect. Improving this failure would simply requiring testing the battery power before each run. B. Assigning Failure Mode Criteria The next step for defining reliability of our product was to assign severity, occurrence, and detection ratings to each failure mode. 1) Severity Rate: The severity rating of each potential failure mode reflects the extent to which the failure prevents the mouse from successfully solving the maze. We defined a severity scale from 1-10. A rating of 10 means the severity of the effect of the failure is very high, and causes the mouse to crash or become permanently lost within the maze. Consequently the severity rate of most, if not all, of our failure modes will be very high. 2) Occurrence Rate: The occurrence ratings for the failure modes were determined by finding the potential causes of each failure. For example, 3) Detection Rate: The detection ratings for our failure modes were fairly straightforward to assign. The debugging tools, such as the onboard LEDs, will allow us to identify most component malfunctions.

1 1.1 1.2 1.3 1.4

2 2.1 2.2 2.3 2.4 2.5 2.6 3 3.1

Component Failure Processor failure IR Sensor failure Motors failure Digital Compass failure Shaft encoders failure H-bridge failure Mechanical Malfunction Wheel slip

10 C. Calculating Risk Priority Number The Risk Priority Number (RPN) is the product of the Severity, Occurrence, and Detection rates. The risk priority numbers are a base for comparing new RPNs as we make improvements to our design to reduce the effect of potential failure modes. Risk Priority Numbers are shown along with their corresponding Potential Failure Mode in Table 1. Chart 1 shows the relative magnitudes of the Risk Priority Number for each failure mode.
Pareto Diagram of Ratings
180 160 140 120 100 80 60 40 20 0 168 160

VII. CONCLUSIONS During the integration of micromouse components we encountered new obstacles. We managed to come up with effective solution for some and some problems still need to be addressed. The first problem we encountered was that we were unable to download code on to the processor. After hours of intensive hardware debugging we realized that the resistor used for the processor crystal was off by a factor of a 1000. After replacing the resistor with the appropriate size resistor we were then able to download code on to the processor. While testing the micromouse we also realized that the encoder circuitry was inoperable. This was probably caused by using a H-bridge with too high output voltage. As a result, we had to buy new motors. Later on, we used the Texas instruments SN714410 H-bridge with maximum output voltage of 6 volts to supply power to the motors. We did not encounter any problems with motors since then. We also found out that some of the connections on the Hbridge circuit board were not well connected. We had to use a wire externally to supply power to the H-bridge. After some more debugging, we also found that one of the input pins to the H-bridge chip was always high. We had to cut the pin on the H-bridge chip from the board pad and externally solder a wire to the input pin. The trace connecting the power supply to the fuse also seemed to be faulty. We soldered the trace externally. The motors have internal encoders that operate on 4-18 volts supply. The encoder generates 16 pulses per revolution. These encoder output from the two motors are supplied as an input to the microcontroller on Port D pin 4 and Port D pin 5. The microcontroller generates an interrupt service routine on the rising edge of these pulses to keep track of distance traveled. However, after hours of software debugging we realized that the microprocessor was not able to generate any interrupts on port D pin 4. This was a big problem since we were not able to keep track of the distance traveled for one of the wheels. We supplied the same signal to the same pin (Port D pin 4) on the development board and we found out that it was able to generate interrupts. This confirmed our suspicion that the pin 4 on Port D was inoperable. We externally connected the encoder output to pin 7 on port D of the microcontroller. This solved the problem. Later on during our testing phase, we also recognized that the go button must be able to connect the input pin on the microprocessor to a logic high voltage. Originally we had the go button between the input pin (Port D pin 6) and ground signal. Again, we disconnected the pad from the button pin and soldered a wire from pin to the supply voltage trace on the board. Finally, we encountered a problem with the Devantech digital compass. According to our design we expected that the compass would generate constant value while the mouse traveled in a straight line. However, we found out that the compass generated different values. This is a problem, because now the micromouse does not have way to tell if it is traveling in a straight line. This is an issue that still needs to be addressed by future designers who may work on this robot.

RPN

70 30

50

Component Failure

Mechanical Malfunction

Software Fails to Make Correct

Electrical Malfunction

Potential Failure

Chart 1 Pareto Diagram of Ratings

D. Actions to Reduce High Risk Failure Modes Failures in the software region will be reduced over time during the continual debugging process. The occurrence of incorrect decision making will be reduced as the software evolves. Component failures due to poor design implementation will be reduced during the testing cycle as well as by feedback from competition performance. Electrical and mechanical failures may be reduced by quality construction of the mouse. VI. BUDGET AND SCHEDULE ANALYSIS A. Budget Analysis We ended up $78.46 over budget at the end of the semester. The larger costs of our project came from the expedited shipping of our circuit boards and circuit board components in the attempt to have the mouse running for the October 22 IEEE micromouse demo in Spokane. The final budget for Team MightyMouse is in Appendix A. B. Schedule Analysis We were overly ambitious in our desire to costume design and build the majority of our micromouse components. This caused a lot of time to be spent on hardware design and did not leave adequate time for testing, debugging, and writing efficient code. A comparison between the intended schedule for the fall semester and the actual fall semester can be view in Appendix A.

Power Region Failure

11 VIII. RECOMMENDATIONS FOR FUTURE MICROMOUSE TEAMS Our overall method of solution was to build subsystems (navigation module and mapping algorithm are examples of subsystems) then integrate. The first semester was to be dedicated towards design and construction of subsystems. The second semester was to be dedicated to integration. The first semester we had only the prototypes of each subsystem built and working independently. Consequently, majority of the second semester was focused on constructing the final mouse. This was very time consuming as it involved creating all the circuit boards we would use. In hindsight, to make this project more successful, the final mouse (all parts integrated and functioning) would ideally be completed the first semester. Then more time could be spent working on the method of solving the maze. The following points are advice to new micromouse teams. Limit the amount of hardware that you will have to build or spend time customizing. Attempt to buy components, i.e. a microcontroller, with most of the peripheral you will need. Make basic design decisions early on and immediately build prototypes of those subsystems and interface whatever current subsystems you have working. For example, decide between top-down or side-looking sensors and then interface that system with your mapping algorithm. Another example is, decide between DC or stepper motors and also interface that with any current algorithms. Dont worry about speed! Make your main focus to build a mouse that is rugged and indifferent to its surroundings. Many factors, such as dirt sticking to the wheels or groves in the base, are overlooked in the early design stages. Do not rely on an ideal maze environment for your initial design. Save all your code! Either move it to a different file or comment it out. You will most likely right several versions of a code, attempting several ways to solve the same problem. You will want to record your evolution of design.

12

APPENDIX A BUDGET AND SCHEDULES INTENDED & FINAL FALL SCHEDULES

13

FINAL BUDGET

14

APPENDIX B USERS MANUAL A. Code for MightyMouse 1) Development Software: ZDSII Z8Encore! 4.9.3 Our Z8 Encore! Microcontroller that we used initially before we created our own circuit board came with the ZDSII Development Environment. This environment is a debugging tool as well as a compiler for code written for the Z8 Encore! Microprocessor. C++ is the programming language used in the ZDSII Development Environment. The debugging tools include setting breakpoint and watch variables as well as error and warning messages after building the file. 2) Loading Code The Z8 Encore! Microcontroller we used came with a programming cable that interfaced the microcontroller to the pc. We modified it by removing the external casing so that we could use it for our custom made mouse. The cable connects to the mouse the same way as it did to the microcontroller, via a six-pin header on the main circuit. This cable allows code to be changed and different codes to be loaded onto MightyMouse. A picture of the modified programming cable connected to the mouse can be found in Figure 8. 3) Existing Code We currently have many several programs written for MightyMouse. There are programs that interface the individual components to the processor. These programs and a brief description of their function are below. A brief description of each program file is in Readme.txt on the electronic copy of the code. navigation_sensor.zdsproj This program reads values of up to six infrared analog sensors. There are functions that will convert the digital values read to corresponding range values. The current code will light up an onboard LED designated to a certain sensor when it detects a wall. This code is very useful for deciphering if your mouse is seeing the walls and openings within the maze. The range at which the LEDs are toggle can be modified accordingly. The code also allows for the digital or range values to be printed to a hyperterminal. This was useful for linearizing the sensors. dgcomp_host.zdsproj This code initializes and calibrates the digital compass. A description of the calibration process can be found in Appendix B in the Devantech Digital Compass Data Sheet. This code also prints compass readings to a hyperterminal. B. Troubleshooting Hardware Problems 1) Disassembling MightyMouse When troubleshooting the mouse it may be necessary to partially disassemble it to access the power board, H-bridge board, motors, or underneath of the main board. Below are pictures diagramming the disassembly of the mouse.
Fig. 9 Mouse taken apart: To take off the Main PCB unscrew the three mounting posts and disconnect the wires from the bottom of the Main PCB.

15

Fig. 10 Mouse Guts: Some important connections are labeled in this picture. All connections can be easily view in the Eagle files on the included Software CD.

2) Using Eagle Layouts, Continuity Testing If a trace or connection is suspected to be bad or faulty the best method is to do a continuity test using a digital multimeter. If the connection is good the multimeter will either show a resistance or sound a beep depending on its mode of operation. The circuit board layouts in Eagle are very useful when checking continuity or board traces. To verify that a connection is or is not suppose to be somewhere on the board simple use the eyeball tool to highlight the connection by double-clicking on either pad of the connection. Overall the circuit board schematics and layouts are the best reference when troubleshooting hardware connection.

16

APPENDIX C COMPONENT DATA SHEETS

MAJOR COMPONENT SPECIFICATIONS

Supply Voltage Sharp GP2D IR Sensors Devantech Electronic Compass Micromo DC Motors Encoders IC H-bridge 5V

Current 20mA

Range/ Resolution GP2D120: 4-30cm GP2D12: 10-80cm 0.1 degrees 6750rpm 16 count 8-bit current control -64K Flash Memory -4K Register RAM -2 Full-duplex UART -4 16 bit timers w/ capture, compare, and PWM capability

External Circuitry 10F Capacitor between Vo and Ground 2k pull-up resistors on SDA and SCL N/A Feedback speed control hardware

Output Analog Voltage 0.4-2.4 V I2C 5V quadrature pulse

5V 12V 5V 5V-35V

15mA 50mA 12mA Up to 1A per motor

Z8 Encore C

2.7-3.6V (5V tolerance)

160mA

-12 Channel, 10 bit ADC -60 I/O pins -I2C -SPI -Programmable Priority Interrupts

17

APPENDIX C MAPPING ALGORITHM: DETAILED METHOD OF SOLUTION The following figure shows the basic flowchart the micromouse mapping module. This function is repeatedly executed from the main program during the mapping mode.
This statement checks if the current cell that the robot stands has been visited . If the cell has been visited then updating the wall map is necessary

Start

(maze[[x][y]&CMARK_mask == 0)

True

False get_sensor_data(current_cell) get_sensor_data()

This module collects sensor data from the appropriate sensor channels. It can also be overloaded to get artificial sensor data. This module uses the sensor data from the three sensor channels to store the surrounding wall information associated with the current cell. The sensors channels are interrupt driven and are sampled every 35 ms.

update_wallMap(sensor_data)

This statement checks if the destination cell has been found. If the destination cell is found then updating weight, and getting motion variables is not necessary. (maze[x][y]&0xFF != 0)

True

False

This module updates the cell weight based on the data collected from the sensor channels. This function finds the open neighbor with least distance value with respect to current cell with row #x and column # y. The function assigns the row and column # of the cell with least distance value to the variables next_x and next_y respectively

update_cellWeight ();

get_minOpenNBwt(x, y, &next_x, &next_y)

getMotionVariables

This module computes the turns and distance required to move the micromouse towards the destination cell.

End

Fig. 6 Micromouse mapping system flow chart.

1) Initialization-Theoretical basis: The initialization process is necessary for the mapping systems. During initialization system is forced to into a known state, thus making the debugging process simpler.

18 2) Initializing the Maze: This process involves initializing the maze cells with weighted value that is associated with the proximity of a particular cell from the destination cell. Since the north, south, east and west boundary of the maze is surrounded by walls, this process also includes initializing of the boundary wall bits. The boundary wall bits encode the information of surrounding wall for each cell. Figure XV shows the structure of data that is used to store information about the maze cells. Since the maze consists of 16 by 16 cells, there are 256 data words (512 bytes of data) allocated to store information of the maze. b15 b14 B13 b12 b11 b10 b09 b08 b07 b06 b05 b04 b03 b02 b01 b00 visit dir dir dir N S E W WT WT WT WT WT WT WT WT
Fig.6 Unsigned int maze[16][16]. WT = weighted value, dir = direction.

For the data structure given in Figure XV, bits 07 through 00 encode weighted values of each cell. Bits 11 through 8 encode a wall map. Bits14 through 12 encode current mouse direction. Bit 15 indicates if the cell was visited during exploration of the maze. This data word allows me to encode information about the current direction of micromouse, wall map for the relevant cells, and distance values for each cell of the maze inside one word of data. Figure XVI shows the interpretation of maze data of an example 6 by 6 cell maze after the initialization process.

Starting point ->


Fig.7 The 6x6 memory mapped maze after initialization process.

In figure XVI, the value within each cell is the weighted value. The weighted value represents the number of steps that is required to reach the destination cell from that particular cell. The cell with the distance value of 00 is the destination cell. In figure XVI, the four cells in the center of the maze form the destination point. The weighted value of the starting cell is initialized to 4 because it takes 4 steps for the micromouse to reach the destination cell from the starting point. 3) Initializing the Micromouse: A variable named CURR_DIR_WALL_POS keeps track of the current position and direction of the micromouse. This variable must be initialized to reflect the starting position of the mouse. Figure XVII shows the value of the variable CURR_DIR_WALL_POS after initialization. b15 b14 b13 b12 b11 b10 b09 b08 b07 * 0 1 1 N=0 S=1 E=1 W=1 0 b06 0 b05 0 b04 b03 b02 b01 b00 0 0 0 0 0

Fig.8 Unsigned int CURR_DIR_WALL_POS.

Bits 07 through 00 encode position of the mouse within the maze. Since the mouse starts from the first row and first column, the position bits are initialized to 0. Bits 11 through 8 encode wall map. Since the north wall is the only open wall from the starting position, bit 11 that encodes the north wall is set to 0. Bits14 through12 encode direction of the micromouse. If the bits 13 through 12 are set to 1, then it is defined to be facing north. During initialization these bits are always set to 1 to indicate that the mouse is facing north (reference north, not magnetic north). If the bits 13 and 12 are set to 1 and 0 respectively, then it is defined to be facing south. If the bits 13 and 12 are set to 0 and 1 respectively, then it is defined to be facing east. If the bits 13 and 12 are set to 0 and 0 respectively, then it is defined to be facing west. Bit 15 remains unused. 4) Initializing the Stack: Initializing the stack simply involves emptying the stack. This is achieved by setting the stack pointer to zero.

19

Stack pointer->
Fig. 9 Memory structure for a stack

Each byte of data inside the stack encodes the location of particular cell within the maze. There are 256 bytes allocated for the stack since the maze contains a maximum of 256 cells. Figure VIII shows the structure of a stack. 5) Updating the Wall Map: The sensors attached to the micromouse are used to get information about the walls surrounding a cell. The sensor data is used to update the wall map for each cell of the maze. For ease of understanding the mapping process, I constructed a 6 by 6 cell test maze using artificially seeded sensor data. Figure IX shows the test maze generated by using artificial sensor data values.

Cell 10 (row#1, column#0) -> Test maze starting point ->

Fig. 10 Virtual test maze via artificial sensor data values.

b15 b14 b13 b12 b11 b10 b09 b08 b07 * 0 1 1 N=1 S=0 E=0 W=1 0

b06 0

b05 0

b04 b03 b02 b01 b00 1 0 0 0 0

Fig. 11 Unsigned int CURR_DIR_WALL_POS

b15 1

b14 0

B13 b12 b11 1 1 N=1

b10 S=0

b09 b08 E=0 W=1

b07 0

b06 0

b05 0

b04 0

b03 0

b02 0

b01 1

b00 1

Fig. 12 Unsigned int maze[1][0].

In the above 6 by 6 cell test maze, the micromouse moves towards north cell from the starting cell. Since the next cell is located in the second row and first column the cell number is 10. While the micromouse is in cell 10, it collects data from the north, south, east and west sensors. After collection of data from these sensors the micromouse updates the variable CURR_DIR_WALL_POS and the maze[1][0] (see figure XVII and XV) to replicate the walls surrounding the cell 10 within the computer memory. Figure XX shows changes that occur within the variable CURR_DIR_WALL_POS. Figure XXI shows the changes that occur within the variable maze[1][0]. In figure X and figure XI, bit 11 (b11) is set to 1 because the north wall is present in cell located at memory location 10. Bit 10 (b10) is set to 0 because the south wall is not present. Similarly bit 9 and 8 are set to 0 and 1 respectively to indicate that the cell has no wall towards east and has a wall towards west. This gives the wall map for the cell addressed row # 1 and column # 0 whose wall information is being stored at memory location maze[1][0].

20 6) Updating the Weighted Value of a Cell: The weighted value of a cell represents the number of steps that would be required to reach the destination cell from that particular cell. As the micromouse receives information about the wall for each cell, it has to update the weighted value because the number of steps to reach the destination cell from that particular cell would change. The following is a pseudo code that this process executes to update the weighted value of each cell. The following pseudo code is taken from the www.micromouseinfo.com. It was presented on the website hosted by Steve Benkovic.
a) b) c) d) e) f) g) h) Make sure the stack is empty. Push the current cell onto stack. Repeat following set of instruction until stack is empty. Pop a cell from the stack Does the distance value of this cell = 1 + the minimum value of its open neighbors? No -> Change the cell to 1 + the minimum value of its open neighbors, and Push all of the cell's open neighbors onto the stack to be checked. Yes -> do nothing.

7) Making Decisions about Progress to Next Cell: This process is straightforward. It involves finding the open neighbor cell with minimum weighted value and deciding the next cell to be covered. The open neighbors are found by checking the wall bits associated with the relevant cell. Once the open neighbors are detected their distance values are compared to get the open neighbor with minimum weighted value. In this step, the module makes decisions about progress to next cell based on the wall map, weighted values and current mouse direction. 8) Virtually Moving Micromouse to Next Cell: In this step the variable CURR_DIR_WALL_POS gets updated with the appropriate cell value, and direction of the mouse within that cell. The wall bits are cleared to zero here because at this point the mouse is now ready to move on to the next cell and it does not have information about the wall setup for the next cell. At the end of this process the visit bit of the maze data associated with the relevant cell is also set to 1. This indicates that the cell has been visited by the micromouse during the exploration of the maze. This process occurs after the mouse physically moves to a new cell. 9) Micromouse Operating Modes: The micromouse will operate in two modes: the mapping mode, the back track mode, and the speed run mode. During the mapping mode it travels at a slower speed and sample sensor data within fixed time intervals. In this mode the micromouse will explore the maze in search for the destination cell located in the center of the maze. During the back track mode, the mapping system will compute the shortest path between the starting point and the destination point within the explored area of the maze. During the speed run mode the micromouse would use this shortest path to travel from the starting point to the center of the maze. While operating in this mode the micromouse would not sample the sensor data related to mapping, and it would also travel at a faster speed. The sensors would still be used to get feedback about the alignment.

21