• Skip to main content
  • Skip to primary sidebar

Homemade Circuit Projects

Get free circuit help 24/7

New Projects | Privacy Policy | About us | Contact | Disclaimer | Copyright | Videos | Circuits for Beginners | Basic Circuits | Hobby Projects | Transistor Circuits | LED Drivers 

You are here: Home / Sensors and Detectors / 5 Simple Motion Detector Circuits using PIR

5 Simple Motion Detector Circuits using PIR

Last Updated on July 15, 2022 by Swagatam 103 Comments

caution electricity can be dangerous

A PIR motion sensor alarm is a device which detects the infrared radiation from a moving human body and triggers an an audible alarm.

The post discuses 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:

  1. How to use a PIR sensor device to Detect human body infrared.
  2. How to use a PIR module as a Security Burglar Alarm Circuit
  3. How to use a PIR to switch ON lights when a human presence is detected.
  4. 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:

actual PIR device pinout and internal details

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.

how to connect PIR pins with circuit Vdd, Vss, output

1) PIR Human Movement Detector Circuit using Op Amp

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

PIR motion sensor security anti-theft security 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.

single transistor PIR relay activate circuit

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:

PIC motion sensor circuit using one transistor

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 module preset adjustments details

PIR Sensor Front View:

PIR module actual image with fresnel lens

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.
tested prototype image of PIR motion circuit

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.

relay arrangement for PIR sensor

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

LDR controlled PIR

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 motion sensor for industrial machine control

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.

PIR with delay ON alarm

You'll also like:

  • 1.  How to Measure Gain (β) of a BJT
  • 2.  Make this Touch free Faucet Circuit for Hands-free Tap Control
  • 3.  PIR Sensor Datasheet, Pinout Specifications, Working
  • 4.  Make this IR Remote Control Range Extender Circuit
  • 5.  Infrared (IR) Motor Remote Control Circuit
  • 6.  Make this Thermo-Touch Operated Switch Circuit

About Swagatam

I am an electronic engineer (dipIETE ), hobbyist, inventor, schematic/PCB designer, manufacturer. I am also the founder of the website: https://www.homemade-circuits.com/, where I love sharing my innovative circuit ideas and tutorials.
If you have any circuit related query, you may interact through comments, I'll be most happy to help!

Reader Interactions

Comments

    Have Questions? Please post your comments below for quick replies! Comments should be related to the above artcile Cancel reply

    Your email address will not be published. Required fields are marked *

  1. MAHMOUDI says

    December 21, 2022

    Très fantastique. Merci infiniment pour tes efforts. Ahmed du Maroc

    Reply
    • Swagatam says

      December 21, 2022

      You are most welcome!

      Reply
  2. K.chuma says

    September 23, 2022

    Your tutorial is fantastic.i enjoyed the PIR circuits detailed diagrams

    Reply
    • Swagatam says

      September 23, 2022

      Thank you!!! Glad you found it helpful.

      Reply
  3. dj vicky says

    July 26, 2022

    where can i find a li-ion battery charger circuit
    12 volt dc battery
    5 to 8 amp charging with auto cutt off

    Reply
    • Swagatam says

      July 26, 2022

      You can refer to the last relay circuit from the following article. Replace the relay with a 12V relay, and use a supply Dc that suits your battery.

      https://www.homemade-circuits.com/usb-automatic-li-ion-battery-charger/

      Reply
  4. Emmanuel says

    May 20, 2022

    Dear Mr. Swagatam,
    Thank you so much for these innovative tutorials. I’ve a critical interest ( obsession) in electricity. I want to learn from the scratch. May you please give me your contact WhatsApp or. And also I was wondering that from where do you get those electric circuit components, I meant , for instance, Like the resistors, PIR, LED etc.

    Many Thanks, your response has been appreciated very much!

    Reply
    • Swagatam says

      May 20, 2022

      Thank you Emmanuel,

      I understand your requirement. If you have any queries or doubts you an ask them through comments, I will try to solve them for you.

      Reply
  5. ray says

    May 2, 2022

    i want to build a water drinking bowl for my dog where water will flow in the bowl when she approach the bowl. my vision is for the small fountain supplying water will start and stop after may be 5 seconds (adjustable) of approaching. good enough to give something to drink.

    Reply
    • Swagatam says

      May 3, 2022

      You can use the following idea, but I wouldn’t recommend an external delay feature because the PIR module itself has a delay adjustment feature. The relay contacts can be configured with a 12V water tap solenoid.

      Reply
  6. Douglas Bair says

    December 3, 2021

    Hello, I am looking for information regarding the HC-SR501 circuit board. There are 2 places that have
    1/10th inch spaced plated solder through holes. I didn’t find any label markings related to them except the shape of the copper around the holes, the square and round. I am guessing they might be for an LED. Any guidance or reference about these might be helpful and appreciated
    Thanks, Doug

    Reply
    • Swagatam says

      December 3, 2021

      Hello, I don’t think the board includes an LED. You can refer to the last diagram from the following article which shows a similar design, you can compare your PCB track layout with this design and try to figure out the exact purpose of those pads.

      https://www.homemade-circuits.com/pir-sensor-datasheet-pinout-specification-working/

      Reply
  7. Kostas says

    November 2, 2021

    I tried to make the first one on breadboard with the pir D203S but it didn’t work.
    Maybe I should change something e.g. resistances;

    Reply
    • Swagatam says

      November 3, 2021

      You can try the second diagram which is easier to implement.

      Reply
  8. Ravi says

    October 18, 2021

    Hello Swagatam. Thank you for all your work to teach us and answer everybody’s questions.
    I use trail cameras to photograph animals in the wild. I am wondering if it is possible to have pir a longer distance from the camera (maybe 20-50 meters)? I have built your circuit and conected it to one of my cameras and it works great. Now if I can just extend that connection?

    Thank you in advance Ravi G

    Reply
    • Swagatam says

      October 18, 2021

      Thank you Ravi, Glad you could built the circuit successfully! I am actually not very sure about the maximum range of a PIR, but you can probably try enhancing it by removing the fresnel lens from the PIR. This could make the device extremely sensitive and in turn increase its range to the desired levels.

      Reply
  9. Andrew says

    October 6, 2021

    Hi, I am working on a UVC LED disinfecting device that consist of 12 V DC fan, an led series/parallel array, and a constant power LED driver (Meanwell elgc-300-h-ab) with 110 AC input and default output of 5.6 A and constant current region output voltage of 29 V ~ 58 V rated for 256 W. The LED array consist of 28 LEDs rated for 9W each and max current of 0.8 A. My question is how I can include a PIR sensor to turn off the LEDs when it senses human motion for safety purposes. I would love to hear any ideas to help get me started, I don’t know how to go about wiring these components together, I would preferably like to create a device that requires a single receptacle plug in, therefore I might need more parts such as a relay or converter, perhaps it would be easier to use an AC PC fan, I have many uncertainties. please let me know if you can help in any way thank you!

    Reply
    • Swagatam says

      October 6, 2021

      Hi, I can help you with the PIR switching circuit. The design shown in 2) can be suitably modified and used for your application, as shown below:

      UVC LED controller using PIR motion sensor

      Reply
  10. stephen adams says

    October 3, 2021

    I have built the first circuit on your list.
    But I have found a problem with the sensor, it uses two sensors within and compares the two before putting out the difference on the output pin.
    So if you place a Infra Red Source in front of the sensor it sends out nothing, as both sensor see the same IR source, and the sensor is still balanced!
    You have to cover one of the sensor pads with plastic tape to get it unbalanced, i.e. comparing it with no IR signal, then it will react to a IR source and provide a output without any movement.
    Also the inputs to the OP amp have to be reversed, otherwise it turns OFF when the IR source is detected.
    Then you can detect a human hand or face with a sensitivity of nine inches to three feet.

    Reply
    • Swagatam says

      October 4, 2021

      The infrared source must move so that both the sensors inside the PIR can sense the movement and produce an alternating voltage at the output. If the source remains stationery the PIR cannot sense anything. Your suggestion is incorrect, PIR can never sense an IR if it is stationery. Either the source has to move or the PIR has to move, if both remain stationery, nothing will be detected.

      You cannot cover any part of the PIR.

      The op amp inputs are correctly configured so that the op amp output goes high when the PIR produces an AC pulse in response to a human movement. If you reverse the op amp input pins, the relay will be always ON and will be switched OFF only when a IR source is detected, which we don’t want.

      Reply
      • stephen adams says

        October 4, 2021

        Sorry your wrong, because I have done it!
        Covering up just one of the sensor windows produces an output when a IR source is stationary.
        No movement necessary to get an output.
        It also changes dependent on the distance between the sensor and the source. You can adjust the sensitivity using the potentiometer.

        Reply
        • Swagatam says

          October 4, 2021

          If what you are saying is true then why this is not implemented in all the PIRs? Why they have made the detection process so complex using two channels inside the lens? Why the manufactures have made it compulsory for the detection to happen only when the target is moving?

          Reply
          • stephen adams says

            October 4, 2021

            Because the main reason for having a PIR is to detect movement!
            It is then used in intrusion detection, street lights etc.
            But it does not work if the movement is vertical, or constantly in front of the sensors, as it only outputs an UNBALANCED voltage.
            I have sent this in as a suggestion to the company concerned, as I have seen on the internet a lot of failures of projects due to this problem, especially when trying to program a computer to recognise the output.
            It is currently NOT a PIR device, but a PDIR Passive Dynamic Ifra-Red device which relies on movement, not just IR.
            By using just one sensor you get what you want, an IR detector, giving you an output proportional to the strength of the incoming IR beam, no matter what direction it comes from (obviously this is effected by the design of the sensor at an angle).
            The sensitivity can be adjusted to operate an alarm at a certain distance, if you know the source of the IR. So it can be used to eliminate small animals for instance.

            Reply
            • Swagatam says

              October 4, 2021

              So does it mean your method will not detect a moving human being. If it will, then using the two sensing elements doesn’t make sense. The manufactures should have employed your method which looks much convenient and straightforward? It actually looks too good to be true. You must post a video on this, on Youtube.

              Reply
  11. Sead says

    September 7, 2021

    Hello,
    Can I get your email to contact you regarding one device?

    Reply
    • Swagatam says

      September 7, 2021

      Hello, You can discuss it here!

      Reply
  12. Ulise Aguilar says

    August 10, 2021

    good night sir Im looking for a wireless ac voltage detector , if can help

    Reply
    • Swagatam says

      August 10, 2021

      I will check it and let you know soon

      Reply
  13. SOUBHIK PAUL says

    August 2, 2021

    Dear Swagatam,
    I have tried differently in 2-3 ways constructing PIR motion sensor. all gave satisfactory results. But when temperature difference occurs due to wind flow it gives false alarm randomly. If you have any suggestion to overcome this problem, it will honour me.

    Reply
    • Swagatam says

      August 2, 2021

      Dear Soubhik, glad the circuits are working for you, however, that sounds strange, because the PIR might trigger ON only when there’s significant amount of difference in temperature around it. I have tested it with ceiling fan running at full speed, and did not see any such false triggering. You can try reducing the input supply to 5 V and check if that solves the problem. Use 12 V only for the relay separately.

      Reply
  14. Ryan says

    February 4, 2021

    Good day! Im just a student and i would like to ask about the circuit analysis of PIR Human Movement Detector Circuit using Op Amp. where does the comparator get it’s reference voltage? How does the op amp output trigger the alarm?

    Reply
    • Swagatam says

      February 4, 2021

      Hello, It is already explained in the article itself, under the diagram.

      Reply
      • Ryan says

        February 4, 2021

        I mean the specific value of reference voltage sir

        Reply
        • Swagatam says

          February 4, 2021

          Reference will need to be set by adjusting the 10k preset

          Reply
  15. Reuben Koren says

    December 6, 2020

    Creative and i have not published an depth analysis of PIR detectors and smoke detectors, if you are interested we can be in touch

    Reply
  16. koren reuben says

    December 6, 2020

    Why you do not use operative amplifiers, good results can be achieved and more

    Reply
  17. BillyRay says

    November 1, 2020

    Hello Swagatam,
    Just wanted to let you know, I have been scouring the internet looking for something that would work for an idea I have. I have been having problems with deer, raccoons and bear causing me problems. First, I looked for something that would already do what I had in mind. And, there are a few devices that deal with these animals, but nothing that did exactly what I had in mind. So, I decided to try and design a circuit that would help me. I know very little about electronics, but I knew what the circuit needed to do. I just couldn’t get it to work. Then, I came across your site, and after a couple of tries it worked. It is based on your circuit #2. When I get the final product, I will send you a video, so you can see what it does. I think you will find it interesting. Thanks again for your willingness to share your expertise and knowledge with guys like me.

    Reply
    • Swagatam says

      November 1, 2020

      Thanks Billy, I am glad the circuit helped you achieve the required results.
      You can certainly send the video to me, it will be a pleasure to watch how you succeeded with the project.

      Reply
      • BillyRay says

        November 6, 2020

        Hi Swag,
        I am having a hard. It works fine on breadboard. Not good on pcb. This was my first attempt at soldering on a pcb. Any recommendations on getting from breadboard to pcb? Are there any multimeter tests on the pcb that could isolate the problem? I can see myself going thru a number of pcb’s and components trying to get this right.

        Reply
        • Swagatam says

          November 6, 2020

          Hi Billy, Use the PIR Module with the transistor directly soldered on the PIR pin, and assemble the rest of the elements like the resistor, and the relay on the PCB, and check if that works.
          There are no crucial meter based troubleshooting tips for this project.

          Reply
  18. Andy Turner says

    October 30, 2020

    Hi Swag, I built the circuit as in the diagram right after “2) PIR Motion Detector and Security Alarm Circuit” but instead of a siren I have a night light.

    Is there an easy way to add components to make sure the circuit doesn’t get triggered in daylight and only at night ?

    Thanks in advance !

    Reply
    • Swagatam says

      October 30, 2020

      Hi Andy, it can be easily done, by adding the following circuit to your existing PIR circuit:

      PIR disable during daytime using LDR

      Reply
      • Swagatam says

        October 30, 2020

        …the transistor can be another BC547

        Reply
        • Andy says

          October 31, 2020

          Awesome Swag, thanks for your quick reply !

          Reply
          • Swagatam says

            October 31, 2020

            Glad to help, Andy!

            Reply
  19. Gerald Brown says

    September 21, 2020

    We have a UV-C lighting tower and would like to add a switching circuit that opens and delays restoring power to the lighting ballasts when humans (human body) are present to prevent exposure to the harmful UV-C rays. I would like to construct and install PIR sensors on the four sides of the tower. All the circuits I’ve seen depict the use of a single PIR sensor. Can four PIR sensors be connected in parallel with any one triggering the relay? Is there a diagram of such a device or can an isolation resistor or other device be used? Is there any such item available “off the shelf”? Thanks for all help and advice.

    Reply
    • Swagatam says

      September 21, 2020

      Yes you can use any number of PIR with a single drive circuit. You can apply the 2) concept, and connect all the PIRs in parallel using the following shown approach

      PIR pinout for parallel connection

      Please do the above shown wiring across all the PIR modules, and then connect the shown 1,2,3 points together in parallel. The 1. terminal common end associated with the 1k will go to the positive supply +12V, the 2. diode common end connections will go to the drive circuit input, and the 3. terminal common ends will join with the negative line of the supply.

      Reply
  20. Miguel says

    September 3, 2020

    Hey Swagatam,
    I still have an older hard copy of your PIR circuit for 1) with 5V, now I see you set it to 12V. Any good reason? Already buliding the 5V version…difficult to go to 12 now…
    Also, clicking on that picture, you get an image without the diode on pin 6 of the IC. Any reason for that or is it just an oversight?
    Many thanks!
    Miguel

    Reply
    • Swagatam says

      September 3, 2020

      Hey Miguel, Yes the diagram had some problems, I have corrected it now and have replaced it with a new one, please check it now.

      Reply
      • Miguel says

        September 3, 2020

        Many thanks, Swagatam!
        You now upgraded the IC voltage to 12V, an issue for me since I have all on 5V. What is the real reason 5V should not be used? If not recommended, could I use a DC-DC converter for the IC and leave the relay and PIR on 5V?
        Also, my PIR’s output is a series of pulses, so, since you are now not integrating them with a capacitor at the output of the IC as before, the relay will “see” these pulses. Why not leave the capacitor? The pulses are very short, so I doubt the relay will actually switch.
        Best regards

        Reply
        • Swagatam says

          September 4, 2020

          No problem Miguel. 5V can be also used, but 12V looks better since a 12V relay will consume 50% less current than a 5V relay and will be more economical.

          To ensure that the transistor does not get disturbed by the train pulse, you can simply add a 100uF/25V capacitor right across the base/emitter of the driver transistor.

          Reply
  21. Norman D Kelley says

    August 8, 2020

    Hi Swagatam,
    Ok, I tried your suggestion. It works! Sorry for misunderstanding your reply. I used the circuit you suggested and replaced the supply connection to the emitter of the PNP transistor T2 with the output of the PIR and removed the relay and connected the input trigger of the music chip to the collector of transistor T2. I used a 1M resistor for R2 and a 470uF capacitor for C2. R1, R3, and R4 remain the same as your circuit. I’m using 5v supply so I removed the 3.3v Zener Diode. I tried it with the Zener and it didn’t work. I may try it again as the timing is around 35 seconds. I’ll play with it some more before making the PCB. Breadboards are sometimes hard to work with as they sometimes give bad results due to loose connections. Anyway I am happy with the circuit. Thanks so much!

    Reply
    • Swagatam says

      August 8, 2020

      I am glad it worked Norman, please keep up the good work!

      Reply
  22. Norman D Kelley says

    August 8, 2020

    Hi Swagatam,
    Maybe I misunderstood your suggestion. In the example circuit T2 transistor is connected to the positive rail at its emitter and its collector is connected to relay coil which is connected to ground. Are you saying to replace the emitter connection with the output from the PIR and replace the collector connection with the trigger input of the music chip? If T2 will operate like this, it will probably work. I’ll try this and let you know.

    https://www.homemade-circuits.com/wp-content/uploads/2013/02/simpledelayONcircuit.png

    Reply
    • Swagatam says

      August 8, 2020

      Hi Norman, You actually understood it correctly. So if you want only the PIR output to delay, in that case you can simply disconnect the R2 end from the positive line, and connect it with the PIR OUT pin. And yes you should remove the emitter zener and replace it with a direct link.

      Reply
  23. Norman D Kelley says

    August 8, 2020

    That will work to delay the PIR but I only want to delay the PIR output. If I delay the power to the PIR, then when it does receive power, it will output immediately and act irrational for up to 60 seconds. That is what I am trying to avoid. I want to interrupt the output 3.3v signal for about 60 seconds. I am using the PIR signal to play an edge (trigger) activated music chip. When I first turn on the power switch, I do not want the chip to be activated. After about 60 seconds, the PIR will be settled in and will not be putting out a signal. When a human nears the PIR, it will activate and send a signal to the trigger of the music chip which will cause the music chip to play its music.
    I could use your suggested circuit to delay a relay for 60 seconds which would give the PIR the needed time to settle in. Once the delay period is over the relay contacts will be made and will be waiting for output from the PIR. This will work, but the relay takes up a lot of room on the PCB. Is there another way to interrupt the PIR output signal(similar to the relay concept) for a 60 second time interval? I could possibly use a 555 on delay, but here again the PCB gets bigger. I was hoping I could use transistors or mosfets and capacitors to achieve the desired results. As you know these little music chips are very sensitive. Thanks!

    Reply
  24. Norman Kelley Kelley says

    August 7, 2020

    Hi Swagatam,
    When you first power up a HC-SR501 PIR it outputs and sometimes is irrational for the first 60 seconds. I am trying to design a circuit to delay or interrupt the output from the PIR for about 60 seconds after power up. After the 60 second delay, the PIR should work as usual. I know I can do it with a time delay and a relay, but that takes up too much room on the PCB. Is there a way to accomplish this with transistors?

    Reply
    • Swagatam says

      August 7, 2020

      Hi Norman, I think you can try applying the circuit titled “Delay ON Timer Circuit Working Details” under this post:

      https://www.homemade-circuits.com/simple-delay-timer-circuits-explained/

      You can eliminate the relay and connect the PIR circuit across the collector/ground of the PNP

      Reply
    • moboy says

      August 13, 2020

      Hi Swatagam
      I would like to have a circuit diagram of the pir switching on a room light, staying fully on , until the person leaves the room and then it switches off the light.
      Thank you.

      Reply
      • Swagatam says

        August 13, 2020

        Hi Moboy, it is already given in the above article, you can use the security alarm circuit for the same purpose

        Reply
        • moboy says

          August 13, 2020

          Hi Swatagam,
          Thank you so much for your prompt reply, I really do appreciate it.
          The thing is I don’t have the same pir model as the one you are using.
          But I will attempt to construct as per your suggestion and i will give you feedback. Thank you.

          Reply
          • Swagatam says

            August 13, 2020

            No problem, even with some other PIR you will still have 3 pinouts, designated as +, – and OUT…so you can configure the 1K and the transistor accordingly, as per the diagram.

            Reply
      • moboy says

        August 20, 2020

        Hi Swatagam
        I managed to purchase a pir sensor,
        constructed it like your circuit diagram and it works very well.
        Thank you so much and I must say i enjoy reading and learning on your website. Your site is so very informative and instructive and professional.
        Once again thank you so much for your time and effort.

        Reply
        • Swagatam says

          August 20, 2020

          Thank you moboy, I am so glad you could make the circuit successfully, keep up the good work!

          Reply
  25. Kev says

    July 2, 2020

    Great website and lots to learn and try out. Im new(ish) to the hobby and the usual format is I try a project and it usually doesn’t work then I spend a few days going over it and a growing number end up working. Can someone who built the project on breadboard post a few pictures so I can compare?
    My project (the first one of the four) lights the led on switching on but the relay will trigger randomly.
    Ive gone over it and re built it several times but still the same. Any help appreciated, thanks

    Reply
    • Swagatam says

      July 3, 2020

      Thanks, and glad you are learning from this website.
      piR are difficult to control, that is true. When I tried testing a PIR module, I simply couldn’t stop the PiR from continuously operating the relay, it kept on switching it ON/OFf no matter whether a human was present or not.
      I checked the soldering, the wiring, any possible leakages, everything seemed alright and it seemed there was no solution to the issue.
      Then I decided to remove the PCB and mount the parts directly on the PIR pins, the moment I did this the PIR started working perfectly.

      Here’s the set up which worked perfectly at one go:

      https://www.homemade-circuits.com/wp-content/uploads/2019/08/PIR-alarm.png

      Reply
      • Kev says

        July 3, 2020

        Thanks Swagatam I will give that a try. I’m sure I’m not the only one here to appreciate your time and generous sharing of information. All the best Kev

        Reply
        • Swagatam says

          July 3, 2020

          You are most welcome Kev!

          Reply
  26. Nitin says

    June 29, 2020

    Hello, can I have some circuit through which I can use this pir module as bistable, like for washroom light. It should remain on until the pir sensor again detect a human. I want to install it at gate of washroom so that when a person gets in, the light switches on and remain on irrespective of time and switches off only when the person leaves the washroom. I tried using ic 4017 but not getting results. The 4017 circuit is not getting activated with the output of PIR module. Pls suggest some circuit. Thanks

    Reply
    • Swagatam says

      June 29, 2020

      Hello, a bistable is not required for this, you can simply build the 2) design explained in the above article for your specific application. It will do the job perfectly.

      Reply
  27. Shrey Gandhi says

    May 22, 2020

    Hi swagatam,
    Is there a way to change the blockage time of PIR ? By Blockage time i mean the time duration while PIR outputs LOW even if there is motion detected.

    Reply
    • Swagatam says

      May 23, 2020

      Hi Shrey, if you see the circuit diagram of a standard PIR, you may find a few RC networks in it, as can be seen in the last image from this article:

      https://www.homemade-circuits.com/pir-sensor-datasheet-pinout-specification-working/

      In this diagram there’s a capacitor C5, I guess this capacitor may be responsible for the delay effect, and could be tweaked to decrease the block time.

      Reply
  28. sriram says

    May 8, 2020

    Hi, While am searching to buy a PIR radial, I found two part number. They are D203S and RE200B. Could you suggest me which one to buy. I am planing to integrate with 555 monostable circuit.

    Reply
    • Swagatam says

      May 8, 2020

      Hi, I would recommend buying a whole PIR module instead of the sensor, because managing the sensor sensitivity can be quite a headache

      Reply
  29. Shrey says

    April 29, 2020

    HI.. I have a question regarding powering PIR through 12V supply where you have used 1K ohm R.
    PIR uses 5V to bias which leaves 7V to drop over the 1K resistor while using a 12V SMPS. Using Ohm’s Law 7V/1k = 7mA current in the circuit. Now, here, since PIR module requires 65mA driving current which is way less than 7mA. How is the PIR getting the rated current?
    Please correct me where i am wrong.

    Reply
    • Swagatam says

      April 29, 2020

      Hi, If it would be 65mA, my circuit wouldn’t have worked, so it is wrong. The actual working current of a PIR sensor is no more than 200 uA, and working volatge is 3.3 V through an internal 3.3 V regulator IC.
      I have used this unusual workaround since the PIR simply failed to respond when a 5V supply was applied from a rectified 12V SMPS. After lot of experimentation I could find this idea of using a 1K series resistor, and by mounting (soldering) the BJT and the resistor right over the pins of the PIR module, and finally the PIR started responding correctly

      Reply
      • Shrey says

        April 30, 2020

        Hi Swagatam, thanks for replying.
        The PIR worked absolutely fine with the resistor in Series and I did measure the current drawn by PIR (VCC) which was 67-70 microAmps (I wonder why it is advertised with low current rating of 65mA, probably there is a misprint of milli instead of micro).
        Also, there was zero current reading on the Output of PIR when i drove the gate of a MOSFET through it (would you like to explain why was that?).
        Another question regarding current rating of any device. let say i have a Distortion pedal that is rated 9V 200mA and I have a 9V 2A SMPS to drive it. So, is there a chance of risking the pedal by driving it with a higher current output capable SMPS or the pedal will draw only the required 200mA and be just absolutely safe with it.

        Reply
        • Swagatam says

          May 1, 2020

          Thanks Shrey, I am glad the PIR worked correctly for you. Yes you may be correct with your assumption regarding the working current of the PIR. A MOSFET gate has an infinite impedance, which means the MOSFET will not draw any current from the PIR while switching ON, and this may be the reason for the low current reading. The pedal will safely draw 200 mA only regardless of the SMPS high current, but only as long as the voltage from the SAMPS is correctly matching the specification of the load at 9V, and not exceeding this value

          Reply
  30. Chandrasekhar says

    April 21, 2020

    Hi swagtam, i have aome questions. I take out the por sensor from the pir module.
    1. How to check the pir sensor wether it ok or not?
    2. As per ur 1st diagram i have connected 100k from source to ground and 4.7k from sorce to bc547, emmitter to ground and connected led at +5v and collector also gave 5v to gate of sensor. Now the led only light on. Not off when there is no human movement. Is my circuit ok or the pir sensor damaged.?
    Pls let me know.

    Reply
    • Swagatam says

      April 21, 2020

      Hi Chandrashekhar, PIRs are very sensitive devices, and can get triggered by any external stray signal or even by a minute disturbance in the supply source itself.
      I would recommend not to remove the sensor from the module rather use it with the module and connect the transistor directly on the module as shown in the
      security alarm circuit.

      Reply
  31. Patrick says

    April 15, 2020

    Dear Swag,
    You are a blessing to our generation ,hobbyists and Electricians mostly.
    I want to construct a coil counting machine using a fan motor whereby the motor will rotate with a piece of sq or rectangular wood for counting the coil on it.
    Please can you help me design a sensor circuit which can sense a piece of metal placard welded to the rotor and send the signal to three digit counter circuit for display.
    That is, whenever the placard passes or blocks the sensor it energizes its circuit to count with speed as the number turns increases from one.There will be reset.
    Thank you so much.Looking froward to your reply.

    Reply
    • Swagatam says

      April 15, 2020

      Thanks Patrick, you can try the last concept presented in the following article;

      https://www.homemade-circuits.com/optocouplers-working-characteristics-interfacing-application-circuits/

      Reply
  32. Mohamed Hashem says

    April 4, 2020

    Dear,Sir Swagatam
    Could you please help me for explaining for the control circuit and components
    which used in self sterilization gates , it used in entrances of airport (for example), sterilization by certain chemical powder – the gate when sensing human body automatically open the powder to make sterilization

    Reply
    • Swagatam says

      April 4, 2020

      Hello Muhamad, do you want the gate control circuit?

      Reply
  33. Curie Gupta says

    January 31, 2020

    Very nice tutorial. Thank you!

    Reply
    • Swagatam says

      January 31, 2020

      Thanks, Glad you liked it.

      Reply
  34. Pascal says

    December 31, 2019

    Why do you use a 25V capacitor and not a 16V?

    Reply
    • Swagatam says

      December 31, 2019

      Because 25V is more easily available than 16V, and their size and cost are same.

      Reply
      • Pascal says

        January 1, 2020

        Thanks. So it’s maybe better to say “minimum 16V”, no? 😉

        Reply
        • Swagatam says

          January 1, 2020

          for 12V supply it must be 25V as per rules, but 16V will also do!

          Reply
  35. Michael says

    October 1, 2019

    Is it possible to connect 4 or more hc-sr 501 pir in different zones to activate one relay? If possible how can I connect them?

    Reply
    • Swagatam says

      October 1, 2019

      Yes, that’s definitely possible, you can add any number of PIRs in parallel for activating a common relay circuit.

      Reply
  36. Louis says

    June 15, 2019

    Please sir, can u help me with a circuit diagram of a electronic water fountain ( indoor water fountain for decoration).
    I need the timing, lighting and melody diagram. Thanks

    Reply
    • Swagatam says

      June 15, 2019

      Please explain more about timing, lighting, and melody, if possible I’ll to help

      Reply
      • MAHMOUDI says

        June 23, 2022

        Tanks for your perseverance.

        Reply
        • Swagatam says

          June 23, 2022

          My pleasure!

          Reply
    • Jafar says

      December 22, 2021

      Thank you

      Reply
  37. M DAVID says

    July 29, 2018

    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.

    Reply
    • Swagatam says

      July 29, 2018

      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

      Reply
    • dodong says

      August 3, 2018

      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!

      Reply
      • Swagatam says

        August 3, 2018

        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/

        Reply
      • Luis Zanel says

        February 24, 2020

        Hi, how could I handle two pir to activate a single relay?
        My idea was to put a pir on the outside of one door and the other on the inside, so that when it enters it activates and when it leaves it goes out.
        If I place only one on the outside or inside side after a while it turns off and the ideal is to stay on until you leave the room.
        What I want is to turn it on when it comes in and goes out when it comes out.
        Thank you for your help it would be very useful to help me make the circuit.

        Reply
        • Swagatam says

          February 24, 2020

          Hi, you can do it in the following manner:

          how to connect two PIR in parallel to activate asingle relay

          Reply

Primary Sidebar

Calculators

  • 3-Phase Power (15)
  • 324 IC Circuits (19)
  • 4017 IC Circuits (52)
  • 4060 IC Circuits (25)
  • 555 IC Circuits (98)
  • 741 IC Circuits (19)
  • Arduino Engineering Projects (83)
  • Audio and Amplifier Projects (114)
  • Battery Chargers (82)
  • Car and Motorcycle (94)
  • Datasheets (46)
  • Decorative Lighting (Diwali, Christmas) (33)
  • Electronic Components (100)
  • Electronic Devices and Circuit Theory (36)
  • Electronics Tutorial (116)
  • Fish Aquarium (5)
  • Free Energy (34)
  • Fun Projects (13)
  • GSM Projects (9)
  • Health Related (20)
  • Heater Controllers (29)
  • Home Electrical Circuits (102)
  • How to Articles (20)
  • Incubator Related (6)
  • Industrial Electronics (28)
  • Infrared (IR) (40)
  • Inverter Circuits (98)
  • Laser Projects (12)
  • LED and Light Effect (93)
  • LM317/LM338 (21)
  • LM3915 IC (25)
  • Meters and Testers (65)
  • Mini Projects (148)
  • Motor Controller (67)
  • MPPT (7)
  • Oscillator Circuits (26)
  • PIR (Passive Infrared) (8)
  • Power Electronics (34)
  • Power Supply Circuits (77)
  • Radio Circuits (10)
  • Remote Control (48)
  • Security and Alarm (61)
  • Sensors and Detectors (120)
  • SG3525 IC (5)
  • Simple Circuits (75)
  • SMPS (29)
  • Solar Controllers (60)
  • Timer and Delay Relay (53)
  • TL494 IC (5)
  • Transformerless Power Supply (8)
  • Transmitter Circuits (40)
  • Ultrasonic Projects (16)
  • Water Level Controller (45)

Calculators

  • AWG to Millimeter Converter
  • Battery Back up Time Calculator
  • Capacitance Reactance Calculator
  • IC 555 Astable Calculator
  • IC 555 Monostable Calculator
  • Inductance Calculator
  • LC Resonance Calculator
  • LM317, LM338, LM396 Calculator
  • Ohm’s Law Calculator
  • Phase Angle Phase Shift Calculator
  • Power Factor (PF) Calculator
  • Reactance Calculator
  • Small Signal Transistor(BJT) and Diode Quick Datasheet
  • Transistor Astable Calculator
  • Transistor base Resistor Calculator
  • Voltage Divider Calculator
  • Wire Current Calculator
  • Zener Diode Calculator

© 2023 · Swagatam Innovations