You are on page 1of 13

“Line Follower Robot

,,

Introduction: Line following Robot is a machine that can follow a path. The path can be visible like a black line on a white surface (or vice-versa) versa) or it can be invisible like a magnetic field. .

ATmega8: This is going to be the main processing unit for our robot. Sensor Plate: This would the main input sources for ‘feedback’ on the whereabouts of the robot with respect to the line. 4. Motor Driver(L293D): All motors are directly connected to the motor driver. we use 4. We can use any number of sensors in the array but generally. 1. Power Supply: We are going to need a 12V external power supply/battery as the main power source for our battery. Motor driver receives command from the microcontroller in form of PWM signals and accordingly drives the motors at varying speed. it will do the work of ‘commanding’ all other components to start/stop their work. 3. . work 2. 5. All the logic operations will be performed by ATmega8.Material’s: The materials list for a Line Following Robot is pretty basic and straight forward. Motor: Motor is a very important part of robot. Besides.5 or 7 sensor array plate.

Motor Driver IC PWM PWM IR Sensor .

Connection’s: Connection of atmega8 with sensor and motors SENSORS: MOTOR: sensor connected with PORTD Motor connected with PORTC L = D3 IN1 = C0 C1= D2 IN2 = C1 C2= D1 IN3 = C2 R = D0 IN4 = C3 .

Color Detection .

Sensor Arrangement On Robot 1C2 R Input Turns Condition 6 0000 Turn 180 degree obot Condition 5 0111 Turn right Condition 4 1110 Turn left Condition 3 0010 Turn soft right Condition 2 0100 Turn soft left Condition 1 0110 Forward .

Motor Speed control by PWM .

Programming of ATmega8 controller Normal Programming PWM programming Let see normal programming .

PWM programming of atmega8 atmega8 have 3 PWM outputs. PIN 15 – OC1A PIN 16 – OC1B PIN 17 – OC2 Timer1 Timer2 Here we are using timer1 and OC1A & OC1B to get PWM utput to control the speed of motor. .

Registers: Here are some registers of AVR. OCR1A & OCR1B . which is used for programming of PWM.

OUTPUT’S: TCNT1 OCR1x + 1 Duty cycle = X 100 256 OCR1A=191 OCR1B=63 OC1A OC1B .