Huhu.. When I wrote this, i realized that I need one good looking picture, but it is already gone.. Very regrat that I only took functional pictures

Micro Mouse
Computer Science 154
Final Project

 

SooYoung Jung
04/30/01

 

Introduction

There were a plenty of choice for my final project, such as a smo robot, a walking extinguisher with a camera, and an explorer based on GPS control.  However, this Micro Mouse was a most interesting project that I could do for final.  Moreover, the Micro Mouse contest encouraged me to build my own Micro Mouse and participate competition.

The premise of the Micro Mouse contest is to design and build a small, autonomous robot that will find the center of a maze.  The fastest Micro Mouse is the winner of the contest (Micro Mouse contest Rules).

 

Hardware

Part list: Parts that I used to build Micro Mouse

There were several choices that I could choose my hardware but some limitation of budget and time, I ended up with above.

 

Handy Board

handyboard.jpgI had to decide whether to design an entire controller or to use already designed one.  Conveniently, there were handy boards which contain all the functions that I need to drive Micro mouse so I decided to use one of handy boards in the lab.  

The handy board uses 52-pin Motorola 6811 microprocessor with system clock at 2MHz which is enough to implement maze solving algorithm.

The memory in the handy board is 32K of battery-backed CMOS static RAM.  The Handy board reserves 16k memory to control I/O and hardware.  As a result 16K is only space that I can use and seems not enough to handle 16x16 cell maze solving program.  Therefore I was looking for adding more 32K RAM (64K in total) on the board and found one web page with Prof. Dodds.  However, ordering components and modification seem too much time consumption for 4 weeks project, I decided to reduce data and program size in the program which was more reasonable.

 

rotation_sensor.jpgMotors

There were three choices.  Servo, stepper, and DC motors.

Firstly, servo motors.  To use servo motors, I have to modify to drive micro mouse which means there is not much differences between DC motors and servo motors so I did not choose servo motors.

Second, stepper motors.  Stepper motors are ideal to drive the micro mouse.  However, good stepper motors are expensive and I have to design motor controller.

As a result, I decided to use DC motors.  DC motors are very easy to use but we cannot tell how far we are driving the micro mouse.  Therefore, I have to use Lego rotation sensors so I would know how far I am driving the micro mouse.

 

rotation_sensor.jpgRotation sensor

I used Lego rotation sensors to measure how far the micro mouse I am driving.  The Lego rotation sensor counts 16 when it makes one entire turn.

 

ir.gifInfrared sensor

This is a most important part of the micro mouse.  I decided to use at least 4 Infrared sensors for front, left, right, and back.  Our robot class already had 6 Infrared sensors (QRD1114) but 2 were already broken so I could not add additional sensors for faster wall detection.

QRD1114 Datasheet

 

block.gifLego blocks and acrylic

Lego blocks and acrylic are used to make a chassis.

 

Software Algorithm

Since I decide to use the handy board, I could use Interactive C which is easy to use and familiar to me because of previous project. Also, I could get a commercial version of Interactive C, which supports multi array, structures and some more functions.  These two key functions would make me easy to implement 16x16 maze and represent a cell as one special structure.

Algorithm

From the CS60 class (Principal of computer science), I have already implemented maze problem using JAVA.  As a result, I decided to translate this already done work in JAVA to Interactive C which is not very hard.

This JAVA maze program use BFS (Breadth First Search) to find shortest path from start point to the end using a queue and mazeCell classes.

In addition to this JAVA maze algorithm, I decide to solve the maze as follow.

 

Source code

mm.c

Main drive program

Maze.java

Original code of BFS using queue in JAVA

 

Some test code to determine the behavior of micro mouse (nothing special)

showir.c

This program shows all 4 Infrared sensors every 0.5 second.

test3.c

This program drives the micro mouse two cell forward and turn left and one cell forward.  After that, make the micro mouse return the start position.  This program used rotation sensors to control micro mouse.

testsleep.c

This program does as same as previous one (test3.c) but controls it using seconds.

testspeed.c

Whenever start button is pressed, the micro mouse will increase 5 more motor speed.

teststop.c

Because of power differences of motors, I tried to make two motors drive same.

testwall.c

Check all Infrared sensors and determine whether there is wall or not, if there is wall, set the second bit of maze cell to be 1.

There are not finished or good enough program to drive the micro mouse but I am adding all my scratched sources here.

 

Pictures

front.jpg
front.jpg

 
right.jpg
right.jpg

 
back.jpg
back.jpg

 
left.jpg
left.jpg

 
bottom.jpg
bottom.jpg

 
top.jpg
top.jpg

 
back_close.jpg
back_close.jpg

 
gear.jpg
gear.jpg

 
tob_maze.jpg
tob_maze.jpg

The size of my micro mouse is small enough to fit in one cell.
back_maze.jpg
back_maze.jpg

I lift up the top part
so it can clearly
turn within one cell

 

Click pictures to enlarge

 

Problems that encountered

There were a lot of problems that I encountered while building the micro mouse and after building.

Micro mouse body

My first micro mouse had not enough power.  Before I put handy board on top, I got the desired speed of the micro mouse.   But when I put the handy board on top of the micro mouse, there was not enough power to carry the handy board which includes battery inside and heavy.  Therefore, I had to gear it down to get more power.

Second version had enough power and could carry the handy board and it was small enough to fit within one maze cell.  However, when it turned, its tail hit the maze wall so I had to modify the micro mouse.  

And final version of the micro mouse was created.
 

Rotation sensor

Rotation sensors from Lego give the value back when the motor rotates.  It returns 16 when it fully rotates one cycle.  This 16 was not enough to detect how far the micro mouse is traveling.  I could not think any ways to connect to motor directly so it can give back better values so I connect it to downed-gear.  As a result, it returns about 10 when it travels 18Cm even though motor rotates 100 times.  Moreover, both side rotation sensors were not identical.  They returned different values even if they travel same distance.
 

Infrared sensor

The Infrared sensors were not good enough to be eyes of my micro mouse because QRD1114 Infrared sensor seems that it can only detect within 2cm.  Since my micro mouse has designed to detect wall at the center of the maze cell and distance from the wall and sensors on the micro mouse is about 3 Cm, it could not detect any wall at all.  Also, detecting range, which is 2 Cm, is maximum detecting range so it works well when the object is within 1.5 Cm which is not enough.  For better sensing, I had to make wings to detect wall from the top, which would need more sensors and too late to do this or use better Infrared sensors.  Since, I got the rotation sensors after 2 weeks passed from the initial date of final project begun, I had not enough time to add wings and more Infrared sensors on the micro mouse.
 

Motors

I did not think about any problem with motors but there were a critical problem with Lego motors.  Two motors drive different power every time.  If one had always driven more than the other, I would control this problem but they were not.  Sometimes they drove to the right and sometimes to the left.  If I had better Infrared sensors, I could detect the motors are not driving the micro mouse straight but as I mentioned earlier, Infrared sensors were bad, too.  

 

Result

I could not finish the program because of above hardware problems.  Therefore, I have no result of actual running of the micro mouse.  The performance of the micro mouse was terrible and it always shows different results.

 

Links to Micro Mouse sites

CSUN Senior Design (California State University at Northridge)
CSULB Micro Mouse team (California State University at Long Beach)
UCD Micro Mouse (University of California, Davis)

http://my.netian.com/~vivachin/
http://user.chollian.net/~myolive/
http://www.micromouseworld.wo.to/
http://mama.inchon.ac.kr/main/main.html 

Micro Mouse Contest Rules

 

Future works

I was very upset that I could not finish the micro mouse project because of bad hardware problems.  After I attended to the Micro Mouse contest at CSULB on April, 28, 2001, I thought I could win the contest if I could finish my project because the contest was the first annual contest so there were just 3 parties and only one micro mouse were succeed to find the center of the maze.

I will try to build another micro mouse again over the summer.  I hope this time the micro mouse would work and be able to find the center.