irobot.pptx

25
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

Upload: aamirraihan

Post on 01-Nov-2014

19 views

Category:

Documents


0 download

DESCRIPTION

Manual For line follower robot

TRANSCRIPT

Page 1: 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

Page 2: irobot.pptx

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

Page 3: irobot.pptx
Page 4: irobot.pptx
Page 5: irobot.pptx
Page 6: irobot.pptx
Page 7: irobot.pptx

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.

Page 8: irobot.pptx

IR Sensor Pair

Transmitter (Tx)

Receiver (Rx)

IR sensor PairObject / Line

Transmitter = LED( Light Emitting Diode)

Receiver = Photodiode

Page 9: irobot.pptx

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.

Page 10: irobot.pptx
Page 11: irobot.pptx

Principle of Operation

R1< R2

WHITE surfaceMaximum reflectionT1 is turned ONVout is LOW

BLACK surfaceMinimum or No ReflectionT1 is turned OFFVout is HIGH

Page 12: irobot.pptx

Interfacing IR sensor with ATmega16

ATMEGA

PORTA

Out: 1

Out: 0

In

10

2

Page 13: irobot.pptx

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}

Page 14: irobot.pptx

COMPARATOR

Page 15: irobot.pptx

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

Page 16: irobot.pptx

Configuring ADC using Code Wizard

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

ADC

Page 17: irobot.pptx

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

Page 18: irobot.pptx

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

Page 19: irobot.pptx

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

Page 20: irobot.pptx

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

Page 21: irobot.pptx

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

Page 22: irobot.pptx
Page 23: irobot.pptx
Page 24: irobot.pptx

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

Page 25: irobot.pptx

ContactsName Contact Email

Nikhil Gupta 9795359594,9044059843 [email protected]

Manish Singhal 9450150792 [email protected]

Rishabh Tekriwal 8960976256 [email protected]

Tanmay Agarwal 8573900881,8009607882 [email protected]

Deepak Kumar 8565997407 [email protected]

Gaurav Mishra 8303340071 [email protected]

Prabha Shankar lahariya 8004274085 [email protected]

Rishabh Yadav 9044172285 [email protected]

Vijay Singh 9044612364 [email protected]

Harshit Gupta 7860495316 [email protected]