Robot Building for Beginners, Third Edition

(Marvins-Underground-K-12) #1
CHAPTER 15 ■ COMPARATORS

Figure 15-9. Moving the comparator input’s jumper wire from the sensor test points (left) to the power supply
buses (right)


With the jumper wires still connected to the buses (rather than the sensor test points), use a multimeter
to test that the inputs of one comparator are receiving the voltages opposite from the other comparator. If the
wires aren’t reversed to the second comparator’s inputs, then both LEDs will turn on at the same time and
turn off at the same time.
Make sure neither LED is in backwards.


Adding Headlights


Currently, the sensors react to ambient (room) lighting. When installed on the robot, the sensors face down
near the floor with most of the natural lighting blocked by the circuit board. By adding headlights, you can
place the sensors underneath the robot and operate the robot in dim lighting or at night.
There’s a special reason for adding a light source. As mentioned earlier in this chapter, the comparator
can’t compare voltages in the upper 1.5 V range of the battery voltage. When the photoresistor sensors are
dark, their resistance gets very large. The large resistance causes the voltage at the test points to rise into the
top 1.5 V. By adding headlights, the resistance remains below extreme values, thus staying away from the
comparator’s top-end weakness.


Understanding the Headlight Circuit’s Two LEDs


The headlight circuit is nearly identical to earlier LED circuits. The major difference here is that two LEDs are
sharing the current (see Figure 15-10). This is very energy-efficient since some of the voltage that was being
wasted as heat in the resistor is now creating light in the second LED. Because LED10 is using the same
current flowing through LED9, the additional LED has no effect on battery drain..

Free download pdf