Passive Infrared (PIR) Motion Sensor

The post discuses the pinout details of the standard passive infrared (PIR) sensor RE200B and also explains how to make a motion detector circuit using a single transistor and relay, which can detect the IR radiation from human body and activate the attached relay.

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.

The image shows a typical PIR sensor pin out 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:


Passive Infrared Sensor Device RE200B pinout diagram


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.

PIR sensor pull down resistor connection

Making a Practical PIR Sensor Based Human Movement Detector Circuit


PIR opamp amplifier circuit


In the above section we learned the datasheet and the pinouts of a standard PIR sensor now lets' move on and study a simple application for the same:

The PIR circuit diagram for sensing moving objects 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 100uF/25V makes sure that the relay remains ON even after the PIR is deactivated possibly due the exit of the radiation source.

The PIR device should be suitably enclosed inside a Fresnel lens cover so that its efficiency is adequately enhanced.

PIR Circuit using a Single Transistor


The following post explains a simple PIR human detector relay circuit which can be used for activating lights only in the presence of a human, thus saving precious electric power.

Written and Tested By: SSkopparthy

How it Works


Here is a simple circuit that activates a relay 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.

PIR relay operation


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:

object is detected by the sensor, it produces a small signal voltage(usually 3.3 volts)

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

HC-SR501 Pinouts

PIR Sensor Front View:


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

  1. Working voltage range: 4.5VDC to 12VDC.

  2. Current Drain: <60uA

  3. Voltage output: 3.3V TTL

  4. Detection distance: 3 to 7 metres(can be adjusted)

  5. 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.

PIR relay cabinet fitting installation


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.

PIR prototype connection load wiring


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

PIR moving human detector design is intended to be used with an alarm

Industrial Application


The post illustrates 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 for industrial application cylinder up down control


Need Help? Please send your queries through Comments for quick replies! And please Bookmark my site :)




Comments

M DAVID said…
Hello sir.I'm connecting the pir sensor to 12v battery and immediately gives 3.3v at output while testing it alone and I'm connecting pir and it immediately gives output to switch relay.what is problem of the sensor?Can i collect it?please answer me i want to do it faster.
Swag said…
Hello David, A PiR sensor is designed to detect IR waves from human presence, so while connecting the device it might be detecting the IR from your hand or body and getting activated, you must ignore the initial switch ON and connect it normally, once connected you may get aside from its sensing zone and then you may see the relay switching OFF
dodong said…
PIR particularly the hc-sr501 has an initialization period. Its output goes high upon connecting to a power source and remains high depending on the duration set via the onboard potentiometer. In my observation if you set the pot for longer duration, the initialization and output becomes high for several minutes and then will enter standby mode. BY the way sir swag can you help me how to set up two pir sensor to drive a single relay? Thanks!
Swag said…
Thanks dodong for the information, appreciate it!.

Driving a single relay through two PIRs is actually very easy, you just have to modify the diagram shown in the following article by connecting the OUT pins of the two PIR though separate 1N4148 diodes with the 1K end of the transistor base resistor. The +/- pins of the PIRs can be connected with the supply lines of the circuit:

https://www.homemade-circuits.com/automatic-pir-controlled-fan-circuit/

Contact me for Customized Circuits

Name

Email *

Message *


 Follow on G+  Follow on Facebook   Follow on Tweeter  Follow on G+  Follow on G+

Follow Homemade Circuits