Home Automation System Using IR Technology Power Point Presentation

37
HOME AUTOMATION SYSTEM USING IR TECHNOLOGY Prepared By:- Rahul Balhara (2K6-MRCE-EC-040) Prashant Jain (2K6-MRCE-EC-035) Prikshit Tushir (2K6-MRCE-EC-037) Sahil Jain (2K7-MRCE-EC-LE-05)

Transcript of Home Automation System Using IR Technology Power Point Presentation

Page 1: Home Automation System Using IR Technology Power Point Presentation

HOME AUTOMATION SYSTEM USING IR TECHNOLOGY

Prepared By:-Rahul Balhara (2K6-MRCE-EC-040)Prashant Jain (2K6-MRCE-EC-035)Prikshit Tushir (2K6-MRCE-EC-037)Sahil Jain (2K7-MRCE-EC-LE-05)

Page 2: Home Automation System Using IR Technology Power Point Presentation

Project Aimed at…

Providing help to physically challenged and old people.

Providing comfort and luxury to the general user.

Providing safety by use of fire alarm system.

Page 3: Home Automation System Using IR Technology Power Point Presentation

COMPONENTS USED AT89C52 microcontroller TSOP1736 IR Detector Voltage Regulator 7805 Relays Transistor Crystal Oscillator Transformer Universal Remote

Page 4: Home Automation System Using IR Technology Power Point Presentation

BLOCK DIAGRAM

Page 5: Home Automation System Using IR Technology Power Point Presentation

IR TRANSMITTER CIRCUIT

Page 6: Home Automation System Using IR Technology Power Point Presentation

BLOCK DIAGRAM OF RECEIVING UNIT

Page 7: Home Automation System Using IR Technology Power Point Presentation

RECIVER CIRCUIT DIAGRAM

Page 8: Home Automation System Using IR Technology Power Point Presentation

RELAY CIRCUIT

Page 9: Home Automation System Using IR Technology Power Point Presentation

IR MODULE

An IR module is a combination of IR TRANSMITTER IR RECEIVER (TSOP1738)

The transmitter and receiver communicate using RC-5 standard.

Page 10: Home Automation System Using IR Technology Power Point Presentation

IR TRANSMITTER

Transmitter operates on RC-5 standard.

It works on 36khz frequency.

Page 11: Home Automation System Using IR Technology Power Point Presentation

Contd…

Each bit is sliced in two halves. 

f=36khz, therefore T=27µs So, total time to transmit one bit is,

TTotal= 32 * 27µs + 32*27µs = = 1.778ms

Page 12: Home Automation System Using IR Technology Power Point Presentation

FEATURE OF RC5 2 start bit always "1" 1 toggle bit but this project not use and always

"0" 5 bit address and 6 bit command length Bi-phase coding (aka Manchester coding) Carrier frequency of 36kHz 25-50% duty cycle Bit time period about 1.778 ms Developt by Philips

Page 13: Home Automation System Using IR Technology Power Point Presentation

RC5 FRAME FORMAT

The first two pulses are the start pulses, and are both logical "1". (St1 and St2)

The 3d bit is a toggle bit. This bit is inverted every time a key is released and pressed again. But this project not use this bit and always "0" (Ctrl)

Page 14: Home Automation System Using IR Technology Power Point Presentation

RC5 FRAME FORMAT

The next 5 bits represent the IR device address, which is sent with MSB first. (S0-S4)

The next 6 bits is command and sent with MSB first too.(C0-C5)

Note that a RC5 frame consists of a total of 14 bits so the totaltime is about 23 mS

Page 15: Home Automation System Using IR Technology Power Point Presentation

RC5 MODULATION

The protocol uses bi-phase modulation (or Manchester code) of a 36kHz IR carrier frequency. All bits are of equal length of about 1.778 ms as follows figure.

Bi-Phase coding

Page 16: Home Automation System Using IR Technology Power Point Presentation

RC5 DETECTING

When the detect subroutine is called, it first waits for a start bit. The length of the low part of the first start bit is measured. If the low pulse of first start bit is longer than 1.020 ms or less then 800 uS the routine returns indicating error or no command received.

Page 17: Home Automation System Using IR Technology Power Point Presentation

RC-5

The RC5 code allows 2048 commands divided into 32 addressable groups of 64 commands each.

Page 18: Home Automation System Using IR Technology Power Point Presentation

Contd…

It consists of a 14 bit data word, 1.778ms per bit.

So, total time period of data word =1.778*14 =24.889ms

Page 19: Home Automation System Using IR Technology Power Point Presentation

IR RECEIVER

Infrared Receiver can demodulate the frequencies from 30khz to 40khz

Page 20: Home Automation System Using IR Technology Power Point Presentation

IR SENSOR INTERNAL VIEW

Page 21: Home Automation System Using IR Technology Power Point Presentation

PROGRAME FOR RECIEVING CIRCUIT

VAR1 equ r7 TEMP equ 10H COUNTequ 11H ADDR equ 12H CMD equ 13H FLIP bit 00H TOG bit 01H

Page 22: Home Automation System Using IR Technology Power Point Presentation

IR equ P3.1 ;IR Receiver connected to this pinSW1 equ P1.0 ;Switch 1 connected hereSW2 equ P1.1 ;Switch 2 connected hereSW3 equ P1.2 ;Switch 3 connected hereSW4 equ P1.3 ;Switch 4 connected hereSW5 equ P1.4 ;Switch 5 connected hereSW6 equ P1.5 ;Switch 6 connected hereSW7 equ P1.6 ;Switch 7 connected hereSW8 equ P1.7 ;Switch 8 connected hereSWport equ P1 ;Port at which switches are connected

Page 23: Home Automation System Using IR Technology Power Point Presentation

org 00Hmov SWport,#00H mov sp,#50Hclr TOG

main:jb IR,$mov VAR1,#255 djnz VAR1,$mov VAR1,#255djnz VAR1,$mov VAR1,#255

Page 24: Home Automation System Using IR Technology Power Point Presentation

djnz VAR1,$mov VAR1,#255djnz VAR1,$mov VAR1,#255djnz VAR1,$mov VAR1,#100djnz VAR1,$mov c,IRmov FLIP,cclr Amov COUNT,#5

Page 25: Home Automation System Using IR Technology Power Point Presentation

fadd:mov VAR1,#255 djnz VAR1,$mov VAR1,#255djnz VAR1,$mov VAR1,#255djnz VAR1,$mov VAR1,#4djnz VAR1,$mov c,IRrlc adjnz COUNT,faddmov ADDR,Aclr amov COUNT,#6

Page 26: Home Automation System Using IR Technology Power Point Presentation

fcmd:mov VAR1,#255 djnz VAR1,$mov VAR1,#255djnz VAR1,$mov VAR1,#255djnz VAR1,$mov VAR1,#4djnz VAR1,$mov c,IRrlc adjnz COUNT,fcmdmov TEMP,CMD mov CMD,amov a,ADDRcjne a,#00,nvalidmov a,TEMP

Page 27: Home Automation System Using IR Technology Power Point Presentation

cjne a,CMD,validnvalid:

ljmp mainvalid:

clr amov c,FLIPrlc amov TEMP,aclr amov c,TOGrlc acjne a,TEMP,valid1sjmp nvalid

Page 28: Home Automation System Using IR Technology Power Point Presentation

valid1:mov c,FLIPmov TOG,cmov a,CMDclr ccjne a,#1,skip1 ;Check for SW1jb SW1,isset1setb SW1ljmp main

Page 29: Home Automation System Using IR Technology Power Point Presentation

isset1:clr SW1ljmp main

skip1:cjne a,#2,skip2 ;Check for SW2jb SW2,isset2setb SW2ljmp main

Page 30: Home Automation System Using IR Technology Power Point Presentation

isset2:clr SW2ljmp main

skip2:cjne a,#3,skip3 ;Check for SW3jb SW3,isset3setb SW3ljmp main

Page 31: Home Automation System Using IR Technology Power Point Presentation

isset3:clr SW3ljmp main

skip3:cjne a,#4,skip4 ;Check for SW4jb SW4,isset4setb SW4ljmp main

Page 32: Home Automation System Using IR Technology Power Point Presentation

isset4:clr SW4ljmp main

skip4:cjne a,#5,skip5 ;Check for SW5jb SW5,isset5setb SW5ljmp main

Page 33: Home Automation System Using IR Technology Power Point Presentation

isset5:clr SW5ljmp main

skip5:cjne a,#6,skip6jb SW6,isset6setb SW6ljmp main

Page 34: Home Automation System Using IR Technology Power Point Presentation

isset6:clr SW6ljmp main

skip6:cjne a,#7,skip7jb SW7,isset7setb SW7ljmp main

Page 35: Home Automation System Using IR Technology Power Point Presentation

isset7:clr SW7ljmp main

skip7:cjne a,#8,skip8jb SW8,isset8setb SW8ljmp main

Page 36: Home Automation System Using IR Technology Power Point Presentation

isset8:clr SW8ljmp main

skip8:cjne a,#0CH,exitmov SWport,#00Hljmp main

exit:ljmp main

 END

Page 37: Home Automation System Using IR Technology Power Point Presentation

THANK YOU