Re: [mowbot] mowbot brains

Byron A Jeff (byron nospam at cc.gatech.edu)
Sun, 2 May 1999 12:30:22 -0400 (EDT)

>
> Im happy to see that the group is still hanging in there for the 3rd
> year. 2 years ago I finishished my "prototype and was happy with the "bump
> and turn" guidance system. Tho I'm not sure how even the grass will end up
> cut after an entire area is covered, because I never got to the point of
> perfecting the limit switches, but thats a minor issue, waiting for
> improvement when I rebuild my mobot in its finished form. A picture of my
> mobot is in the mobot home page.
> What I have not seen in this group is the "brains" of a bump and turn
> mobot. I hear a lot about microprocesors but my education is more of the
> analog type so I used 555 timer chips. Also the only cheap way I could find
> in switching polarity to the drive motors were mechanicl relays (very
> little voltage drop and still supply the full 12 volts to the motors).
> I do have a schematic of my mobot brain in .JPG format nospam at 102kb, and if
> anyone would like to see it i would be glad to email it as an attachment.
> Its not the best thing to use as a mobot brain but it does work. Maybe
> somone will offer a shematic of a microprocessor as a brain and I could
> learn in the comparison in difficutlies and cost.

You have a deal. Come back and tell the list more about the mechanics, and
I gladly fill your brain with uP stuff.

I'm a PIC guy. They've been my uP of choice for the last 4-5 years. Here why:

1) Relatively cheap. PIC16F84's are $6 and change at digikey. The 8 pin
PIC12C508 are less than $2 in singles.

2) Extremely simple instruction set. Only 33 instructions. One can learn the
whoule set in an afternoon.

3) Cheap programmers and development tools. Microchip, the PIC manufacturer
give away their Windows based assembler and simulator, and their programmer
is less than $100 and programs everything. If you really want to do it on
the cheap a 16F84 programmer can be built for less than $10 and an afternoon.
I'm a Linux guy and there's a development push for assemblers and programmers
for the Linux environment. One of my students put together a 16C84 programmer
that runs like a champ. The 16C84 is simple because it's EEPROM based so
it doesn't require the eraser, timing, and voltage, that EPROMS require. Most
of the other PICs are EPROM based.

4) Lots and lots of expertise. There's a extermely active PIC mailing list
and a GNU based PIC software mailing list. Hobbists, professionals, and
authors frequent these lists.

5) They're tough little buggers. Can source/sink up to 25ma per I/O pin,
have internal protection diodes, a watchdog timer, and can even survive
reversed polarity on its power supply pins.

6) A wide range of parts. From 8 pins with internal oscillator to 68 pins
with 1K of RAM and 16K of program code space. There are a wide range of
peripheral choices. Each has one timer, many have 2 or three. Some have
serial interfaces, others have A/D (even the 8 pin parts), compartors,
timing capture pins, syncronous serial interfaces are all available.

7) Power miserly. Runs in the microamp range at 32khz and in the single digit
millamp range at full speed.

8) And lastly they are faster than bats out of hell. Unlike Intel's 8051
series, the instruction rate is clock rate/4 not rate/12. So a 20 Mhz part
is clicking along at 5 million instructions per second! And all straight
line instructions run in 1 cycle, with branches/skips clocking in 2 cycles.

There are other manufacturers in the game, like Atmel, Zilog, and Motorola
which are currently in a price war with Microchip. But until I need
100,000 parts, I'm sticking with PICs

Using them are simple. Attach power and a crystal or resonator. Will even run
with a RC clock if timing isn't critical. Program the part, and off you go.

You'd probably want to start with the 16F84. It has a EEPROM program core (1024
words), 64 bytes of data EEPROM, 68 bytes of ram, 13 I/O pins, and an 8 bit
timer. That should be enough to detect all your bump switches, drive
your relays (via a trasistor driver, 25ma usually isn't enough to kick start
a coil.) and determine how long to delay with more than enough horsepower
to do a few other tasks. BTW I drive relays using an optoisolator...

Hope this gives you some insight.

BAJ