I'm a coder with only a little electronics knowledge and I've got a project that requires an outdoor weatherproof PIR sensor but that needs to interface with the Pis GPIO.
I have 2 PIRs:
https://www.amazon.co.uk/Infrared-Detec ... p_p_img_12
https://www.amazon.co.uk/gp/product/B00 ... le_o02_s00
and a couple of questions for using them...
- Both PIRs have 3 wires but one is blue, brown, black the other blue, brown, red. I am correct to think I supply 5v on the brown wire, attach blue to GND and then the red/black one goes to the Pi's input pin?
- Will these PIRs (presumably designed for 220v mains power) work on a 5v supply from the Pi? Will a lower voltage affect the PIRs range or sensitivity etc? I've got one of the PIRs giving me fluctuations in voltage but I need to almost have my hand over it to get big jumps in the readings
- Do use these voltage fluctuations on the red/black wire to trigger the pi? If so how do I read this with the Pi? I'm using Python's Python (RPi.GPIO) API and used the code GPIO.setup(17, GPIO.IN) but the voltage change is pretty small and the Pi seems to only read the input voltage as a 1 or a 0. Am I doing something wrong? Is it right that Pis pins do not take analog readings? (I could set a value as a response threshold if they did)