Repaort Line Follower Robot
Repaort Line Follower Robot
Description
This Robot is programmed to follow a black line on a white background. The path is made with black electrical tape or black paint on a white surface. LFR constantly correcting wrong moves using feedback mechanism forms a simple yet effective closed loop system using IR Sensor pair. 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.
Hardware
In the circuit two IR sensors, one LCD display and two DC geared motors are connected to the ATMega16. The robot uses IR sensors to sense the line an array of 2 IR LEDs (Tx) and sensors (Rx), facing the ground has been used in this setup. The output of the sensors is an analog signal which depends on the amount of light reflected back. By comparing this analog signal microcontroller decides the next move according to the algorithm.
PORTD=0b10010000;// forward when both sensor are in white surface if(s1>600&s2<600) PORTD=0b10100000;// right when one sensor in black & one sensor in white surface if(s1<600&s2>600) PORTD=0b01010000; // left when one sensor in white & one sensor in black surface if(s1>600&s2>600) PORTD=0b10010000;// forward when both sensor are in black surface sprintf(A, " s1=%d s2=%d ", s1,s2); LCDGotoXY(0,0); LCDstring(A,16); } }
Process:
Connect LCD and IR sensor & motor on the kit. Run Eclipse in your computer. Make your own project. Copy lcd_lib.h & lcd_lib.c from BRiCS CD to your project. Copy adc_lib.h & adc_lib.c from BRiCS CD to your project. Write the above code in main.c Compile the code. If successful, transfer it to your hardware.
if(s1>600&s2<600) PORTD=0b10100000; // right when one sensor in black & one sensor in white surface if(s1<600&s2>600) PORTD=0b01010000; // left when one sensor in white & one sensor in black surface if(s1>600&s2>600) PORTD=0b10010000;// forward when both sensor are in black surface sprintf(A, " s1=%d s2=%d ", s1,s2); LCDGotoXY(0,0); LCDstring(A,16); } }
Process:
Connect LCD and IR sensor & motor on the kit. Run Eclipse in your computer. Make your own project. Copy lcd_lib.h & lcd_lib.c from BRiCS CD to your project. Copy adc_lib.h & adc_lib.c from BRiCS CD to your project. Write the above code in main.c Compile the code. If successful, transfer it to your hardware.