Line Tracking Robot Project

Embed Size (px)

Citation preview

  • 8/6/2019 Line Tracking Robot Project

    1/10

  • 8/6/2019 Line Tracking Robot Project

    2/10

    2. Light Emitting DiodeCertain diodes, under the condition of forward-bias, emit light. These could be of different colors. In our case it is infrared.

    Tracking Robot Project http://www.seas.upenn.edu/~ese111/robot/R

    0 7/18/2011

  • 8/6/2019 Line Tracking Robot Project

    3/10

    3. Transistor

    A transistor is a three-terminal device that is made of three sections called emitter, base and collector. A transistor is either npn or

    pnp.

    Tracking Robot Project http://www.seas.upenn.edu/~ese111/robot/R

    0 7/18/2011

  • 8/6/2019 Line Tracking Robot Project

    4/10

    A small base current, IB, is used to control a much larger collector current Ic. A small signal (small variations) superimposed on

    the IB results in similar but larger variations in Ic. This is called amplification.

    3. Phototransistor

    A phototransistor is a transistor that is sensitive to light. When light shines on it, the collector current will greatly increase, while

    in the absence of light, Ic is very small. We can view the effect of light as controlling the effective resistance between the

    collector and emitter. In the presence of light this resistance is low, resulting in a large collector current, while in the absence of

    light the opposite happens.The phototransistor is functioning as a switch; no connection is made to the base.

    4. PotentiometerThis device is essentially a variable resistor. It has three terminals. Figure 3 shows the example of a 10kW potentiometer. The

    contact C can be moved along the 10kW resistor from A to B. The resistance between A and B is fixed (10kW in this case). The

    resistance between A and C can be changed from 0 to 10kW by moving the pointer from A to B. As this happens, the resistance

    between C and B changes from 10kW to 0.

    A. Sensor Section

    The sensing subsystem consists of two identical parts called Photo Interrupters. Each photo interrupters is made of a light emitting

    diode (LED) and a phototransistor.

    Tracking Robot Project http://www.seas.upenn.edu/~ese111/robot/R

    0 7/18/2011

  • 8/6/2019 Line Tracking Robot Project

    5/10

    The LED emits infrared radiation. If the Photo Interrupter passes over a white surface, the infrared light is reflected back and is

    detected by the phototransistor. Let us assume that this is the case for the right (shown in red) photo interrupter assembly. The

    result is that the emitter-collector resistance drops and a large current flows through the red 27kW resistor. This created a large

    voltage drop across this resistor and VR is reduced to near zero. If at the same time, the left photo interrupter assembly (shown in

    blue) is over the black line, the radiation is not reflected back to the phototransistor and the emitter-collector resistance remains

    high. This results in a small current through the blue 27kW resistor. The resulting small voltage drop across this resistor leads to a

    high value of ~9 V for VL. We send these two voltages to a comparator, which then makes one of the two wheels of the robot

    rotate in such a fashion that it turns to the left.

    The 10kW resistor is a potentiometer, and we adjust it so that when light strikes both photo-interrupters (or neither of them), the

    left motor will be rotating and the right motor stopped. We use the pre-assembled photo-interrupter units from the kit.

    The following picture shows the protoboard set-up for the sensor stage of the robot:

    B. Comparison Section

    Before describing the next section we will introduce a new element, the Operational Amplifier (OPAMP).

    5. OPAMP

    This device (Fig. 4), has two inputs, VN (the inverting input), and VP (the non-inverting input).

    Tracking Robot Project http://www.seas.upenn.edu/~ese111/robot/R

    0 7/18/2011

  • 8/6/2019 Line Tracking Robot Project

    6/10

    It has one output, VO. The remaining two connections, +VCC and -VCC provide power to the OPAMP. VCC is usually between 12

    and 25 V. In our circuit, +VCC is connected to the +9V power supply and -VCC to the ground. We use the OPAMP as a

    comparator:.

    If VP > VN , then V0 = +VCC.

    If VP < VN , then V0 = -VCC.

    In our case, +VCC=+9V and -VCC=0V(ground)

    The integrated circuit (IC) used in this kit contains two OPAMPs used as comparators. The package (Fig. 5) has 8 pins: 4 inputs,

    2 outputs and 2 more pins for +VCC and -VCC.

    The robot moves in such a way as to locate itself above a dark line drawn on a white surface. The voltage at pin3 of the

    comparator 1 is fixed at +3V because of the voltage divider (we have 9V across the series combination of the 10 and 20kW

    resistors).

    Now let us see what happens if the right photo-interrupter is on a dark region and the left photo-interrupter is on a light region.

    As we saw in SectionA, under this condition VR > VL. This will result in the output of the comparator 2 (pin7), to be low (a few

    tenths of a volt). The Amplifier Section connected to pin 7, i.e., TR1 and TR3 (as we will see later) actually work in such a way as

    to output a large current to the Left Motor when pin 7 is low! This allows the Left Motor to rotate.

    At the same time, pin7 is fed into the pin2 ofcomparator 1. Since the voltage at pin3 of this comparator (the non-inverting

    input) is held fixed at +3 V, the output (pin1) will go high (~9V), and the amplifier section, TR2 and TR4 out put very little

    current to the Right Motor. Therefore it does not rotate. If the left motor operates and the right motor does not, the robot move to

    the right, until the left photo-interrupter is located on the dark region and the right photo-interrupter on the light region.

    The 1k resistors connecting the outputs of the two compatators (pins 7 and 1) to +9V are temporarily there to simulate the rest of

    the circuit, and are removed when the amplifier sect ion is installed.

    Tracking Robot Project http://www.seas.upenn.edu/~ese111/robot/R

    0 7/18/2011

  • 8/6/2019 Line Tracking Robot Project

    7/10

  • 8/6/2019 Line Tracking Robot Project

    8/10

    D. Amplification Section:

    This section (See Figure 4) is made of two amplifier subsections. One, consisting of transistors TR1 and TR3, connects pin 7 of

    the the second comparator to the Left Motor. The second, consisting of transistors TR2 and TR4, connects pin 1 of the first

    comparator to the Right Motor.

    Let us see how one of these, the first, operates. If the output ofpin 7 is high (~9V), very little current will flow through the 68k

    resistor connected to the BASE ofTR1. Therefore this transistor acts as a switch which is turned off. As a result very little current

    Tracking Robot Project http://www.seas.upenn.edu/~ese111/robot/R

    0 7/18/2011

  • 8/6/2019 Line Tracking Robot Project

    9/10

    will leave the COLLECTOR ofTR1 which is in turn connected (through the 750W resistor) to the BASE ofTR3. In turn, very

    little current will leave the COLLECTOR ofTR3 (no amplification). Since the collector ofTR3 is connected to the Left Motor, it

    does not rotate. The opposite is true when pin 7 is low.

    To summarize:

    Pin 7 high Left Motor stopped

    Pin 7 low Left Motor turns

    Pin 1 high Right Motor stopped

    Pin 1 low Right Motor turns

    The following two pictures show the completed protoboard:

    Tracking Robot Project http://www.seas.upenn.edu/~ese111/robot/R

    0 7/18/2011

  • 8/6/2019 Line Tracking Robot Project

    10/10

    E. Power Source

    There are two sources of power. A 9V battery provides power for the electronic circuits and two 1.5V cells in series power the

    motors. In the lab, you will use the 0 to 25V variable power supply set for 9V, and the 0 t0 6V variable supply set to 3V.

    Created by: Sohrab Rabii and Siddharth Deliwala, November 1998.

    Tracking Robot Project http://www.seas.upenn.edu/~ese111/robot/R