I have a passive infrared sensor attached to a Raspberry Pi. Namely this model which has digital output in addition to the analog one so it can be attached directly to Raspberry Pi.
The data pin is an open collector which is pulled low when the PIR senses movement.
The problem is that when the CPU load goes high, the data pin also goes low for some reason.
Edit added paragraph:
The sensor is hooked on from the Raspberry 5V rail to VCC, from a GPIO with pull-up enabled to the data pin and from ground to ground. According to the sensor datasheet VCC can be from 3 to 12V, so I chose the 5V over 3.3V because it's directly connected to the power supply.
I have tried the Raspi internal pull-up, as well as an external one, but that doesn't make a difference. I also looked into filtering the signal in software, but the signal during high CPU loads barely looks different from a signal triggered by movement.
Do you think this is due to increased current draw of the Raspi when the CPU load is high (I have a 2A power supply)? If this is the case will using a separate power supply for the PIR make a difference if it is plugged into the same mains power rail as the Raspi? Could putting a capacitor in the VCC line to the sensor make a difference? Or should I use a capacitor to make a low-pass filter on the signal line?
Please excuse my limited knowledge of electronics.