GB+USA
Tip:
Use a flashlight as a light source. Try not to focus the light beam too
small, so that both photosensors can receive the light source. Note
that other light sources in bright rooms, e.g., sunlight from a window,
can be stronger than the light from your flashlight. The robot
might move past your flashlight and toward brighter light.
Solution:
Conclusion:
We have now constructed a robot, which detects its environment actively.
Its sensors are programmed to locate a light source and – if it succeeds –
to move toward or follow this source.
We saw that the program switched off the robot if no light source was
found. For example, if only a small obstacle interrupts the direct line of view
to the robot, it does not detect the light source and cannot find it, although
it is there. It would apparently make sense to have the robot move more or
less randomly to another spot after an unsuccessful light search, so that it
could search for light again there.
But what happens if an obstacle, which prevents light from reaching the
robot, is precisely in the robot's movement of direction? This question seems
sufficiently interesting for us to examine it more closely.
4.5 The Tracker
Searching and following are two essential characteristics, which intelligent
beings have. We built and programmed a robot, which reacted to direct
signals from its target or potential victim.
We use a different search principle with the tracker. Instead of targeted, pre-
cise movement to a light source, we mark a line that the robot should fol-
low. This task can be solved relatively easily using optic sensors.
24
We measure the reflected light of the marking and then adjust the motors.
You should also light the line with your flashlight, so that this functions
precisely. Make certain that the photosensors are not dazzled by stray light
due to unfavorable arrangement of lamps and photosensors. Concentration
of light by the optical lens of our incandescent bulb works very favorably in
this context.
Task 6:
Build the Tracker model (gear reduction 100:1). First write a
subprogram, with which the track is sought. The robot rotates 360°
in a circle for this. If no track is found, the robot moves a bit straight
ahead and searches again. The photosensors are queried about track
detection. If the robot finds the track, it follows it. If the track ends
or the robot loses it, e.g., if the track changes direction too suddenly,
the search begins anew.
Tip:
After the lamp is switched on, there must be a short delay time
(approx. one second) before the phototransistors are queried.
Otherwise, the phototransistor detects "dark," i.e., a track where
there is none. Use an approx. 20 mm wide strip of black insulating
tape for the track or draw a black line in this width on a sheet of
white paper using a felt pen.
Solution: