I have a setup with a Raspberry PI model 3 a PIR sensor and a OEM HDTV Pi IR-Camera with two LED modules (pictures below).
I'm running a little Python script triggering a camera recording whenever the PIR sensor is detecting motion.
Now, the problem is that the sensor is detecting a lot of false positive motions. It seems to just trigger about every 30 seconds. I have tested the setup with two different PIR sensor but the issue remains.
I found out that the sensor seems to work ok as long as the camera is not being connected. Somehow the camera seems to interfere with the PIR sensor.
I'm no electronics expert so I'm kind of stuck and don't know what to do. Any help from you guys is highly appreciated.
Here's my Python script and some pictures of my setup:
from gpiozero import MotionSensor
from picamera import PiCamera
from datetime import datetime
sensor = MotionSensor(4)
camera = PiCamera()
while True:
sensor.wait_for_motion()
print("I can see you!")
filename = "Intruder_{0:%Y-%m-%d_%H:%M:%S}.h264".format(datetime.now())
camera.start_recording(filename)
sensor.wait_for_no_motion()
print("I don't see any motion")
camera.stop_recording()