hardwired line follower autonomous robot manual

10
HARDWIRED LINE FOLLOWER AUTONOMOUS ROBOT MANUAL An autonomous robot is one such robot, which can operate without any human intervention. This means an autonomous robot essentially can sense and process external world stimuli, such as light, sound, movement etc. Thus sensors and dedicated circuitry for processing the signals is the integral part of autonomous robots. Autonomous robotics can be really complicated, but here we start with a simple one. A line follower robot is basically a vehicle that navigates on line drawn on a surface. For example a black line, on a white surface(the most common form). It stays on this path and never moves out of it, and even if it does, tends to return back on the path. Before going into details, let us examine the most important part that constitutes any robot. These are: 1) Sensors 2) Processing unit(can be microcontroller based or hardwired combinational circuit) 3) Locomotion/navigational unit Let us first start with the Locomotion/Navigational part, and then move to sensors and processing part. This will make things easier, as the navigation is the simplest thing to deal with. Locomotion: By Locomotion we mean the ability of the robot to move in any desired direction. For example to avoid any obstacle it may move left, right, back or forward. As our robot is basically a vehicle, it must have a drive mechanism which allows it to do so. Drive mechanisms could be of various types: 1) Differential wheel drive 2) Car type drive 3) Synchronous drive 4) Pivoted drive Here we will discuss the most simple and widely used drive mechanism, the DIFFERENTIAL DRIVE. For information on other drive assembly, just make a Google search! A differential drive has two motors on each side of the vehicle, and relative speed of the motors determines the movements. MOVEMENT OF ROBOT RIGHT MOTOR MOVEMENT LEFT MOTOR MOVEMENT FORWARD FORWARD FORWARD BACKWARD BACKWARD BACKWARD LEFT FORWARD BACKWARD RIGHT BACKWARD FORWARD

Upload: supratim-das

Post on 02-Apr-2015

194 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: HARDWIRED LINE FOLLOWER AUTONOMOUS ROBOT MANUAL

HARDWIRED LINE FOLLOWER AUTONOMOUS

ROBOT MANUAL

An autonomous robot is one such robot, which can operate without any human

intervention. This means an autonomous robot essentially can sense and process external

world stimuli, such as light, sound, movement etc. Thus sensors and dedicated circuitry

for processing the signals is the integral part of autonomous robots. Autonomous robotics

can be really complicated, but here we start with a simple one.

A line follower robot is basically a vehicle that navigates on line drawn on a surface. For

example a black line, on a white surface(the most common form). It stays on this path and

never moves out of it, and even if it does, tends to return back on the path.

Before going into details, let us examine the most important part that constitutes any

robot. These are:

1) Sensors

2) Processing unit(can be microcontroller based or hardwired combinational circuit)

3) Locomotion/navigational unit

Let us first start with the Locomotion/Navigational part, and then move to sensors and

processing part. This will make things easier, as the navigation is the simplest thing to

deal with.

Locomotion:

By Locomotion we mean the ability of the robot to move in any desired direction. For

example to avoid any obstacle it may move left, right, back or forward. As our robot is

basically a vehicle, it must have a drive mechanism which allows it to do so. Drive

mechanisms could be of various types:

1) Differential wheel drive

2) Car type drive

3) Synchronous drive

4) Pivoted drive

Here we will discuss the most simple and widely used drive mechanism, the

DIFFERENTIAL DRIVE. For information on other drive assembly, just make a Google

search!

A differential drive has two motors on each side of the vehicle, and relative speed of the

motors determines the movements.

MOVEMENT OF ROBOT RIGHT MOTOR MOVEMENT LEFT MOTOR MOVEMENT

FORWARD FORWARD FORWARD

BACKWARD BACKWARD BACKWARD

LEFT FORWARD BACKWARD

RIGHT BACKWARD FORWARD

Page 2: HARDWIRED LINE FOLLOWER AUTONOMOUS ROBOT MANUAL

THE PICTURE ABOVE ILLUSRTATES THE DIFFERENTIAL WHEEL DRIVE

Having said this, the next important thing is that, motors requires a lot of power, thus

draws a lot of current, at least above 200mA. Digital circuit outputs, don’t meet these

requirements, they are only good for making LEDs glow! Thus we need something that

can drive these power hungry motors! Here comes a Motor driver! The IC-

L293D/L293/L298 are popular motor drivers. We will use L293D. The L293D is

basically a dual H-bridge, and can drive 2 motors simultaneously, making things easy for

us, because one IC will do it all! The digital signals are fed into the inputs of L293D,

which act as switching/control signals.

The Pinout of L293D and the truth table are as follows.

Page 3: HARDWIRED LINE FOLLOWER AUTONOMOUS ROBOT MANUAL

EN1,2 Dir1A Dir2A Motor A EN3,4 Dir1B Dir2B Motor B

1 0 0 Brake 1 0 0 Brake

1 0 1 Reverse 1 0 1 Reverse

1 1 0 Forward 1 1 0 Forward

1 1 1 Brake 1 1 1 Brake

0 x x Stop 0 x x Stop

Now as we are done with the locomotion part, we will have a look at the basic structure

of our Robot as a Block Diagram, and try to understand the basic principle behind it’s

automation!

Page 4: HARDWIRED LINE FOLLOWER AUTONOMOUS ROBOT MANUAL

In our case, since we are making a hardwired version, we are using a simple

combinational circuit using multiplexers, if some complex functions are to be

implemented or if we intend to make our robot more intelligent, it requires a lot more

processing, and here a microcontroller enters the scene. The Microcontroller is a small

scale computer system, with a built in ROM that can be programmed/reprogrammed at

will and as and when necessary to meet requirements.

Sensors:

For our robot to intercept the various parameters of its operating and surrounding

environments, we require some sort of sensing mechanism or sensors. Sensors are

electronic or electromechanical devices that convert various physical parameters like

light, touch, pressure, temperature etc into a convenient electrical form. Sensors use

electronic devices which are sensitive to such physical parameters. In our case we need to

develop an optical sensor, and make use of an LDR.

LDR stands for Light Dependent Resistor. The property of an LDR is that, it resistance is

inversely proportional to the intensity of the light incident on it.

Our sensor is built using LED-LDR pairs.

Page 5: HARDWIRED LINE FOLLOWER AUTONOMOUS ROBOT MANUAL

We may use photo diode or photo transistors for better sensitivity, but the cost also goes

up. Besides we have used a LM324 quad-2input comparator IC, which compares two

voltage levels in its input pins, and if the voltage in Positive Terminal is greater than

Negative Terminal, then it gives a high signal in its output, otherwise low. This two state

output is necessary because our processing unit is a digital combinational circuit, whose

inputs are essentially binary. If we were to use a microcontroller based system, we may

omit this IC and may have used the internal ADC of the microcontroller.

Page 6: HARDWIRED LINE FOLLOWER AUTONOMOUS ROBOT MANUAL

The above schematic is of a single optical proximity sensor, and uses only one out of the

four comparators of LM324. For our Sensor array, to keep things simple we will use

three such proximity sensors, and thus use 3 out of 4 comparators of LM324. Thus only

one LM324 IC will suffice for our project.

Its important to note that, increasing the number of proximity sensor though increases

circuit complexity and requires more processing of bits(as each sensor generates one bit),

it definitely increases the resolution of the robotic vision, which gives much finer control

to the movement of the robot.

Processing Unit:

Now consider the 3 bit array given below, which corresponds to the bits generated by the

sensor array.

L M R

L=Left bit

M=Middle Bit

R=Right Bit

Now in the sensor schematics, its said that, on a white surface the output is high and on

black surface the output is low. Now if there is a path represented by a black line of

Page 7: HARDWIRED LINE FOLLOWER AUTONOMOUS ROBOT MANUAL

definite width on a white surface, our sensors will generate different bit pattern

depending upon the alignment of the robot.

When the robot is on the middle of the line, the bit pattern is: 101

When the robot is slightly out of the line by its right, the bit pattern may be: 001 or 011

When the robot is slightly out of the line by its left, the bit pattern may be: 100 or 110

When the robot is totally out of the line, the bit pattern is: 111

Now depending upon these bit patterns we may move our robot, such that, it remains on

the line. For example, when it is slightly out of line from right, we have to move it by

left. This is achieved by designing an appropriate logic circuit (combinational circuit),

with the bit pattern generated by the sensor array as input, and the control signals for the

motor driver as output. Voila! We are almost done here! The next task is to design the

combinational circuit, which follows the same procedure as any other combinational

circuit. That is, drafting a truth table, k-map minimization, obtaining logic diagram, and

finally implementation using appropriate TTL chips. To make the design procedure and

implementation on a veroboard simple, we have here used 8:1 MUX (74LS151) chips.

Since we have got 4 control lines, we will need 4 such MUX, for each control line. We

will use the 3 select lines as input, and we will provide 1s and 0s at necessary input

terminals of the MUX to realize our circuit.

THE TRUTH TABLE IS PROVIDED NEXT:

FOR Dir1-A,Dir2-A,Dir1-B,Dir2-B refer the motor controller IC shown previously

The combinational circuit diagram is not shown, I assume that the reader already knows

how to make one. If not, I suggest getting a quick crash course on digital electronics. It’s

worthy thing to do before getting into robotics! Or make a google search!!!

L M R Robot

Movement

Dir1-A Dir2-A Dir1-B Dir2-B

0 0 0 STOP 0 0 0 0

0 0 1 LEFT 0 1 1 0

0 1 0 FORWARD 1 0 1 0

0 1 1 LEFT 0 1 1 0

1 0 0 RIGHT 1 0 0 1

1 0 1 FORWARD 1 0 1 0

1 1 0 RIGHT 1 0 0 1

1 1 1 BACKWARD 0 1 0 1

Page 8: HARDWIRED LINE FOLLOWER AUTONOMOUS ROBOT MANUAL

PICTURE GALLERY…HELPS IN UNDERSTANDING BETTER

Basic structure of my prototype

The sensor unit

Backside view showing LED-LDR pairs

Page 9: HARDWIRED LINE FOLLOWER AUTONOMOUS ROBOT MANUAL

The processing unit (combinational logic using 8:1 MUX)

The main wheel base with the motor controller

Page 10: HARDWIRED LINE FOLLOWER AUTONOMOUS ROBOT MANUAL

The Entire unit, with sensors, logic circuitry and driver attached together -prepared by Supratim Das. Calcutta Institute of Engineering & Management Dept. of Computer Science & Engineering