The circuit diagram is quite simple. I have powered my circuit with 4 AA batteries that gives 6 V supply.A diode is used in series to drop the voltage down to 5.4 V as the operating voltage for the PIC microcontroller should be below 5.5 V. Besides, the diode also provides the protection to the circuit in case of reverse polarity of the power supply. I have tested the circuit with NI-MH rechargeable batteries (that gives 4.8 V) and it worked, but I recommend to use the alkaline batteries (1.5 V each) for better performance. You can also use a 9 V battery but then you need a LM7805 regulator IC in your circuit.
The output of the PIR sensor module is monitored through GP5 (pin 2) of PIC12F635. When the motion is sensed, this output is high at about 3.3 V (my sensor module has a 3.3V regulator IC on board). You could still use this voltage as a valid logic high for PIC12F635, but I preferred to use this voltage to drive the base of an NPN transistor (BC547) so that at the collector we will have the full swing of the logic voltages. Now, the microcontroller monitors the voltage at the collector of the transistor. During the normal condition, the transistor is cut off, and the collector output is at logic high (+5 V). When the motion is sensed, the high output from the sensor module saturates the transistor and the voltage at the collector drops down to logic low. The jumper selection for trigger is at H position, so the sensor output will remain active as long as the motion exists. Note that the PIC12F635 microcontroller uses the internal clock oscillator at 4.0 MHz. The MCLR function is disabled and WDT is OFF in this project.
PIR SENSOR MODULE: DATASHEET,PRICE
PIR SENSOR MOTION SENSOR TO OPERATE ARELAY
Pyroelectric sensor module,developed for human body detection. A PIR detector combined with a fresnel lens are mounted on a compact size PCB together with an analog IC (SB0061) and limited components to form the module. High level output (3.3V) of pre-settable variable width (5Secs -18 Minutes) is provided.
Circuit diagram of the PIR Motion Sensor Light and Switch based on SB0061 shown here can be used for security or corridor lighting in power saving mode. The 12V DC supply required for the whole circuit can be fed from any standard 12V ac mains adaptor/battery.Working of the circuit is simple and straight forward. When any movement is detected within near 5-6 metres, around 3.3 Volt is appeared at the base of Transistor T1 and it conducts to fire the next relay driver transistor T2. As a result, the 12V DPDT relay is energised to power the White LED through current limiting resistor R3. Spare relay contacts can be used as a switch to control any suitable external load. The white LED and the relay remains ON for a duration based on the mono time setting in SB0061, ie from 5 Secs to 18 Minutes.
PIR SENSOR MODULE:
- Complete with PIR, Motion Detection IC and Fresnel Lens
- Dual Element Sensor with Low Noise and High Sensitivity
- Supply Voltage: 5-20Vdc
- Delay Time Adjustable: 5 seconds to 18 Minutes
- Standard TTL Output
- Module Dimensions: 28mm Length, 38mm Width, 40mm Height
ABOVE CIRCUITS WORK FINE ,I HAVE MADE THEM..