microcontroller with ir sensors

31
Micro-Controllers & Robotics Raman kumar Lovely Professional University

Upload: anishvancha

Post on 23-Aug-2014

784 views

Category:

Documents


8 download

DESCRIPTION

Micro-Controllers & RoboticsRaman kumar Lovely Professional UniversityA sensor when coupled with an electronic circuit converts the physical change into a signal which can be read by an observer or by an microcontroller.The most common use of sensors is to get feedback from external environment.IR Sensor PairIR sensor Pair Object / LineTransmitter (Tx)Receiver (Rx)Transmitter = LED (Light Emitting Diode) Receiver = PhotodiodeIR LED• Similar to normal LEDs but emit infra-red

TRANSCRIPT

Page 1: Microcontroller with IR sensors

Micro-Controllers

&

Robotics

Raman kumar

Lovely Professional University

Page 2: Microcontroller with IR sensors

A sensor when coupled with an electronic

circuit converts the physical change into a

signal which can be read by an observer or by

an microcontroller.

The most common use of sensors is to get

feedback from external environment.

Page 3: Microcontroller with IR sensors

IR Sensor Pair

Transmitter (Tx)

Receiver (Rx)

IR sensor Pair Object /

Line

Transmitter = LED (Light Emitting Diode)

Receiver = Photodiode

Page 4: Microcontroller with IR sensors

IR LED

• Similar to normal LEDs but emit infra-red light

• Glow can be seen with a digital camera or

mobile phone camera.

Page 5: Microcontroller with IR sensors

Photodiode

A photodiode is a diode that conducts only when light falls on it.

O/p = 5 V = 0.7 V

Page 6: Microcontroller with IR sensors

Transistor

Page 7: Microcontroller with IR sensors
Page 8: Microcontroller with IR sensors

Principle of Operation

R1< R2

WHITE surface

Maximum reflection

T1 is turned ON

Vout is LOW

BLACK surface

Minimum or No Reflection

T1 is turned OFF

Vout is HIGH

Page 9: Microcontroller with IR sensors

Interfacing IR sensor with

microcontroller

A

T

8

0

5

1

Port 1

Out: 1

Out: 0

In

1

0

2

Page 10: Microcontroller with IR sensors

Sensor Connector on board

O/p

GND

Vcc

Page 11: Microcontroller with IR sensors

Programming IR sensor with 8051

#include <regx51.h>

void main( )

{

P12=1;

while(1) {

If ( P12==1)

// do something

else

// do the other thing

}

}

Page 12: Microcontroller with IR sensors

• Vout is ANALOG

But uC being digital can only read it as 0 or 1.

0 if Vout < 1.2 V

1 if Vout > 1.2 V

However most applications require much higher

resolution & multiple levels.

Page 13: Microcontroller with IR sensors

TSOP

GND

Vcc

O/p

Page 14: Microcontroller with IR sensors

TSOP

• TSOP is also an IR sensor, but differs from

phototransistor in the following aspects.

- O/p is either 0 or 5V

- Responds only to IR pulses at 38KHz ( or 36KHz)

- 3 terminal device (Vcc, GND and O/p)

- Has a lot of electronic circuitry inside along with simple

IR Rx.

• TSOP is the IR receiver used in TV sets for receiving

signals from remote control.

Page 15: Microcontroller with IR sensors

TSOP Output

No IR Light f ≠ 38KHz Constant IR Light

O/p = 5V O/p = 0V

f = 38KHz

Page 16: Microcontroller with IR sensors

Nomenclature

Commonly available models of TSOP are

TSOP1736 responds only to pulses at 36KHz

TSOP1738 responds to 38KHz pulses

Page 17: Microcontroller with IR sensors

To use TSOP as Rx, the IR LED must blink at 38KHz

(36KHz).

So a 38KHz waveform needs to be applied at the +ve

i/p of IR LED instead of the constant +Vcc as in earlier

case.

This 38KHz signal can either be generated used PWM

mode of timers or separate astable multi-vibrator made

using NE555.

Page 18: Microcontroller with IR sensors

Complete TSOP sensor

GND

Vcc

O/p

IR LED

38KHz

waveform

source

Page 19: Microcontroller with IR sensors
Page 20: Microcontroller with IR sensors

Wireless Control of Robots

RF Remote (radio Control)

RF Modules

IR Remote

Mobile Phone

Page 21: Microcontroller with IR sensors

RF Remote

Plug n play remote, everything ready

Numerous controls

Very costly

Rx Can be directly connected to motor driver

Page 22: Microcontroller with IR sensors

RF Modules

Cheap

Rx Can be directly connected to motor driver

Require external Antenna to be connected.

Require parallel to serial converter at Tx and vice versa at Rx

Commonly avai freq are : 315MHz, 345 MHz, 434 MHz

Page 23: Microcontroller with IR sensors
Page 24: Microcontroller with IR sensors

IR Remote

Page 25: Microcontroller with IR sensors
Page 26: Microcontroller with IR sensors
Page 27: Microcontroller with IR sensors

Replacement of H bridge

Page 28: Microcontroller with IR sensors
Page 29: Microcontroller with IR sensors
Page 30: Microcontroller with IR sensors
Page 31: Microcontroller with IR sensors

Download this ppt

http://lpu.co.in/oe/ece881

From within LPU : student login UMS

Raman

9988900339

[email protected].