hat
Post on 18-Dec-2015
216 Views
Preview:
DESCRIPTION
TRANSCRIPT
-
LINE FOLLOWER ROBOT
Line follower is a machine that can follow a path. The path can be
visible like a black line on a white surface (or vice-versa) or it can be
invisible like a magnetic field.
Sensing a line and maneuvering the robot to stay on course, while
constantly correcting wrong moves using feedback mechanism forms
a simple yet effective closed loop system. As a programmer you get
an opportunity to teach the robot how to follow the line thus giving
it a human-like property of responding to stimuli.
Practical applications of a line follower: Automated cars running on
roads with embedded magnets; guidance system for industrial robots
moving on shop floor etc.
The working principle of this bot is sensor on getting blocked or
unblocked sends combination of high/low signals to AT89C51
microcontroller which are processed and appropriate signals are sent
to L293D (motor driver chip) which switches on/off the motors so as
to keep the robot moving in one direction.
-
CIRCUIT DIAGRAM
SOURCE CODE
PROGRAM FOR LINE FOLLOWER
#include
sbit IR_left=P1^0;
sbit IR_right=P1^1;
sbit L_motor=P3^0;
sbit R_motor=P3^1;
-
void main()
{
L_motor=0;
R_motor=0;
IR_left=0;
IR_right=0;
while(1)
{
if(IR_left == 1 && IR_right == 0)
{
L_motor=1;
R_motor=0;
}
else if(IR_right == 1 && IR_left == 0)
{
L_motor=0;
R_motor=1;
}
else
{
L_motor=1;
R_motor=1;
}
}
}
-
HEX CODE GENERATED FOR THE CODE
:10080000C2B0C2B1C290C291309009209106D2B05C
:10081000C2B180F4309109209006C2B0D2B180E814
:06082000D2B0D2B180E26B
:03000000020826CD
:0C082600787FE4F6D8FD75810702080019
:00000001FF
top related