Robot Building for Beginners, Third Edition

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

The pinout of the LM393 comparator chip is shown in Figure 15-2. There’s a notch and/or a dot atop
the physical chip as well as a notch atop the pinout illustration. Mentally number the pins starting from the
notch, rotating counter-clockwise. This method makes it easy to universally reference any pin on a chip.


Figure 15-2. Pinout of the LM393


■ Tip When a bunch of chips are placed on a board, the board should be designed so that all notches


are aligned in the same direction. This way, a quick visual inspection reveals if any chips have been


inserted backwards.


Locating the Power Supply Pins


All chips have pins that receive power to run the chip. Think of a chip like an appliance: You need to plug it
in to make it work. The power supply pins are the first two pins you should locate.
On the LM393, pin 8 and pin 4 receive power. Pin 8 is labeled V+, which means the positive end of the
battery connects to this pin. Pin 4 is labeled GND, which means the negative end of the battery connects to
this pin. (At the end of this book is a list of the most common labels that indicate positive and negative power
connections for chips.)
Many chips have power pins on the same diagonal corners as the LM393. However, always check the
chip’s pinout on its datasheet to be sure.


Identifying the Comparators


Based on the chip’s title, “Dual Comparators,” we know that two comparators are included on this chip. Pins
1, 2, and 3 belong to the first comparator (“A”) and pins 7, 6, and 5 belong to the second comparator (“B”).
Notice that pin 1 (Output A) has the same name as pin 7 (Output B), pin 2 (Input A-) has the same name as
pin 6 (Input B-), and pin 3 (Input A+) has the same name as pin 5 (Input B+) except that one set of pins is for
comparator A and the other set for comparator B.
The comparators are truly independent: You can use them individually to measure completely different
circuits or test points. The comparators function in the same manner, so once you have learned how to use
comparator “A,” then you know how to use comparator “B.”
On the LM393, pin 1 is labeled Output A (see Figure 15-2). There is a solid-state switch inside of the chip
that either connects the inside of this pin to the negative terminal of the battery or disconnects it.

Free download pdf