Page 81 - Robots Androids and Animatrons : 12 Incredible Projects You Can Build
P. 81

to, such as light, sound, or heat. The sensors one incorporates into
                                a robot will depend upon its intended operating environment and
                                application.
                        Signal conditioning
                                When determining which sensor to use for a robot, one must de-
                                cide how the robot will read the sensor signal. Many sensors are
                                resistance-type, meaning that the sensor varies its resistance in
                                proportion  to  the  energy  being  detected.  When  the  sensor  is
                                placed in a simple voltage divider network, it outputs an electrical
                                signal whose amplitude varies in proportion to the energy it senses.

                                If the robot is required to read the actual energy intensity (analog),
                                an analog-to-digital (A/D) converter is needed. A/D converters can
                                measure  the  electrical  signal  and  output  an  equivalent  binary
                                number.
                                A/D converters will require a microcontroller or digital circuit to
                                function properly and extrapolate the data. In many cases an A/D
                                converter isn’t required to read sensor signals. Instead of an A/D con-
                                vertor one uses a comparator.
           60                   As its name implies, a comparator compares two voltages. One is
                                a reference voltage that we, the designers, set. The other voltage
                                is derived from the sensor (via the voltage divider). The compara-
                                tor can output one of two signals: high or low. The high signal is  5
                                V and the low signal is 0 V.
                                The output signal from the comparator depends upon the magni-
                                tude of the two voltages on its two input lines. There are three
                                possible choices. The sensor signal is less than the reference volt-
                                age, equal to the reference voltage, or greater than the reference
                                voltage.

                        Comparator example

                                The best way to learn about comparators is to use one in a circuit.
                                The first thing you notice in Fig. 5.1 is that the comparator looks
                                much like an operational amplifier (op-amp). This is true; com-
                                parators are specialized op-amps. The comparator used in our first
                                example is the LM339 quad comparator. This integrated circuit
                                contains four comparators in a 14-pin dip package. Like op-amps
                                the comparator has an inverting and noninverting input. In this
                                particular circuit the reference voltage is placed on the inverting
                                input ( ).


                                                       Team LRN
            Chapter five
   76   77   78   79   80   81   82   83   84   85   86