This page is about using a PIR (Passive Infrared) Motion sensor to trigger an alarm using an Arduino compatible MCU board called- Gemma, created by Adafruit part no. 1528-1297-ND
PIR sensors are triggered by changes in heat radiated from our bodies or other energy source by comparing the difference between the heat source and surrounding area. An amplifier and ASIC are used in the Panasonic brand to make detection almost like a Schmitt trigger effect and easy to interface to any microcontroller. There is a plastic Fresnel lens on each PIR sensor to enable detection of various zoned areas.
The diagram below shows the timing of the PIR sensor from power up where there is a bit of a delay before the sensor stabilizes and is ready for detection (~15 seconds by my testing)
Circuit operation: When the PIR sensor detects a heat change, the signal pin, rises to a high voltage, when the MCU is polling for a high input, uses the true condition to turn on another pin (D2 below), which turns on the audio alarm (note that the alarm operates off of DC and has it's own pulsing circuit). At almost the same time, pin D1 brings in a series of pulses (set up by the Adafruit NEOPIXEL include library) to help flash the 16 LEDs red. This creates a loud, irritating and bright flashing red lights- perfect for scaring or alarming someone for a special purpose. Panasonic PIR Motion Sensors Datasheet Link.
This alarm project was created with the following part numbers from Digi-Key:
- 255-3075-ND - PIR motion sensor
- 458-1526-ND - Audio Alarm
- 1528-1093-ND - NEOPIXEL 16 ring shape
- 1528-1297-ND - Gemma - small wearable MCU
- MTP3055VLFS-ND - MOSFET
- L7805CV - 5 Volt regulator
- EG2350-ND - Toggle Switch
- EJ501B-ND - Panel mount 2.5 mm power jack
- 1528-1101-ND - Perf board
- 102-3432-ND - 12 volt wall transformer
- SRW032-WB-ND - Box/ housing for components
- 1N4001 - Diode 50V 1A
- 1.0KQBK-ND - 1K ohm axial leaded resistor
- 10KQBK-ND - 10K ohm axial leaded reistor
- 399-13742-1-ND - 0.33uf ceramic capacitor
- 399-9870-1-ND - 0.1uF ceramic capacitor
- 1528-1743-ND - hookup wire kit
- Arduino IDE - code for this project is listed below.
Questions or comments please email me at firstname.lastname@example.org