How PIR Sensor Works and How To Use It with Arduino

Поделиться
HTML-код
  • Опубликовано: 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 8 лет назад +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 :)

  • @eliasibrahim1055
    @eliasibrahim1055 7 лет назад +8

    Thank you very much for making such a great tutorial.

  • @sevillain1
    @sevillain1 Год назад

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

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

  • @ganis6020
    @ganis6020 7 лет назад +2

    Dejan i LOVE YOU and YOUR WORK !

  • @ruffnck4637
    @ruffnck4637 4 года назад +6

    You’re the best at detailed explanations

  • @ilhamrhomadony326
    @ilhamrhomadony326 7 лет назад +4

    thank you very much for your tutorial, its so helped

  • @iiovetelaviv8094
    @iiovetelaviv8094 8 лет назад +2

    Thank you for the great explanation!

  • @karanpahwa5014
    @karanpahwa5014 2 месяца назад

    crisp yet super informative,good work man!

  • @user-od6re6gk4p
    @user-od6re6gk4p 5 лет назад +1

    Nice, simple illustration.
    Thanks

  • @SensorLEDLight
    @SensorLEDLight 7 лет назад

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

  • @speedogonzales7863
    @speedogonzales7863 6 лет назад +5

    Thank you brother good job

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

  • @sameerk12982
    @sameerk12982 6 лет назад

    Thank you very much for this video tutorial.

  • @weekendprogrammer7545
    @weekendprogrammer7545 5 лет назад +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 8 месяцев назад

      @@NAtira-yg9fu nowhere

  • @hemashri
    @hemashri 8 лет назад

    just watched today, Thanks, good works...

  • @efootballgamer9313
    @efootballgamer9313 3 года назад

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

  • @FabianReschke
    @FabianReschke 5 лет назад

    This video is incredibly good.

  • @HopeIsAlliGot
    @HopeIsAlliGot 5 лет назад

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

  • @bartdelabarre3432
    @bartdelabarre3432 4 года назад

    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!

  • @satalajmore
    @satalajmore Год назад

    Thanks for the explanation of PIR working

  • @jeffcarpenter7721
    @jeffcarpenter7721 3 года назад +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

  • @nateF888
    @nateF888 3 года назад

    thank you so much for this!

  • @krishnakumariyer4579
    @krishnakumariyer4579 4 года назад +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.

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

  • @gambart2002
    @gambart2002 7 лет назад

    great explanation , thanks

  • @sagirkhan6805
    @sagirkhan6805 3 года назад

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

  • @hossammoghrabi1021
    @hossammoghrabi1021 7 лет назад +1

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

  • @thinkertobi
    @thinkertobi 2 года назад

    Very helpful thank you

  • @AmineGuerfi
    @AmineGuerfi 7 лет назад

    Great tutorial,Thanks

  • @martinmartinez-ib6qw
    @martinmartinez-ib6qw 6 лет назад

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

  • @TalmadgesArcade
    @TalmadgesArcade 2 года назад

    thank you, and thanks for posting the code

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

  • @celine93wong
    @celine93wong 7 лет назад

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

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

  • @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?

  • @misguidednuke2143
    @misguidednuke2143 6 лет назад

    Interesting. Thank you.

  • @cambodianriverpig7613
    @cambodianriverpig7613 2 года назад

    Can you use the Pyroelectric sensor for thermal vision?

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

  • @sajeebiqtiyar206
    @sajeebiqtiyar206 4 года назад

    Very good system.. Alhamdulillah... Thanks sir

  • @MidasTsai
    @MidasTsai 8 лет назад

    Thanks for your reply. :)

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

  • @Saraikinaat871
    @Saraikinaat871 2 года назад +1

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

  • @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 RUclips.. 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.)

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

  • @Python4Fun
    @Python4Fun 5 лет назад

    Very neat info. I like it.😘

  • @amitroy-sz4xj
    @amitroy-sz4xj 5 лет назад

    very nice explanation....

  • @louisrozario6420
    @louisrozario6420 6 лет назад

    best explanation thanks

  • @stlittleteresasghssvaikom3573
    @stlittleteresasghssvaikom3573 6 лет назад +1

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

  • @wakwaobapa6709
    @wakwaobapa6709 6 лет назад

    Can we use this for spesific objek?

  • @scuaaat8104
    @scuaaat8104 6 лет назад

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

  • @MrDavid949
    @MrDavid949 3 года назад

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

  • @fatimaghaddar3862
    @fatimaghaddar3862 4 года назад

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

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

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

  • @tomjackson532
    @tomjackson532 6 лет назад +2

    saved my ass for my robotics essay!!!

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

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

  • @NetworkJoker
    @NetworkJoker 8 лет назад

    Great tutorials! =8)

  • @twojanazwa
    @twojanazwa 8 лет назад

    thank you!

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

  • @qzorn4440
    @qzorn4440 Год назад

    great information.

  • @evangelolopes1901
    @evangelolopes1901 4 года назад

    Can I use this to active LED's §

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

  • @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?

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

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

  • @gudellithrishool2249
    @gudellithrishool2249 5 лет назад

    Which software you use for schemating drawding

  • @sampetrosyan5334
    @sampetrosyan5334 8 лет назад

    very good explain..

  • @EdaNavarra
    @EdaNavarra 2 года назад

    Thank you Sir

  • @PatrickGuerrisi
    @PatrickGuerrisi 7 лет назад

    Whats the difference between PIR and IR from a surveilance camera

  • @joaocarloslira1367
    @joaocarloslira1367 8 лет назад

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

  • @alienbotofficial
    @alienbotofficial 8 месяцев назад

    Very useful video

  • @woolfy02
    @woolfy02 10 месяцев назад +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.

  • @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?

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

  • @shantixtri8399
    @shantixtri8399 5 лет назад

    Does is really detect the motion of plantts

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

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

  • @abanoubsadik315
    @abanoubsadik315 3 года назад

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

  • @davidmg1925
    @davidmg1925 5 лет назад

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

  • @kunaldhar6713
    @kunaldhar6713 2 года назад +1

    Mate, can the same happen using ir reciver led?

  • @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 ?

  • @justardel2136
    @justardel2136 2 года назад

    with this work using uno R3 as well?

  • @nileshsurwade6976
    @nileshsurwade6976 7 лет назад

    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

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

  • @tairallail8071
    @tairallail8071 3 года назад

    good work drog moi

  • @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 ?

  • @David-ln5mg
    @David-ln5mg 5 лет назад

    How big of an area can this type of sensor be made to cover? Would a commercial sized one be able to cover larger distances? Let's say 500 meters to 1km?

  • @general.1233
    @general.1233 Год назад

    Thank you

  • @DashrathSangle
    @DashrathSangle 4 года назад

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

  • @fayazdharwad5999
    @fayazdharwad5999 5 лет назад

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

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

  • @jessmac2379
    @jessmac2379 4 года назад

    Can it give data for calculating distance of a target?

  • @dhafiralani8348
    @dhafiralani8348 7 лет назад

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

  • @hariomparajapati4900
    @hariomparajapati4900 5 лет назад +2

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

    • @vrangarajan7623
      @vrangarajan7623 5 лет назад

      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.

  • @TheUnknownCatWarrior
    @TheUnknownCatWarrior 2 года назад

    The sensor can be directly connected to the relay module