design and implementation of pyroelectric infrared sensor based securitysystem-1

Upload: sanketh07

Post on 03-Apr-2018

221 views

Category:

Documents


1 download

TRANSCRIPT

  • 7/29/2019 Design and Implementation of Pyroelectric Infrared Sensor Based SecuritySystem-1

    1/5

    Proceeding of the 2011 IEEE Students' Technology Symposium

    1416 Januar, 2011, IT Kharagpur

    Design and Implementation of Pyroelectric InfraredSensor Based Security System Using Microcontroller

    Z q M z

    M M z M k

    Department of pplied Physics, Electronics Communication Engineering

    University of DhakaDhaka, Bangladesh

    [email protected]

    bh paper evaluates the development of a Low-costsecurity system using small PIR (Pyroelectric Infrared) sensor

    built around a microcontroller. The low-power PIR detectors

    take advantage of pyroelectricity to detect a human body that is a

    constant source of Passive Infrared (radiation in the infrared

    region). The system senses the signal generated by PIR sensordetecting the presence of individuals not at thermal equilibrium

    with the surrounding environment. Detecting the presence of any

    unauthorized person in any specic time interval, it triggers an

    alarm & sets up a call to a predened number through a GSmodem. This highly reactive approach has low computational

    requirement, therefore it is well-suited to surveillance, industrial

    applications and smart environments. Tests performed gavepromising results.

    Kywf ; ; f; PC P ;y

    I. NTROUCTION

    Security and safety is one of the most talked of topics almost every facet like surveillance, industrial applications,oces, and in general, in smart enviroments. To secure itagainst the, crime, re, etc. a powerl security system isrequired not only to detect but also pre-empt hazards.Conventional security systems use cameras and process largeamounts of data to etract features with high cost and hence

    require signicant inastructures. This paper proposes a PIRsensor based low cost security system for home applications inwhich Passive Inared (PIR) sensor has been implemented tosense the motion of human trough the detection of inared

    radiated om that human body. PIR device does not emit aninared beam but passively accepts incoming inared

    radiation. Fig. 1 shows the block diagram of the system. PIRsensor detects the presence of human in the home andgenerates pulse which is read by the microcontroller.ccording to the pulse received by microcontroller, a call isestablished to mobile station trough a GSM modem and thuswas the presence of human in the home to owner-occupier.On the other hand, this security system remains in idle

    position and performs nothing if no one is the home. Thispaper is organized into eight sections, including this section.Section II discusses some related works and section IIIpresents an overview of PIR sensors and detection process.Circuit diagram and operation details are in section IV and V

    Department of Electrical Electronics Engineeringhsanullah University of Science Techology

    Dhaka, [email protected]

    bimrnldho

    1 1

    Figure . System block diagrm

    J\obr

    tti

    respectively. The application owchart is given in section VI.Section VII discusses the eperimental results of theimplemented prototype system. Finally, ture improvementsand the conclusions are presented in section VIII.

    II. ELATE ORKS

    Todays indoor security systems built with various sensorssuch as ulasonic detectors, microwave detectors, photoelectric detectors, inared detectors etc. Each of these systems

    has its own limitations. s an eample, photo-electric beamsystems detect the presence of an inuder by transmittingvisible or inared light beams across an area, where these

    beams maybe obstructed. But the drawback lies within it if theintruder is aware of the presence of this system. Despite of

    having strong dependence on surrounding environmentalstatus, pyroelectricity has become a widely used detection

    parameter because of simplicity and privilege of interfacing to

    the digital systems. Now, it is etensively used for intruderdetection, smart enviroment sensing, and power managementapplications. Several works have been conducted in varousapplications. Intelligent reproof and the-proof alarm system[1], GSM (Global System for Mobile) network based homesafeguard system [2], human tracking system [3] and intruderdetection systems [4] are some notable works done previously

    based on pyroelectricity sensing technique. Our workintroduces a low-cost security system solution. Utilization ofeisting cellular network to alert and inform the system ownerabout the security breach is made to cope up with everincreasing demand for cheap but reliable security system.

    TSWCE01035 9781424489435/11/$26.00 2011 IEEE 1

  • 7/29/2019 Design and Implementation of Pyroelectric Infrared Sensor Based SecuritySystem-1

    2/5

    III. IR SENSOR

    PIR is basically made of Pyroelectric sensors to develop anelectric signal in response to a change in the incident theal

    radiation. Every living body emits some low level radiationsand the hotter the body, the more is emitted radiation.Commercial PIR sensors typically include two IR-sensitiveelements with opposite polarization housed in a hermeticallysealed metal with a window made of IR-transmissive material

    (typically coated silicon to protect the sensing element). henthe sensor is idle, both slots detect the same amount of IR, theambient amount radiated om the room or walls or outdoors.When a warm body like a human or an animal passes by, it stintercepts one half of the PIR sensor which causes a positivedierential change between the two halves. When the warm

    body leaves the sensing area, the reverse happens, whereby thesensor generates a negative differential change. These change

    pulses are what is detected. In order to shape the FOV, i.e.Field Of View of the sensor, the detector is equipped withlenses in ont of it. The lens used here is inepensive andlightweight plastic materials with transmission characteristicssuited for the desired wavelength range. To cover much larger

    area, detection lens is split up into multiple sections, eachsection of which is a Fresnel lens. Fresnel lens condenses light.Providing a larger range of IR to the sensor it can span overseveral tens of degree width. Thus total conguration improvesimmunity to changes in background temperate, noise orhumidity and causes a shorter settling time of the output aer abody moved in or out the FOV. long with pyroelectric sensor,a chip named Micro Power PIR Motion Detector IC has beenused. This chip takes the output of the sensor and does someminor processing on it to emit a digital output pulse om theaalg sesr Scheatic o PIR esr utput wavefr ishown in Fig. 2.

    For iggering puose, there are three dedicated pins in the

    PIR module: HIGH, LOW and COMMON. When coectngup LOW and COMMON pns, the output tus on and offevery second or so when moving in ont of it. That is called"non-retriggering" and shown in Fig. 3(a). When coecting upHIGH and COMMON pins, the output stay on the entie timethat something is moving. That is called "retriggering" andshown in Fig. 3(b).

    ea sor!e moveme-Figure 2. PIR sensor output waveform

    TSWCEO035

    Proceeding of the 2011 IEEE Students' Technolog Symposium

    14-16 January, 2011, IT haragpur

    pm

    ss

    Ddmums

    uu

    pm

    ss

    dmums

    uu

    -x

    x

    (b)

    x(a)

    Ti

    Lx

    Figure 3. (a) Non-Retriggering (b) retriggering waveforms

    IV. ORKING CIRCUIT

    The total system can be divided into three segments:

    A. Sensor and signal processing segment:

    This segment is shown in the Fig. 4. This segment consists ofve parts:

    - PIR sensor module: The PIR sensor module is fed omthe output of ed output voltage regulator IC LM7805. PIRpositive input terminal is fed with a +5V supply and negativeterminal is grounded. PIR sensor module output pin iscoected to MCU pin. For re-triggering puose, a jumper

    (JP) is attached on the COMMON (C) pin and HIGH (H) pin.- LM7805: LM7805 is a ed output voltage regulator I.

    7805 takes + 12V input and gives a ed regulated ouutvoltage of +5V.

    - LM35: This is temperature sensor IC rated for ll -55 to+ 150C temperature range. is is a transducer IC that takesvoltage input and gives a voltage output proportional to theambient temperature. +VS pn is coected to the output pin ofLM7805 and the VOUT pin is connected to one of the analoginput channels available on MCU.

    - Switch: This is a mechanical switch which is of NO(Normally Open) type. One end of the switch is connected to

    the +5V supply and the other end is coected to one of theMCU input pins. For practical use electronic remote cntrlledswitch is a better option to secure the system operation.

    - MCU: For this system, PIC 1676 is used as the MCU,i.e. Microcontroller unit. It has built-in USRT module whichis necessary for passing T commands to the GSM modem.The PIR sensor module output is tied to the pin . Theoutput of temperate sensor IC and one end of the mechanicalswitch is coected to pins R3 and respectively. L EDis coected to the pin RC3. The MCL VPP is coected to+5 V supply. 4 MHz crystal is connected between OSC and

    2

  • 7/29/2019 Design and Implementation of Pyroelectric Infrared Sensor Based SecuritySystem-1

    3/5

    Figure 4. Sensor and signal processing segment

    OSC2 pins. This crystal deteines the clock speed of theMCU operation.

    B Alarm segment:

    This segment is illustrated in Fig. 5. This segment consists oftee parts:

    - 74LS75: This is a -atch I. The input voltage level onD1 is kept unchanged on Q and inverted on Q2. Inveredoutput images the voltage level set by MCU keeping the alaon even when MCU is at SLEEP mode.

    - la: The ala has two pins- VCC and GN. Thepower pin is connected to Q output pin of the-atch I. Theala can be set to ring by MCU.

    - MCU: Pin RC4 of PIC 1676 is conected to the 1 inputof 74LS75.

    GSM Modem interfacing segment:

    This segment is shown in Fig. 6. s GSM modem usesserial communication to interface with other peripherals, an

    U

    .

    RA0/AN0 n

    RA/ANa(

    RA2/AN2 "'

    RA3/AN3RA4/T0K

    RAS/AN4

    aC/CLKN

    2

    32

    C2/CLKUT ALAR/MCLR/VPP

    V V

    8 19

    TSWCE01035

    Figure 5. Alarm segment

    VCC

    GN

    Proceedng of the 2011 IEEE Students' Technology Symposum

    14-16 January, 2011, IT aragpur

    r____F====-RCO6

    5

    4 4 232-0 TT-[I I -I3 232[ TTOI 2 -2

    3 7 23202 TT[2 8 232-[2 TT-02 '2 6

    +

    J lOFDBE

    Figure 6. GSM Modem interfacing segment

    interface is needed between MCU and GSM modem. Thissegment consists of four parts:

    -B9 male connector: The serial port used here is a 9 pinB9 male connector as the GSM modem side uses a female

    connector. Pin 14 and 13 of MX232 are conected to pin 2and 3 ofB9 respectively. Pin 5 ofB9 is grounded.

    - MX232: This particular IC is necessary for increasingthe voltage swing at the outputs. It takes V and +5V inputsand makes it a + 12V and -12V output voltages. This increasedvoltage swing is a requirement for serial communications.Two 1 /F capacitors are connected between pins 4, 5 and 1, 3of MX232. V+ and V- pins are fed om VCC and GN, i.e.Ground through two 1 /F capacitors. Between VCC and GN

    pins, one 10 /F capacitor is placed.

    - GSM modem: GSM modem is conected through a B9female connector to the interfacing circuit.

    - MCU: The VCC, i.e. power pn, TTL input and TTLoutput pins of MX232 are conected to the pins RC, RCand RC2 of MCU respectively.

    V. IRCUIT OPERATION

    A. Sensor and signal processing segment:

    s the jumper of PIR sensor module is placed between C andH, the output will stay on the entire time something is moving.The regulator IC serves regulated +5V to the LM35 and PIRsensor module. Prior to any operation, eteal interrupt isdisabled in soware of MCU. When the mechanical switch isclosed, pin RB gets an input voltage. This sets the system to

    run. The analog voltage output om LM35 is taken andconvertd to an equivalnt bnary vau which reprents thambient temperature. s PIR sensor module does not perfosatisfactorily below 15

    C temperature, MCU monitors the

    temperature and light LED on pin RC3 when the temperatureis equal to or greater than the critical temperature [5]. er

    the LED is on, the MCU waits a pre-dened time for the placeto be lly evacuated. er that time is over, the system isonline. er activation of the system, if there is anymovement on that place within the coverage region of the PIRsensor module, it outputs a pulse which is taken as input by

    3

  • 7/29/2019 Design and Implementation of Pyroelectric Infrared Sensor Based SecuritySystem-1

    4/5

    MCU. MCU then waits a pre dened time and checks for thatsignal again. This is done for avoiding false triggering.

    B Alam segment :

    RC4 remains HIGH right om the begining. Thus, theoutput pin Q of 74LS75 stays LOW and the alarm does not

    ring. If the signal is still present during the second check, MCUmakes pin RC4 LOW. This makes a HIGH on Q of 74LS75

    and the alarm rings.

    GSM Modem intefacing segment :

    MCU makes HIGH on RC which in tu, activatesMAX232 I. Then MCU starts sending T commands to theGSM modem through the pins RC and RC2. The commandsare sent tough the interface to the modem. The modemreceives the commands and sets up a call to a pre-denednumber. The call is not discoected until the call time up orthe recipient discoects the call. er the call isdiscoected, MCU goes to SLEEP, i.e. low power consumingmode. Before going into SLEEP, MCU enables the extealinterrupt in soware. When the mechanical switch is open, an

    interrpt occurs and MCU is brought out of SLEEP mode.

    VI. OFTWE

    The whole system is built around a MCU. MCU reques to bebued with sowe written for specic applications. Thecode is written using SSEMBLY language and compiledusing MPLAB. MPLAB generated a hex le which is buedusing a buer into the IC. This section demonstrates theowchart of the soware which helps to visualize the codngsteps which is shown n the Fig. 7. t the begiing of theprogram, exteal interrupt of MCU is disabled in soware.Therefore, any signal input on the pin B caot generateinterrupt. Then, MCU looks for the switch whether it is closed

    or open. When the switch is open the signal is LOW and whenthe switch is closed, the signal is HIGH on pin B. If thesignal is LOW, MCU repeatedly checks for the switch stats.When the signal gets HIGH, MCU converts the analog signalom the temperature sensor to the binary equivalent andchecks repeatedly if the temperature of the suounding isgreater or equal to 15 Celsius. When the temperature rises to15 Celsius or more, MCU waits for a pre-dened time beforeexecuting any instruction. is wait state is introduced toensure proper evacuation of the place where the system is torun. er the wait state is over, MCU starts checking for ysignal om the PIR sensor module. When there s no signalom the sensor, MCU checks the status of the switch. If the

    switch is still closed, it contues to check for sensor signal.But, if the switch is opened, MCU breaks out of the sialchecing loop and wats or the swtch to be closed agan.Whenever the input signal state is HIGH on B, MCU begswaiting for a pre-dened time. This wait state is introduced toensure avoidance of the false triggering as the output pulseom the PIR sensor module stays HIGH for a specic timedepending on the resistor and capacitor values [6]. Then MCUchecks again for the input signal on B 1. If MCU does not nd

    the signal HIGH, it will jump back to the rst motion detectionloop. But, if the sial is still HIGH, MCU interprets it as the

    true detection of motion of any warm body. In this case, MCU

    TSWCE01035

    Proceeding of the 2011 IEEE Students' Technology Symposium

    1416 January, 2011, T Kharagpur

    sbexe

    Yes

    Figure 7. Soware owchar

    Sep chogh S

    ode

    will sound the alarm and send proper T commands to theGSM modem to initiate a call to a pre-dened number. Aersetting up the call, MCU will wait for a pre-dened time beforeexecuting next instructions. This wait state allows the call to becompleted successlly. er that, MCU enables the extealintept and goes to SLEEP mode. Enabling the extealintet prior to SLEEP mode ensures that MCU will wakeom the SLEEP mode whenever there is a HIGH to LOW

    transition on B, i.e. when the switch gets opened. When an

    4

  • 7/29/2019 Design and Implementation of Pyroelectric Infrared Sensor Based SecuritySystem-1

    5/5

    exteal inteuption occurs, MCU wakes up om sleep moodand disable the exteal interrupt and the program goes to thebegiing of the algorith.

    VII. ESULT DISCUSSION

    The proposed prototype system is implemented and testedfor the desired functionalities. Fig. 8 shows the test bed. Thegreen and red LEDs are employed to indicate the temperature

    above optimal level and the alarm respectively. The functionof mechanical switch is done manually though a connectingwire. The system made 5 calls to a pre-specied cell phonenumber in 5 test runs which yields a hundred percent successrate. The whole test procedure is done in a laboratory havingthe mentioned criteria for optimal performance. Based onseveral experiments conducted under various conditions, it isveried that this system can resolve the presence of any warm

    body within the coverage area and execut e subsequent actions.

    In order for a PIR sensor to work well most of the time, itis designed with certain limitations. A PIR sensor caotdetect a stationary or very slowly moving body. If the sensorwas set to the required sensitivity, it would be activated by the

    cooling of a nearby wall in the evening, or by very smallanimals. Similarly, if someone walks straight towards a PIRsensor, it will not detect them until they are very close by. PIRsensors are temperature sensitive - they work optimally atambient air temperatures of ound 15-20 degree Celsius. If

    the temperature is over 30 degree Celsius, the eld of viewnarrows and the sensor will be less sensitive. Alteatively, ifthe temperature is below 15 degree Celsius, the eld of viewwidens and smaller or more distant objects will activate thesensor [5]. On cold nights, the dierence in temperaturebetwe peson, e.g. nml bdy tmpratur s 37C dthe outside air temperature is relatively large, giving anapparent increase in performance of the sensor. On hot nights,

    this difference in temperature is relatively small and adecrease in performance of the sensor can be expected [7].Moreover, the PIR sensors are sensitive to exposure to directsunlight and direct wind om heaters and air conditioners.Precaution is required if there are pets in the house. PIR's aresensitive enough to detect dogs and cats. There are special lensavailable or a tape can be put on lower part of the existing

    Figure 8: Test bed for prototype

    TSWCEO035

    Proceeding of the 2011 IEEE Students' Technology Symposium

    14-16 January, 2011, IT Kharagpur

    lens, so as to avoid detection close to the ground. At the sametime, it should be kept in mind that the intruder can also crawland avoid detection. So placement and subsequent testing ofPIR sensor modules is a must to avoid false alarms. Thesefactors need to be kept in mind to ensure the proper operationof this system.

    VIII. UTURE WORK CONCLUSION

    In this security system PIR sensor has been used which islow power, and low cost, pretty rugged, have a wide lens

    range, and are easy to interface with. This security system canbe implemented in places like home, oce, shop etc. Thesensitivity range for detecting motion of the system is about 3to 4 feet. It can be raised up to 20 feet tough careful use ofconcentrating optical lenses as te development. In addition

    to this, this system can be equipped with glass break detectorsto enhance the level of protection. Use of multi-sensor datasion and complex algorithm can be used to increase theeffective FOV for larger spaces. In order to ehance thelocation accuracy and to enhance the method of processing thePIR sensor signal, use of more advanced techiques such as

    probabilistic theories and so computing is le open for theture.

    EFERENCES

    [] Z. Zhi - hui, L. Hui, L. Yin, C. Jia jia, "esign of the intelligent reproof nd the - proof ala system for home, JOURNAL OF HENANPOLYTECHNIC UNIVERSITY,vol. 28,no. , pp. 207-210, Feb. 2009.

    [2] Q. Qu, Z. Guohao, W. Baohua, "esign of Home Safeguard SystemBased on GSM Technique,Electronic Engineer, vol. 32, no. , pp. 76-78, Nov. 2006.

    ] M Shnkar, 1. rhett, Q. ao, B. nther, "Hmn-traking systmsusing pyroelectric inared detectors, Optical Engineering, vol. 10, no.45, pp. 106401 (01-10), Oct. 2006.

    [4] M. Moghavvemi and C.S. Lu, "Pyroelectric inared sensor for intruder

    detection, in Proc. TENCON 2004 Co, pp. 656-659.[5] Renewable Energy UK. (2010, Aug.). Find out how to integrate PIR

    (passive infra red) sensors into renewable energy applications. [Online].Available: http://www.reuk.co.ukPIR-Sensors.htm

    [6] BISS atasheet. [Online]. Available:http://cdn.shopi.com/s/les/ 0038/9582/es/BISS. pd

    [7] Schneider Electric. PL PIR Sensor Technical Guide. [Online].Available:http://www.pdlglobal.comrochures/PIRTechnicalBooklet.pd

    5