Robotics with PIC16F877 anyone??
Dan Michaels email (remove spam text)
Tom Handley wrote:
> Dan, well I'm working on it in spare time but I really want to wait for a
>dual motor platform instead of spending much more time on this R/C car.
Still interested in that Radio Shack tank? I wonder if it has the
Tamiya twin-motor in it. [you could buy one and tell me].
> I'm using multiprocessing with a 16F876 for testing, 12C508 for the IR
>detector, 12C671 as a dual RC servo controller (I needed the TMR0
>interrupt), and a 16F84 as a dual H-Bridge controller. I plan on another
>12C508 for the Ultrasonic detector. They all talk over a serial interface.
You connecting all the chips to the same RS-232 channel? How are you
doing this? Ever think of using just a single PIC40 for the whole
thing? But, I guess, servo control would be a problem if you have to
keep feeding signals to it.
>The whole idea is to keep it modular with a standard interface so I can
>easily add or remove modules (kind of like Leggo's system).
I'm thinking along the same lines, but with several stacked PIC40
boards. Lowest one would do most of low-level processing, as I
described earlier in the day. Next one up would have a 32KB SRAM
and be used to store real-time "mapping" data obtained by the
low-level board as the beastie runs around the room. Basically
build up an internal representation of the environment - would
need some kind of external landmarks for this - IR beacons or
>Port B goes to a standard 74x30 8-Input NAND gate used to expand the
>interrupts to 7 channels with the output going to RB0/INT.
Why do you need all these interrupts? I figure my thing wouldn't
be moving very fast, so I can poll the sensor ports. Also, with the
L293 chips controlled by dedicated I/O pins and the 2 PWM channels
used for speed control, it wouldn't require any processor cycles
for real-time control over the motors.
The bot will either run very slowly or else run a few inches, and
stop and take sensor readings. Slow-lane robotics here.
>planning on adding other goodies such as a Vector 2X compass, I'll
>definitely be using a 16F877. If I can just pin down the platform... I'm
>real interested to hear your experiences with that TAMIYA gearbox!
Maybe GPS, too? BTW, the latest/greatest GPS apps I have heard
about are: a) herding cows, and b) finding free spots in parking
lots. a) works by "cow whispering", b) works by having a satellite
photograph the parking lot from space, and downloading a map
to the computer in your Cadillac SUV. A traveling salesman
algorithm routes you to the open space before any other cars
can get to it - Cadillacs rule [what a gas].
Re Tamiya, will breadboard a PIC, L293 and Tamiya together
this week. Look for possible motor noise/heating/etc problems.
> The CDROM's are a good idea. I save them for coasters ;-) You know, they
>might make good wheels if you could find a way to add a rubber O-ring or
>something around the edge. Maybe glue 2-3 CDs together. You could easily
>drill holes or mount magnets on them to count revoloutions. It would'nt be
>practical for a tach but you could sense how far you traveled. I haven't got
>that far yet on my hack.
Nice thing, for a botbody, you can stack any #of AOL disks [I
must have millions] till you have it as rigid as you want. For
wheels, CDs are too big, I think. I bought some 1.75" rubber
airplane wheels for the Tamiya. Friction, plus small size for
Also, with CDs, you can easily build a multi-level bot.
For distance measurements, I'll probably just relie on
BTW, Walgreens is advertising 3 little RC cars for $12
altogether. Heckuva deal for radio links - if can get different
frequencies. This way one xmtr-rcvr in bot, another in
base station --> 2-way comm. Slow, but that's probably ok
if the bot has some minimal brains.
- Dan Michaels
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email mitvma.mit.edu with SET PICList DIGEST in the body listserv
See also: www.piclist.com/techref/microchip/devices.htm?key=16F
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the