DASH 1 uses two wheels in a
wheelchair arrangement. Forwards movement is
by driving both wheels forwards. It turns by driving one
wheel forwards and one backwards. The wheels are mounted
on shafts and these are driven by a worm and gear
arrangement from two separate DC motors.
The motors are driven from an H-bridge
using bipolar upper elements and power FET lower
elements. Both bipolars ON gives a free-wheel condition,
both FETS ON gives a braking action.
Each motor shaft has a disk with 8
holes in it. An LED and phototransistor work with these
to give a notional shaft position.
The mechanical system and drive
electronics are taken from Swallow Systems PIXIE
robot.
The electronics uses an Intel 80C31
microprocessor with memory expanded to 32K RAM and 32K
EPROM. Two external interrupts are used to measure motor
revolutions. Four I/O bits are used for the motor drive.
There are only six bits left for sensors and this has
proved to be a serious limitation.
The sensors are all based on Hamamatsu
photo I.C.s. These make very simple reflective sensors.
The LEDs used with them are all high-brightness visible
red types. This makes debugging the sensor positions MUCH
easier. The sensors use modulated light and are very
tolerant of sunshine or flourescent light.
The software is all written in
Microprocessor Engineering's FORTH 83. Without the
interactive features given by this, DASH 1 would not have
been ready for the competition in time.
Some preliminary work on mazes was
done early in the year, but development started properly
on June 1st. A PIXIE was modified to remove the keyboard
and add 32K RAM. Sockets for sensors were added using a
modified top plate. A socket was fitted to bring out the
UART connections for connection to a host computer. RS232
level shifters were put in a pod connected to the UART
socket. a long lead for connection to the host completed
the arrangement.
Software development started using an
EPROM emulator until the compiler was running
satisfactorily. From then on it was a case of bursts of
interactive development on a practice maze followed by
burning a new EPROM. The current EPROM is number
19.
The algorithms used fall into four
parts. One function is wall following and positioning the
mouse. This is where more sensors would have helped a
great deal. Positioning is done with one sensor each
side. Where there is only one wall, DASH 1 has to
waddle to correct its position continually
from too close to too distant.
Another function is navigation in the
sense of keeping track where the mouse is. This can cause
problems in pathological cases where the mouse has a long
run of continuous walls.
The third function is to find the
centre of the maze. DASH 1 uses three weighted rules. It
likes to carry straight on, it likes to get closer to the
centre and it likes to boldly go where it
has not gone before. These rules overlay the basic idea
of not hitting walls!
The last function is to optimise the
route from start to centre. This is done continuously as
DASH 1 moves. By the time it reaches the centre it knows
its best route, of the cells visited, for the return
path.
These main functions are coordinated
to follow a scheme of:- find the centre, return to the
start by a good route, go back to the centre by a good
route, return to the start fast, get to the middle
fast.
After DASH 1 has traversed 80 cells,
about 6 minutes worth, it panics and starts to travel
fast. Fast travel can cause positioning and navigation
problems.
There are some known problems with
DASH 1. It cannot turn very repeatably due to backlash in
the drive train. This will be solved by adding more
sensors so that it can position itself more accurately.
If it becomes too close to a wall, it
can sometimes fail to detect the wall. This will cause it
to jam against the wall with disastrous results. This can
be solved by better sensor design.
The software is not well structured.
The next version may use the multi-tasker to run the
maze-solver and centre-finder functions as separate
tasks. The terminal task will also run separately to
allow interactive debug DURING a test run.
Final
Outcome
After all this effort, DASH 1 had some
problems in competition. On its first run, it got "lost"
and thought it was in the centre when it was one cell
away. The problem was caused by a long run of continuous
walls on both sides. A swift modification to the software
and it managed to reach the centre in about 41/2 minutes.
This was good enough to get into the final of the
intermediate competition. In the finals it did no better
and was placed fifth. Better luck next year!
To put this into perspective, DASH 1
was the slowest to actually reach the centre out of some
15 entrants. The schools class was won by a mouse that
only traversed 3 or 4 cells. The winner of the advanced
class, after it had researched the maze, travelled from
start to centre in 7.9 seconds. We have a long way to go
yet!