irobot.pptx

Post on 01-Nov-2014

17 views 0 download

Tags:

description

Manual For line follower robot

Transcript of irobot.pptx

Sensors

• A sensor is a device which measures a physical quantity and converts it into a signal which can be read by an observer or by an instrument.

• They are used to provide feedback from the external environment

WORKING OF IR SENSORSThe infrared phototransistor acts as a transistor with the base voltage determined by the amount of light hitting the transistor.

Hence it acts as a variable current source. Greater amount of IR light cause greater currents to flow through the collector-emitter leads.

As shown in the diagram below, the phototransistor is wired in a similar configuration to the voltage divider.The variable current traveling through the resistor causes a voltage drop in the pull-up resistor.This voltage is measured as the output of the device

IR reflectance sensors contain a matched infrared transmitter and infrared receiver pair.These devices work by measuring the amount of light that is reflected into the receiver.Because the receiver also responds to ambient light, the device works best when well shielded from abient light,and when the distance between the sensor and the reflective surface is small(less than 5mm).IR reflectance sensors are often used to detect white and black surfaces. White surfaces generally reflect well,while black surfaces reflect poorly. One of such applications is the line follower of a robot.

IR Sensor Pair

Transmitter (Tx)

Receiver (Rx)

IR sensor PairObject / Line

Transmitter = LED( Light Emitting Diode)

Receiver = Photodiode

The resistance of the sensor decreases when IR light falls on it. A good sensor will have near zero resistancein presence of light and a very large resistance in absence of light.

Principle of Operation

R1< R2

WHITE surfaceMaximum reflectionT1 is turned ONVout is LOW

BLACK surfaceMinimum or No ReflectionT1 is turned OFFVout is HIGH

Interfacing IR sensor with ATmega16

ATMEGA

PORTA

Out: 1

Out: 0

In

10

2

Programming IR sensor with ATmega16

#include <mega16.h>

void main(){

int x;

DDRA=0b00000011; // last two pins as o/p for Vcc & GNDPORTA.0 =1; // VccPORTA.1= 0; // Gnd

x= PINA.2;

// now you can use x for any calculation u want}

COMPARATOR

Registers used in the ADCADMUX – ADC Multiplexer Selection RegisterADCSRA – ADC Control and Status Register A

These registers are used to configure ADCHowever when using CVAVR this will be done by code wizard

Configuring ADC using Code Wizard

1. Open a new project2. Select ‘yes’ to use code wizard3. Goto ADC tab on Code Wizard

ADC

Line Follower : Design

The bot has two IR sensors facing downwards (towards the floor).

The separation between the sensors is such that in normal (correct) position of the bot , both the sensors are on white surface. ie separation > strip width

The bot is driven by two wheel differential drive ie the two back wheels are driven by independent motors.

SleftSright

Line Follower : Algo

When the bot is in correct pos, both sensors are on white & read LOW. The robot should move forward in this case.

Sleft Sright Movement

LOW LOW Forward

SleftSright

Line Follower : Algo

When the bot is over line from right side, left sensor is on white & reads LOW whereas right sensor is on black & reads HIGH The robot should take a right turn in this case to come back in correct pos.

Sleft Sright Movement

LOW HIGH Right Turn

SleftSright

Line Follower : Algo

When the bot is over line from left side, right sensor is on white & reads LOW whereas left sensor is on black & reads HIGH The robot should take a left turn in this case to come back in correct pos.

Sleft Sright Movement

HIGH LOW Left Turn

Sleft

Sright

Line Follower

Sleft Sright Movement Left Motor Right Motor

LOW LOW Forward Forward Forward

LOW HIGH Right Turn Forward Back

HIGH LOW Left Turn Back Forward

IN THIS WHEN VOLTAGE V > 2.5 OUTPUT IS 1 AND IF V < 2.5 OUTPUT IS 0.

ContactsName Contact Email

Nikhil Gupta 9795359594,9044059843 nikhilgupta1003@gmail.com

Manish Singhal 9450150792 manishsinghal230792@gmail.com

Rishabh Tekriwal 8960976256 tekriwalfamily@gmail.com

Tanmay Agarwal 8573900881,8009607882 tanmay.iitbhu@gmail.com

Deepak Kumar 8565997407 deepakrocks0009@gmail.com

Gaurav Mishra 8303340071 gauravmishra0098@gmail.com

Prabha Shankar lahariya 8004274085 plahariya72@gmail.com

Rishabh Yadav 9044172285 yrishabh24@yahoo.com

Vijay Singh 9044612364 vijaysingh15793@gmail.com

Harshit Gupta 7860495316 harshitgupta1108@gmail.com