Escolar Documentos
Profissional Documentos
Cultura Documentos
INTRODUCTION
Robotics nowadays is of great importance and interest for hobbyists and design engineers.
Robot in general is defined as a system that contains sensors, control systems, manipulators,
power supplies and software all working together to perform a task. It has many application
in auto, medical, manufacturing and space industries. Various types of robots are in a wide
use among which automated line-following robot is in a huge practice.
Automated line-following robot is a self-operating machine that detect and follows a line
pattern drawn on a floor. Generally, the paths are visible like a black line on a white surface
(or vice versa) or it can be invisible like a magnetic field. Actually, a fairly good and
advanced, robot could be easily adapted to maze solving, obstacle avoiding, etc. However, at
this point, it only follows a white line and independently self accommodates the turnings.
The robot consists mainly four parts two sensors, two comparators, one decision making
device and a motor driver (with two gear head dc motors). Phototransistor sensors detect the
white strip on the black background whose output is fed to microcontroller which takes the
decision and gives appropriate command to motor driver IC so as to move the motor
accordingly.
1
2. OBJECTIVES
2
3. PROJECT OVERVIEW
Electronics systems and machines are seldom developed with a single component, rather they
are combination of different electronics parts and units. Each single components are
embedded to form different identical functional units which at once functions together to
comprise an electronic system. Automated Line- Following Robot is not an exception. It
comprises of various parts which can be described in major functional blocks.
The basic organization of ALFR can be divided into 4 major functional blocks.
Motor 1
Sensor 1 Comparator 1
Decision
making and Motor driving
controlling circuit
circuit
Sensor 2 Comparator 2
Motor 2
Sensor: The sensor sense the light reflected from the surface and feeds the output to the
comparator. When the sensor is above the white background the light falling on it from the
source reflects to the sensors, and when the sensor is above the black background the light
from the source doesn’t reflect to it. The sensor senses the reflected light to give output,
which is fed to the comparator.
Comparator: The comparator compares the analogue inputs from sensors with a fixed
reference voltage. If this voltage is greater than the reference voltage the comparator outputs
a low voltage, and if it is smaller the comparator generates a high voltage the acts as input for
the decision-making device (microcontroller).
Decision making and controlling circuit: The microcontroller is programmed to make the
robot move forward, turn right or turn left based on the input coming from the comparator.
The outputs of the microcontroller are fed to the motor driver.
3
Motor driving circuit: The current supplied by microcontroller to drive the motor is small
therefore a motor driver IC is used. It provides sufficient current to drive the motors.
4
4. GANTT CHART
The Project is started from July 15, 2010 and will be ended in September 14, 2010. We have
total 70 working days.
September
Duration
July
August
No. Task Start End
5
5. METHODOLOGY
The basic block building for automatic line following robot is shown below (figure 2).
Automatic system must use some physical parameters as an input to get aware of its
surrounding. ALFR uses the reflected light rays emitted from led. The intensity of reflected
light will distinguish the path to take the further decisions
When light falls on the phototransistor (say, T1), it goes into saturation and starts conducting.
When no light falls on the phototransistor, it is cut-off. A white LEDs has been used to
illuminate the white path on a black background. Phototransistors T1 and T2 are used for
detecting the white path on the black background.
6
5.6-kilo-ohm resistor and 10-kilo-ohm preset. This reference voltage can be adjusted by
changing the value of the 10-kilo-ohm preset.
When sensor T2 is above the black surface, it remains cut-off as the black surface absorbs
virtually all the light falling from LED2 and no light is reflected back. The voltage at the
inverting input (pin2) of operational amplifiers A1 is higher than the references voltage as its
non-inverting (pin3) and therefore the amplifier output at pin1 becomes zero.
When sensor T2 is above the white line, the light gets reflected from the white surface to fall
on phototransistor T2. Phototransistor T2 goes into saturation and conducts. The inverting
input (pin 2) of operational amplifier A1 goes below the reference voltage at its non-inverting
input (pin 3) of operational amplifier A1 and therefore output pin 1 goes high. This way, the
comparator outputs logic ‘0’ for black surface and logic ‘1’ for white surface.
Similarly, comparator A2 compares the input voltage from phototransistor T1 with a fixed
reference voltage.
Table for action corresponding to the microcontroller inputs and outputs can be summed in a
table.
7
Inputs Outputs Action
P3.0 P3.1 P2.3 P2.2 P2.1 P2.0
0 0 1 0 1 0 Forward
0 1 0 0 1 0 Left
1 0 1 0 0 0 Right
1 1 0 0 0 0 Stop
Port pins P2.0, P2.1, P2.2 and P2.3 are connected to pins 15, 10, 7 and 2 of motor
driverL293D. Port pins P2.0 and P2.1 are used for controlling the right motor, while port
pins P2.2 and P2.3 are used for controlling the left motor. Three wheels can be used for this
robot-one on the front and two at the rear. Front wheel can rotate in any direction as
specified by the rear wheel. To make the robot turn left, the left-side motor should stop and
the right-side motor should rotate in the clockwise direction. Similarly, to make the robot
turn right, the right-side motor should stop and the left-side motor should rotate in clockwise
direction. For forward motion, both the motors should rotate in clockwise direction.
Microcontroller used in decision making and controlling circuit is solely responsible to drive
the motors in logical way. This microcontroller needs to be programmed for being capable of
making such decisions. The flow chart and algorithm which can be helpful to program the
microcontroller are discussed below.
8
5.2.1. Flow Chart
5.2.2. Algorithm
Step 1. Start.
Step 2. Move both wheels forward.
Step 3. Get both sensors output.
If (over white line; high)
Stop left wheel & move right wheel;
Go to step 3.
Otherwise;
Go to step 4.
Step 4. Get right sensors output.
If (over white line; high)
Stop right wheel & move left wheel;
Go to step 4.
Otherwise;
Go to step 5.
9
Step 5. Get output from both sensors.
If (both over white; high)
Go to step 6.
Otherwise;
Go to step 2.
Step 6. Stop.
5.3. Working
Fig. 5 shows the path of the line-follower robot, where ‘L’ is the left sensor and ‘R’ is the
right sensor.
At the start, when the robot is at point ‘A’ sensors T1 and T2 are above the black surface and
port pins P3.0 and P3.1 of the microcontroller receive logic ‘0’. As a result, the robot moves
forward in straight direction.
At point ‘B’, a left turn is encountered, and the left sensor comes above the white surface,
whereas the right sensor remains above the black surface. Port pin P3.0of the microcontroller
10
receives logic ‘1’ from the left sensor and port pin P3.1 receives logic ‘0’ from the right
sensor. As a result, the left motor stops and the right motor rotate, to make the robot turn left.
This process continues until the left sensor comes above the black background.
Similarly, at point ‘C’, where a right turn is encountered, the sane procedure for right turn is
executed. When both the sensors are at the white surface, the robot should stop. The output
of the microcontroller (IC2) depends on the inputs received at its port pins P3.0 and P3.1 as
shown in table (Table1).
Semiconductors:
Capacitors:
11
Miscellaneous:
S1 - On/off switch
S2 - Push-to-on switch
Xtal - 12MHz crystal
M1, M2 - 20rpm, 6V DC geared motor
Batt. - 6V, 4.5AH battery
- 2 side brackets for mounting motors
- 1 caster wheel (front wheel)
- 2 wheels for the rear
- Chassis
12
6. APPLICATION
Line following robot has a great reception in automation engineering. ALFR with different
capabilities are commonly used in industry and manufacturing plants. It has many
application in auto, medical and space industries. Automation cars will have a huge
impression over current transportation system in near future.
13
7. CONCLUSION
This robot is a great tool for expanding a student’s imagination and engineering expertise as
it gives a basic, yet complete introduction to robotics. This project then shows how this small
yet diverse and powerful platform can then be added upon, in this case, with line-tracking.
This allows the robot to be used to teach someone beyond even the basics.
Automated Line- Following Robot proposed is a versatile machine that has some intelligence
of tracing the specified line. Microcontroller for the decision making and logic section makes
it a powerful device. In nutshell, Automated Line- Following Robot is a simple and effective
automated system that has some very good applications in household and industries.
14
REFERENCES
Automated line-following Robot. Electronics for you magazine. Retrieved from September
2009.
Intelligent line following Robot. Retrieved July 28, 2010 from http://www.wineyard
technologies.com/tools/assests/wk22.pdf
15
16