A PIR motion sensor alarm is a device which detects the infrared radiation from a moving human body and triggers an an audible alarm.
In this post I have explained 5 simple motion detector circuits using op amp and transistor. We also discuss the pinout details of the standard passive infrared (PIR) sensor RE200B.
We will Learn:
- How to use a PIR sensor device to Detect human body infrared.
- How to use a PIR module as a Security Burglar Alarm Circuit
- How to use a PIR to switch ON lights when a human presence is detected.
- How to apply a PIR to detect an object in industrial applications
The first circuit uses an op amp, while the second design works with a single transistor and relay for detecting the IR radiation from a moving human body and activating the a relay activated alarm.
What is a PIR
PIR is the acronym for Passive Infra Red. The term "passive" indicates that the sensor does not actively take part in the process, meaning it does not itself emit the referred infra red signals, rather passively detects infrared radiations emanating from warm blooded animal in the vicinity.
The detected radiations are converted into an electrical charge proportional to the detected level of the radiation. This charge is then further enhanced by the built-in FET and fed to the output pin of the device which becomes applicable to an external circuit for further amplification and for triggering the alarm stages.
PIR Pinout Details
The image shows a typical PIR sensor pinout diagram. It's quite simple to understand the pinouts and one may easily configure them into a working circuit with the help of the following points:
As indicated in the following diagram, PIN#3 of the sensor should be connected to the ground or the negative rail of the supply.
Pin#1 which corresponds to the "drain" terminal of the dvice should be connected to the positive supply, which must be ideally a 5V DC.
And pin#2 which corresponds to the "source" lead of the sensor must be connected to ground via a 47K or 100K resistor. This pin also becomes the output pin out of the device and the detected infrared signal is carried forward to an amplifier from pin#2 of the sensor.
1) PIR Human Movement Detector Circuit using Op Amp
In the above section I have explained the datasheet and the pinouts of a standard PIR sensor now lets' move on and study a simple application for the same:
The first PIR circuit diagram for sensing moving humans is shown above. A practical implementation of the explained pin-out details can be witnessed here.
In the presence of a human IR radiation, the sensor detects the radiations and instantly converts it into minute electrical pulses, enough to trigger the transistor into conduction, making its collector go low.
The IC 741 has been set up as a comparator where its pin#3 is assigned as the reference input while pin#2 as the sensing input.
The moment the collector of the transistor goes low, the potential at pin#2 of the 741 IC becomes lower than the potential at pin#3. This instantly makes the output of the IC high, triggering the relay driver stage consisting of the another BC547 transistor and a relay.
The relay activates and switches ON the connected alarm device.
The capacitor 100 uF/25 V makes sure that the relay remains ON even after the PIR is deactivated possibly due the exit of the radiation source.
The PIR device discussed above is actually a core sensor and can be extremely sensitive and difficult to optimize. In order to stabilize its sensitivity the sensor should be suitably enclosed inside a Fresnel lens cover, this will additionally enhance the radial range of the detection.
If you are unsure about using an uncovered PIR device, you can simply go for a readymade PIR module with a lens and other enhancements, as described below.
2) PIR Motion Detector and Security Alarm Circuit
The following PIR motion sensor circuit can be easily built using the following basic set up and applied as a anti-theft alarm circuit.
As the figure shows, the PIR only requires a single 1K resistor, transistor and a relay to be configured externally. The siren can be either built at home or purchased ready made.
The 12v supply can be from any ordinary 12V 1 amp SMP circuit.
Video Demo
3) Human Presence Detector using Two PIR Modules
The above explained PIR motion detector circuit can be also built using 2 PIR sensors in parallel for a 360 degree human presence detection.
This idea was tried and tested successfully by Mr. V.
Th device was installed above one of the door entrances for illuminating the passage automatically whenever a human approach was detected by the PIR sensors.
The following amazing circuit diagram and the tested prototype images were contributed by Mr. V.
Let's have a look at them.
How to increase the Range of the PIR
The following information was sent by Mr. V. Hope this will help the users to adjust the range of the PIR to its maximum capacity.
Just this bit of info, I was playing around with the PIR Sensitivity Potentiometer and I realized it practically that if you turn the adjustment clockwise the sensitivity & Range increases, unlike what is given in the product description, it says turn Counterclockwise for max sensitivity. I tried it gradually in different positions & with it turned to about the 3 O’clock position, clockwise I get a Range of about 16 feet. I did not go max.
However the PIR should not be in an area with very bright light as it becomes unstable, it should be guarded or shaded from bright light.
Hope this was helpful,I did a check on 5 pieces & all responded the same way, I was very disappointed with the Range earlier now I’m happy. The timer pot is good, keeps to time set.
4) Another Simple PIR Based Alarm Circuit
The fourth idea below explains a simple PIR motion detector alarm circuit which can be used for activating lights or an alarm signal, only in the presence of a human or an intruder.
How it Works
Here is a simple circuit that activates a relay alarm when a living being (a human) is detected by the PIR sensor. Here PIR stands for Passive Infrared sensor. It doesn’t produce any infrared radiations to detect the presence of a living being but on the other hand it detects the infrared radiations released by them.
This circuit uses a HC-SR501 IC which is the heart of the circuit. Initially when the moving object is detected by the sensor, it produces a small signal voltage(usually 3.3 volts) which is fed to the base of the transistor BC547 through a current control resistor and hence, its output goes high and it switches the relay on.
A more Comprehensive Diagram can be Visualized below:
Relay Wiring
This relay can be configured to be used with a electrical bulb or a tubelight, night lamp or anything else that works on 220VAC.
This circuit is mostly used in gardens, so that at night, when we go for a walk in the garden, the circuit switches on a light automatically and it remains lit until we are in the sensor’s vicinity and it gets turned off when we move away from that place and hence reducing the electricity costs.
Here’s a back view of the sensor HC-SR501…
HC-SR501 Pinouts
PIR Sensor Front View:
The sensor consists of two preset resistors which can be used to control the delay time and sensing range.
The delay potentiometer can be adjusted to decide the time for which light remains on.
The sensor when purchased, it comes with the default mode ‘H’ which means that the circuit switches on the light when somebody moves within the zone and it remains on for preset time and after the preset time lapses, if the sensor could still detect motion, it does not switch the light off in the absence of a moving target, it switches off the light.
Here are the technical details of the sensor HC-SR501
- Working voltage range: 4.5VDC to 12VDC.
- Current Drain: <60uA
- Voltage output: 3.3V TTL
- Detection distance: 3 to 7 metres(can be adjusted)
- Delay time: 5 to 200 seconds(can be adjusted)
One of the disadvantages PIR sensors is that its output goes high even when a rat or a dog or some other animal moves in front of it and it switches on light unnecessarily.
In cold countries, the sensor’s sensing range increases. Due to low temperature, infrared radiations released by humans travel more distances and hence causing unnecessary switching of lights.
If installed in backyards, there are chances of activating of light when a car passes by because the radiations emitted by hot engine of car fools the sensor.
PARTS LIST:
- D1, D2 - 1N4007,
- C1- 1000uf, 25V,
- Q1 - BC547,
- R1 - 10K,
- R2 - 1K,
- L1 - LED(green)
- RY1 - Relay 12V
- T1 – Transformer 0-12V.
After completing the construction of the circuit, enclose it in a suitable casing and use a separate casing for the sensor and connect the sensor to circuit using long wires so that you can place sensor at the place you wish like in a garden and circuit will be inside so that the circuit is protected from weather.
And remember to use a separate PCB for relay.
Also, don’t forget to use a suitable relay with correct current and voltage rating. You can use a terminal block which connects to the relay’s switching contacts, and arrange it as shown in image so that you can change the electrical device connected to relay contacts easily.
Usage of this sensors save electricity to great extents. It could reduce your electricity bills too!
“PLEASE SAVE THE POWER FOR THE NEXT HOUR!”
If the above PIR moving human detector design is intended to be used with an alarm and a lamp such that both the loads operate during night but the alarm only during day, then the diagram may be modified in the following manner. The idea was suggested by Mr. Manjunath
5) Industrial Application
The 5th circuit diagram below shows an industrial motion sensor circuit using a couple of LDRs, an IC and a few other passive components. The circuit senses the movement of a cylinder illuminating the appropriate LEDs for the required detection. The idea was requested by Mr.Hasnain.
Technical Specifications
I have sent you request on Google account, i am not sure that you got my messages or not, so i am sending you my problem here again, please help me out i shall be very thankful to you, i hope you will understand my problem and solve it...
sir it is related to motion sensing, and i have no knowledge about sensors, that which type i should use..problem : there are two levels, ( level means height), level A, and level B. height A > height B.i want to use sensors at these levels, so from now i will say sensor A and sensor B..
i have two indication lights RED and GREEN there is a cylinder that moves from up to down and then down to up and so on..first it will move from up to down and will come in front of sensor A.
( at this time RED light should turn ON and GREEN turn OFF) and moving downward cylinder will come in front of sensor B.
( this should make no difference, i,e RED should remain ON, and GREEN should remain OFF ).
then cylinder will start moving upward, first it will move away from sensor B.
( at this time RED should turn OFF and GREEN turn ON), then moving upward cylinder will move away from sensor A,
( this should make no difference. i,e RED should remain OFF and GREEN should remain ON)..then again repeat.
The Circuit Design
The proposed idea is quite straightforward and can be understood with the following points:
When power is switched ON, the IC is reset through the 0.1uF capacitor ensuring the green LED illuminates first.
At this position both the sensors sensorA (LDR1) and sensorB (LDR2) are able to receive the lights from the relevant laser beams focused at them.LDR1 switches ON BC547 transistor while LDR2 does the same for BC557 and keeps it triggered.
Due the above actions the transistor BC557 passes the supply voltage to pin#14 of the IC. However since LDR1 ad BC547 are also conducting this potential gets grounded, and the net potential at pin#14 remains at logic low or zero.
Now as the cylinder lowers and comes in front of LDR1, it blocks the beam making LDR1 resistance high, shutting OFF BC547.
This allows the voltage from the BC557 to hit pin#14 producing a forward sequence at the output of IC which results in illuminating the red LED and shutting off green LED.
The cylinder continues its downward motion and comes in front of LDR2 blocking its beam and lowering its resistance, this stops the transistor from conducting such that the potential at pin#14 of the IC is again switched back to zero, however this action does not effect the IC since it's specified to respond only to positive pulses.
Next, the cylinders reverts and starts moving upwards and in the course unblocks the LDR2 beam allowing the BC557 to conduct, and yet again the positive pulse from the transistor is allowed to hit the IC pin#14 resulting in the restoration of the previous situation i.e. now green LED illuminates and the RED shuts off.As the cylinder moves past LDR1, BC547 also switches ON, but produces no effect due to the same reasons as explained above.
The above motion detection cycle keeps repeating in response to the specified cylinder movement.
Circuit Diagram
PIR Security Alarm with Delay Effect
When the PIR is triggered, the BC547 switches ON which in turn prompts the TIP127 to switch ON. However, due to the presence of the 220uF capacitor the base emitter voltage of this PNP transistor is unable to attain the required 0.7V quickly, and the LED does not light up until the 220uF is fully charged.
When the PIR is switched OFF, the 220uF is able to quickly discharge through the 56K resistor, rendering the circuit in a standby position quickly. The 1N4148 diode ensures that the circuit works only as a delay ON PIR circuit and not as a delay OFF.