18bec0106 VL2020210101966 Pe003
18bec0106 VL2020210101966 Pe003
PROJECT REPORT
Slot – B2
DIRECTIONAL ROBOT
By
M.BADRINATH 18BEC0394
M.CHETAN KRISHNA 18BEC0106
V.SAI ABHIMANYU REDDY 18BEC0274
Under
ACKNOWLEDGEMENT
AIM
INTRODUCTION
BLOCK DIAGRAM
CIRCUIT
DESCRIPTION
WORKING
FLOWCHART
SOFTWARE SIMULATION
CODE
PROJECT DEMONSTRATION
CONCLUSION
REFERENCES
ACKNOWLEDGEMENT
Every project is successful largely due to the effort of a number of people who have
always given their valuable advice or lend a helping hand .We sincerely appreciate the
Inspiration, support and guidance of all those people who have been instrumental in
Making this project a success.
M.BADRINATH 18BEC0394
M.CHETAN KRISHNA 18BEC0106
V.SAI ABHIMANYU REDDY 18BEC0274
AIM
To design a line follower robot that is a self-operating robot that detects and follows a line drawn on the floor.
The path to be taken is indicated by a white line on a black surface. The control system used must sense the line
and maneuver the robot to stay on course while constantly correcting the wrong moves using feedback
mechanism, thus forming a simple yet effective closed-loop system.
A line follower robot with pick-and-placement capabilities is commonly used in manufacturing plants.
These move on a specified path to pick the components from specified locations and place them on desired
locations.
INTRODUCTION
This circuit consists of 8051 microcontroller, two IR sensors, motors and motor driver IC. The line follower robot
needs mechanical arrangement of the chassis. Assume a two wheel robotic vehicle with a castor wheel. The two
IR sensors are mounted on the robot facing towards Earth.
When the robot is placed on the fixed path, it follows the path by detecting the line. The robot's direction of
motion depends on the two sensor outputs. When the two sensors are on the line of path, the robot moves forward.
If the left sensor moves away from the line, the robot moves towards right. Similarly, if the right sensor moves
away from the path, the robot moves towards its left. Whenever a robot moves away from its path it is detected by
the IR sensor.
BLOCK DIAGRAM
Fig. 1 shows the block diagram of the automated line follower robot. It consists of mainly four parts: two sensors,
two comparators, one decision-making device and two motor drivers. The robot is built using microcontroller
9AT89C51 (used as the decision-making device), motor driver L293D, operational amplifier LM324
(comparator), phototransistor (sensor) and a few discrete components.
Sensor-
The sensor senses 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 sensor, 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 an output.
Microcontroller-
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.
Motor driver- The current supplied by the microcontroller to drive the motor is small. Therefore a
motor-driver IC is used. It provides sufficient current to drive the motor.
AT89C51 microcontroller:
The 8051 Microcontroller was designed in the 1980's by Intel. Its foundation was on Harvard Architecture and
was developed principally for bringing into play in Embedded Systems. At first it was created by means of
NMOS technology but as NMOS technology needs more power to function therefore Intel reintended
Microcontroller 8051 employing CMOS technology and a new edition came into existence with a letter ‘C’ in the
title name, for illustration: 80C51.
PIN DIAGRAM-
L293D motor driver:
The L293 and L293D are quadruple high-current half-H drivers. The L293 is designed to provide bidirectional
drive currents of up to 1 A at voltages from 4.5 V to 36 V. The L293D is designed to provide bidirectional drive
currents of up to 600-mA at voltages from 4.5 V to 36 V. Both devices are designed to drive inductive loads such
as relays, solenoids, dc and bipolar stepping motors, as well as other high-current/high-voltage loads in
positive-supply applications.
Pin Diagram-
CIRCUIT DIAGRAM-
CIRCUIT PRINCIPLE
This circuit mainly consists of 8051 microcontroller, two IR sensors, motors and motor driver IC (embedded in a
module). The line follower robot needs mechanical arrangement of the chassis. I have used a 4WD Acrylic
chassis. The two IR sensors are mounted on the front of the robot facing with the diodes facing towards Earth.
When the robot is placed on the fixed path, it follows the path by detecting the line. The robot direction of motion
depends on the two sensor outputs. When the two sensors are on the line of path, the robot moves forward. If the
left sensor moves away from the line, the robot moves towards right. Similarly, if the right sensor moves away
from the path, the robot moves towards its left. Whenever a robot moves away from its path it is detected by the
IR sensor.
IR sensor consists of an IR transmitter and IR receiver on a board. When the vehicle is moving on a black line, IR
rays are continuously absorbed by the black surface and there is no reflected ray making output high. Whenever
the robot moves out to the white surface, it starts reflecting the IR rays and making the output low. Thus
depending on the output of the IR sensor, the microcontroller indicates the motors to change their direction.
CIRCUIT DESCRIPTION
The circuit consists of 8051 microcontroller, IR Sensors (with IR transmitter and IR Receiver), L298N Motor
Driver Module, Robot Chassis with 4 wheels and 4 motors, battery holder. 8051 microcontroller is the main
component of the project. It is an 8 bit microcontroller with 32 programmable I/O pins. This has many peripheral
features like programmable UART, two 8-bit timer/counter, two interrupts, external memory access etc. The DC
motors of the robot are connected to the controller using a motor driver IC. As the output of the controller is
maximum 5V with very small current, it cannot drive the motors. So, to amplify this voltage motor driver IC is
used. L298N can drive motors up to 36v and can provide a drive current of 3A.
These ICs are easily available in the market as Modules. The inputs to the Motor Driver Module are connected to
PORT2 pins P2.0, P2.1, P2.2 and P2.3. The two IR sensors are connected to P2.6 and P2.7 pins of the
microcontroller. Arrange the chassis and connect the four wheels of the robotic vehicle to the motors which are in
turn connected to the microcontroller.
Design of IR Sensors
IR sensor circuit consists of mainly IR transmitter and IR receiver. IR transmitter is similar to an LED. Its
operating voltage is around 1.4V. So to protect it, a 150Ω resistor is placed in series with it and is connected in
forward bias. The IR receiver is connected in reverse bias and a 10KΩ resistor is placed between VCC and the
receiver. Output is taken between resistor and IR receiver.
Since this is an analog output, we can convert it to a digital HIGH and LOW with the help of a simple comparator
IC like LM358, for example. The IR Sensor Module used in this project uses the same configuration and the
circuit diagram is shown below.
Working of IR Sensors
The IR transmitter continuously transmits the IR rays. When the IR transmitter is on the black surface these rays
are absorbed by the surface and when it is on white surface these rays are reflected. The IR receiver has maximum
resistance when no IR rays are received and voltage from VCC flows through the resistor. At the output pin,
voltage is approximately 5V.
As the intensity IR rays received by the receiver increases, resistance value decreases and reverse breakdown
occurs. Thus voltage through the resistor is grounded. So, at the output pin, it will produce 0V.
Connections
1. Initially draw the path on a light colored surface with black color tape.
2. Place the robot on the floor.
3. Now power on the circuit.
4. Robot moves in the specified path.
5. When it moves out of path, sensors check it and automatically adjust the robot.
FLOWCHART
Here is a flowchart to demonstrate the working of the circuit and the code:
CODE
#include //INCLUDE reg51.h for 8951
void main()
{
This robot uses a technology of photo-transition in which it detects the white light through a photo-transistor and
acts accordingly.
Applications
This can be used in the driver less the car system with some added features like obstacle detection.
This can also be used in industrial and defense applications.
Limitations
Line follower the robot requires 2-3 inches broad line.
It may not move properly if the black line drawn is of low intensity.
The IR sensors may sometimes absorb IR rays from surroundings also. As a result, robots may move in
improper way
REFERENCES
https://www.electronicshub.org/line-follower-robot-using-microcontroller/