Professional Documents
Culture Documents
• 2.AtMega 16 IC
• 3.L293d IC
• 4.Chassis
• 5.Wheels
• 6.DC Motor
• 7.IR Sensor
• 8.Connecting wires
• 9.AVR Programmer
• 10.A to B cable
• 11. 12 V Adaptor
Block Diagram of the Project
• Line follower robot senses black line by using sensor and then
sends the signal to AVR. Then microcontroller drives the
motor according to sensors' output.
• 1. When both left and right sensor senses white then robot
move forward.
2.If left sensor comes on black line then robot
turn left side.
3. If right sensor sense black line then robot turn right side until
both sensor comes at white surface. When white surface comes
robot starts moving on forward again.
4. If both sensors comes on black line, robot stops.
Program Explanation
If a sensor comes on black surface then it gives
output 0 and if it comes on white surface then it
gives output 1.There are 4 cases:
Input Output Movem
ent
Left Right Left Motor Right Motor
Of
Sensor Sensor
Robot
0 0 0 0 0 0 Stop
0 1 1 0 0 0 Turn
Right
1 0 0 0 1 0 Turn
Left
1 1 1 0 1 0 Forwar
d
CODE
#include<avr/io.h>
#define F_CPU 16000000UL
#include<util/delay.h>
void main()
{ DDRB=0xFF;
DDRA=0x00;
while(1)
{ if(PINA=0x02)
{ PORTB=0x01;
_delay_ms(1000);
}
else if(PINA=0x04)
{ PORTB=0x04;
}
else if(PINA=0x06)
{ PORTB=0x05;
}
else
{ PORTB=0x00;
_delay_ms(1000);
}
}
}
Applications of line follower robot
• Industrial Applications: These robots can be used as
automated equipment carriers in industries replacing
traditional conveyer belts.
• Automobile applications: These robots can also be
used as automatic cars running on roads with
embedded magnets.
• Domestic applications: These can also be used at
homes for domestic purposes like floor cleaning etc.
• Guidance applications: These can be used in public
places like shopping malls, museums etc. to provide
path guidance.