Thursday, January 2, 2014

Line tracking Robot without Microcontroller

Line following or tracking robot is an autonomous machine which follows a line with light colors marked on dark surfaces or vise-versa. These machine are designed to detect a line of particular color with the aid of the sensors. Mostly line following robot are made to follow a line of white or black color but there is no any hard and fine rule to use line of these two colors.

To design a line tracking robot without microcontroller, one should require a very good knowledge of basic electronics. Using transistor as switch, configuration of comparator IC's and motor driver IC's and working of light dependent resistor(LDR) is all what you need to know to design line following robot.

LDR is a resistor which resistance varies with the intensity of light striking its surface.The value of resistance increases or decreases with the increase or decrease in intensity of light striking its surface.

Comparator compares two voltages and gives result as digital logic high or logic low. For two inputs Vin1 and Vin2, output can be logic 1 if Vin1>Vin2 and logic 0 if Vin1<Vin2. Here we will be using LM324 comparator. For its detail knowledge you can see datasheet from its manufacturer.

Motor driver ICs are used to drive motors. They are designed to provide sufficient current required for motor to rotate and also bidirectional rotation of motor can be achieved using these ICs.Here we will be using L293D motor driver IC which can drive motor rated up-to 1Amperes.

Now as you have done reading about LDR, comparator and motor driver IC, its turn to go further towards the hardware model of the line following robot which is shown below in figure a and the detail description of each block are given below.

The block diagram of line tracking robot
fig a:- Hardware model of line tracking robot

Sensors:-

Optical sensor used in line tracking robot
Fig b:- sensor used in line tracking
robot
Optical sensors which uses principle of reflection of light are used. LDR, photosensor and photodiode can be used to make this sensor but here we will be using LDR because it will be easy to understand for beginners in robotics.The schematic of sensor used is shown in the figure b which consists of transmitter and receiver. The transmitter consists of LED which emitts light and the receiver consists of LDR where when the reflected light from the white line strikes. Since the intensity of light that LED must emit depends on the height of sensor from the ground, the value of R1 is choosen by hit and trail method as per our need. The value of R2 used is 10K. 
 When the sensor is in black surface, no light is reflected back to strike the surface of LDR. Hence the value of resistance is large which results in negligible voltage at node B i,e Vs.When this sensor is above white surface, the light emitted by LED is reflected back by white surface to strike the surface of LDR. This causes the resistance of LDR to drop and which in turn increases the voltage obtained at node B i,e Vs.

Signal Conditioning:-

Voltage obtained from sensor is analog which is converted to digital form by using the comparator LM324. The signal obtained from the sensor is fed to one input of comparaor and another input is adjusted to threshold voltage(voltage which can differentiate white and black surface clearly).(See more in Schematic description)

Control Unit Interface:-

In most of automatic robots, decision device or control unit contains microcontroller which provides decision based on the result after processing the signals obtained from the sensors. In this case where we are not using microcontroller, the output from signal conditioning section can be used as control unit.(See schematic description which will give a clear idea)

Motor drivers and Motors:-

Motors act as actuator. Motors along with attached wheel helps robot to move from one position to another. Relays and transistors are most commonly used motor driver but in this case we will be using L293D motor driver ICs.

How line tracking robot works?

For a simple line tracking robot two sensors can be used which are assembled close to right and left wheel of robot and we respectively call them right sensor and left sensor. While following the white line on black surface, both the wheel of motor needs to move if and only if both sensor are not above white line. And if right sensor is above white line, right motor needs to be stopped and left motor should move until they are again at equilibrium.Same case applies when left sensor is above white line.
First the robot is placed in the track which is shown in the figure c.
white track on black surface
fig c:- track
After powering up, the robot starts following the track. While following the line, if right sensor is above white track (the light is reflected back to sensor), the input to the comparator from sensor is greater than the threshold voltage. Thus, the output of the comparator is zero which when applied to the input of motor driver IC(as shown in schematic above) stops the right motor but the left motor remains rotating.Similarly, if the left sensor is above the white track, left motor stops and right motor rotates. This helps the robot to be in equilibrium and follow the white track. If both the sensors are above white line, both motor stops.

Schematic:-

The schematic of line following robot is shown below.

Schematic of line tracking robot without using microcontroller.
Fig d:- Schematic of line tracking robot
First two similar sensors as shown in figure b are made. They are labelled as right and left sensor. The output from these sensors are fed to (-) input of the comparator as shown in figure above. The (+) input of comparator fed with threshold voltage which can be obtained with the aid of potentiometer as shown in figure above. Since no microcontoller is used the output from the comparator will be used to provide decision. The output of first comparator is fed to one input (in1) of motor driver IC while second input (in2) is connected with ground. Similarly output of second comparator is fed to in3 and in4 is connected to ground. This connection will help the robot to get the decision.
Suppose both the sensors are not above white line, then the output of comparator is 1 which rotates both the motor in forward direction. If right sensor is above white line (which means the voltage obtained from sensor is greater than threshold voltage), then output of first comparator is 0 and that of second comparator is 1 which causes right motor to stop and left motor to rotate in forward direction until both the sensors are again above black surface. If left sensor is above white line, then output of first comparator is 1 and that of second comparator is 0 which causes left motor to stop and right motor to rotate in forward direction until both the sensors are again above black surface. In this way, line tracking robot can be designed without use of microcontroller and it works.

No comments: