Robot Building for Beginners, Third Edition

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

A hop in a wire appears just above pin 5. The hop indicates that those wires aren’t connected.
Some schematics and wiring diagrams don’t bother with the hop. Instead they assume crossing wires
aren’t connected unless there’s a dot. Depending on the author, you’ll need to take a moment to acquaint
yourself with his or her wire-connecting indicators.


Understanding the Brightness Comparator Circuit


The purpose of the brightness comparator circuit is to indicate which pair of photoresistors is receiving more
light. The comparator chip accomplishes this by comparing the voltage at test point 1 to the voltage at test
point 2; whichever has the lower voltage is receiving more light.
Both comparators in the LM393 are utilized. Comparator A compares TP2 (connected to Input A-) to
TP1 (connected to Input A+) and turns on the LED7 (connected to Output A) when TP1 has a lower voltage
(left photoresistors receiving more light). Comparator B compares TP1 (connected to Input B-) to TP2
(connected to Input B+) and turns on LED8 (connected to Output B) when TP2 has a lower voltage
(right photoresistors receiving more light).
Pin 8 (V+) connects to positive power and pin 4 (GND) connects to negative power because the
comparator chip needs to be plugged in to operate. Resistor R7 protects LED7 and resistor R8 protects LED8
from the full force of the battery, just as you used a resistor for that same purpose in the LED Power Indicator
Circuit.


Parts List for the Brightness Comparator Circuit



  • -- – 9 VDC power supply

  • R7, R8 – 2.2 kW resistor (red, red, red)

  • LED7 – Yellow LED

  • LED8 – Green LED

  • IC1 – LM393 (or equivalent) dual comparator


Building the Brightness Comparator Circuit


In the last chapter, you built the balanced brightness-sensing circuit on the right side of a solderless breadboard.
You should build the brightness comparator circuit in the middle of the same board (see Figure 15-6).

Free download pdf