SlideShare a Scribd company logo
1 of 6
Download to read offline
Published on Your Electronics Open Source (http://dev.emcelettronica.com)


Home > My blog > Contenuti




How to design a Passive Infrared (PIR)
By Ionela
Created May 12 2009 - 10:10


This article details the hardware and software required for a fully functional passive infrared (PIR) sensor
with an associated remote control unit. The remote control unit adjusts key algorithm detection parameters
which are stored in the MC68HC908JK1/3 FLASH memory area.




The PIR sensor is mounted behind a Fresnel lens. The output signal from the sensor is amplified and
conditioned by two elements of an operational amplifier, before being connected directly to an analog-to-
digital (A/D) channel of the microcontroller (MCU) which is the conventional analog approach. Alternatively,
it may be AC coupled to the input of the microcontroller via an R/C network which forms the basis for the
alternative Delta Sigma method of detection. The intruder detect output is a signal that is used to indicate
to the PIR units parent system that a valid intruder event has been detected. In this application, a light-
emitting diode (LED) is used to indicate an alarm condition. Normally, this is an alarm trigger device, such
as a relay, transistor, etc.

Features

Features of the PIR include:

         ? Infrared (IR) communications with 38 kHz tx being bit bashed and rx via the timer capture interrupt
         ? RS232 tx communications, bit bashed at 38,400 bit rate
         ? FLASH self-erase/program/verification using Motorola monitor routines
         ? Analog initialization/read
         ? Intruder detect using analog buffer scan or Delta Sigma algorithms

Using a low-cost microcontroller (MCU) like the MC68HC908JK1/3 has many advantages compared to an
analog sensor circuit since the MCU can apply real-time intelligence to the sensor data it is receiving. This
intelligence forms the heart of the intruder detection algorithm; the advantage is increased by the ability of
the user to modify key algorithm parameters, which are stored in FLASH memory. The FLASH memory
parameters are adjusted by 2-way infrared communications using a REMOTE unit. The use of an MCU
also provides the designer with an alternative method of sensor amplification, which employs considerably
fewer components than the op-amp approach.
One of the most important factors to consider when designing intruder alarm systems is that they should
offer good sensitivity combined with a high immunity to false alarms. Pyrolytic sensors used in PIR alarm
systems deliver a very low amplitude output, which is proportional to changes in incident infrared radiation
falling on them. Traditionally, a multi-stage amplification has been used to condition the sensor output to
provide a usable output signal.

Source Code (Abstract)

////////////
// main() //
////////////
void main( void )
{
MicroStartUp();
while( 1 )
{
STOP();
ServiceWatchDog();
////////////////////////////////////////////////////////////
// by virtue of the fact that we have got to this part of //
// the software a KEYBOARD interrupt must have ?fired?. //
////////////////////////////////////////////////////////////
Initialise908GP32();
if ( GetPirPassword() )
{
do {
ServiceWatchDog();
ReadButtons();
IRCommsCheck();
RS232CommsCheck();
ModeCheck();
////////////////////////
// 10ms do-while sync //
////////////////////////
while ( !flags1.bit._10MS_LOOP );
flags1.bit._10MS_LOOP = 0;} while ( ++stop_counter
After every analog read/store operation a magnitude difference test is performed w
Programming procedure


       1. Ensure that the VDD switch is Off.
       2. Ensure that the 20-pin socket is occupied.
       3. Ensure that a standard 9-way RS232 cable is connected from the
       PC to the development board?s Programmer RS232 connector.
       4. Set the Osc Select switch to Program.
       5. Set VDD switch to On.
       6. Invoke c:pemicroics08jlzprog08sz.exe (assuming default installation directory).
       7. After programming is complete, set the VDD switch to Off and move the Osc Select switch from
       Program to Run.

Note: The PIR MC68HC908JK1/3 programming is in-circuit, there is no separate programming socket.

PIR Unit Bill of Materials
Resistors

       R1 1k
       R2 10k
       R3 47k
       R4 10M
       R5 10R
       R6 680R
       R7 10k
       R8 100k
       R9 47k
       R10 100k
       R11 100k
       R12 470R
       R13 2k2
       R14 10k
       R15 10k
       R16 10k
       R17 10k
       R18 470R
       R19 680R
       R20 10k
       R40 3M3
       R42 10k
       R44 10k
       R45 47k
       R46 3M3
       R47 680k
       R48 4k7

Miscellaneous

       SW1 SPCO slide switch
SW2 SPCO slide switch
      SW3 SPCO slide switch
      X1 4MHz resonator
      XT1 9.8304MHz Oscillator Module
      FR1 Curtain? Fresnel lens
      IR1 GP1U28Q
      J1 9 way rt angle male ?D? Connector
      J2 ?3pin 0.1?? header?
      J3 ?3pin 0.1?? header?
      J4 9 way rt angle male ?D? Connector
      J5 3pin PIR Connector
      J6 1.2mm
      LED1 Infra Red transmitter
      LED2 5mm Red
      LED3 5mm Yellow
      LED4 5mm Green

Capacitors

      C1 100nF 50V DC
      C2 100nF 50V DC
      C3 220uF 16V DC
      C4 470uF 25V DC
      C5 100nF 50V DC
      C6 100nF 50V DC
      C7 100nF 50V DC
      C8 100nF 50V DC
      C9 100nF 50V DC
      C10 100nF 50V DC
      C11 3nF3 50V DC
      C12 100nF 50V DC
      C13 220µF 16V DC
      C14 100nF 50V DC
      C15 33µF 10V Tantalum
      C16 10µF 16V DC
      C17 10µF 16V DC
      C19 100nF 50V DC
      C20 10nF 50V DC
      C21 22µF 16V DC
      C23 10µF 16V DC

Semiconductors

      D1 BAS16
      D2 BAS16
      D3 BAS16
      D4 BAS16
      D5 5V1
      IC1 MC68HC908JK3
IC2 LM7805
        IC3 MAX232
        IC4 74HC125D
        IC5 LM324D
        Q1 BC818-40
        Q2 BC850
        Q3 BC850
        Q4 BC850

The PIR unit is based upon the MC68HC908JK1/3, these are 1536-bytes/4096-byte FLASH
microcontrollers, the ?9? in the part number denotes the part as being a FLASH device. The minimum size
FLASH memory that can be erased at one time is 64 bytes and the maximum size FLASH memory that
can be programmed at one time is 32 bytes (row). This reference design uses the last 64-byte block of the
user code space as a 32-byte nonvolatile data store. This feature alleviates the need for an external
memory IC such as an 8-pin 2-wire I2C type.

CONTACT REQUEST
If you want to know more about this Freescale product, please submit your request to Arrow Italy using
this form [1].
NOTE: this form is valid ONLY for Companies or Customers based in Italy and working in the Italian area.

Read the Italian version: Come progettare un sensore infrarosso (PIR) [2]

Source: Passive Infra Red (PIR) for Security Peripherals [3]

                                                                                 HowTo passive infrared pir

                                                   Trademarks




Source URL: http://dev.emcelettronica.com/how-to-design-passive-infrared-pir

Links:
[1] http://it.emcelettronica.com/contact/freescale
[2] http://it.emcelettronica.com/come-progettare-un-sensore-infrarosso-pir
[3] http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=RD68HC08PIR

More Related Content

What's hot

Datasheet rtu cathodic_protection
Datasheet rtu cathodic_protectionDatasheet rtu cathodic_protection
Datasheet rtu cathodic_protectionhaykel79
 
BlueOptics Bo31j136s4d 10gbase-lrm xfp transceiver 1310nm 220m multimode lc d...
BlueOptics Bo31j136s4d 10gbase-lrm xfp transceiver 1310nm 220m multimode lc d...BlueOptics Bo31j136s4d 10gbase-lrm xfp transceiver 1310nm 220m multimode lc d...
BlueOptics Bo31j136s4d 10gbase-lrm xfp transceiver 1310nm 220m multimode lc d...CBO GmbH
 
RoboticCarKit_MANUAL
RoboticCarKit_MANUALRoboticCarKit_MANUAL
RoboticCarKit_MANUALElijah Barner
 
AFL Fiber Optic Test and Inspection Solutions 2017
AFL Fiber Optic Test and Inspection Solutions 2017AFL Fiber Optic Test and Inspection Solutions 2017
AFL Fiber Optic Test and Inspection Solutions 2017Christian Kraemer
 
IM 42XX Series - Intelligent Monitoring System - Panel Mount. (Serial & 4-20m...
IM 42XX Series - Intelligent Monitoring System - Panel Mount. (Serial & 4-20m...IM 42XX Series - Intelligent Monitoring System - Panel Mount. (Serial & 4-20m...
IM 42XX Series - Intelligent Monitoring System - Panel Mount. (Serial & 4-20m...Suyash Lad
 
BlueOptics Bo31j15640d 10gbase-er xfp transceiver 1550nm 40km singlemode lc d...
BlueOptics Bo31j15640d 10gbase-er xfp transceiver 1550nm 40km singlemode lc d...BlueOptics Bo31j15640d 10gbase-er xfp transceiver 1550nm 40km singlemode lc d...
BlueOptics Bo31j15640d 10gbase-er xfp transceiver 1550nm 40km singlemode lc d...CBO GmbH
 
Omnik inverter-5k-6k-7k-8k-tl
Omnik inverter-5k-6k-7k-8k-tlOmnik inverter-5k-6k-7k-8k-tl
Omnik inverter-5k-6k-7k-8k-tlOmnik Solar
 
War field spying robot
War field spying robotWar field spying robot
War field spying robotARUN S L
 
BlueOptics Bo31j15680d 10gbase-zr xfp transceiver 1550nm 80km singlemode lc d...
BlueOptics Bo31j15680d 10gbase-zr xfp transceiver 1550nm 80km singlemode lc d...BlueOptics Bo31j15680d 10gbase-zr xfp transceiver 1550nm 80km singlemode lc d...
BlueOptics Bo31j15680d 10gbase-zr xfp transceiver 1550nm 80km singlemode lc d...CBO GmbH
 
Webinar: Sensores e soluções para aplicações em indústria inteligente
Webinar: Sensores e soluções para aplicações em indústria inteligenteWebinar: Sensores e soluções para aplicações em indústria inteligente
Webinar: Sensores e soluções para aplicações em indústria inteligenteEmbarcados
 
BOMB DETECTION ROBOT BY USING GSM & GPS
BOMB DETECTION ROBOT BY USING GSM & GPSBOMB DETECTION ROBOT BY USING GSM & GPS
BOMB DETECTION ROBOT BY USING GSM & GPSJOLLUSUDARSHANREDDY
 
Medium Performance Gyroscopes
Medium Performance GyroscopesMedium Performance Gyroscopes
Medium Performance GyroscopesPremier Farnell
 
Meier_ECET365_Manual_LI
Meier_ECET365_Manual_LIMeier_ECET365_Manual_LI
Meier_ECET365_Manual_LIjmeier72
 
BlueOptics Bo66hxx680d 2-4-8gbase-cwdm xfp transceiver 1471nm - 1611nm 80km s...
BlueOptics Bo66hxx680d 2-4-8gbase-cwdm xfp transceiver 1471nm - 1611nm 80km s...BlueOptics Bo66hxx680d 2-4-8gbase-cwdm xfp transceiver 1471nm - 1611nm 80km s...
BlueOptics Bo66hxx680d 2-4-8gbase-cwdm xfp transceiver 1471nm - 1611nm 80km s...CBO GmbH
 
Webinar: Wearables - Apresentando um diagrama de blocos e componentes chaves
Webinar: Wearables - Apresentando um diagrama de blocos e componentes chavesWebinar: Wearables - Apresentando um diagrama de blocos e componentes chaves
Webinar: Wearables - Apresentando um diagrama de blocos e componentes chavesEmbarcados
 
Zigbee based metal detecting robot to assist bomb detection and rescue team
Zigbee based metal detecting robot to assist bomb detection and rescue teamZigbee based metal detecting robot to assist bomb detection and rescue team
Zigbee based metal detecting robot to assist bomb detection and rescue teamshiva kumar cheruku
 
BlueOptics Bo66hxx640d 2-4-8gbase-cwdm xfp transceiver 1471nm - 1611nm 40km s...
BlueOptics Bo66hxx640d 2-4-8gbase-cwdm xfp transceiver 1471nm - 1611nm 40km s...BlueOptics Bo66hxx640d 2-4-8gbase-cwdm xfp transceiver 1471nm - 1611nm 40km s...
BlueOptics Bo66hxx640d 2-4-8gbase-cwdm xfp transceiver 1471nm - 1611nm 40km s...CBO GmbH
 
IM 42 XX Series - Intelligent Monitoring System - 4 to 20mA catalogue
IM 42 XX Series - Intelligent Monitoring System - 4 to 20mA catalogueIM 42 XX Series - Intelligent Monitoring System - 4 to 20mA catalogue
IM 42 XX Series - Intelligent Monitoring System - 4 to 20mA catalogueSuyash Lad
 

What's hot (19)

Datasheet rtu cathodic_protection
Datasheet rtu cathodic_protectionDatasheet rtu cathodic_protection
Datasheet rtu cathodic_protection
 
BlueOptics Bo31j136s4d 10gbase-lrm xfp transceiver 1310nm 220m multimode lc d...
BlueOptics Bo31j136s4d 10gbase-lrm xfp transceiver 1310nm 220m multimode lc d...BlueOptics Bo31j136s4d 10gbase-lrm xfp transceiver 1310nm 220m multimode lc d...
BlueOptics Bo31j136s4d 10gbase-lrm xfp transceiver 1310nm 220m multimode lc d...
 
RoboticCarKit_MANUAL
RoboticCarKit_MANUALRoboticCarKit_MANUAL
RoboticCarKit_MANUAL
 
AFL Fiber Optic Test and Inspection Solutions 2017
AFL Fiber Optic Test and Inspection Solutions 2017AFL Fiber Optic Test and Inspection Solutions 2017
AFL Fiber Optic Test and Inspection Solutions 2017
 
IM 42XX Series - Intelligent Monitoring System - Panel Mount. (Serial & 4-20m...
IM 42XX Series - Intelligent Monitoring System - Panel Mount. (Serial & 4-20m...IM 42XX Series - Intelligent Monitoring System - Panel Mount. (Serial & 4-20m...
IM 42XX Series - Intelligent Monitoring System - Panel Mount. (Serial & 4-20m...
 
BlueOptics Bo31j15640d 10gbase-er xfp transceiver 1550nm 40km singlemode lc d...
BlueOptics Bo31j15640d 10gbase-er xfp transceiver 1550nm 40km singlemode lc d...BlueOptics Bo31j15640d 10gbase-er xfp transceiver 1550nm 40km singlemode lc d...
BlueOptics Bo31j15640d 10gbase-er xfp transceiver 1550nm 40km singlemode lc d...
 
Omnik inverter-5k-6k-7k-8k-tl
Omnik inverter-5k-6k-7k-8k-tlOmnik inverter-5k-6k-7k-8k-tl
Omnik inverter-5k-6k-7k-8k-tl
 
War field spying robot
War field spying robotWar field spying robot
War field spying robot
 
BlueOptics Bo31j15680d 10gbase-zr xfp transceiver 1550nm 80km singlemode lc d...
BlueOptics Bo31j15680d 10gbase-zr xfp transceiver 1550nm 80km singlemode lc d...BlueOptics Bo31j15680d 10gbase-zr xfp transceiver 1550nm 80km singlemode lc d...
BlueOptics Bo31j15680d 10gbase-zr xfp transceiver 1550nm 80km singlemode lc d...
 
Webinar: Sensores e soluções para aplicações em indústria inteligente
Webinar: Sensores e soluções para aplicações em indústria inteligenteWebinar: Sensores e soluções para aplicações em indústria inteligente
Webinar: Sensores e soluções para aplicações em indústria inteligente
 
BOMB DETECTION ROBOT BY USING GSM & GPS
BOMB DETECTION ROBOT BY USING GSM & GPSBOMB DETECTION ROBOT BY USING GSM & GPS
BOMB DETECTION ROBOT BY USING GSM & GPS
 
Medium Performance Gyroscopes
Medium Performance GyroscopesMedium Performance Gyroscopes
Medium Performance Gyroscopes
 
Meier_ECET365_Manual_LI
Meier_ECET365_Manual_LIMeier_ECET365_Manual_LI
Meier_ECET365_Manual_LI
 
BlueOptics Bo66hxx680d 2-4-8gbase-cwdm xfp transceiver 1471nm - 1611nm 80km s...
BlueOptics Bo66hxx680d 2-4-8gbase-cwdm xfp transceiver 1471nm - 1611nm 80km s...BlueOptics Bo66hxx680d 2-4-8gbase-cwdm xfp transceiver 1471nm - 1611nm 80km s...
BlueOptics Bo66hxx680d 2-4-8gbase-cwdm xfp transceiver 1471nm - 1611nm 80km s...
 
Important
ImportantImportant
Important
 
Webinar: Wearables - Apresentando um diagrama de blocos e componentes chaves
Webinar: Wearables - Apresentando um diagrama de blocos e componentes chavesWebinar: Wearables - Apresentando um diagrama de blocos e componentes chaves
Webinar: Wearables - Apresentando um diagrama de blocos e componentes chaves
 
Zigbee based metal detecting robot to assist bomb detection and rescue team
Zigbee based metal detecting robot to assist bomb detection and rescue teamZigbee based metal detecting robot to assist bomb detection and rescue team
Zigbee based metal detecting robot to assist bomb detection and rescue team
 
BlueOptics Bo66hxx640d 2-4-8gbase-cwdm xfp transceiver 1471nm - 1611nm 40km s...
BlueOptics Bo66hxx640d 2-4-8gbase-cwdm xfp transceiver 1471nm - 1611nm 40km s...BlueOptics Bo66hxx640d 2-4-8gbase-cwdm xfp transceiver 1471nm - 1611nm 40km s...
BlueOptics Bo66hxx640d 2-4-8gbase-cwdm xfp transceiver 1471nm - 1611nm 40km s...
 
IM 42 XX Series - Intelligent Monitoring System - 4 to 20mA catalogue
IM 42 XX Series - Intelligent Monitoring System - 4 to 20mA catalogueIM 42 XX Series - Intelligent Monitoring System - 4 to 20mA catalogue
IM 42 XX Series - Intelligent Monitoring System - 4 to 20mA catalogue
 

Similar to How to design a Passive Infrared (PIR) Open Source Project

Microcontroller based Ultrasonic Radar (Microprocessors and Embedded Systems ...
Microcontroller based Ultrasonic Radar (Microprocessors and Embedded Systems ...Microcontroller based Ultrasonic Radar (Microprocessors and Embedded Systems ...
Microcontroller based Ultrasonic Radar (Microprocessors and Embedded Systems ...Tawsif Rahman Chowdhury
 
Report on Embedded Based Home security system
Report on Embedded Based Home security systemReport on Embedded Based Home security system
Report on Embedded Based Home security systemNIT srinagar
 
Handheld Laser Barcode Scanners
Handheld Laser Barcode ScannersHandheld Laser Barcode Scanners
Handheld Laser Barcode ScannersPremier Farnell
 
Bluetooth based home appliances control
Bluetooth based home appliances controlBluetooth based home appliances control
Bluetooth based home appliances controlPROJECTRONICS
 
TV Remote Operated Domestic Appliances Control
TV Remote Operated Domestic Appliances ControlTV Remote Operated Domestic Appliances Control
TV Remote Operated Domestic Appliances ControlEdgefxkits & Solutions
 
Solution on Portable Blood Pressure Monitor System
Solution on Portable Blood Pressure Monitor SystemSolution on Portable Blood Pressure Monitor System
Solution on Portable Blood Pressure Monitor SystemPremier Farnell
 
Substation Monitoring and Control Based on Microcontroller Using IoT
Substation Monitoring and Control Based on Microcontroller Using IoTSubstation Monitoring and Control Based on Microcontroller Using IoT
Substation Monitoring and Control Based on Microcontroller Using IoTIRJET Journal
 
16 f887
16 f88716 f887
16 f887lala
 
Introduction to nanoWatt XLP: PIC18F46J50
Introduction to nanoWatt XLP: PIC18F46J50 Introduction to nanoWatt XLP: PIC18F46J50
Introduction to nanoWatt XLP: PIC18F46J50 Premier Farnell
 
ZiLOG Universal Infrared Remote Reference Design
ZiLOG Universal Infrared Remote Reference DesignZiLOG Universal Infrared Remote Reference Design
ZiLOG Universal Infrared Remote Reference DesignDiana Laboy-Rush
 
Navigation of Robot Vehicle using RF with Landmine Detection
Navigation of Robot Vehicle using RF with Landmine DetectionNavigation of Robot Vehicle using RF with Landmine Detection
Navigation of Robot Vehicle using RF with Landmine DetectionVeena Rani
 
Datasheet PIC16f887
Datasheet PIC16f887Datasheet PIC16f887
Datasheet PIC16f887whendygarcia
 
Virtual Twins: Modeling Trends and Challenges Ahead
Virtual Twins: Modeling Trends and Challenges AheadVirtual Twins: Modeling Trends and Challenges Ahead
Virtual Twins: Modeling Trends and Challenges AheadBrain IoT Project
 
esp32-pico-d4_datasheet_en.pdf
esp32-pico-d4_datasheet_en.pdfesp32-pico-d4_datasheet_en.pdf
esp32-pico-d4_datasheet_en.pdfraimon ribal
 

Similar to How to design a Passive Infrared (PIR) Open Source Project (20)

Pic16f87x1a
Pic16f87x1aPic16f87x1a
Pic16f87x1a
 
Microcontroller based Ultrasonic Radar (Microprocessors and Embedded Systems ...
Microcontroller based Ultrasonic Radar (Microprocessors and Embedded Systems ...Microcontroller based Ultrasonic Radar (Microprocessors and Embedded Systems ...
Microcontroller based Ultrasonic Radar (Microprocessors and Embedded Systems ...
 
Report on Embedded Based Home security system
Report on Embedded Based Home security systemReport on Embedded Based Home security system
Report on Embedded Based Home security system
 
Handheld Laser Barcode Scanners
Handheld Laser Barcode ScannersHandheld Laser Barcode Scanners
Handheld Laser Barcode Scanners
 
Pic16F887
Pic16F887Pic16F887
Pic16F887
 
Bluetooth based home appliances control
Bluetooth based home appliances controlBluetooth based home appliances control
Bluetooth based home appliances control
 
TV Remote Operated Domestic Appliances Control
TV Remote Operated Domestic Appliances ControlTV Remote Operated Domestic Appliances Control
TV Remote Operated Domestic Appliances Control
 
Solution on Portable Blood Pressure Monitor System
Solution on Portable Blood Pressure Monitor SystemSolution on Portable Blood Pressure Monitor System
Solution on Portable Blood Pressure Monitor System
 
Substation Monitoring and Control Based on Microcontroller Using IoT
Substation Monitoring and Control Based on Microcontroller Using IoTSubstation Monitoring and Control Based on Microcontroller Using IoT
Substation Monitoring and Control Based on Microcontroller Using IoT
 
16 f887
16 f88716 f887
16 f887
 
Introduction to nanoWatt XLP: PIC18F46J50
Introduction to nanoWatt XLP: PIC18F46J50 Introduction to nanoWatt XLP: PIC18F46J50
Introduction to nanoWatt XLP: PIC18F46J50
 
Pic bluetooth
Pic bluetoothPic bluetooth
Pic bluetooth
 
ZiLOG Universal Infrared Remote Reference Design
ZiLOG Universal Infrared Remote Reference DesignZiLOG Universal Infrared Remote Reference Design
ZiLOG Universal Infrared Remote Reference Design
 
Navigation of Robot Vehicle using RF with Landmine Detection
Navigation of Robot Vehicle using RF with Landmine DetectionNavigation of Robot Vehicle using RF with Landmine Detection
Navigation of Robot Vehicle using RF with Landmine Detection
 
Embedded system
Embedded systemEmbedded system
Embedded system
 
Datasheet PIC16f887
Datasheet PIC16f887Datasheet PIC16f887
Datasheet PIC16f887
 
Virtual Twins: Modeling Trends and Challenges Ahead
Virtual Twins: Modeling Trends and Challenges AheadVirtual Twins: Modeling Trends and Challenges Ahead
Virtual Twins: Modeling Trends and Challenges Ahead
 
esp32-pico-d4_datasheet_en.pdf
esp32-pico-d4_datasheet_en.pdfesp32-pico-d4_datasheet_en.pdf
esp32-pico-d4_datasheet_en.pdf
 
Introduction to PIC.pptx
Introduction to PIC.pptxIntroduction to PIC.pptx
Introduction to PIC.pptx
 
datasheet.pdf
datasheet.pdfdatasheet.pdf
datasheet.pdf
 

More from Ionela

IoT with OpenPicus Flyport
IoT with OpenPicus FlyportIoT with OpenPicus Flyport
IoT with OpenPicus FlyportIonela
 
Flyport wifi webserver configuration page
Flyport wifi webserver configuration pageFlyport wifi webserver configuration page
Flyport wifi webserver configuration pageIonela
 
openPicus Proto Nest Datasheet
openPicus Proto Nest DatasheetopenPicus Proto Nest Datasheet
openPicus Proto Nest DatasheetIonela
 
How to Integrate Internet of Things with Webserver with
How to Integrate Internet of Things with Webserver with How to Integrate Internet of Things with Webserver with
How to Integrate Internet of Things with Webserver with Ionela
 
Openpicus Flyport interfaces the cloud services
Openpicus Flyport interfaces the cloud servicesOpenpicus Flyport interfaces the cloud services
Openpicus Flyport interfaces the cloud servicesIonela
 
Flyport openPicus datasheet
Flyport openPicus datasheetFlyport openPicus datasheet
Flyport openPicus datasheetIonela
 
Windows phone 7 è l’ultima occasione di microsoft 2010-10-18
Windows phone 7 è l’ultima occasione di microsoft   2010-10-18Windows phone 7 è l’ultima occasione di microsoft   2010-10-18
Windows phone 7 è l’ultima occasione di microsoft 2010-10-18Ionela
 
Videocamera cam ball un mare di caratteristiche nella piccola videocamera a ...
Videocamera cam ball  un mare di caratteristiche nella piccola videocamera a ...Videocamera cam ball  un mare di caratteristiche nella piccola videocamera a ...
Videocamera cam ball un mare di caratteristiche nella piccola videocamera a ...Ionela
 
Utente premium 2010-10-17
Utente premium   2010-10-17Utente premium   2010-10-17
Utente premium 2010-10-17Ionela
 
Unity sostituisce gnome su ubuntu 11.04 2010-11-01
Unity sostituisce gnome su ubuntu 11.04   2010-11-01Unity sostituisce gnome su ubuntu 11.04   2010-11-01
Unity sostituisce gnome su ubuntu 11.04 2010-11-01Ionela
 
Una retina artificiale per ridare la vista 2010-11-10
Una retina artificiale per ridare la vista   2010-11-10Una retina artificiale per ridare la vista   2010-11-10
Una retina artificiale per ridare la vista 2010-11-10Ionela
 
Un orologio elettronico completo basato su i2 c rtcc mcp79410 2010-10-29
Un orologio elettronico completo basato su i2 c rtcc mcp79410   2010-10-29Un orologio elettronico completo basato su i2 c rtcc mcp79410   2010-10-29
Un orologio elettronico completo basato su i2 c rtcc mcp79410 2010-10-29Ionela
 
Ultimo lancio discovery delle perdite rinviano l’ultimo lancio dello shuttle...
Ultimo lancio discovery  delle perdite rinviano l’ultimo lancio dello shuttle...Ultimo lancio discovery  delle perdite rinviano l’ultimo lancio dello shuttle...
Ultimo lancio discovery delle perdite rinviano l’ultimo lancio dello shuttle...Ionela
 
Ubuntu passa a wayland 2010-11-08
Ubuntu passa a wayland   2010-11-08Ubuntu passa a wayland   2010-11-08
Ubuntu passa a wayland 2010-11-08Ionela
 
Touchatag un'applicazione di internet delle cose 2010-11-10
Touchatag  un'applicazione di internet delle cose   2010-11-10Touchatag  un'applicazione di internet delle cose   2010-11-10
Touchatag un'applicazione di internet delle cose 2010-11-10Ionela
 
Tianhe 1, il supercomputer cinese - 2010-11-05
Tianhe 1, il supercomputer cinese - 2010-11-05Tianhe 1, il supercomputer cinese - 2010-11-05
Tianhe 1, il supercomputer cinese - 2010-11-05Ionela
 
Thread o processo quale usare - 2010-11-02
Thread o processo  quale usare  - 2010-11-02Thread o processo  quale usare  - 2010-11-02
Thread o processo quale usare - 2010-11-02Ionela
 
Termometro digitale usando pic16 f84a schema elettrico - 2010-11-03
Termometro digitale usando pic16 f84a   schema elettrico - 2010-11-03Termometro digitale usando pic16 f84a   schema elettrico - 2010-11-03
Termometro digitale usando pic16 f84a schema elettrico - 2010-11-03Ionela
 
Telescopio webb il sistema di engineering del telescopio webb della nasa si ...
Telescopio webb  il sistema di engineering del telescopio webb della nasa si ...Telescopio webb  il sistema di engineering del telescopio webb della nasa si ...
Telescopio webb il sistema di engineering del telescopio webb della nasa si ...Ionela
 
Tecnologia light peak intel potrebbe adottarla da inizio 2011, apple a segui...
Tecnologia light peak  intel potrebbe adottarla da inizio 2011, apple a segui...Tecnologia light peak  intel potrebbe adottarla da inizio 2011, apple a segui...
Tecnologia light peak intel potrebbe adottarla da inizio 2011, apple a segui...Ionela
 

More from Ionela (20)

IoT with OpenPicus Flyport
IoT with OpenPicus FlyportIoT with OpenPicus Flyport
IoT with OpenPicus Flyport
 
Flyport wifi webserver configuration page
Flyport wifi webserver configuration pageFlyport wifi webserver configuration page
Flyport wifi webserver configuration page
 
openPicus Proto Nest Datasheet
openPicus Proto Nest DatasheetopenPicus Proto Nest Datasheet
openPicus Proto Nest Datasheet
 
How to Integrate Internet of Things with Webserver with
How to Integrate Internet of Things with Webserver with How to Integrate Internet of Things with Webserver with
How to Integrate Internet of Things with Webserver with
 
Openpicus Flyport interfaces the cloud services
Openpicus Flyport interfaces the cloud servicesOpenpicus Flyport interfaces the cloud services
Openpicus Flyport interfaces the cloud services
 
Flyport openPicus datasheet
Flyport openPicus datasheetFlyport openPicus datasheet
Flyport openPicus datasheet
 
Windows phone 7 è l’ultima occasione di microsoft 2010-10-18
Windows phone 7 è l’ultima occasione di microsoft   2010-10-18Windows phone 7 è l’ultima occasione di microsoft   2010-10-18
Windows phone 7 è l’ultima occasione di microsoft 2010-10-18
 
Videocamera cam ball un mare di caratteristiche nella piccola videocamera a ...
Videocamera cam ball  un mare di caratteristiche nella piccola videocamera a ...Videocamera cam ball  un mare di caratteristiche nella piccola videocamera a ...
Videocamera cam ball un mare di caratteristiche nella piccola videocamera a ...
 
Utente premium 2010-10-17
Utente premium   2010-10-17Utente premium   2010-10-17
Utente premium 2010-10-17
 
Unity sostituisce gnome su ubuntu 11.04 2010-11-01
Unity sostituisce gnome su ubuntu 11.04   2010-11-01Unity sostituisce gnome su ubuntu 11.04   2010-11-01
Unity sostituisce gnome su ubuntu 11.04 2010-11-01
 
Una retina artificiale per ridare la vista 2010-11-10
Una retina artificiale per ridare la vista   2010-11-10Una retina artificiale per ridare la vista   2010-11-10
Una retina artificiale per ridare la vista 2010-11-10
 
Un orologio elettronico completo basato su i2 c rtcc mcp79410 2010-10-29
Un orologio elettronico completo basato su i2 c rtcc mcp79410   2010-10-29Un orologio elettronico completo basato su i2 c rtcc mcp79410   2010-10-29
Un orologio elettronico completo basato su i2 c rtcc mcp79410 2010-10-29
 
Ultimo lancio discovery delle perdite rinviano l’ultimo lancio dello shuttle...
Ultimo lancio discovery  delle perdite rinviano l’ultimo lancio dello shuttle...Ultimo lancio discovery  delle perdite rinviano l’ultimo lancio dello shuttle...
Ultimo lancio discovery delle perdite rinviano l’ultimo lancio dello shuttle...
 
Ubuntu passa a wayland 2010-11-08
Ubuntu passa a wayland   2010-11-08Ubuntu passa a wayland   2010-11-08
Ubuntu passa a wayland 2010-11-08
 
Touchatag un'applicazione di internet delle cose 2010-11-10
Touchatag  un'applicazione di internet delle cose   2010-11-10Touchatag  un'applicazione di internet delle cose   2010-11-10
Touchatag un'applicazione di internet delle cose 2010-11-10
 
Tianhe 1, il supercomputer cinese - 2010-11-05
Tianhe 1, il supercomputer cinese - 2010-11-05Tianhe 1, il supercomputer cinese - 2010-11-05
Tianhe 1, il supercomputer cinese - 2010-11-05
 
Thread o processo quale usare - 2010-11-02
Thread o processo  quale usare  - 2010-11-02Thread o processo  quale usare  - 2010-11-02
Thread o processo quale usare - 2010-11-02
 
Termometro digitale usando pic16 f84a schema elettrico - 2010-11-03
Termometro digitale usando pic16 f84a   schema elettrico - 2010-11-03Termometro digitale usando pic16 f84a   schema elettrico - 2010-11-03
Termometro digitale usando pic16 f84a schema elettrico - 2010-11-03
 
Telescopio webb il sistema di engineering del telescopio webb della nasa si ...
Telescopio webb  il sistema di engineering del telescopio webb della nasa si ...Telescopio webb  il sistema di engineering del telescopio webb della nasa si ...
Telescopio webb il sistema di engineering del telescopio webb della nasa si ...
 
Tecnologia light peak intel potrebbe adottarla da inizio 2011, apple a segui...
Tecnologia light peak  intel potrebbe adottarla da inizio 2011, apple a segui...Tecnologia light peak  intel potrebbe adottarla da inizio 2011, apple a segui...
Tecnologia light peak intel potrebbe adottarla da inizio 2011, apple a segui...
 

Recently uploaded

TC_Philosophy_Report_by_BSCrim.4-A2023--
TC_Philosophy_Report_by_BSCrim.4-A2023--TC_Philosophy_Report_by_BSCrim.4-A2023--
TC_Philosophy_Report_by_BSCrim.4-A2023--RvEscoro
 
Purposive Communication lesson8 application letter
Purposive Communication lesson8 application letterPurposive Communication lesson8 application letter
Purposive Communication lesson8 application letterrubycaquilala
 
7 tips to help you become a Supercommunicator
7 tips to help you become a Supercommunicator7 tips to help you become a Supercommunicator
7 tips to help you become a SupercommunicatorAlex Clapson
 
Warp Speed Habits: A Brain Based Roadmap to Create Habits.pdf
Warp Speed Habits: A Brain Based Roadmap to Create Habits.pdfWarp Speed Habits: A Brain Based Roadmap to Create Habits.pdf
Warp Speed Habits: A Brain Based Roadmap to Create Habits.pdfmneves5
 
Stu Hirst - Imposter Syndrome 2024 - Presented at Cloud Expo Europe (Cyber Ke...
Stu Hirst - Imposter Syndrome 2024 - Presented at Cloud Expo Europe (Cyber Ke...Stu Hirst - Imposter Syndrome 2024 - Presented at Cloud Expo Europe (Cyber Ke...
Stu Hirst - Imposter Syndrome 2024 - Presented at Cloud Expo Europe (Cyber Ke...Stu Hirst
 
Be Our Guest - Rotaract Club of Paramaribo 2024
Be Our Guest - Rotaract Club of Paramaribo 2024Be Our Guest - Rotaract Club of Paramaribo 2024
Be Our Guest - Rotaract Club of Paramaribo 2024Jean-luc van Charante
 

Recently uploaded (6)

TC_Philosophy_Report_by_BSCrim.4-A2023--
TC_Philosophy_Report_by_BSCrim.4-A2023--TC_Philosophy_Report_by_BSCrim.4-A2023--
TC_Philosophy_Report_by_BSCrim.4-A2023--
 
Purposive Communication lesson8 application letter
Purposive Communication lesson8 application letterPurposive Communication lesson8 application letter
Purposive Communication lesson8 application letter
 
7 tips to help you become a Supercommunicator
7 tips to help you become a Supercommunicator7 tips to help you become a Supercommunicator
7 tips to help you become a Supercommunicator
 
Warp Speed Habits: A Brain Based Roadmap to Create Habits.pdf
Warp Speed Habits: A Brain Based Roadmap to Create Habits.pdfWarp Speed Habits: A Brain Based Roadmap to Create Habits.pdf
Warp Speed Habits: A Brain Based Roadmap to Create Habits.pdf
 
Stu Hirst - Imposter Syndrome 2024 - Presented at Cloud Expo Europe (Cyber Ke...
Stu Hirst - Imposter Syndrome 2024 - Presented at Cloud Expo Europe (Cyber Ke...Stu Hirst - Imposter Syndrome 2024 - Presented at Cloud Expo Europe (Cyber Ke...
Stu Hirst - Imposter Syndrome 2024 - Presented at Cloud Expo Europe (Cyber Ke...
 
Be Our Guest - Rotaract Club of Paramaribo 2024
Be Our Guest - Rotaract Club of Paramaribo 2024Be Our Guest - Rotaract Club of Paramaribo 2024
Be Our Guest - Rotaract Club of Paramaribo 2024
 

How to design a Passive Infrared (PIR) Open Source Project

  • 1. Published on Your Electronics Open Source (http://dev.emcelettronica.com) Home > My blog > Contenuti How to design a Passive Infrared (PIR) By Ionela Created May 12 2009 - 10:10 This article details the hardware and software required for a fully functional passive infrared (PIR) sensor with an associated remote control unit. The remote control unit adjusts key algorithm detection parameters which are stored in the MC68HC908JK1/3 FLASH memory area. The PIR sensor is mounted behind a Fresnel lens. The output signal from the sensor is amplified and conditioned by two elements of an operational amplifier, before being connected directly to an analog-to- digital (A/D) channel of the microcontroller (MCU) which is the conventional analog approach. Alternatively, it may be AC coupled to the input of the microcontroller via an R/C network which forms the basis for the alternative Delta Sigma method of detection. The intruder detect output is a signal that is used to indicate to the PIR units parent system that a valid intruder event has been detected. In this application, a light- emitting diode (LED) is used to indicate an alarm condition. Normally, this is an alarm trigger device, such as a relay, transistor, etc. Features Features of the PIR include: ? Infrared (IR) communications with 38 kHz tx being bit bashed and rx via the timer capture interrupt ? RS232 tx communications, bit bashed at 38,400 bit rate ? FLASH self-erase/program/verification using Motorola monitor routines ? Analog initialization/read ? Intruder detect using analog buffer scan or Delta Sigma algorithms Using a low-cost microcontroller (MCU) like the MC68HC908JK1/3 has many advantages compared to an analog sensor circuit since the MCU can apply real-time intelligence to the sensor data it is receiving. This intelligence forms the heart of the intruder detection algorithm; the advantage is increased by the ability of the user to modify key algorithm parameters, which are stored in FLASH memory. The FLASH memory parameters are adjusted by 2-way infrared communications using a REMOTE unit. The use of an MCU also provides the designer with an alternative method of sensor amplification, which employs considerably
  • 2. fewer components than the op-amp approach.
  • 3. One of the most important factors to consider when designing intruder alarm systems is that they should offer good sensitivity combined with a high immunity to false alarms. Pyrolytic sensors used in PIR alarm systems deliver a very low amplitude output, which is proportional to changes in incident infrared radiation falling on them. Traditionally, a multi-stage amplification has been used to condition the sensor output to provide a usable output signal. Source Code (Abstract) //////////// // main() // //////////// void main( void ) { MicroStartUp(); while( 1 ) { STOP(); ServiceWatchDog(); //////////////////////////////////////////////////////////// // by virtue of the fact that we have got to this part of // // the software a KEYBOARD interrupt must have ?fired?. // //////////////////////////////////////////////////////////// Initialise908GP32(); if ( GetPirPassword() ) { do { ServiceWatchDog(); ReadButtons(); IRCommsCheck(); RS232CommsCheck(); ModeCheck(); //////////////////////// // 10ms do-while sync // //////////////////////// while ( !flags1.bit._10MS_LOOP ); flags1.bit._10MS_LOOP = 0;} while ( ++stop_counter After every analog read/store operation a magnitude difference test is performed w
  • 4. Programming procedure 1. Ensure that the VDD switch is Off. 2. Ensure that the 20-pin socket is occupied. 3. Ensure that a standard 9-way RS232 cable is connected from the PC to the development board?s Programmer RS232 connector. 4. Set the Osc Select switch to Program. 5. Set VDD switch to On. 6. Invoke c:pemicroics08jlzprog08sz.exe (assuming default installation directory). 7. After programming is complete, set the VDD switch to Off and move the Osc Select switch from Program to Run. Note: The PIR MC68HC908JK1/3 programming is in-circuit, there is no separate programming socket. PIR Unit Bill of Materials Resistors R1 1k R2 10k R3 47k R4 10M R5 10R R6 680R R7 10k R8 100k R9 47k R10 100k R11 100k R12 470R R13 2k2 R14 10k R15 10k R16 10k R17 10k R18 470R R19 680R R20 10k R40 3M3 R42 10k R44 10k R45 47k R46 3M3 R47 680k R48 4k7 Miscellaneous SW1 SPCO slide switch
  • 5. SW2 SPCO slide switch SW3 SPCO slide switch X1 4MHz resonator XT1 9.8304MHz Oscillator Module FR1 Curtain? Fresnel lens IR1 GP1U28Q J1 9 way rt angle male ?D? Connector J2 ?3pin 0.1?? header? J3 ?3pin 0.1?? header? J4 9 way rt angle male ?D? Connector J5 3pin PIR Connector J6 1.2mm LED1 Infra Red transmitter LED2 5mm Red LED3 5mm Yellow LED4 5mm Green Capacitors C1 100nF 50V DC C2 100nF 50V DC C3 220uF 16V DC C4 470uF 25V DC C5 100nF 50V DC C6 100nF 50V DC C7 100nF 50V DC C8 100nF 50V DC C9 100nF 50V DC C10 100nF 50V DC C11 3nF3 50V DC C12 100nF 50V DC C13 220µF 16V DC C14 100nF 50V DC C15 33µF 10V Tantalum C16 10µF 16V DC C17 10µF 16V DC C19 100nF 50V DC C20 10nF 50V DC C21 22µF 16V DC C23 10µF 16V DC Semiconductors D1 BAS16 D2 BAS16 D3 BAS16 D4 BAS16 D5 5V1 IC1 MC68HC908JK3
  • 6. IC2 LM7805 IC3 MAX232 IC4 74HC125D IC5 LM324D Q1 BC818-40 Q2 BC850 Q3 BC850 Q4 BC850 The PIR unit is based upon the MC68HC908JK1/3, these are 1536-bytes/4096-byte FLASH microcontrollers, the ?9? in the part number denotes the part as being a FLASH device. The minimum size FLASH memory that can be erased at one time is 64 bytes and the maximum size FLASH memory that can be programmed at one time is 32 bytes (row). This reference design uses the last 64-byte block of the user code space as a 32-byte nonvolatile data store. This feature alleviates the need for an external memory IC such as an 8-pin 2-wire I2C type. CONTACT REQUEST If you want to know more about this Freescale product, please submit your request to Arrow Italy using this form [1]. NOTE: this form is valid ONLY for Companies or Customers based in Italy and working in the Italian area. Read the Italian version: Come progettare un sensore infrarosso (PIR) [2] Source: Passive Infra Red (PIR) for Security Peripherals [3] HowTo passive infrared pir Trademarks Source URL: http://dev.emcelettronica.com/how-to-design-passive-infrared-pir Links: [1] http://it.emcelettronica.com/contact/freescale [2] http://it.emcelettronica.com/come-progettare-un-sensore-infrarosso-pir [3] http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=RD68HC08PIR