PIR Motion Sensor False Positive Fix!

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 เม.ย. 2019
  • Just quick followup video from my IoT connected Motion Sensor Project: • Motion Activated Push ...
    I had some troubles with the PIR sensors after making that video where they would randomly get triggered even with no motion (false positives). Simple fix was to add Ferrites to filter out any high frequency noise and keep the always on power nice and clean for the sensor.
    Here's the wiki page for adding a PIR motion sensor to the trigBoard with all the details: www.kevindarrah.com/wiki/index...
    And main trigBoard wiki: www.kevindarrah.com/wiki/index...
    Check out my Tindie store (trigBoard is available) www.tindie.com/stores/kdcircu...
    Thanks to all the Patrons for dropping a few bucks in the tip jar to help make these videos happen!
    / kdarrah
    Twitter: / kdcircuits
    For inquiries or design services:
    www.kdcircuits.com
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @trustmenl1991
    @trustmenl1991 3 ปีที่แล้ว +9

    The noise is certainly the problem. Because of a lack of ferrites in my DIY-supply, I tried an LPF solution by solely using capacitors. My problem of false positives was completely solved by putting 3 capacitors in parallel, connected to the supply voltage and ground terminals: 1x ceramic 10nF, 1x ceramic 100nF and 1x electrolyte 10uF.
    Never had a false positive for weeks now!

  • @anonymouscoward923
    @anonymouscoward923 4 ปีที่แล้ว +1

    Thanks for the fix. My project uses a Sonoff Basic R2 with an AM312 to control a hall light. I had almost non stop false triggers until I fell across your fix. Now it's as solid as a rock. You saved me a world of pain.

  • @maryodea4066
    @maryodea4066 4 ปีที่แล้ว +1

    Thanks so much, had problems with false positives with a different setup, Arduino and Panasonic EKMB pir sensor and adding the 2 capacitors you showed in your circuit fixed it! Saved the day! Keep up the good work.

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

    This trick definitely worked for me. No more false triggers. Thanks a lot!

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

    I found wrapping the pir sensor board with foil to shield it the trick for me.
    I used kapton tape on the board, then foil and finally heat shrink. Cheap and easy.

  • @sterillium
    @sterillium 5 ปีที่แล้ว +1

    Thanks for sharing! Could you consider doing a video about which capacitor values and types to use for filtering? When do I need to implement ceramics and when electrolytics? Thanks!

  • @fredericguiet2077
    @fredericguiet2077 5 ปีที่แล้ว +2

    Hi Kevin. I was waiting for this fix. Will give it a try on my trigboard version. Thank so much for sharing. Fred

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

      Hi any update on this?

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

      @@mamacmarino Hi Jong. Did not have time to make a new trigboard...just ordered the components...

  • @nkronert
    @nkronert 10 หลายเดือนก่อน

    I have to try this as I'm getting false positives in my project as well. I thought it might be a bug, but this makes sense. Thanks!

  • @brandonb87
    @brandonb87 4 ปีที่แล้ว +1

    wow thanks for the tip. as a test i used a 220 ohm with 2200uf and it worked a charm(a bit overkill). prior to that it was all over the place from what i concidered a good power supply.... will try the circuit you described

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

    As this PIR outputs 3.3v when motion is detected, you can attach its output to the CH_EN pin on the ESP8266-01 module, meaning you can wake the ESP up from being powered off. If you hook up GPIO2 to the same CH_EN pin and in your sketch you drive the GPIO2 pin high this will keep the esp alive. Once you’ve sent your notification you can drive it low again - turning off the esp. The pir only needs to drive the CH_EN pin high for about 400ms and it will wake the esp.

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

    I finally got around to trying this fixed for the false triggering and it works. His fix is the only thing on the net that really works with these sensors. I implemented everything minus the.1uf cap (didn't seem to need it) and all my false triggers went away. the sensors are highly sensitive to the Wi-Fi signal interference from the esp8266. It was very perplexing because I was testing with Wi-Fi off and there were no issues when I started using Wi-Fi that's when the madness began. Adding the ferrite beads did the trick of grounding out the high frequency interference. I picked up a bunch of inline ferrite beads on Amazon, and they work like a charm. Thank you Kevin for sharing this fix this is a life saver.

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

    Oh nice one. I must have missed the original video. Might try to put one of these in my postbox to let me know when I get snail mail.

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

    What might be nice on the Wiki is the addition of the math to work out the corner frequency based on the capacitor and inductor.
    Fc = 1 / 2 Pi SQRT L x C
    The Wikipedia page has the formula in a format I prefer to work with rather than in text (above).
    With the above. people could specify their own inductors based on noise frequency measured.

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

    thankyou very much fixed my project!

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

    I wonder why the recommended ferrites differ so much in their spec:
    HF30ACB321611-T: 19Ohms @100MHz
    28L0138-50R-10: 153Ohms @100MHz
    Is the actual Impedance value that unimportant?

  • @user-en1dz1xh3k
    @user-en1dz1xh3k 3 ปีที่แล้ว +2

    Tnx sir!
    I use two inductance of 220, dont know if have ferrite but work only with this 2 components!
    Also add 2 very little electolitic capacitors for be sure.
    Tnx again!
    My pir drive a transistor 2n2222 with a ion negative module at 12v as load.
    This cause a lot interference and a continue false trigger.
    At terminal of module there is a high voltage capacitor in parallel with a flash tube for camera.
    Its very nice for Christmas!
    Now work good!

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

    Hey! , some while ago I was working on the same project but instead of Esp I just used Arduino and nrf24l01 modules
    they work really good and of course, there was some false trigger as mentioned in the video,
    another problem I got into was while I was using interrupt pin of Arduino, somehow it just takes all of the current from OUT pin of pir and didn't work well, so I hooked it up to a transistor and it just worked, hope that is helpful

  • @sisoncs40
    @sisoncs40 4 ปีที่แล้ว +1

    thank you sir.me also having the same problom with pir sensor..during night its automatically trigers after some time again.but i fix with only rectifying powersupply by same as ur diagram.Its so cool trick.thanks alot

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

    Thanks again for this, since I saw that fix (first) on your channel, I finally have peace of mind ! Would never consider buying that new 40 bucks PIR of yours.....

  • @hero-gl4zy
    @hero-gl4zy 4 ปีที่แล้ว

    I have the same problem with atmega32 for outdoor sensitizer gate it does Work fine so If i add ferrites can fix my problem?
    And
    What is this black Shield over PIR501?

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

    I came across this video in search of a way to fix the false positives with the AM312 motion detectors. Put the 2 capacitors in place and it works perfectly now. What happens if I want to add multiple AM312 to my MCU? Do I need multiple 10uF? Or can all of the AM312 work off of the same capacitor? I believe that I would need a 1uF capacitor for each AM312 output..

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

    Hey I just built up a similar system (but not on battery) to transfer info to my raspberry pi. I am also detecting false positive, but sometimes 4 per our, and 0 for the next hour, plus, it seems to be only by night. Can my sensor be fooled by my PIR camera? Can my sensor (placed on the floor) be detecting a mouse which I can't see on the camera maybe? I will order some ferites anyway 👍. Thanks for your sharing.

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

    I have had the same problem. Here was my solution to the problem:
    I accomplished a similar result with some code. When the sensor gets a trigger, it checks the sensor an additional time after a short (un-noticeable) delay. My device is not battery operated, and will use more current. (everything in life is tradeoffs!) Thanks for the video!
    if (digitalRead(MotionPin1)) {
    delay(2);
    if (digitalRead(MotionPin1)) {
    delay(2);
    if (digitalRead(MotionPin1)) {
    //YEP, There is definitely motion. DO SOMETHING HERE
    }
    }
    }

    • @rodrimunoz9110
      @rodrimunoz9110 5 ปีที่แล้ว +1

      Hey there, Michael. I'd love to ask you some questions cause I've been struggling with this matter for so long now: the thing is that I'm using the exact same PIR as the one shown in the video (based on the AM312). Whenever the sensor detects motion, it triggers a pulse that is 3 seconds long, that's why I'd like to ask you how you get to make arduino differentiate with delays of only 2 miliseconds. In my case, if the PIR detected motion (an undesired false positive) and I tried to tell different pulses with 2 ms long delays I'd still get the same result because the output signal of my sensor lasts for 3000ms! (3s) What do you do? whats the magic you are using? :D.
      Thanks for your comment!!

    • @michaelkrug
      @michaelkrug 5 ปีที่แล้ว +1

      @@rodrimunoz9110 I just use a generic PIR. Doing the digitalRead a few times solved the false positive problem for me. But, I am not on a battery. This might not be the best solution if running on a battery.
      What else can I do to help?

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

      @@michaelkrug Could you send me a picture or a link in google of your generic PIR? When you say "generic" do you mean that it's not a PIR embedded into a module? And finally, why do you think that not being on a battery has any difference? I mean, this might not be the best solution being on a battery?? I really appreciate your help!
      Email just in case you'd like to send me the picture: rodrigo-mharo@hotmail.com
      :D Thanks a lot again!!

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

      @@rodrimunoz9110 I am using this sensor:
      ebay.us/TNVFa6
      This might not be the most energy efficient solution to the false positive problem. If you are running off a battery, my code could use more current than desired, and shorten battery life. My project is plugged in, so I don't worry so much about micro-amps.
      (on the other hand, the ferrites also consume some amount of current)

    • @rodrimunoz9110
      @rodrimunoz9110 5 ปีที่แล้ว +1

      @@michaelkrug Hey there Michael!, sorry for taking so long to answer; I've been busy with other things. However I had time to check what you were saying the other day and here are my conclusions:
      1) I used the generic PIR that I had laying around (same as yours), I read the datasheet and the output signal time when motion is detected ranges from 3s to 5min (regulated with the potentiometer), so applying your code with two nested "if" and 2ms delays was pointless since the output signal will still be high; it doesn't distinguish in between peaks because the time 2ms is too short and the output signal lasts 3 seconds: after the 2ms delays the code will still read a high signal comming out of the PIR, so it wont know if its a real or false positive
      2)Are you using the PIR sensor outdoors?? my problem is false positives in outdoors.
      3) I found out that modifiying/desoldering a couple of components in the module you can modify the minimum time that the signal will be held high after detecting motion from 3s to 0,3s.
      Thanks a lot for keeping up and answering!!

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

    Kevin I know nothing about electronics, but you obviously do. 😀
    I’ve put up an outdoor battery powered night PIR motion sensor LED light that was purchase new around 18 months ago. I tested it first and was impressed by it. It’s solar powered and all seems great performance. It solar charges and uses 2 sealed 18650 batteries connected to a small board with a round plastic sensor as you show, that ‘looks like’ an EKMC1603111.
    Installed it and tested and works great. However it false triggers 30 times each evening. I completely covered the sensor and tested it would not detect, however it still false triggers even covered, so it’s faulty. Which is a shame because otherwise it’s an impressive light for being solar powered, and I hate to just bin in.
    The board and sensor doesn’t seem to have any adjustments at all. Is there anything I can ‘simply’ and cheaply do to fix it? What are these Ferrites and how do I fix them?
    I know you haven’t seen it or even know what it is at all, but is it simply pushing in a replacement sensor and which to use and where to get one? Any advice would be much appreciated. Thank you! 🙂

  • @GurinderSingh
    @GurinderSingh 3 หลายเดือนก่อน

    My pir sensor nor off after trigger please help

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

    why is there no link to the ferrite thingies, my PIR sensor goes off regularly even on lowest sensitivity, but I cant work out where or what those ferrite thingys are

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

    In pushsager code when I am using WiFiClientSecure client; that is not working for me any help ?

  • @shadowdarkria
    @shadowdarkria 4 ปีที่แล้ว +1

    Where can i buy ferrites?

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

    Why do you like trigboard better than a wemos d1 mini or nodemcu? Purchasing one of these soon and would like to hear why everyone likes what they do!

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

    Kevin,
    How much range can you get on this outside? I want to connect one to a clapping monkey toy to scare the deer and birds out of my garden.

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

    Is there a way to use a Photoelectric beam, to trigger my phone ?

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

    In my case, is seems that the SUN is triggering false alerts of the AM312
    Anyone else having this issue?
    Thank you for this video. I will give the PSU de-coupling capacitors and ferrite-filters a try

  • @thewatersons
    @thewatersons 4 ปีที่แล้ว +1

    I'm working on a similar project and wired a tiny solar panel on a blocking diode to a rechargeable battery, but when the panel gets full sun it spikes the amps or something enough that the sensor creates false positive. the battery works between 2.75 and 4.8 volts, and the solar panel only puts out 3.5, so I thought it would work. Any thoughts anyone has would be great!

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

      My AM312 PIR sensor is also suffering from direct sunlight. I have all electronics indoors, just the sensor is outside. So, I'm guessing this is an optical (or heat?) issue with the AM312. /chrisV

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

    What value inductor? What kind of noise ? Would be a good video to dive in depth

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

      oh I see you put parts on the wiki, nm

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

    I notice all your boards are using lithium rechargeables. That would mean charging them all manually every couple of months is that right? They'd have some level of self discharge. I'm thinking of a similar thing with alkaline (AA) batteries and trying to make it last around 1 to 2 years between battery changes and I figure at less than 20uA sleep current and wifi on for no more than 25 seconds a day, this should be achievable. What do you think?

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

      yea, check out my latest v8 board - now runs on anything from 2-5V

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

    I had lot's of false readings with an ESP8266 and a HC-SR505. I tried this solution and it's much better now but not good enough.
    So, where to put the ferrites. Between the ESP and the HC-SR505? or UN-solder the sensor itself and put the ferrites between that?
    For now I put them between the ESP and the HC-SR505.

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

      are u still facing the problem?

  • @rangawarunakulasuriya4225
    @rangawarunakulasuriya4225 4 ปีที่แล้ว +1

    hi Kevin, Had the same issue with the PIR and ESP8266, Did all the things mentioned and did not work
    ( fixed ferrite and uf). I connected PIR out to to pin 16 with pulldown. Still did not work. All the others tested separately working. Finally issues sorted by changing the jumper wires from PIR to ESP8266. This means some jumber wires also contributing to the problem.

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

    Where is link for ferrite?

  • @Big74Mike2012
    @Big74Mike2012 11 หลายเดือนก่อน

    Apparently someone forgot to add the link to the through-hole ferrite in the description....

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

    The outside pir doesn't get triggered with clouds?

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

      Too slow a change? I wonder if the PIR is damped a little because it's aimed at home-gamers?

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

    hc-sr505 pir It starts with a high value Then goes down HOW CAN I FIX IT

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

    Can you please share a ferrite link ?

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

      I think the product is this: 28L0138-50R-10

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

    Dear sir I am looking for human presence detector humans can be stationary or moving came across 2 sensor one as omron d6t mems thermal sensor and other as AMG8833 IR 8x8 Thermal Imager Array Temperature Sensor I would like to request you to make videos on these 2 to make human presence through arduino or esp8266

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

      I have experience working with omron d6t mems thermal sensor but tell you, its way too tricky to sense presence, I did all sort of tricks and to my experience work good enough with human presence sensing, but the threshold limits are real pain in the ass. Either you need to compromise with the sensing distance or be ready to experience a lot of false triggers. Also with Air conditioner in the room it is a chaos.

  • @haxxy40
    @haxxy40 5 ปีที่แล้ว +12

    It's ghosts, I tell ya!

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

      Yep, I heard Ghosts hate ferrite beads, that's why there are no more false alarms.

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

    Hey,
    yeah I really nice trick. Creating a 2nd level low pass filter.. :)

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

    you got a link tot he trigboard

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

      trigboard-docs.readthedocs.io/en/latest/wheretobuy.html

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

    Hi ,Will it help in reducing the strong IR from sunlight

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

    D
    I want to buy this setup but do i need an additional wifi channel ?

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

      Esphome works on the same wifi network as the esphome/home assistant server, or a sub network

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

    Do we really need it? Thanks btw!

  • @deltapparo4451
    @deltapparo4451 5 ปีที่แล้ว +1

    I'll keep this in mind Kevin. But I have one of these PIRs as my shop "doorbell", connected to an Arduino, and have never had a false trigger yet. So the trash on your lines is probably being generated by the Trig board.

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

      Is your Arduino using WiFi or Bluetooth? If not you probably won't see it. If you turn off WiFi on esp8266 it works as expected. When wifi is on, high frequency noise is getting in on the power lines. Simple ferrite beads cures it. This is a. If problem (Google our sensor and wifi). Kevin's solution is the easiest fix out there.

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

      @@miketony2069 thanks for the information

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

    If somebody were to rob your house they will certainly have a hard time.