How PIR Sensor Works and How To Use It with Arduino

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ก.ย. 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)

ความคิดเห็น • 348

  • @neutron1969
    @neutron1969 7 ปีที่แล้ว +5

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

  • @anytimecinema459
    @anytimecinema459 7 ปีที่แล้ว +4

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

  • @sevillain1
    @sevillain1 ปีที่แล้ว

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

  • @eliasibrahim1055
    @eliasibrahim1055 7 ปีที่แล้ว +8

    Thank you very much for making such a great tutorial.

  • @Canadazeus
    @Canadazeus 6 ปีที่แล้ว +18

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

  • @agstechnicalsupport
    @agstechnicalsupport 4 ปีที่แล้ว +2

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

  • @karenberry9498
    @karenberry9498 8 ปีที่แล้ว +4

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

  • @ilhamrhomadony326
    @ilhamrhomadony326 6 ปีที่แล้ว +4

    thank you very much for your tutorial, its so helped

  • @karanpahwa5014
    @karanpahwa5014 8 วันที่ผ่านมา

    crisp yet super informative,good work man!

  • @SensorLEDLight
    @SensorLEDLight 7 ปีที่แล้ว

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

  • @ruffnck4637
    @ruffnck4637 4 ปีที่แล้ว +6

    You’re the best at detailed explanations

  • @imnotleoz5486
    @imnotleoz5486 8 ปีที่แล้ว +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 !!

  • @iiovetelaviv8094
    @iiovetelaviv8094 8 ปีที่แล้ว +2

    Thank you for the great explanation!

  • @ganis6020
    @ganis6020 6 ปีที่แล้ว +2

    Dejan i LOVE YOU and YOUR WORK !

  • @user-od6re6gk4p
    @user-od6re6gk4p 4 ปีที่แล้ว +1

    Nice, simple illustration.
    Thanks

  • @weekendprogrammer7545
    @weekendprogrammer7545 4 ปีที่แล้ว +8

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

    • @NAtira-yg9fu
      @NAtira-yg9fu 3 ปีที่แล้ว

      Where were u been using it

    • @apotre1207
      @apotre1207 7 หลายเดือนก่อน

      @@NAtira-yg9fu nowhere

  • @bartdelabarre3432
    @bartdelabarre3432 3 ปีที่แล้ว

    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!

  • @sameerk12982
    @sameerk12982 5 ปีที่แล้ว

    Thank you very much for this video tutorial.

  • @HopeIsAlliGot
    @HopeIsAlliGot 4 ปีที่แล้ว

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

  • @speedogonzales7863
    @speedogonzales7863 6 ปีที่แล้ว +5

    Thank you brother good job

  • @hemashri
    @hemashri 7 ปีที่แล้ว

    just watched today, Thanks, good works...

  • @efootballgamer9313
    @efootballgamer9313 3 ปีที่แล้ว

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

  • @satalajmore
    @satalajmore ปีที่แล้ว

    Thanks for the explanation of PIR working

  • @FabianReschke
    @FabianReschke 5 ปีที่แล้ว

    This video is incredibly good.

  • @krishnakumariyer4579
    @krishnakumariyer4579 3 ปีที่แล้ว +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.

  • @mfdares1809
    @mfdares1809 8 ปีที่แล้ว +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 TH-cam.. 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.)

  • @sagirkhan6805
    @sagirkhan6805 3 ปีที่แล้ว

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

  • @bad63r31
    @bad63r31 8 ปีที่แล้ว

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

  • @nateF888
    @nateF888 3 ปีที่แล้ว

    thank you so much for this!

  • @TalmadgesArcade
    @TalmadgesArcade 2 ปีที่แล้ว

    thank you, and thanks for posting the code

  • @jeffcarpenter7721
    @jeffcarpenter7721 2 ปีที่แล้ว +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

  • @gambart2002
    @gambart2002 6 ปีที่แล้ว

    great explanation , thanks

  • @Saraikinaat871
    @Saraikinaat871 2 ปีที่แล้ว +1

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

  • @johnberry5339
    @johnberry5339 7 ปีที่แล้ว

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

  • @larryzhang3446
    @larryzhang3446 4 ปีที่แล้ว +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.

  • @maza6357
    @maza6357 7 ปีที่แล้ว +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 7 ปีที่แล้ว +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 ._.

  • @martinmartinez-ib6qw
    @martinmartinez-ib6qw 6 ปีที่แล้ว

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

  • @sajeebiqtiyar206
    @sajeebiqtiyar206 4 ปีที่แล้ว

    Very good system.. Alhamdulillah... Thanks sir

  • @AmineGuerfi
    @AmineGuerfi 7 ปีที่แล้ว

    Great tutorial,Thanks

  • @anirudhas888
    @anirudhas888 7 ปีที่แล้ว

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

  • @Pandafoot1
    @Pandafoot1 4 ปีที่แล้ว +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

  • @louisrozario6420
    @louisrozario6420 6 ปีที่แล้ว

    best explanation thanks

  • @huzaifaahmad2289
    @huzaifaahmad2289 4 ปีที่แล้ว

    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

  • @mikeearls126
    @mikeearls126 4 ปีที่แล้ว +90

    This guy sounds like an extremely smart version of Borat.

    • @sophia-tj1ck
      @sophia-tj1ck 4 ปีที่แล้ว +1

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

    • @ITLBGaming
      @ITLBGaming 3 ปีที่แล้ว +5

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

    • @johnmax8829
      @johnmax8829 3 ปีที่แล้ว +2

      hahahahahahahahahaha

    • @zero3905
      @zero3905 3 ปีที่แล้ว

      @@sophia-tj1ck yes

  • @algebraguy
    @algebraguy ปีที่แล้ว

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

  • @thinkertobi
    @thinkertobi 2 ปีที่แล้ว

    Very helpful thank you

  • @hossammoghrabi1021
    @hossammoghrabi1021 7 ปีที่แล้ว +1

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

  • @amitroy-sz4xj
    @amitroy-sz4xj 5 ปีที่แล้ว

    very nice explanation....

  • @woolfy02
    @woolfy02 8 หลายเดือนก่อน +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.

  • @fayazdharwad5999
    @fayazdharwad5999 4 ปีที่แล้ว

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

  • @celine93wong
    @celine93wong 7 ปีที่แล้ว

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

  • @ColinRichardson
    @ColinRichardson 8 ปีที่แล้ว +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?

  • @brownmunda7200
    @brownmunda7200 6 ปีที่แล้ว +9

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

    • @umxrr8677
      @umxrr8677 3 ปีที่แล้ว +1

      Change the jumper to other side

  • @tomjackson532
    @tomjackson532 6 ปีที่แล้ว +2

    saved my ass for my robotics essay!!!

  • @Python4Fun
    @Python4Fun 5 ปีที่แล้ว

    Very neat info. I like it.😘

  • @fotobluzz9217
    @fotobluzz9217 6 ปีที่แล้ว

    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.

  • @MidasTsai
    @MidasTsai 8 ปีที่แล้ว

    Thanks for your reply. :)

  • @misguidednuke2143
    @misguidednuke2143 6 ปีที่แล้ว

    Interesting. Thank you.

  • @ammarhaikal6907
    @ammarhaikal6907 5 ปีที่แล้ว

    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.

  • @MrDavid949
    @MrDavid949 3 ปีที่แล้ว

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

  • @shivaranjanmenon1543
    @shivaranjanmenon1543 6 ปีที่แล้ว +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 ปีที่แล้ว

      wasting memory and/or cpu power

  • @Tech_Brigadier
    @Tech_Brigadier 2 ปีที่แล้ว +1

    hello sir after watching your video I thought if I can use a PIR sensor instead of an ultrasonic sensor in obstacle avoiding car
    will it work or it will keep crasing

  • @isaacmendez5
    @isaacmendez5 3 ปีที่แล้ว

    Wow Can this be applied to lights? To be more specific Could I use it for my refrigerator that I have in my patio? Is that freezer which has glass in the front like a shopwindows! I would be so happy to read your comment back! Thanks I gonna follow you! Im zero in this area bur tremendously curious! Thanks

  • @NetworkJoker
    @NetworkJoker 8 ปีที่แล้ว

    Great tutorials! =8)

  • @joaocarloslira1367
    @joaocarloslira1367 7 ปีที่แล้ว

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

    • @joaocarloslira1367
      @joaocarloslira1367 7 ปีที่แล้ว

      I appreciate your answer, I am gonna work on it.

  • @borisloncar3011
    @borisloncar3011 ปีที่แล้ว

    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.

  • @stlittleteresasghssvaikom3573
    @stlittleteresasghssvaikom3573 6 ปีที่แล้ว +1

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

  • @cambodianriverpig7613
    @cambodianriverpig7613 ปีที่แล้ว

    Can you use the Pyroelectric sensor for thermal vision?

  • @DashrathSangle
    @DashrathSangle 4 ปีที่แล้ว

    Hello Sir,
    I want to change my keyboard key using motion sensor,. thank you..

  • @tairallail8071
    @tairallail8071 3 ปีที่แล้ว

    good work drog moi

  • @franklincabornay6483
    @franklincabornay6483 6 ปีที่แล้ว

    where can i buy like this please. nee fo our research project, and how much could thi be ... thank u to those who answer

  • @wakwaobapa6709
    @wakwaobapa6709 6 ปีที่แล้ว

    Can we use this for spesific objek?

  • @yudikurniaadiputra5766
    @yudikurniaadiputra5766 6 ปีที่แล้ว

    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 :)

  • @aglan
    @aglan 6 ปีที่แล้ว

    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.

  • @sampetrosyan5334
    @sampetrosyan5334 8 ปีที่แล้ว

    very good explain..

  • @shivamsahil3660
    @shivamsahil3660 6 ปีที่แล้ว

    I really needed this thanks buddy!

  • @twojanazwa
    @twojanazwa 8 ปีที่แล้ว

    thank you!

  • @nicolascolin6366
    @nicolascolin6366 7 ปีที่แล้ว

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

  • @koupohroyandredavid2639
    @koupohroyandredavid2639 5 ปีที่แล้ว +17

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

    • @mobinwb
      @mobinwb 3 ปีที่แล้ว

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

  • @Farah-nr6et
    @Farah-nr6et 5 ปีที่แล้ว

    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 ?

  • @scuaaat8104
    @scuaaat8104 6 ปีที่แล้ว

    Can I ask if all Arduino are the same. If not, what arduino did you use? Thank you!

  • @TheUnknownCatWarrior
    @TheUnknownCatWarrior 2 ปีที่แล้ว

    The sensor can be directly connected to the relay module

  • @justardel2136
    @justardel2136 2 ปีที่แล้ว

    with this work using uno R3 as well?

  • @kunaldhar6713
    @kunaldhar6713 2 ปีที่แล้ว +1

    Mate, can the same happen using ir reciver led?

  • @fatimaghaddar3862
    @fatimaghaddar3862 4 ปีที่แล้ว

    Hello, Im new to PIR sensors, can we adjust the sensitivity to be less than 3 meters? Please respond :)

  • @koushikchakraborty4541
    @koushikchakraborty4541 7 ปีที่แล้ว +2

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

  • @gautamahuja7469
    @gautamahuja7469 5 ปีที่แล้ว

    awesome work. really liked it....

    • @HowToMechatronics
      @HowToMechatronics  5 ปีที่แล้ว

      Thanks!

    • @gautamahuja7469
      @gautamahuja7469 5 ปีที่แล้ว

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

  • @gamestv4875
    @gamestv4875 5 ปีที่แล้ว +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 4 ปีที่แล้ว

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

  • @qzorn4440
    @qzorn4440 ปีที่แล้ว

    great information.

  • @gudellithrishool2249
    @gudellithrishool2249 5 ปีที่แล้ว

    Which software you use for schemating drawding

  • @dashcamdude6690
    @dashcamdude6690 6 ปีที่แล้ว

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

  • @vinaybakle6443
    @vinaybakle6443 5 ปีที่แล้ว

    Can we add hooters to it? And can we make arm disarm function using smartphone? Can we make like it will send message when motion happens?

  • @abanoubsadik315
    @abanoubsadik315 3 ปีที่แล้ว

    Can i replace the relay 2-channel module with single one module

  • @CaiZhongwen2023
    @CaiZhongwen2023 8 ปีที่แล้ว

    不错做的很好啊

  • @1NATURELOVERJ
    @1NATURELOVERJ 3 ปีที่แล้ว

    Great video. I am working for the state of Florida. I set up dslr camera traps in south Florida to capture pictures of our endangered Florida panthers. I am looking to have made a couple motion activated units that will trigger cameras to take a picture, or series of pictures. I am not a electronics guy, so I couldn't build a system. Would you be interested in making a couple sensors for me? And if so, what would be their cost? Thanks.

  • @alienbotofficial
    @alienbotofficial 7 หลายเดือนก่อน

    Very useful video

  • @BhavyaJoshi
    @BhavyaJoshi 6 ปีที่แล้ว

    I have Sensor and arduino, can you guide me to make camera sensor trigger? Pl share the link if you have it will great help for my project

  • @EdaNavarra
    @EdaNavarra 2 ปีที่แล้ว

    Thank you Sir

  • @LeonardoValente_
    @LeonardoValente_ 8 ปีที่แล้ว

    I love your videos !!!

    • @LeonardoValente_
      @LeonardoValente_ 8 ปีที่แล้ว

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

  • @AzeezAbdul-iv2sr
    @AzeezAbdul-iv2sr 23 วันที่ผ่านมา

    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.