Creating a motion sensor that only works in the dark

AlbertHall

Joined Jun 4, 2014
12,630
Can you swap, temporarily, the 1MΩ resistor for a 100k resistor.
The time will now be more like 3 seconds but if it then works then there is a leakage problem.
 

Thread Starter

djg26

Joined Jan 10, 2018
15
Can you swap, temporarily, the 1MΩ resistor for a 100k resistor.
The time will now be more like 3 seconds but if it then works then there is a leakage problem.
As you expected, replacing the 1M with a 100k resistor does solve the problem (only responding to motion in the dark) and LED does stay on for 3 seconds. Should I keep playing with those resistor values to find a way for the LED to stay on for 30 seconds, or is there a more direct solution?
 

AlbertHall

Joined Jun 4, 2014
12,630
If this is built on a PCB then try cleaning with a PCB cleaner like IPA to eliminate any leakage across the board.
The original values should give a delay of 24 seconds so, if you were getting 30 seconds then the leakage was having an effect before any changes.

You could try a new 22uF capacitor and the original resistor.
 

Thread Starter

djg26

Joined Jan 10, 2018
15
You could try a low leakage aluminium electrolytic or tantalum or even ceramic capacitor, if there is still a problem.
I won't have those parts until tomorrow, I will try first thing in the morning and let you know if that resolves the issue. Thanks again, Albert!
 

Thread Starter

djg26

Joined Jan 10, 2018
15
I was able to replace the components and wanted to let you know that the circuit works exactly as desired. Could you explain why the LED remains on indefinitely with a 9V battery but functions properly with a 9V DC brick?
 

AlbertHall

Joined Jun 4, 2014
12,630
The short answer is no, I can't give you a cause and effect but I can give you a maybe.
The brick will maintain the same voltage regardless of whether the LED is on or off.
The battery, especially if it isn't new, won't. Its voltage will drop when the LED turns on and the symptoms you describe may be due to that.
Check what happens to the supply voltage in each case.
 
Top