PIR Motion Detector with Sliding Window Timeout

Thread Starter

Kelly Sumrall

Joined Jun 13, 2015
8
I'm wanting some under the cabinet lighting that will detect motion and turn on automatically. I'v designed a circuit that will stay on several minutes after the last detected motion. The current design works OK, but lacks any daytime detection. I'd rather it not function during the day or when the overhead light is already on. I'm trying to avoid using a microprocessor and use discrete components instead, if that's a practical choice.

I'm sure the answer is to add an LDR, but I can't figure out how to properly use it. I'm thinking it should be used as an overall on/off switch somehow, but that is just my guess.
PIRSlidingWindowTimeout.pngPIRSlidingWindowTimeout.png

Any other advice/criticism is also welcome. I've attached images of the PIR Motion detector I'm using (I got it off Amazon). I'm also attaching the KiCad schematic in case it is of use.

Thank you
 

Attachments

wayneh

Joined Sep 9, 2010
17,498
I'm thinking it should be used as an overall on/off switch somehow, but that is just my guess.
That's one approach, and maybe the easiest and simplest. You could also involve the LDR in the control of the MOSFETs gate voltage in a way that both the LDR and the PIR signals would have to be calling for the LED to turn on.
 

crutschow

Joined Mar 14, 2008
34,469
Here's a simple approach per Wayneh's suggestion, which uses a Darlington photo transistor, such as this, which conducts to clamp the signal off when illuminated.
upload_2017-2-25_21-25-35.png
I think the photo-darlington would be sensitive enough for your purposes, but you'd have to experiment to see for sure.
A higher value for R1 would make it more sensitive, with the tradeoff that it slows down the response to the turn-on PIR signal.

Note that the diode direction is incorrect in your schematic.
 
Last edited:

Thread Starter

Kelly Sumrall

Joined Jun 13, 2015
8
Well, I put a phototransistor into the circuit like Crutschow suggested. While it does work, it produces a new hurdle. When it is dark enough for the light to come on (phototransistor is off), the now glaring light turns the phototransistor on and the capacitor discharges prematurely. I was hoping to solve this with discrete components and learn a little about electronics along the way (well, I am learning, just not getting the desired results as envisioned). I think I'll move on to controlling this with an ATTiny and put the on vs off state concerns into the code.
 
Top