I wanted to make a motion sensor that switches on a LED only when it's dark. Eventually, I'll replace the LED with several LEDs. The project has been done a lot of times. At first, I didn't have the R4 resistor. In that case the LED was always lit. So I put a resistor R4 = 10k. In that case the LED seems to blink on and off about every 5 seconds. So I changed R4 = 1K. Now it seems to work better; however, the PIR still seems to detect motion in the light, even though there is insufficient voltage and current to Q1. Seems like since the GND pin of the PIR is open when it's light, the PIR shouldn't be able to function. But it is. When it's dark, everything works ok.




