PIR Motion Detector with Sliding Window Timeout

Discussion in 'The Projects Forum' started by Kelly Sumrall, Feb 25, 2017.

  1. Kelly Sumrall

    Thread Starter New Member

    Jun 13, 2015
    8
    1
    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.png PIRSlidingWindowTimeout.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
     
  2. wayneh

    Expert

    Sep 9, 2010
    16,099
    6,209
    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.
     
  3. crutschow

    Expert

    Mar 14, 2008
    22,010
    6,367
    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: Feb 26, 2017
    wayneh likes this.
  4. Kelly Sumrall

    Thread Starter New Member

    Jun 13, 2015
    8
    1
    Wayneh, Crutschow - Thank for the details. I'll give it a shot a let you know how it goes.
     
    wayneh likes this.
  5. Kelly Sumrall

    Thread Starter New Member

    Jun 13, 2015
    8
    1
    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.
     
Loading...