I have built a few outdoors Arduino and pir sensor(HC-SR501) hacks. But i get really unreliable behavior outdoors.
Can be everything from hanging, to sensors firing when it shouldn’t or don’t fire when it should.
I should also mention it has been cold and rainy when running the stuff. The things have been built into boxes but it is still really cold. No heating or isolation.
I have a feeling it is not moisture. There is no sign of it in the circuitry. The things are only running for a few days so i dont think it will be destroyed completely by corrosion.
Can it be the cold that cause it to fail?
Can it be i am using the cheap china stuff. Would it be diffrent if i used better components.
Can't be sure until you actually describe what it is you're building. The way you call it a PIR 'hack' tells us nothing other than the likelihood that you are operating out of normal operating expectations or some such.
The electronics consists of
1 x Ardurino uno
5 x Relays (Relay Module DC AC 220V)
1 x USB SD/SDHC U-disk MP3 Shield
1 x SR501 HC-SR501 Adjust IR Pyroelectric Infrared PIR module Motion Sensor
What makes you think false triggers are false? Are you there to witness nothing present when it is triggering, or is it possible the triggers are real like from wildlife?
Those particleboard boxes don't exactly look weather proof to me. I prefer to use ready-made plastic boxes for outdoor use.
I found basically two ways to stop condensation from ruining your electronics.
seal your box very well (as in VERY well: rubber gaskets & screws, not click-clack tupperware, and screw gaskets for the wires that go in and out). If not sealed well, air pressure differences due to temperature will suck in water. Potting in epoxy is another way of very thorough sealing.
make sure your box ventilates well. Some openings in the bottom work great. You may still get condensation in 100% humidity conditions (a common occurrence in my climate; don't know about yours). The heat from the electronics (keeping the inside a few degrees above ambient) is enough to stop that from happening usually, and conformal coating is a good idea as well.
INTP:
What makes you think false triggers are false? Are you there to witness nothing present when it is triggering, or is it possible the triggers are real like from wildlife?
Hi,
Yes I am quite sure. It is in both triggering when it shouldn’t and not triggering when it should. No wildlife close by
I've never played around with PIR sensors, but I have several devices installed outdoors for several months now and no signs of weather effects. Hitting the wet season now...
I don't think heating is necessary for your boxes, at least in my case the electronics themselves do just fine to keep the inside a few degrees above ambient, which in turn should be enough to keep most moisture out or at least stop it from condensing (which happens normally when an object is cooler than the surrounding air).
For your false triggering: make sure it's an actual trigger of the sensor, not noise on the line (the first usually lasts a second or more depending on your sensor; the second much shorter). You can do this in software by checking back one or two times with say 100 ms intervals. If there is noise, a small filter cap (100 nF) and/or a stronger pull-up resistor should help to stop this from triggering the Arduino.
I can confirm these observations. They don't seem to work as well outdoors.
Testing it under semi-controlled environments yield that even leaves can trigger it. Have some more testing to do regarding the "Warm-up" time of these things but so far im sure it has nothing to do with moisture.
I thought that that triggering by leaves had been solved by now.
It was a major issue 20-30 years ago when those things were quite new. Leaves/foliage usually has different temperature than the air surrounding it...