home automation system using ir technology power point presentation
TRANSCRIPT
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)
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.
COMPONENTS USED AT89C52 microcontroller TSOP1736 IR Detector Voltage Regulator 7805 Relays Transistor Crystal Oscillator Transformer Universal Remote
BLOCK DIAGRAM
IR TRANSMITTER CIRCUIT
BLOCK DIAGRAM OF RECEIVING UNIT
RECIVER CIRCUIT DIAGRAM
RELAY CIRCUIT
IR MODULE
An IR module is a combination of IR TRANSMITTER IR RECEIVER (TSOP1738)
The transmitter and receiver communicate using RC-5 standard.
IR TRANSMITTER
Transmitter operates on RC-5 standard.
It works on 36khz frequency.
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
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
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)
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
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
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.
RC-5
The RC5 code allows 2048 commands divided into 32 addressable groups of 64 commands each.
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
IR RECEIVER
Infrared Receiver can demodulate the frequencies from 30khz to 40khz
IR SENSOR INTERNAL VIEW
PROGRAME FOR RECIEVING CIRCUIT
VAR1 equ r7 TEMP equ 10H COUNTequ 11H ADDR equ 12H CMD equ 13H FLIP bit 00H TOG bit 01H
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
org 00Hmov SWport,#00H mov sp,#50Hclr TOG
main:jb IR,$mov VAR1,#255 djnz VAR1,$mov VAR1,#255djnz VAR1,$mov VAR1,#255
djnz VAR1,$mov VAR1,#255djnz VAR1,$mov VAR1,#255djnz VAR1,$mov VAR1,#100djnz VAR1,$mov c,IRmov FLIP,cclr Amov COUNT,#5
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
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
cjne a,CMD,validnvalid:
ljmp mainvalid:
clr amov c,FLIPrlc amov TEMP,aclr amov c,TOGrlc acjne a,TEMP,valid1sjmp nvalid
valid1:mov c,FLIPmov TOG,cmov a,CMDclr ccjne a,#1,skip1 ;Check for SW1jb SW1,isset1setb SW1ljmp main
isset1:clr SW1ljmp main
skip1:cjne a,#2,skip2 ;Check for SW2jb SW2,isset2setb SW2ljmp main
isset2:clr SW2ljmp main
skip2:cjne a,#3,skip3 ;Check for SW3jb SW3,isset3setb SW3ljmp main
isset3:clr SW3ljmp main
skip3:cjne a,#4,skip4 ;Check for SW4jb SW4,isset4setb SW4ljmp main
isset4:clr SW4ljmp main
skip4:cjne a,#5,skip5 ;Check for SW5jb SW5,isset5setb SW5ljmp main
isset5:clr SW5ljmp main
skip5:cjne a,#6,skip6jb SW6,isset6setb SW6ljmp main
isset6:clr SW6ljmp main
skip6:cjne a,#7,skip7jb SW7,isset7setb SW7ljmp main
isset7:clr SW7ljmp main
skip7:cjne a,#8,skip8jb SW8,isset8setb SW8ljmp main
isset8:clr SW8ljmp main
skip8:cjne a,#0CH,exitmov SWport,#00Hljmp main
exit:ljmp main
END
THANK YOU