 |
So you've got two line followers. Just how long can you resist racing them against one another? For me its not too long. Time to race
Roverbot against Sandwich.
Different Sensors
For line following, Sandwich uses four CdS photoresistors. Wired in parallel, there are two for the left and two for the right, and as Sandwich drives, he straddles the line.
In addition, Sandwich has two white visible-light LEDs for headlights. These shine on the floor & line, and the photoresistors sense the
reflected light.
Roverbot in this configuration uses a single Lego light sensor. This has a red visible-light LED for illumination, and a single light sensor (I'm not sure if its a CdS or
a photo-transistor). So while Sandwich straddles the line, Roverbot tries to keep his single eye on top of the line.
Different Techniques
These different sensor layouts lead to different line following techniques. Sandwich starts off with his left sensor array facing the floor to the left of the line,
and his right sensor above the right side of the line. If he sees equal brightness on both sides, he drives straight. As the line curves to one side, that side will become
darker. So Sandwich's left sensors will read a different value than the right side, and Sandwich knows which direction to turn in.
Roverbot, the cyclops, does not have that luxury. When his single light sensor goes off of the line, he does not have another sensor to
compare to, so he does not know what direction he must turn in to find the line again. And that's what leads to the jittering algorithm I
devised for him to scan back and forth until he finds the color of the line again.
Multimedia
See for yourself which sensor arrangement is more effective. Bear in mind that a variety of factors impact line-following speed,
but the sensor limitations drive the algorithm in this situation and that is the critical factor for performance here.
Roverbot vs. Sandwich Race - .wmv (852 KB) | .avi (3.92 MB)
|
 |