Robot Building for Beginners, Third Edition

(Marvins-Underground-K-12) #1

CHAPTER 25 ■ LAUNCHING THE LINE-FOLLOWER


If only the headlights or tube LEDs don’t light, it could be that one or more of the LEDs are backwards.
The tube LED connector may be loose or have its wires reversed. The trimpot for the headlights might be set
at too high of a resistance.
In a modular robot or in a robot that uses a lot of connectors, a great diagnostic trick is to disconnect
everything that is unnecessary. You can test each part on its own. And, you can reinstall one part at a time
until the robot stops working again. For example, the motors and tube LED can be disconnected while
diagnosing a headlight issue.
Parts can also be swapped. If the motor on the left side doesn’t work, try swapping it with the motor on
the right side. If the motor suddenly starts working on the left side, then you know the issue is with the motor
that you exchanged. If neither motor works on the left side, but both motors work on the right side, then you
know the issue is with the left side of the circuit.
At no time should any of the parts become hot. If the transistors, comparator chip, or any other
component seem to be heating up, disconnect power immediately. Make sure errant solder blobs or metal
leads aren’t resulting in unintentional connections.


Checking the Sensors



  1. Place the robot on a solid, evenly lit, non-patterned surface, such as a large white
    piece of paper. The goal is to make sure the sensors are seeing the same amount
    of light.

  2. Slide a thin dark piece of paper back and forth under the sensors. The brightness-
    indicator LEDs on the left and right sides of the robot should light up alternately.


If neither sets of brightness-indicator LEDs light, compare the wiring of the soldered circuit board
to the solderless breadboard. Is the comparator chip or any of the LEDs in backwards? Is the comparator
damaged? Since the comparator is socketed, it’s easy to pull it out and put it into the solderless breadboard
version of the line-following circuit for testing.
If both sets of LEDs turn on and turn off at the same time (rather than alternating), then check the
wiring between the sensor test points and the comparator. Perfectly balanced sensors may appear to light
both LEDs at the same time, but putting your hand under one set of LEDs should be enough to break the tie.
If one set of LEDs turns on and off, but the other set always stays off, there’s likely a broken connection
or reversed LED in the set that stays off.
If one set of LEDs always stays on and the other set always stays off, then maybe the trimpot (R2) for
balancing the sensors is not near the center. At the extremes of its range, the trimpot will imbalance one set
of sensors so much it always seems to be brighter or darker.


Balancing the Sensors



  1. Remove the dark piece of paper. With only the evenly lit piece of white paper
    beneath the sensors, dial the trimpot so that the left and right brightness
    indicators light up at the same time.


Sometimes it isn’t possible to get both sets of LEDs lit at the same time. A tiny nudge of the screwdriver
causes one side to light, and a tiny nudge the other way causes the other side to light. But, that’s close
enough, and it indicates the sensors are evenly balanced.



  1. Place a dark piece of paper under the right-side set of sensors. The left set of
    brightness-indicator LEDs should light.

  2. Move the dark piece of paper to be under the left-side set of sensors. The right-
    side set of brightness-indicator LEDs should light.

Free download pdf