Wednesday, June 24, 2009

IR Roaming BoeBot



The BoeBot here is configured with its IR LEDs and IR detectors pointed ahead of it like crustacean eyes. Its running a simple loop which:

1) Sends a pulse to the LEDs (making them emit IR light)
2) Checks the detectors to see if any of the light was reflected AND
a) Moves straight ahead if neither detector registered reflections
b) Or moves away from a single side that registered a reflection
c) Or moves backward if both detectors registered a reflection

It can get reasonably far with this simple loop. It does have a main weakness that if it approaches objects dead on in the right arrangement, it can get stuck in an infinite (or at least until the batteries die) loop of backing up until it just doesn't detect something then going forward a little and detecting it again. Sometimes the slight randomness of when it senses the objects and the wheels turning or sliding can wiggle it out of such a loop over a few minutes. Other times it gets stuck.

This brief video also shows that the two-IR sensor arrangement has some blind spots. This happens in almost any arrangement: if you align them straight ahead, it may clip things at the side without detecting them. If you make it too cross-eyed, it may register reflections from objects on the left on the right sensor (or vice versa) and react incorrectly. If you make it too bug eyed, it may not see things straight ahead. It would be best to have a third sensor to detect things directly ahead.

Also the vertical placement of the sensors is important. You'll see in the video that it can hit things that aren't as tall as it. So mounting the sensors as close to the ground would be best. (You can't point them at the ground too much or it will always go back since its only registering reflections or their absense; it has no ability to "see" with any resolution and detect patterns. So these sensors are like primitive animals light-sensitive spots.)

Finally the IR sensors register objects differently depending on their color and texture and how well they reflect or absorb this IR frequency. So it detects my hand at 5-6", a white wall at closer to a foot, a mirror well over a foot away, and sometimes doesn't detect black objects until it collides with them. So it should have a back-up sensing system like whiskers or a bumpers.

No comments:

Post a Comment