Summary of MOTION SENSOR USING PIR SENSOR MODULE WITH PIC MICROCONTROLLER AND WITHOUT MICROCONTROLLER
The article describes a simple motion-detection circuit using a PIR sensor module and a PIC12F635 microcontroller powered by four AA batteries (6 V) with a series diode to drop to ~5.4 V and provide reverse-polarity protection. The PIR module outputs about 3.3 V; this drives a BC547 NPN transistor whose collector is read by the PIC. With no motion the collector is at +5 V; when motion is detected the transistor saturates and the collector goes low. PIC12F635 runs on its internal 4 MHz oscillator with MCLR disabled and WDT off.
Parts used in the Motion Sensor Using PIR Sensor Module with PIC Microcontroller:
- 4 AA batteries (recommended alkaline)
- Diode (series for voltage drop and reverse polarity protection)
- PIC12F635 microcontroller
- PIR sensor module (pyroelectric sensor with Fresnel lens and SB0061 analog IC)
- NPN transistor BC547
- LM7805 regulator IC (optional if using 9 V battery)
- Jumper for trigger selection (H position)
- What supply voltage is used for the circuit?
The circuit is powered by four AA batteries giving 6 V, with a series diode dropping it to about 5.4 V for the PIC. - Why is a diode used in series with the battery supply?
The diode drops the voltage to about 5.4 V to keep PIC operating below 5.5 V and provides reverse polarity protection. - Can rechargeable NiMH batteries be used?
Yes, the author tested NiMH rechargeable batteries (4.8 V) and it worked, though alkaline cells are recommended for better performance. - How is a 9 V battery accommodated?
If using a 9 V battery you need an LM7805 regulator IC in the circuit. - What voltage does the PIR sensor module output when motion is detected?
The PIR sensor module provides a high output of about 3.3 V when motion is sensed. - How is the PIR output interfaced to the PIC?
The 3.3 V PIR output drives the base of a BC547 transistor; the PIC monitors the transistor collector for full logic swing. - What is the collector voltage behavior with and without motion?
During normal condition the transistor is off and the collector is at logic high (+5 V); when motion is sensed the transistor saturates and the collector drops to logic low. - Which PIC pin monitors the PIR output?
The PIR-derived signal is monitored through GP5 (pin 2) of the PIC12F635. - What PIC oscillator and configuration are used?
The PIC12F635 uses its internal 4.0 MHz oscillator; MCLR is disabled and the watchdog timer is off. - What adjustable output timing does the PIR module provide?
The PIR module provides a pre-settable high-level output pulse width adjustable from about 5 seconds to 18 minutes.