![]() |
Microcontrollers
The simplest mouse is designed around a stimulus / reflex method of navigation. These mice will typically go straight as it follows a wall, and turn when it finds an opening in the wall. The sensors directly control the motors. Since this type of mouse has no computer to make decisions, it relies on blind luck to eventually find the center (this is good for the wall-hugging competition but it won't help you solve a full maze). At the other extreme are mice with multiple processors. One processor can be used to receive data from the sensors and control the motors, while another processor is used solely to solve the maze. Most people use a single microcontroller on their mouse. If you've had some experience with a particular microcontroller and you feel it can control a small robot, then go ahead and use it. And don't think that you need a powerful microcontroller to control a maze solving robot. Dexter, our first MicroMouse, used an 8-bit controller running at 2 MHz. Another advantage to using an older microcontroller is that you will find plenty of programming examples on the Internet to help get you up and running. The amount of memory required will depend on the maze solving algorithm, the language used, how tight the code is, etc. To be on the safe side, 16k to 32k of programming space should be adequate. If this is available as flash memory then reprogramming will be quick and easy. To implement the flood-fill routine, about 1K of data space will be needed. Make sure that the controller you choose has enough I/O ports for your needs. The microcontroller will need to read the sensors and send commands to the motors. Development of the software will be made easier if you have some sort of feedback in the form of an LCD display, LEDs and/or a speaker. Also, you'll want to read a pushbutton or two to start and stop the mouse. If you're going to use analog sensors, you'll need to perform analog to digital conversion which can be done by the microcontroller itself or by an external chip. Whether you use DC motors or stepper motors, the microcontroller will need to generate an accurate signal for speed control. The easiest way to do this is to use timers within the microcontroller. Some controllers will even save you the trouble of generating your own signal by providing a pulse width modulation function. If your design has encoder wheels to determine speed and distance traveled then you will also want some counters as well. |