I have PIR detectors as in the picture. They are all configured as "non repeatable trigger", mid sensitivity and min pulse width. At times, quite rarely, some start to oscillate and send me a number of pulses lasting each ~ 5". This happened both during the day and at night.
These false alarm are very annoying and I wander if some of the readers have faced this issue and could suggest How to cure or progress toward a solution
I did once have a similar problem to this, with false triggering of PIR sensors. The project was an "under the bed light" and originally used 3 HC-SR505 sensors and an ATTINY84 to control lighting. The problem was that if one triggered, the electrical activity of switching the lights on or off could trigger another one. I attempted to solve it and, in the process, learned a lot about the HC-SR505, hacking component values to alter its characteristics. I could use a software solution whereby I ignored triggers around switching times, but was never very happy with it.
I later tested some AM312 IR detectors and these were much better, being very resistant to noise, and am now using those.
Wawa:
Why the 7805, and does it have the required capacitors.
It would be logical to power the PIR sensors directly from the Mega's 5volt pin.
Are you sure it's the PIR sensors doing that.
How long and how tidy are the output wires to the Mega.
Could they be picking up interference.
Leo..
Thank you Leo
7805 is to prevent that unintentional short (many long wires) shut down the mega or the associated logic. I could have used a ptc or a fuse instead.
No, there is no input or output capacitor - I thought they were only used against malicious spirits Note that on the VIN mega pin of the power 8 pin SIL connector, erroneously marked VOUT in the my drawing, there is a 47uF//100nF. Can the lack of output cap explain the oscillations? but then why didn't all 13 lines oscillated in concert? or at least the group of 3 or 4(wall2) PIRs powered by the same line?
The most frequent oscillation period is 3" and 3" is also the PIR detection pulse width when set to minimum as in my case.
Wires (power and digital in) do run long distances: ~ 12m but digital inputs from the PIRs are debounced: only low to high transitions are considered and for a transition to be recognized, it needs to be sampled low 5 times with interval of 10ms between samples and then 5 times high with same interval1
It would be nice be able to force the system into oscillations upon request so I can see what really stops it for good
1 Furthermore a line staying high "too long" (>5") is reported immediately
6v6gt:
I did once have a similar problem to this, with false triggering of PIR sensors. The project was an "under the bed light" and originally used 3 HC-SR505 sensors and an ATTINY84 to control lighting. The problem was that if one triggered, the electrical activity of switching the lights on or off could trigger another one. I attempted to solve it and, in the process, learned a lot about the HC-SR505, hacking component values to alter its characteristics. I could use a software solution whereby I ignored triggers around switching times, but was never very happy with it.
I later tested some AM312 IR detectors and these were much better, being very resistant to noise, and am now using those.
Thanks
My system does not alter the IR radiation by the sensors
nor does it induce any power consumption variation before detecting 5 debouced transitions in less that 30"
It seems to me that our oscillations are of different origine
guy_c:
Thanks
My system does not alter the IR radiation by the sensors
nor does it induce any power consumption variation before detecting 5 debouced transitions in less that 30"
It seems to me that our oscillations are of different origine
Maybe I didn't explain it correctly. It was the electrical noise caused by switching on (or off) 0.5 watts of LED lights from the same battery power source that powered the PIR detectors,that caused the false triggering, a potentially endless cycle. It was not the heat radiation from the LEDs. The same would have happened if the LEDs were completely covered.
I simply mentioned it to illustrate that some types of PIR sensor can be extremely sensitive to electrical noise in their power supply, resulting in false triggering.
Can the lack of output cap explain the oscillations
Yes every time.
I once had a production line shut down because some one changed the manufacturer of a regulator, same part number. The new manufacturer’s data sheet recommended a slightly higher value capacitor on the output than the old one. So it oscillated.
but then why didn't all 13 lines oscillated in concert?
Because when you are on the edge of operation individual differences in components and more importantly layout can cause the edge to be crossed.
You need ceramic capacitors as well as the big ones to tackle high frequency interference.
@6v6gt. I understand. Yet, in my system, there is no delta power following detection.
There need to be 5 transition in less than 30" for the system to do anything which will change the consumed power and, in one occasion, this change was simply to print on the monitor. I was looking at the monitor, during the day and thought these oscillations was due to a strong sunlight but last time this happened by midnight! I'm starting to think it has to do with the regulator. I am pretty sure it never happened before i inserted it, following a short while tinkering with a PIR at an outside wall
@6v6gt: BTW, when the system does consume (quite a lot) once it decides that it's time to shout, it fires few sirens but these are powered by another independent supply and all the Arduino do is apply digital one to the gate of a mosfet
I made some precision to the figure and gathered some more data
As opposed to the drawing I have of the hc-sr501, these pir modules have a 47uF at the input voltage in addition to 22uF at the 3.3V.
With a DVM and a scope. Voltage at the source (arduino) and load (pir) is 5.03V with mV ripple
with DVM, voltage at the pir is steady 5.03 during confirmed excitements.
The duration of my last midnight oscillations
wall 3 pir1 for 4'13" with oscillation period: mostly 3", 4" and 5", all <9"
40' later wall 1 pir1 for 41" period 3" and 4".
11" later wall1 pir2 for 36" period 3" and 4"
2'13” later wall 1 pir1 for 5'40", period 3" and 4" with few interruptions of oscillation
More details in wall1.txt and wall3.txt. The underscore is a wall separator, the star a ‘motion’
since March 13 this did not happened again
Yes there is a way to force the pirs into oscillations with the period set by pulse width pot + some (~1”) constant low time: its enough that the supply voltage be at 3.9V or less - after the first trigger it will oscillate until the voltage is raised again to 4V and above
I realize that I don’t know nor why neither how to reproduce and conclude that it can happen again
Another sufficient reason for having pir oscillations is the pots (sensitivity and pulse width) edging. It's primordial to change them against fixed resistors (or top quality pots)