Sunteți pe pagina 1din 14

TECHNICAL MANUAL 2012

CONTENTS
1. 1.1 1.2 INTRODUCTION Goal(what is the motivation?)........ page no.1 Real life analogy(something you can relate to)and basics....... page no.2

2. 2.1 2.2 2.3 2.4

BUILDING BLOCKS InfraRed transmitter circuit and infrared receiver circuit (eyes of the logic bot) along with indicator led....page no.4 Introduction to L293D driver IC(the power house )......page no.7 Operation of L293D with motors.................................. page no.8 Actual implementation of L293D in logic bot....................................................................................................... page no.9

3. 3.1 3.2

IMPLEMENTATION The actual circuit diagram(electrical circuit connections)................................................................................... page no.10 The actual layout of components on the printed circuit board........................................................................... page no.11

1 INTRODUCTION

GOAL ( WHAT IS THE MOTIVATION ? ) THE MAIN AGENDA IS TO BUILD A LINE TRACER AND MAKE IT FOLLOW THE BLACK LINE ON A WHITE SURFACE. WE SHOULD NOT USE ANY MICROCONTROLLER! But we will not jump into the main agenda straight away, we will take small steps towards that goal after all it is the small drops that make an ocean!!! Lets begin. Firstly we are given a set of components to make the robotlets take a look you should have Components IRLED(transmitter) IRLED(receiver) Trim potentiometers 100K switch(single push on type) Printed circuit board soldering rod solder and flux Motors Motor clamps Castor wheel 2 pin male connector (RMC) and female connectors L293D driver IC and base 1.5 V AA battery (eveready) 4 AA size battery holder Resistors BO wheels Screws and nuts Quantity(in nos.) 3 3 3 1 1 1 Few strands of solder and some amount of flux 2 2 1 3 each 1 each 4 1 You will need 7 of them; consult for specifications 2 few

And of course you would require wire strippers, screw drivers .. you are requested to share the resources. Any thing missing or any thing extra please contact the organizer So having all of them we need to build the building blocks of the the robot. There are two main building blocks indicated as follow: 1. InfraRed transmitter circuit and infrared receiver circuit (eyes of the logic bot) along with indicator led(to indicate the action taken by the logic bot). 2. driver circuit(the power house of the logic bot) we will discuss them in detail in the building block section. FIRST lets see a real life analogy and the basic principle behind the line follower.
Mitveinz- ERF

REAL LIFE ANALOGY: Think of yourself driving a car you are at the steering and trying to follow a curved road. Your eyes see the curved road and you steer the vehicle accordingly. You are driving a car with power steering. So, a small turn of the steering to the left would amount to the powerful turning of the wheels (which is supporting a huge weight of the vehicle) to the left. The same is true for a right turn. But notice you dont have to put considerable amount of force to turn the steering. The enormous power is derived from the engine itself and the engine derives its energy from the fuel (petrol/diesel we would prefer diesel in India after the recent hike in petrol prices). Just like the above example our logic bot follows the same key processes for following a black line. In the driving car example, your eyes correspond to the sensors of the robot and your hand resembles the logic action taken, which is given to the L293D driver. These sensors do the job of seeing and giving the steering input to the engine of the robot (L293D). The steering input is given to the L293D and based on it; an enormous force is given to the corresponding motors coupled to wheels.

This ensures the robot (analogous to the vehicle) does not deviate from the line.

The engine needs fuel! In our bot the role of fuel is played by 4 AA 1.5 volts battery. The L293D derives the power from the batteries and powers the requisite motors. (Notice your logic bot does not use petrol! May be this is the eco-friendly future transport prototype! Congratulations that you have decided to take your future in your hands! )..

Apart from simple black line following, our logic bots are much disciplined on the line. It has a mechanism to avoid colliding with a fellow logic bot ahead of it!! The bus, auto, car and other automobile drivers must learn a thing or two from your logic bot. The number of road accidents can surely be reduced then!

So now that we have an idea of our objectivelets dive straight into the fundamentals of a basic line tracer
.

Mitveinz- ERF

3
0 Left side sensor BASIC LINE FOLLOWER CONFIGURATION Right side sensor

Obstacle sensor Wheel

Obstacle sensing For obstacle sensing there is a separate sensor. The sensor detects light reflected of the obstacle and gives the signal to the driver IC which then disconnects the motors from the power supply

Line Following Method: This robot works by having two sensors, one on each side of the black painted line, and two motors, each driving one wheel and a driver IC L293D which interprets the signal coming from the sensor and powers the motors. Each sensor consists of an infrared LED and an infrared phototransistor. The LED and phototransistor are positioned such that the phototransistor is receiving light from the LED, reflected off the ground. The white paint reflects more infrared light than the unpainted concrete, and this difference can be used to determine when the sensor is over the line. Each motor responds to the sensor of that particular side via the L293D driver IC. When both sensors are not over the line, both motors run, driving the robot forward. When one of the sensors is over the line, the motor on that side stops. This causes the robot to turn to that side, until the sensor is no longer over the line; this is how corrective action takes place. With a sensor on each side, the robot is then capable of following the line.

Sensor Arrangement: The width of the line is approximately 3cm and it is black in color. We fix 2 line following sensors vertically downwards such that they are outside the black line and use them to follow the line as straight as possible. The obstacle sensor is made horizontal to detect obstacle.

Having gone through the basics lets plunge into the exciting world of electronics. Let us explore the building blocks of the robot.

Mitveinz- ERF

BUILDING BLOCKS OF THE LOGIC BOT: As discussed in the previous section let us encounter our first building block InfraRed transmitter circuit and infrared receiver circuit (eyes of the logic bot) : this part is also analogous to the mechanism used by bats(they use sound waves reflecting on the surface of obstacles to detect them. ) The following is a typical InfraRed transmitter circuit

Positive supply; in our circuit it is +6 volts

CURRENT LIMITING RESISTOR. A typical IRLED can bear at most 100mA continuously. Therefore we need this resistor.

Infrared light invisible to human eyes but can be seen through a mobile camera this helps in checking whether the IRLED is working or not. The IR light reflects off white surface and is received by the IR receiver. The IR radiation is absorbed by the black line, so the receiver does not detect it. The above idea is used for line following. Negative supply; in our circuit, it is 0 volts
ANODE IR LED

This is the anode terminal of the IRLED; in reality this terminal is longer than cathode.

This is an infrared led representation. In order that the IR led emits IR light it must be forward biased. Forward biasing means the anode of the IRLED must be at a higher potential than the cathode. This is the cathode terminal of the IRLED. This terminal is usually shorter than anode.

CATHODE
Mitveinz- ERF

5 Next we look at the infrared receiver circuit (eyes of the logic bot): in our logic bot we use 2 types of configuration, we shall name them as type A and type B. they are described below: TYPE A: This type of configuration is used for is used for the line tracing sensors (both the left sensor and the right sensor). This is an example of positive logic.

Power supply: positive terminal-6Volts Potentiometer section:


The LED2 has fixed properties (relatively). In abundant IR exposure (sensor over white surface; as we know white reflects almost any radiation) the photodiode (LED2) has a low resistance. Let us call it Rlow (fixed for a particular photodiode). When the sensor is over black surface the exposure is very low as all the IR is absorbed in the black line. The photodiode has a very high resistance now. Let us call this resistance Rhigh. The general representation of resistance of photodiode is . Consider the resistance of the TRIM POT as Rtrim. Now concentrate on the marked out area. This represents the voltage divider configuration therefore the voltage at node 2 is given as: = Trim POT 100k + The above equation is not completely true (potentiometer); 3rd pin left as we can see from node 2 there is branch floating consisting of LED7 and R6. Therefore the voltage at the node 4 is approximately given by the above equation. In the above equation = when over white surface; and = when over black surface; however unreliable our photodiode is, notice by varying one can vary .and hence the logic level.

This is an IR Receiver (photo diode) photodiode is always placed nearby the IR transmitter for better reception of reflected signals .IR receiver is reversed biased. That means the cathode of the IR receiver is at higher potential than the anode. The resistance of a photo diode (in this example LED2) varies with IR exposure. When the sensor pair (IRLED and photo diode) is over white surface, the maximum amount of IR is reflected back to the photodiode. When exposure to IR is high then the photodiode behaves like a short circuit therefore the voltage at node 2 is nearly 6 volts (explained in the potentiometer stage) . Since node 2 and node 1 are connected through an ideal wire, their voltages are same. This high logic level is fed to the input 1A of the L293D if the left sensor is considered or 4A pin otherwise through the node 1. This enables the motor corresponding to the sensor. That is if left sensor pair is in white then left motor rotates forward. The right motor will rotate in case the right sensor is over white. Notice the corresponding indicating led (like LED7) would glow and it will be visible to us. This indicating led is often used to tune the sensor.

2 1

Normal led -forward biased. This led glows when the photo diode is over white surface
Mitveinz- ERF

TYPE B: The circuit diagram below represents the photodiode configuration for obstacle sensor. This is an example of negative logic. This logic levels are fed into the enable pins of the L293D driver IC. When object is detected the L293D is Disabled by supplying 0 logic level through node 3. Otherwise the enable pins are high always.

Power supply: positive terminal-6Volts

Trim POT 100k (potentiometer); 3rd pin left floating to utilize the variable resistance property between the two terminals

4 3

Power supply: negative terminal-0 Volts

IMPORTANT: IF THE ROBOT DOES NOT FOLLOW THE LINE PLEASE TUNE YOUR SENSORS SO THAT THESE LOGIC LEVELS ARE OBTAINED FOR PROPER LINE FOLLOWING. CHECK THE VOLTAGE AT THE NODE 2 AND 3 OF BOTH CONFIGURATIONS WHILE TESTING.

Normal led -forward biased. This led glows when the obstacle is near the sensor

In this example LED4 is the Photodiode. The characteristics have been dealt in detail.

The LED4 has fixed properties (relatively). In abundant IR exposure (sensor near the obstacle; most of the IR reflected from it) the photodiode (LED4) has a low resistance. Let us call it Rlow (fixed for a particular photodiode). When the sensor is not near an obstacle the exposure is very low as all the IR is lost. The photodiode has a very high resistance now. Let us call this resistance Rhigh. The general representation of resistance of photodiode is . Consider the resistance of the TRIM POT as Rtrim. Now concentrate on the marked out area. This represents the voltage divider configuration therefore the voltage at node 2 is given as: = + The above equation is not completely true as we can see from node 4 there is branch consisting of LED8 and R8. Therefore the voltage at the node 4 is approximately given by the above equation. In the above equation = when over white surface; and = when over black surface; however unreliable our photodiode is, notice by varying one can vary .and hence the logic level.

Mitveinz- ERF

7 Introduction to L293D driver IC: Having learnt about sensors let us learn about the power house of the logic bot. What is so special about this IC? The external structure of L293D is like any normal IC. This is how it looks like.

This has a total of 16 pins. The L293D looks like a cuboid with pins alongside the length. The black body is made up of silicon (high quality and processed). We are not interested in the internal structure the functionality is important consider it like a black box with input and output pins. But for those who want to learn about the internals may consult the internet. 16. This is the logic signal enable pin. It is We now discuss about the general working of L293D: The pin diagram of L293D is presented below. recommended to apply above +5 volts 1. Enable pin for the output at pin 3 and 6. +5 volts is required here. 2. Input 1 pin. This input usually comes from sensors (low current). The L293D compares the logic level between this pin and pin7 to give output at pin 3 and 6 3. Output pin 1. Depending upon the input at pin 2 and 7, high power is drawn from pin 8 and directed to pin 3 or nothing is directed to it.(generally a motor will be connected across pin 3 and 6) 1 2 3 4 5 6 7 8 1, 2 E 1A 1Y GND Vcc 4A 4Y GND GND 3Y 3A 3, 4 E 16 15 14 13 12 11 10 9

15. Input pin 4. This input usually comes from sensors (low current). The L293D compares the logic level between this pin and pin10 to give output at pin 14 and 11.
14. Output pin 4. Operation similar to the output pins on the left side.

L293D

4. 5. Both pin 4 and 5 are connected to the ground.


6. Output pin 2. Depending upon the input at pin 2 and 7, high power is drawn from pin 8 and directed to pin 6 or nothing is directed to it.(generally a motor will be connected across pin 3 and 6) 7. Similar to pin 2, pin 7 is a low power input pin. This is the motor voltage supply. This is connected to the battery supply.

GND
2Y 2A VS

13. 12. Both pin 13 and 12 are connected to the ground.


11. Output pin 3. 10. Similar to pin 15, pin 10 is a low power input pin. 9. Applying +5 volts and above to this pin enables the output from pin 14 and 11. 0 volts disables the right side of the IC. RIGHT SIDE

Mitveinz- ERF

LEFT SIDE (Remember right side is independent of left) two motors can be independently controlled

Operation of L293D with motors: now let us see the characteristics and operation of L293D: Firstly 1. This IC is not a power source. 2. In our case we have to give 6 volts supply (this supply can be from 4, 1.5V AA batteries) to 8th pin of the IC. 3. This voltage level is required for operation of the motors (just like the power of the brakes on the wheel). The IC only directs the power to appropriate pins (3rd, 6th & 11th, 14th) depending on whether 6volts (user gives this input with little effort) is present or absent on particular pins (2nd, 7th & 10th, 15th respectively). Only when the IC receives a logic high signal (6 volts) on the 2nd pin and logic low signal (0 volts) on the 7th pin, the motor connected across 3rd and 6th pin will rotate in one direction. If opposite signal is applied, the motor will rotate in opposite direction. The same is true for the right side. The operation can be understood using the h bridge concept in which we imagine that internally the L293D has the following abstract connections (resembles H):
6 volts 6 volts 6 volts 6 volts

Pin 3

Pin 6

Pin 3

Pin 6

M1-motor

The above two diagrams can be understood as follows: When 2nd pin is high and 7th pin is low, internally switch1 and switch 4 closes simultaneously, so M1 rotates in 1 direction; if 7th pin is high and 2nd pin low then switch 2 and switch 3 closes (simultaneously switch1 and switch 4 open) and the direction of current reverses and so M1 also reverses its direction.
Mitveinz- ERF

9 Actual implementation of L293D in logic bot: How L293D is used in the logic bot? A: in the following way:

This input signal comes from the obstacle sensor. Remember the configuration of the sensor is Type B which is already discussed.

This input signal comes from the left sensor. Remember the configuration of the sensor is Type A which is already discussed.

This input signal comes from the right sensor. Remember the configuration of the sensor is Type A which is already discussed.

Output to the left motor

Output to the right motor

6 volts is supplied here from battery

All of them are grounded

The operation can be described as follows: when the left sensor is in white, approximately 6 volts (sensor output) is fed into 1A pin. This results in left motor running forward. When the left sensor is in black, 0 volt appears at 1A and the left motor stops. The case of the right sensor is similar to the left as the configuration of their photodiodes is the same (Type A-positive logic). Now coming to the obstacle sensor configuration (Type B-negative logic), when obstacle is detected, 0 volts apply to the pins 1-2EN and 3-4EN and hence both the left motor and the right motor is disabled. If no obstacle is detected then approximately 6 volts apply to these pins and the motors are enabled.
Mitveinz- ERF

Mitveinz- ERF

10

IMPLEMENTATION: THE ACTUAL CIRCUIT DIAGRAM: The following is a schematic representing the electrical connections of the logic bot. On the next page, the diagram represents the actual layout of the components on the printed circuit board. The labels (like R1, LED10) of the schematic correspond to the labels of the actual layout.

6 volts
1 2

4 5

Power supply Single push on/off switch

This region of the circuit consists of power supply indicating led and the left line sensor.
LEGEND: (Type A configuration) R10 is the current limiting resistor for 1 LED10. LED10 is a normal red led. It glows when power is going into the circuit. LED1 is an IR transmitter (IR Led). It is Forward biased and the current is limited by R1.
2

LED2 is an IR receiver (photodiode). LED1 and LED2 make the left line sensor.
3

R5 is a potentiometer with the 3 pin left floating. This enables variable resistance. The idea is already explained.
4

rd

This region represents the forward sensor and obstacle detecting led. The bot stops when obstacle is detected by this sensor. The sensor consists of LED3 and LED4. (Type B) LED3- IR transmitter current limited by R4. LED4-photo diode IR receiver. rd R2- potentiometer with 3 pin floating. This enables variable resistance. The idea is already touched upon. LED8- normal led glows when obstacle is detected. Current through LED8 is limited by R8. NOTICE THE CONFIGURATION OF LED4 IS DIFFERENT FROM LED2. Explained before.

This part of the circuit consists of the right sensor and the right indicating led. This configuration (Type A configuration) is similar to the left sensor configuration, already discussed.

To motor right

To motor left

R6 and LED7 are similar to R10 and 1 LED10 as discussed in . LED7 glows when the left sensor goes over white area. This is explained in previous section.
5

This is an L293D driver. This part understands the low current signals from the sensors and delivers high current output to the motors. st th nd The 1 and the 9 pin (enable pins) of L293D driver is connected to the 2 pin of R2 (obstacle detector part). The driver is disabled rd nd when the obstacle is detected. The 2 pin of the driver is connected to 2 pin of R5(left sensor part). The driver supplies power to the th left motor when left sensor is on white surface. The left motor is connected across pin 3 and 6 of the driver. The 15 pin of the driver is nd connected to the 2 pin of R3 (right sensor part). The driver supplies power to the right motor when right sensor is on white surface. th th th th th th The right motor is connected across pin 14 and 11 of the driver. 4 5 7 13 12 and 10 are grounded. Details discussed earlier.

11 THE ACTUAL LAYOUT OF COMPONENTS ON THE PRINTED CIRCUIT BOARD

Right black line sensor; LED5-transmitter; LED6-receiver Potentiometer R2varying the resistance one can in a way vary the analog output from the obstacle sensor. The above manual tuning is done to improve the performance of the sensor. The signal thus obtained is given to the enable terminals of L293D.
Power switch

Obstacle sensor; LED3-transmitter; LED4-receiver

Left black line sensor; LED1-transmitter; LED2-receiver Potentiometer R5varying the resistance one can in a way vary the analog output from the left sensor. The above manual tuning is done to improve the performance of the sensor. The signal thus obtained is given to the 1A terminal of L293D. These holes are for fixing the MOTOR CLAMPS OF THE LEFT MOTOR

Potentiometer R3varying the resistance one can in a way vary the analog output from the right sensor. The above manual tuning is done to improve the performance of the sensor. The signal thus obtained is given to the 4A terminal of L293D.

These holes are for fixing the MOTOR LEGEND: CLAMPS OF HHINDICATE HOLES FOR THE RIGHT ATTACHMENT OF CLAMPS AND MOTOR CASTOR WHEELS. LED 9- normal led -glows when right motor rotates L293D driver IC LED 8normal led glows when obstacle is detected.

LED 10- normal led -glows when power is going into the circuit. one knows whether power supply is working or not

LED 7normal led glows when left motor rotates

J2-power supply is given to it. J3-left motor connected across it. J4-right motor connected across it. R10-current limiting resistor for LED10. R1- current limiting resistor for LED1. R6- current limiting resistor for LED7. R4- current limiting resistor for LED3. R8- current limiting resistor for LED8. R7- current limiting resistor for LED5. R9- current limiting resistor for LED9.

Mitveinz- ERF

HAVE FUN WITH YOUR LOGIC BOT!!!!!

ON 15TH JUNE 2012 ... HISTORY WILL BE MADE!!!

Mitveinz- ERF