10. PROCESSORS AND LOGIC
The processor provides the logic to drive the micromouse and solve the micromouse maze. The controlling software might work in this 'circular' fashion:
- The sensors detect walls or gaps,
- which are recorded on a 'map' in storage,
- the map is used to solve the micromouse maze,
- the appropriate move is decided,
- steering and drive are controlled to make the move, during which the sensors detect walls or gaps, and so on.
During Step 1 the wall positions are used to help ensure that Step 5 is made correctly. The start or end of any wall surface is an important check-point in the move, as the distance from the wall is used to control the steering. Remember 'steering' means keeping the micromouse in the centre of the corridor, turning means changing direction at corners.
The micromouse maze has 256 squares for convenience in programming. Most builders use assembler ('machine') code. Assembler gives good control of short timing loops and generates fast-running code. Popular choices for processors are Z80s and 6502s and close relations, because support systems are readily available in the form of Sinclair and BBC computers. The processor might include the CPU/MPU, 1K of RAM (a 6116 giving 2K is a popular choice), 2K of EPROM, and a digital port chip with 8 or 16 input bits and 8 output bits. There are integrated controller chips which contain many of these elements on one chip. Your choice will probably depend on what you know or have access to. Nick Smith used an 1802 processor chip; some competitors are using PC-type processors. Some builders use EPROM for the main micromouse maze code, others download code into RAM from a support PC, a technique which is very useful for the frequent changes needed during development.
If 5-volt motors are used, the power supply can be four nickel-cadmium cells of 500mA capacity, with no regulator for lightness and simplicity, if your external circuits do not need a stabilised supply. The processor will be reliable on 4 Ni-cad's if there is ample decoupling on the power rails. If you need a regulated supply use a low-dropout regulator chip to help squeeze the last bit of charge from the cells. Steppers rated at 12 volts imply a larger number of cells, but this is not necessarily a problem, ten 500mA nickel-cadmium cells are not an excessive load, and 12 volt steppers may give enough torque on six, seven or eight cells.
Remember that batteries need last for only 20 minutes to cover the competition time, and may be replaced or fast-charged in minutes. Be sure to use vented cells designed to be fast-charged. Long battery life during development is convenient. Consider using an external power pack on an umbilical cable during testing. Use CMOS or other low current technology wherever possible.
Skills needed, in one member of the team at least, must encompass:
- Mechanical/craft skills
- Software of the appropriate type
- Electronic construction
- An understanding of optics for building IR sensors
- Logic/maths for micromouse maze solving
- And a few more, I expect.
Many of these skills are gained from a childhood spent model-making or 'messing' about with electricity. Cynicism and experience tells me that most of the development will be done during the week before the Championship meeting. Make sure your team will not be on holiday!
13. WORKSHOP EQUIPMENT
As well as the usual pliers, screwdrivers, saws and comparable hand tools, must include:
- An oscilloscope, the higher the spec. the better, 2-beam preferred
- At least one multi-meter
- Soldering equipment for electronic use
- A development support computer for assembling/compiling code, with
- An EPROM blower, if needed,
- A test micromouse maze, which need not be 16xl6 squares, about 5x6 is reasonable, with an extension to allow the micromouse to reach what it thinks is the centre, 7 squares north and 7 squares east from the start. Some folk say that it is not necessary to have more than a small piece of micromouse maze of about 2x4 squares, but they are experts - you are not. Make it with moveable walls, like the real thing, to allow you to try your micromouse maze solving and steering systems under many conditions. The other facility, needed by the whole team, is time, and more time.