PIR Motion Sensor with Arduino

Поделиться
HTML-код
  • Опубликовано: 18 дек 2024

Комментарии •

  • @sleeth
    @sleeth 6 лет назад +35

    Do you have a video that explains the code in a bit of detail? I'm a bit confused by the takeLowTime and lockLow parts on your website.

  • @brookecox2344
    @brookecox2344 9 лет назад +29

    That was great. Very clear easy to follow video. Nice production quality - good sound and visuals.

    • @Circuitmagic
      @Circuitmagic  9 лет назад +1

      +Brooke Cox Thanks!

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

      Hi, I am also working a project which is Humanbody speed and direction with PIR. But I want to ask you How can I adjust PIR sensitiviy for human body ? PIR senses all objects heat but I want to PIR sense only HUMAN BODY ? If you answer, I appreciate that. THANKS

  • @menasheaharonian9183
    @menasheaharonian9183 3 года назад +4

    Hey
    Very nice explanation.
    A. Will the pir manage to sense a fly?
    B. Is the sensing influenced by surrounding temperature?
    Thanks

  • @michaelchiaravalloti7197
    @michaelchiaravalloti7197 3 года назад +1

    Is there any way to get the PIR sensor to send something like a notification to my phone or computer rather than activating an LED?

  • @muhdirfan2272
    @muhdirfan2272 7 месяцев назад

    Sya dtg sbb Mariposa sruh tngk video nih

  • @rammone5241
    @rammone5241 2 года назад +3

    Just what I was looking for, this is a great tutorial, I will definitely put it to use. Thank you so much!

    • @aminamebarki3768
      @aminamebarki3768 10 месяцев назад

      I completed it and I want my hand to move. What should I use?

  • @windell8966
    @windell8966 10 месяцев назад

    THANK YOU FOR SAVING MY NIGHT

  • @user-ov8zx7bv2k
    @user-ov8zx7bv2k 5 лет назад +9

    Going to add this into my final year project lol! Thank you!

    • @surajsurya1928
      @surajsurya1928 4 года назад +4

      Your college principle is also watching this😬🤐

  • @MrNams
    @MrNams 4 года назад +2

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

  • @woolfy02
    @woolfy02 2 года назад +2

    Is it possible to trigger something with more power, instead of a LED?( Maybe something like 5-12 volts.)

    • @nevis2769
      @nevis2769 10 месяцев назад +1

      Yes. Use a pwm signal to a logic level shifter to drive a high voltage load such as a motor

  • @scientistmadhavdasari-9858
    @scientistmadhavdasari-9858 11 месяцев назад

    Brilliant Video! Thanks for helping me... I was in a big need.

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

    My PIR motion sensor lacks the little yellow jumper connecting the repeatable/non repeatable trigger. any tips on how to get around this issue would be appreciated :) Thanks!

  • @normandocherty4207
    @normandocherty4207 4 года назад +2

    Great video, wasn't sure if my PIR was operating, it is!! thanks

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

    Would it be possible to set up four different motion sensors to four different color lights onto the same board?
    For motion sensing in four different directions. Or would I need to set up four separate projects?

  • @ShadovvV
    @ShadovvV 2 года назад +4

    Is there a way to trigger a speaker output sound effect, rather than an LED light? That would be far more interesting.

    • @vighneshrane6009
      @vighneshrane6009 Год назад +1

      Yes, u need to add a buzzer. And do little modifications which is easy and simple

    • @amerzair858
      @amerzair858 Год назад +2

      @@vighneshrane6009 can i add the buzzer to the Arduino directly without breadboard?!

    • @shreyaslemos5297
      @shreyaslemos5297 Год назад +2

      @@amerzair858 yes a 5 volt buzzer will work with arduino just like the led connect it to the Uno , or else use relay circuit for 12 volt buzzer

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

    What can I use to measure and compare vibration levels of different cd players ect? Will the Arduino achieve what I am looking for? How do I get a digital readout to be able to read the vibration level and do comparisons between different sources? Just add a multimeter and some cables to the sensor? If I wanted to measure vibration from the chassis of a cd player, do I just place the Arduino sensor on the cd player?

  • @With_life7
    @With_life7 6 месяцев назад

    Thank you for giving me knowledge the PIR sensor

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

    Instead of LED, can I turn on 5v battery operated device? Would I need a relay?

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

      Yes you can do whatever you want... A relay is the best idea to do high voltage and amp stuff. You just need to edit the code so it turns the relay on/off whenever the sensor detects something. It's a simple IF function

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

    Are these particular sensors good for outside motion detection lights?

  • @thecuriousmindssteamclub
    @thecuriousmindssteamclub 4 года назад +1

    very good quality of explaination

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

    Hey what if i wanted to turn this into a baby monitor? For example i'd like to install the sensor in baby's room and the led indicator light in my garage. Is there a way to do this wirelessly instead dragging a long wire from babys room the garage?

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

    How can we connect 2 sensors like one temperature and one pir and run them sequentially

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

    hye. how to connect pir, arduino uno and gsm SIM900? is it the gsm need power (electricity) or just need to connect all these hardware using jumpwire only?

  • @rajmahesh9
    @rajmahesh9 7 лет назад +3

    Hi, thank you very much. This is really awesome! I am always wondering how do we convert a quadcopter(drone) into a motion sensor drone. Of course there are lot of models available in the market to buy, but can we do that somehow with Arduino or any other sensor devices ?? Please advice ??

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

    Mostly this won't be seen but would that thing turn be able to enable a button to be pressed so say if the sensor wasn't waved the button won't work but when you wave it it will worm

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

    Great, straight forward, and easy!

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

    Would I be able to link it up to a speaker or something along those lines and get a robot voice to say Intruder or something has entered the room

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

    I want to make project something like:
    There are two door in my room and i want to turn on fan automatically when any no. Of person stay in my room.
    And turn off automaticall when no one is at room.
    Can it be made using pir sensor only??

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

    How would I install a 3 way switch with the pir. To where one side runs by motion and other side constant on with middle being off position

  • @JobQuestUnveiled
    @JobQuestUnveiled 7 лет назад +22

    I am sorry but mine is blinking no matter there is an object or not!

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

      Henri A SAME HERE!!!!!!!

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

      That jeans the code is nog correctly saved because the blinking is the standart program

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

      your code is not working

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

      Try covering the sensor with something that blocks IR/heat radiation. Like the silver mylar wrapper of a
      candy bar. There may be unknown heat sources triggering it.

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

      Hi everybody! It is a common thing, simply the sensor is damaged!!! I had two sensors one is damaged and one is not. Same code working with one and not with the damaged one.

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

    I'm pretty much a beginner so this might be a silly question but how could I add a pushbutton to this?

  • @nagarjunr4061
    @nagarjunr4061 4 года назад +1

    Thank you its working good , short vedio with quality content

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

    I know this video has been uploaded quite a while ago, but is it possible for the output to have a camera snap a picture? Asking for a friend.

  • @olariksurinta
    @olariksurinta 6 лет назад +3

    Thanks, you made it easy.

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

    thank you but can we use LCD instead of using serial monitor

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

    Would it be possible to replace the LED with a seven segment display instead?How would the coding change too?>

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

    Hi, is this possible to add to a arduino clock somehow? It runs on battery and I would like it to turn off, when no one is in the room and on when there is people in the room

  • @aravindkrishna6133
    @aravindkrishna6133 7 лет назад +5

    which potentio meter is used to adjust the tine of on and off

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

      There are two on the sensor itself. Two orange wheels. Those are the potentiometers : One for the time, the other for the distance. Check the sensor's datasheet for more details.

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

      thx

    • @MG-ko3rz
      @MG-ko3rz 6 лет назад

      one on right side

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

      @@MG-ko3rz No.

  • @mekapatidarshanik6788
    @mekapatidarshanik6788 4 года назад +1

    Great work and explanation. This might seem like a beginner question, since I'm a beginner. But can we connect output pin of pir sensor to analog pin rather than digital pin.
    Thank you.

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

      Pir sensor gives digital output so u need to connect it to digital pin.
      ruclips.net/video/4NWowu5wghM/видео.html

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

      @@rekhaagarwal9694thank you I figured it out. I just soldered output to adafruit L293d digital pin2 and also vcc and GND to L293d. Works fine.

  • @cmsbpl
    @cmsbpl 8 лет назад +8

    Thanks, Friend! It worked in one go !

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

    Could you explain how to wire the same thing as in this tutorial, but if I wanted to have 3 x PIR Sensors? The idea is that if one of the sensors detect movement, the light switches on. Thanks.

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

      Try this: tie three different outputs from the Arduino to one input of a relay.
      When activated, the relay will turn on the light. Relays are available for 110v and 220v lights. Google: Sonoff

  • @the_nguy9123
    @the_nguy9123 7 лет назад +14

    I would highly recommend everyone to wire a 220ohm resistor with the led to prolong the life of the led bulb.

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

      Thanks for your suggestion

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

      Isn't PIN #13 on an Arduino the same as the built-in LED? If so, it might already be protected.

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

      No, there is no "hidden" built-in resistor in pin #13, so you're basically plugging your led between Vcc and ground. It still works because of the internal voltage drop of the led, also pins are limited in current. However, that way you're absorbing more current than necessary (you see the led is very bright), thus shortening the life of the bulb.

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

      Leonardo Lai yeah because those LED’s are incredibly expensive right? No it doesn’t really matter the board does indeed have a built in resistance when plugging in an LED to pin 13 and ground

    • @leonardolai1994
      @leonardolai1994 6 лет назад +8

      LEDs' price is absolutely irrelevant here, and I never mentioned it. Of course they're extremely cheap, but why would you want to learn electronics (which is the main purpose of Arduino) the wrong way, just because these components are almost free to replace? Moreover, if you start neglecting the value of resistors (in terms of usefulness, not price), then you are likely to fry a 200$ sensor if ever working on a real-world system. If you get used to best practices since the beginning, your life will be easier later.

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

    The issue i have with the pir sensors is when i throw a large object like a karton box in front of it , it detects movememt.
    So the PiR works as a motion sensor and not specificly as a PIR SENSOR.
    How can i change it as s human detector and not as a lifeless karton box detector ?
    Any ideas?

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

    hi. may i ask what should i change if i want to make the led light stays on for 5 mins?

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

    I have a perimeter alert system I like, but the company is out of
    business so I cant get more sensors from them. There is a base unit that
    has 6 channels for up to 6 motion sensors,but I only have one. How can I
    make a motion sensor from a different security system work with this
    one, so I can add it to my system?

  • @agstechnicalsupport
    @agstechnicalsupport 5 лет назад +1

    Good video briefly explaining how to activate an LED using PIR motion sensor with Arduino. Thank you for posting !

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

    excellent work...But could you please explain coding for this in arduino software.

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

      yea, the program is written like a paragraph and also no setup is placed as serial begin is placed above loop, looks like author not wants to copy the concept, thank you

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

      @@mohammedyasarshaikh4090 Got it, I sorted it out, Thank you.

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

    Where is the power input? can it be a battery or does it have to be hard-wired?

  • @AtlantaTerry
    @AtlantaTerry 6 лет назад +11

    "You can adjust the time using this potentiometer."
    Which potentiometer? It might have been informative to show which potentiometer and how to adjust it.

    • @Zhak7
      @Zhak7 5 лет назад +1

      Dude it's on the PIR sensor, read the datasheet

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

      dont try sir it is not working

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

      There's a potentiometer ON the sensor. But I'm not sure as mine is always outputting to HIGH

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

      @@Zhak7 True. But that presumes a person actually has one and is not simply watching the video in order to learn how this works.

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

    can we measure the distance of the moving object using pir sensor ? plz reply

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

    Can you set a delay time for the LED to stays on like a min after PIR sensor detects something? Also can you set the LED to always stay on at 50% brightness until PIR sensor detects then LED is on at 100% Thank you

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

      You might need to do this in code.

  • @NURULAINUMAIRAHBINTIROSL-rk3kv

    How do I make the led last for like 40 seconds before it goes off?

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

    hi can u explain me why sometimes detects movement even if I haven't done anything?

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

    Hey, I followed your each n every step but my LED is taking more than 2 min to turn OFF after motion detection, can you please suggest a solution on it ??

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

    At what meters does this sensor detect movement

  • @mondal9509
    @mondal9509 4 года назад +2

    Is there anyway to make the light blink when a object is in a particular position/shape?

    • @AtlantaTerry
      @AtlantaTerry 4 года назад +1

      Shape? That would involve complex math.
      Position? What about a laser? Point it at a sensor or at a mirror that bounces the light beam to a sensor. Once the beam is broken then you an object is in a particular position. You have probably seen this in a movie or TV show where something needs to be protected such as an art gallery, bank vault, etc.
      To find out how to use a laser sensor, look for a RUclips video where one is used inside a mail box to sense when mail is present. Then convert how they did it to your needs.

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

    how did you get the pop up screen after you verify? I cant seem to find that screen

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

    Can you add wled to this as it uses a data wire

  • @burakk.48
    @burakk.48 2 года назад

    sir In my code, low, high, input, output texts appear colorless and my circuit did not work. I think my library is missing where can I find it?

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

    hlo sir what we want to do for light is on more than 1 minutes (if it is possible when we increase the delay in program code )

  • @angelzenelaj
    @angelzenelaj 3 года назад +1

    how do you upload the code on to Arduino Editor?

  • @nicholasgraham89
    @nicholasgraham89 8 лет назад +1

    Awesome! I am new to Arduino, and only took a couple of minutes to knock out. Here's a question, is there a way to display the actual time of sensor violation in the serial monitor? Thanks for the information!

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

      You will need a RTC module, or connect to a network and use NTP to get the current time.

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

    how to make the LED switch off when the PIR sensor detect another movement .. not after 15 seconds ?

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

    Sir, I make this same project without aurdino and it's really work and delay time is 5 to 6 second

  • @dawa-hdeh8681
    @dawa-hdeh8681 2 года назад

    thank you very much

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

    Hi, john. How can i use multiple LED using this project?

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

    If I connect a battery to this do I need to leave it plugged in ?

  • @AM-vp6fi
    @AM-vp6fi 6 лет назад

    Can I connect a small fan instead of d light.......will d same codes work?

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

      Yes you can, but do not connect directly to the Arduino, use some realy or mosfet if fan required more the 500mA.

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

    Can you put more than one led? Like 4, for instance

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

      Circuit Magic
      Circuit Magic
      1 second ago
      Yes you can put as many as you want, if more voltage or amp required then use extra power supply with some transistor or mosfet.

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

    Easy and Clean , Very Good

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

    Hi, how to Set the sensor to off once there is no movement . I don’t want 15s or 20s

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

    can you make it so that the light stays on the amount of time someone is detected by the sensor?

  • @YouTooCanDo
    @YouTooCanDo 5 лет назад +3

    Can this code playback a voice message when the led is on ?
    I need to remind my husband to put the sunscreen (cancer risk) everytime he walks out the door.
    Please help

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

      You'll have to load a wav file and set a speaker up around the 8ohm range www.amazon.com/gp/product/B0738NLFTG/ref=ppx_od_dt_b_asin_title_s00?ie=UTF8&psc=1

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

    hi the code is not working do you know what might be wrong it says sereal does not have a name type

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

    Is the same project will work with aurdino NANO ??

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

      Yes, it will also work with Arduino Nano

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

    anyone knows if this small PIR system can be powered by batteries and how many watts it may consume ? I need few of them for our off the grid house

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

      I have the same need. You might want to look at some RUclips videos on using solar to power the system rather than just batteries alone. The solar would charge the batteries.
      Try this: purchase an inexpensive solar light that is sold for people to place next to sidewalks or driveways. They have a solar cell and a battery. I get mine for US $1 from my local Dollar Tree store. If that works you can always scale up your project to a larger solar array and battery pack.

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

      Stran I I think 6 watts

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

    Circuit Magic rocks🥰🥰

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

    can I detect presence of any Human without any movement with this PIR sensor?

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

    There is a problem with led, it does not work properly😢 any solution?

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

    Can i use pir in sunlight

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

    Hello sir, can u please suggest code for Send IR sensor data to live server(database)?

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

    Thank you sir for your help but can you help me out in my idea of the new project where i want to make my home door to open automatically when someones comes infront of it using the pir sensor and the arduino. If you want to help then sir please send me the code for arduino and the schematic .Thank you.

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

    If I want to use buzzer instead of led how should I do?

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

    are there any alternatives for the LED

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

    only one motion sensor can be connected for one Arduino ...?

  • @Kostanj42
    @Kostanj42 5 лет назад +5

    you can just make it like this:
    int state;
    void setup() {
    pinMode(A0, 0);
    pinMode(13,1);
    while(state == 1) { //this while loop is for waiting until pir is calibrated
    state = digitalRead(A0);
    delay(1000);
    }
    }
    void loop() { //just put the value of pir as the led state(when pir detects movement the output is high, so the led is high too)
    state = digitalRead(A0);
    digitalWrite(13, state);
    delay(1000);
    }
    it's very simple and it works perfectly for me. Otherwise you could use a transistor to switch the led with 10k base resistor. also pin 13 NEEDS a resistor for the led. there is a resistor on pin13 but it's for onboard led and it doesn't effect the output pin.

  • @MomentofEngineering
    @MomentofEngineering 9 лет назад

    can i use an IR module instead of PIR sensor?

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

    Can this be powered by a 9v battery?

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

    How can I fix this issue?
    Sketch uses 2260 bytes (7%) of program storage space. Maximum is 32256 bytes.
    Global variables use 222 bytes (10%) of dynamic memory, leaving 1826 bytes for local variables. Maximum is 2048 bytes.

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

      There's no issue there...

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

    Hello what if i used 12v LED? what module i use? thanks

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

    How far does it go like max distance

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

    great explaintion....very thankful

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

    Hi can i on led only 1ms or 500 micros ?? I mean not 15s , i need help

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

    how far can the PIR sensor detect motion?

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

    Jarak terdekatnya berapa bang? 2 cm apakah bisa sersornya terhadap objek bergerak

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

    Whats the distance for motions?

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

    thanks for making video it is working

  • @ArushO-i5l
    @ArushO-i5l Год назад

    Thank you so much!!!!! ✌👏

  • @ch3rryc0kee
    @ch3rryc0kee Год назад +1

    the motion sensor is working fine but the led lightbulb isn't corresponding could anyone help??

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

    Hey there, i need your help, no matter what my led just stay on whit the sensor and without them

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

      same here. How to resolve this?