How PIR Sensor Works and How To Use It with Arduino

Sdílet
Vložit
  • čas přidán 22. 09. 2015
  • howtomechatronics.com/tutoria... ► Find more details, source codes and circuit schematics here.
    In this Arduino Tutorial we will learn how a PIR Sensor works and how to use it with the Arduino Board for detecting motion. You can watch the following video or read the written tutorial below.
    Visit HowToMechatronics.com for more Tutorials, Tips, Projects and How It Works videos:
    ► howtomechatronics.com/
    Like my page on Facebook:
    ► / howtomechatronics
    Add me on Google+:
    ►plus.google.com/+Howtomechatr...
    Music: Aduro by Jens Kiilstofte (machinimasound.com/music)

Komentáře • 348

  • @neutron1969
    @neutron1969 Před 7 lety +5

    Ubedljivo najbolji tutorijal koji nadjoh na netu u vezi PIR-a. Hvala najlepse!

  • @anytimecinema459
    @anytimecinema459 Před 7 lety +4

    Thanks a lot for making this tutorial, and making everything clear in just 4 minutes :)

  • @eliasibrahim1055
    @eliasibrahim1055 Před 7 lety +8

    Thank you very much for making such a great tutorial.

  • @agstechnicalsupport
    @agstechnicalsupport Před 4 lety +2

    Good explanation of PIR sensor activated electronic circuits. Thank you !

  • @sevillain1
    @sevillain1 Před rokem

    I was watching for the info on the pir sensor .. amazing breakdown and tutorial! Thank you!

  • @ilhamrhomadony326
    @ilhamrhomadony326 Před 7 lety +4

    thank you very much for your tutorial, its so helped

  • @ganis6020
    @ganis6020 Před 7 lety +2

    Dejan i LOVE YOU and YOUR WORK !

  • @karenberry9498
    @karenberry9498 Před 8 lety +4

    This is a great tutorial, thank you very much... John :)

  • @iiovetelaviv8094
    @iiovetelaviv8094 Před 8 lety +2

    Thank you for the great explanation!

  • @imnotleoz5486
    @imnotleoz5486 Před 8 lety +3

    omg , thank you so much! I was trying to write a code which will enable the LED to be on as long as there's movement!!! now I'm going to trying the repeatable mode that you just mentioned to see if it really works without changing the code !!

  • @weekendprogrammer7545
    @weekendprogrammer7545 Před 5 lety +8

    I have been using PIR sensor from long time I did not know that repeat and Non-repeat thing. Good one bro.

  • @Canadazeus
    @Canadazeus Před 6 lety +18

    Excellent tutorial. I finally get to understand how to use something without further research. Thanks.

  • @SensorLEDLight
    @SensorLEDLight Před 7 lety

    Nice video tutorial, which I added on my Facebook wall for motion sensors lights.

  • @speedogonzales7863
    @speedogonzales7863 Před 6 lety +5

    Thank you brother good job

  • @user-od6re6gk4p
    @user-od6re6gk4p Před 4 lety +1

    Nice, simple illustration.
    Thanks

  • @ruffnck4637
    @ruffnck4637 Před 4 lety +6

    You’re the best at detailed explanations

  • @sameerk12982
    @sameerk12982 Před 6 lety

    Thank you very much for this video tutorial.

  • @karanpahwa5014
    @karanpahwa5014 Před měsícem

    crisp yet super informative,good work man!

  • @hemashri
    @hemashri Před 8 lety

    just watched today, Thanks, good works...

  • @bartdelabarre3432
    @bartdelabarre3432 Před 3 lety

    EXCELLENT!
    I want to make a motion activated sprinkler to keep deer out of our garden AND wanted see if an Arduino or PI would be of any use in the sprinkler contraption. Your video nailed it. THANK YOU!

  • @efootballgamer9313
    @efootballgamer9313 Před 3 lety

    Thanks mate. It really helped with my project :))

  • @maza6357
    @maza6357 Před 7 lety +4

    You can run the sensor directly with relay module or use a transistor in the middle because the sensor board has enough controls for distance and time even giving logic signal as output. However if the application requires processing or running a certain control schema with multiple sensors Arduino will be required. Arduino will take care of all timing and trigerring, only the distance needs to be adjusted at the level of sensor board.

    • @cristian-bull
      @cristian-bull Před 7 lety +1

      Depending on the relay module and the sensor, it could not work. Some sensors have a 3.3v output. Besides, the relay in the example is active with a negative input. Anyway, the Arduino can be replaced by a transistor ._.

  • @HopeIsAlliGot
    @HopeIsAlliGot Před 4 lety

    Thanks my genius.....
    this video is soo knowledgeable.....

  • @FabianReschke
    @FabianReschke Před 5 lety

    This video is incredibly good.

  • @nateF888
    @nateF888 Před 3 lety

    thank you so much for this!

  • @MidasTsai
    @MidasTsai Před 8 lety

    Thanks for your reply. :)

  • @gambart2002
    @gambart2002 Před 7 lety

    great explanation , thanks

  • @twojanazwa
    @twojanazwa Před 8 lety

    thank you!

  • @satalajmore
    @satalajmore Před rokem

    Thanks for the explanation of PIR working

  • @mikeearls126
    @mikeearls126 Před 4 lety +90

    This guy sounds like an extremely smart version of Borat.

    • @sophia-tj1ck
      @sophia-tj1ck Před 4 lety +1

      I'm new to pir sensors. Can I use 4 pir sensors with one Arduino?

    • @ITLBGaming
      @ITLBGaming Před 3 lety +5

      Somebody didn't get this comment. I understand, and I agree. Very nice

    • @johnmax8829
      @johnmax8829 Před 3 lety +2

      hahahahahahahahahaha

    • @zero3905
      @zero3905 Před 3 lety

      @@sophia-tj1ck yes

  • @misguidednuke2143
    @misguidednuke2143 Před 6 lety

    Interesting. Thank you.

  • @jeffcarpenter7721
    @jeffcarpenter7721 Před 3 lety +1

    thank you i was looking at changing the sensitivity on mine its exactly what i was looking for, here for an edit i always get motion no matter the settings for delay or sensitivity? not sure why

  • @stlittleteresasghssvaikom3573

    Thankzzzzzz very much............

  • @AmineGuerfi
    @AmineGuerfi Před 7 lety

    Great tutorial,Thanks

  • @brownmunda7200
    @brownmunda7200 Před 6 lety +9

    is there any method to reduce the delay time to 0 so we can take continuous inputs?

    • @umxrr8677
      @umxrr8677 Před 3 lety +1

      Change the jumper to other side

  • @krishnakumariyer4579
    @krishnakumariyer4579 Před 4 lety +5

    Excellent know-how on PIR sensor Dejan. It was quite enlightening. Looking at your vast expertise in such devices, I would like you to do us enthusiasts, one more favour.
    There is this device "Omron D6T Thermal Sensor", which is also based on sensing the body heat, but better than PIR sensor, as it does not require motion to occur, to get triggered. The advantage is that as long as the human is in the frame of view, it stays triggered, unlike the PIR sensor, where if the human stays at one place without moving, the sensor is not able to sense the human presence.
    I have been looking around the internet for some help in using this device, but could not find any proper resource. Would appreciate if you could teach us to implement this device through a suitable project. Your teaching technique is very easy to understand and would definitely help everyone in getting to know this device and using it successfully.
    Many Thanks and keep up the good work.

  • @TalmadgesArcade
    @TalmadgesArcade Před 2 lety

    thank you, and thanks for posting the code

  • @louisrozario6420
    @louisrozario6420 Před 6 lety

    best explanation thanks

  • @sagirkhan6805
    @sagirkhan6805 Před 3 lety

    Very Nice Video, explained very well..Thanks a lot

  • @mfdares1809
    @mfdares1809 Před 8 lety +1

    First things first.. great tutorial... well done..
    Since there is so much demand for a minimalistic working motion sensor tutorial (without Adreno)...
    Could you please make one... and share it.
    While making the tutorial.. MAKE SURE THAT YOU KEEP US IN MIND..... WE KNOW NOTHING ABOUT CIRCUITRY (NOT EVEN Soldering, OMs, resister, etc...).
    So,I request you to kindly make a real simple tutorial for us....if possible a minimalist one, without resister, OMs and a lot of explanation.
    Also make sure that you share your tips and tricks And the mistakes you did (so that we don't repeat them).
    I did search the internet and CZcams.. But couldn't find a tutorial with simple design and instructions. if anyone knows of such tutorial, please share the link.
    I'm planing to power a 5050 led strip with 12V, 2.5 or 5 mAh battery, Activated by this motion sensor..
    If possible please let me know the minimum things required for this project.. ( right now I've got 1.battery, 2. Leds, 3. PIR motion sensor.)

  • @Python4Fun
    @Python4Fun Před 5 lety

    Very neat info. I like it.😘

  • @NetworkJoker
    @NetworkJoker Před 8 lety

    Great tutorials! =8)

  • @hossammoghrabi1021
    @hossammoghrabi1021 Před 7 lety +1

    can you tell me where did you get the music track and what is the name of it? thanks

  • @thinkertobi
    @thinkertobi Před 2 lety

    Very helpful thank you

  • @huzaifaahmad2289
    @huzaifaahmad2289 Před 4 lety

    do you have to keep moving your hand in the repeat trigger mode for it to stay on or will it stay on as long as it senses the IR heat from ur hand

  • @tomjackson532
    @tomjackson532 Před 6 lety +2

    saved my ass for my robotics essay!!!

  • @koupohroyandredavid2639
    @koupohroyandredavid2639 Před 5 lety +17

    bro, what is your config for sensitivity and delay time on PIR???

    • @mobinwb
      @mobinwb Před 3 lety

      They are hardware configured..2 potentiometers on the sensor PCB..Its mentioned in the video itself

  • @Pandafoot1
    @Pandafoot1 Před 4 lety +1

    May I ask you to give a fact based assessment about using the PIR sensor with either Arduino or a Rasberi Pi. The PIR is basically used in security situations and I seem to find only Rasberri Pi board uniting with PIR and exhanging through GSM WITH sms to cell phone notification

  • @sajeebiqtiyar206
    @sajeebiqtiyar206 Před 4 lety

    Very good system.. Alhamdulillah... Thanks sir

  • @cambodianriverpig7613
    @cambodianriverpig7613 Před 2 lety

    Can you use the Pyroelectric sensor for thermal vision?

  • @martinmartinez-ib6qw
    @martinmartinez-ib6qw Před 6 lety

    Excellent videos... Please let me know what software you use for make the schematic? thanks

  • @CaiZhongwen2023
    @CaiZhongwen2023 Před 8 lety

    不错做的很好啊

  • @joaocarloslira1367
    @joaocarloslira1367 Před 8 lety

    Very nice tutorial!!
    Considering this same code, is it possible to add mutiple PIR sensor in parallel to trigger that same relay?

  • @celine93wong
    @celine93wong Před 7 lety

    Do u have a autodesk circuit on it but without the lamp?I would need this as reference for my project >

  • @shivaranjanmenon1543
    @shivaranjanmenon1543 Před 6 lety +1

    Hey,wonderful tutorial! I had a doubt... In the Arduino code, you are taking the PIR's output variable as an integer value, not a boolean. But I thought its output was supposed to be Digital HIGH or LOW?

    • @arisoda
      @arisoda Před rokem

      wasting memory and/or cpu power

  • @ColinRichardson
    @ColinRichardson Před 8 lety +1

    I presume you could do this without the arduino? Have the out on the sensor connected to the trigger on the relay and change NC/NO for the lamp? Just need a 5v source to power the relay and sensor?

  • @gamestv4875
    @gamestv4875 Před 5 lety +11

    This would make for an interesting intrusion detector.
    But I am scared if that thing detects something in my room other than myself and I can't see shit ...lol
    Nice tutorial , thanks

    • @NextLevelCode
      @NextLevelCode Před 4 lety

      I guess it's better to die not knowing what's coming then? lol

  • @LeonardoValente_
    @LeonardoValente_ Před 8 lety

    I love your videos !!!

    • @LeonardoValente_
      @LeonardoValente_ Před 8 lety

      I'm about to buy my first arduino and some sensors , what's some cool projects you recommend me to do ?

  • @MrDavid949
    @MrDavid949 Před 3 lety

    In this example, could you just trigger the relay from the output of the PIR sensor?

  • @SamirSogay
    @SamirSogay Před 7 lety

    Awesome video

  • @johnberry5339
    @johnberry5339 Před 7 lety

    Great tutorial I have liked and subscribed, Without arduino I want to power a 12v led string with just 12 led's, do I need two separate power supplies? maybe 6v for the PIR sensor and separate 12v for the led strip? Thanks John.... :)

  • @EdaNavarra
    @EdaNavarra Před 2 lety

    Thank you Sir

  • @MrNams
    @MrNams Před 3 lety

    My hc-sr501 gives always high output, what is issue?

  • @rameahgupta2635
    @rameahgupta2635 Před 6 lety

    thank you sar

  • @woolfy02
    @woolfy02 Před 10 měsíci +1

    Very cool! I've been trying to build a remote-controlled relay with camera (Through hardware or on an Android app). Basically, you could remotely connect to the pi / Arduino camera anytime and, hit a button that controls the relays action. Does anyone know of a similar project guide / tutorial? I ask because, I'm struggling trying to build it myself.

  • @amitroy-sz4xj
    @amitroy-sz4xj Před 5 lety

    very nice explanation....

  • @larryzhang3446
    @larryzhang3446 Před 4 lety +3

    Dear friend, can I use part of your video in my company on-line seminar? I'm not sure if I can get your reply here, but look forward to your answer.

  • @evangelolopes1901
    @evangelolopes1901 Před 4 lety

    Can I use this to active LED's §

  • @Saraikinaat871
    @Saraikinaat871 Před 2 lety +1

    Bro ...ur code is so simple and i was searching lke this....thax.special thax

  • @wakwaobapa6709
    @wakwaobapa6709 Před 6 lety

    Can we use this for spesific objek?

  • @aglan
    @aglan Před 6 lety

    Is there a way to dim the light for example if PIR sensor detects an object then the light will go ON and keep it on for sometime. Now if there is no object for 20 minutes, instead of turning off the light but dim the light instead for like 30 to 50% instead of 100% ON.
    Thank you.

  • @ForgottenLegendsOfTomorrow

    what do you mean about non repeatable trigger? can't understand. an example would be helfpul

    • @charleslyell3748
      @charleslyell3748 Před 3 lety

      Repeatable trigger: every time the sensor detects a movement, It resets the timer to zero. Otherwise, the timer starts counting after the first detection and posterior detections will be ignored.

  • @nileshsurwade6976
    @nileshsurwade6976 Před 7 lety

    when i sense my PIR sensor continuesly then i want continues ON of output of PIR sensor but this is not happening even i select the repeatable trigger..What is the solution

  • @fotobluzz9217
    @fotobluzz9217 Před 6 lety

    hi. is it posible with this Pir sensor to do some other activation of light. first detection on and stay on until seconde detection. i mean as hand wave in front of pir sensor. or it woud be better to use proximiti ir sensor. same first detection to on and stay on after secons detection. thank you.

  • @hariomparajapati4900
    @hariomparajapati4900 Před 5 lety +2

    Can it activate hot air or other hot object
    can we use 4-5 pir sensor to cover 360° area

    • @vrangarajan7623
      @vrangarajan7623 Před 5 lety

      Check in Amazon there is a product by Blakt Electrotech which can connect multiple PIR sensors upto 1000 Watts and it is just Rs.199 or so.

  • @dashcamdude6690
    @dashcamdude6690 Před 6 lety

    We have a pir sensor which takes photos and transmits to the control center when the alarm is activated

  • @anirudhas888
    @anirudhas888 Před 7 lety

    Thank you so much for such an easy and proper explanation....!but how does it sense the human body ,what does it have to do so..!

  • @PatrickGuerrisi
    @PatrickGuerrisi Před 6 lety

    Whats the difference between PIR and IR from a surveilance camera

  • @AzeezAbdul-iv2sr
    @AzeezAbdul-iv2sr Před 2 měsíci

    00:03 IR sensors come in various package sizes.
    00:53 Understanding the physical differences between IR receiver and transmitter
    01:37 IR sensor detects objects by reflecting IR rays.
    02:31 Voltage level depends on reflected light intensity
    03:09 IR transmitters have limited range for detection purposes.
    03:54 IR sensor detects objects based on reflected rays
    04:34 IR sensor detects variations in reflection based on screen brightness
    05:13 IR sensor detects different voltage levels for different colored lines
    Crafted by Merlin AI.

  • @ammarhaikal6907
    @ammarhaikal6907 Před 5 lety

    Hi Dejan! Can I use your video to merge with my video? I'm doing Arduino tutorial in Bahasa Malaysia and your illustration really helps explaining things.

  • @koushikchakraborty4541
    @koushikchakraborty4541 Před 7 lety +2

    can I sense a particular temperature with this project ? if yes then plzz reply me how .. thank you

  • @general.1233
    @general.1233 Před rokem

    Thank you

  • @fayazdharwad5999
    @fayazdharwad5999 Před 5 lety

    Make another one but clear explanation red, black wire expiation, will it requires DC supply or not pls

  • @bad63r31
    @bad63r31 Před 8 lety

    U 4 ujutru ja naletim na tebe :) Hehe predobro radis posao, samo nastavi iako trenutno mozda ne poprimas dovoljno paznje koliko bi trebao.

  • @qzorn4440
    @qzorn4440 Před rokem

    great information.

  • @gudellithrishool2249
    @gudellithrishool2249 Před 5 lety

    Which software you use for schemating drawding

  • @nicolascolin6366
    @nicolascolin6366 Před 7 lety

    In first nice video an explanation !! I have a question, why on youtube you don't use a breadboard but you use one on your website ? And can you post something where we can see that without the bord ? Can i do that with an arduino uno rev 3 Or (on a UNO R3 ATmega328P) ??
    Thank you very much and don't stop your awesome video !!!

  • @borisloncar3011
    @borisloncar3011 Před rokem

    I have a Solar Lamp with a PIR Potion Sensor and a remote control with which I control the light. When I press Mod 1 ro on the remote it means that the light will turn on via the PIR sensor. when I get close to the PIR sensor the light turns on and automatically turns off in 20 to 30 seconds. My lamp has a Frenzel lens as you said in the video.

  • @sampetrosyan5334
    @sampetrosyan5334 Před 8 lety

    very good explain..

  • @dhafiralani8348
    @dhafiralani8348 Před 7 lety

    hi ...sorry im looking for code and circuit PIR sensor with 8051

  • @Farah-nr6et
    @Farah-nr6et Před 5 lety

    thanks really for this video ,, please help me i did like the video but i had 2 light burned 😢
    and i dont kow why that happened did anyone know the reason ?

  • @algebraguy
    @algebraguy Před rokem

    Good day, I am one of your best subscribers and supporter. Would it be ok to ask where can we buy this project?

  • @alienbotofficial
    @alienbotofficial Před 8 měsíci

    Very useful video

  • @davidmg1925
    @davidmg1925 Před 5 lety

    I take it's not massive step to include a camera in this set up also?

  • @karomahalmunawar5943
    @karomahalmunawar5943 Před 4 lety

    thank you

  • @justardel2136
    @justardel2136 Před 2 lety

    with this work using uno R3 as well?

  • @TheUnknownCatWarrior
    @TheUnknownCatWarrior Před 2 lety

    The sensor can be directly connected to the relay module

  • @shivamsahil3660
    @shivamsahil3660 Před 7 lety

    I really needed this thanks buddy!

  • @yudikurniaadiputra5766

    I want ask if we stop our motion in front of pir sensors, the light will still on or off?
    And how to set a pir sensor so they wouldn't detect any kind of thing except human?
    Thanks for the answers :)

  • @gautamahuja7469
    @gautamahuja7469 Před 5 lety

    awesome work. really liked it....

    • @HowToMechatronics
      @HowToMechatronics  Před 5 lety

      Thanks!

    • @gautamahuja7469
      @gautamahuja7469 Před 5 lety

      @@HowToMechatronics hey i really like your detailed explanation ? it helps a lot.
      can i request that, if you have some free time please make a tutorial for connecting a camera with arduino ?? i really want to learn that.
      thank you.