August 01, 2004

A ROBOT THAT AVOIDS OBSTACLES!

Well here it is!
THE SENSBOT - a robot the senses obstacles
and navigates to avoid them.


sensbot.jpg

I have been having a lot of fun placing boxes and things
around the floor and seeing how well SENSBOT does.
Sometimes it gets itself stuck. But it does very well
and sometimes great when it goes into a dead-end hall area
anbd manages to turn around and come out again all
by itself.

SENSBOT has a rotating turret driven by a stepping motor
controlled from the computer program in the PIC microcontroller.
In general my turret sweeps 90 degrees, and I have settled on
5 segmnents of detection. Extreme left and extreme right,
slightly left and slightly right, and direct ahead. My sensor is the
Sharp GP2Y0D340K. This infrared sensor is set to activate a
signal when object is less than 40 centimeters (about 15 inches?)
from sensor. I bought 4 of these sensors from junun.org at $6
each. I use only one in the rotating turret.

My program algorithm is as follows.
If object sensed on extreme left, stop right wheel for brief time.
If object sensed on extreme right, stop left wheel for brief time.
If object sensed slightly to left, stop right wheel for longer time.
If object sensed slightly to right, stop left wheel for longer time.
If object is directly ahead, I alternate between a hard right
and a hard left.

This robot is not set up to go in reverse. The PIC sends signals
to 2 transistors which control the on and off to the wheel motors.

The sensors are quite complex. An infrared signal is sent out
at some specified freequency, and a phototransistor or photodiode
detects signal. The receiver though will filter out any other signal
that is not at the specified frequency. This prevents false signals
from other sources.

Posted by larrykeegan at August 1, 2004 11:06 AM