LDR Triggered Alarm for Garage Door Opener

Thread Starter

JimStokes

Joined Oct 25, 2015
38
I'm trying to build an alarm that will respond to the light going on in my garage door opener. When the light goes on, I want a buzzer to sound for a few seconds, then stop. The light stays on for several minutes, so it is necessary that the buzzer be on a timer.

The reason behind this is because if I leave my garage door open, the sensors will pick up anyone entering the garage and the light comes on. A bicycle was stolen from my garage last year and I want to create a deterrent, but don't want to keep my garage door closed all the time.

Simply, when an LDR changes from about 2M (light off - dark) to 2k (light on), I want a clean on/off buzzer for about 4 seconds. I'm using a Schmitt Trigger (74HC14) to get a clean on/off. Then a LM555 to control the timing.

I've attached a schematic.

Problems:

1. The bulb (to be replaced with a buzzer when implemented) goes on for about 4 seconds in transition from light to dark. I don't want this to happen because it would sound the buzzer when the light is going off and that would just be annoying. Any ideas why?

2. The bulb goes dim, not off, after the RC timing is complete (i.e. 4 seconds at higher voltage). I can't figure out why this stays on. Any ideas?

3. I need to find a way to automatically reset the 555 when the LDR returns to high resistance in the dark (i.e. 2M). Any ideas?Scan_20160210x.jpg
 

ericgibbs

Joined Jan 29, 2010
18,735
Hi Jim,

Look at this option of your circuit.
Use a coupling capacitor to control the 555 Trig on the falling edge only, also a single 6v battery.
Change the 3 *1megs to just 1meg.
Eric
 

Attachments

AnalogKid

Joined Aug 1, 2013
10,971
The 555 is running on 9 V but its input is coming from a 6 V part. The trigger input (pin 2) needs more drive margin than that.
The input resistor to pin 2 is way too large, even for a CMOS 555. The pin will pick up noise and false trigger.

To eliminate the two power levels, either change the hex inverter to a CD40106 to run on 9 V, or run the 555 on 6 V. Separate from that, consider this:

Reduce the 3 M divider resistance to 1 M.

A 555 has a nice fat output stage that can drive small loads directly, but you can get better load drive with a single transistor. You are using 2 gates to form a non-inverting comparator. If you put an R-C delay between pins 2 and 3, you can eliminate the 555. Pin 4 drives a 2N7000 or 2N7002 small MOSFET, or pins 4, 12, 10, and 8 in parallel drive a 2N2222, 3904, or 4401 bipolar transistor that drives your load. 1 Meg resistor from pin 2 to pin 3, 4.7 uF or 10 uF capacitor from pin 3 to GND. Pin 4 is the output to the load driver.

MOSFET driver:
Pin 4 to 2N7000 gate.
Source to GND.
Drain to the buzzer.
Other end of the buzzer to Batt+.

Bipolar driver:
Pin 2 drives pins 3, 13, 11, and 9 in parallel.
Pins 4, 12, 10, and 8 in parallel connect to a 470 ohm resistor.
Other end of resistor to transistor Base.
Emitter to GND.
Collector to buzzer.
Other end of the buzzer to Batt+.

ak
 

Dodgydave

Joined Jun 22, 2012
11,277
Replace the circuit with a Cd4093 quad nand schmidt trigger,one gate for the ldr, two gates for your latch delay,ditch the 555.
 

Thread Starter

JimStokes

Joined Oct 25, 2015
38
Hi Jim,

Look at this option of your circuit.
Use a coupling capacitor to control the 555 Trig on the falling edge only, also a single 6v battery.
Change the 3 *1megs to just 1meg.
Eric
Thanks. This works as I would like it to work except for the low power to the buzzer. I'm going to upgrade to the CD40106 as I wanted to run this off a 9V battery. Thank you for your help.
 

Thread Starter

JimStokes

Joined Oct 25, 2015
38
The 555 is running on 9 V but its input is coming from a 6 V part. The trigger input (pin 2) needs more drive margin than that.
The input resistor to pin 2 is way too large, even for a CMOS 555. The pin will pick up noise and false trigger.

To eliminate the two power levels, either change the hex inverter to a CD40106 to run on 9 V, or run the 555 on 6 V. Separate from that, consider this:

Reduce the 3 M divider resistance to 1 M.

A 555 has a nice fat output stage that can drive small loads directly, but you can get better load drive with a single transistor. You are using 2 gates to form a non-inverting comparator. If you put an R-C delay between pins 2 and 3, you can eliminate the 555. Pin 4 drives a 2N7000 or 2N7002 small MOSFET, or pins 4, 12, 10, and 8 in parallel drive a 2N2222, 3904, or 4401 bipolar transistor that drives your load. 1 Meg resistor from pin 2 to pin 3, 4.7 uF or 10 uF capacitor from pin 3 to GND. Pin 4 is the output to the load driver.

MOSFET driver:
Pin 4 to 2N7000 gate.
Source to GND.
Drain to the buzzer.
Other end of the buzzer to Batt+.

Bipolar driver:
Pin 2 drives pins 3, 13, 11, and 9 in parallel.
Pins 4, 12, 10, and 8 in parallel connect to a 470 ohm resistor.
Other end of resistor to transistor Base.
Emitter to GND.
Collector to buzzer.
Other end of the buzzer to Batt+.

ak
Thanks. I tried this using a 2N7000. The bulb/buzzer stays on all the time in darkness (ie. when LDR is 2M ohms), which isn't a workable solution for me. Also, the timing circuit on the 74HC14 doesn't produce a crisp on or off signal and that is something I've been trying to accomplish with the combination of the Schmitt Trigger and 555 Timer. Thanks for your help. I'm going to try the CD40106 with the circuit proposed by Eric Gibbs in order to run everything on 9v.
 

AnalogKid

Joined Aug 1, 2013
10,971
Thanks. I tried this using a 2N7000. The bulb/buzzer stays on all the time in darkness...
That's because I made a stupid mistake and reversed the timing components in my text description. That's what happens when I don't follow my own advice about posting a schematic. oops.

Attached is an actual schematic with both output driver options. As DD said above, a 4093 also will work if you have one already; just tie each gate's inputs together to make an inverter. When driving a 2N7000 you need only one output gate. Leave all of the unused gate inputs tied to something so they don't float.

ak
LDR-Garage-Alarm-1-c.gif
 

Attachments

Last edited:

Thread Starter

JimStokes

Joined Oct 25, 2015
38
That's because I made a stupid mistake and reversed the timing components in my text description. That's what happens when I don't follow my own advice about posting a schematic. oops.

Attached is an actual schematic with both output driver options. As DD said above, a 4093 also will work if you have one already; just tie each gate's inputs together to make an inverter. When driving a 2N7000 you need only one output gate. Leave all of the unused gate inputs tied to something so they don't float.

ak
View attachment 100840
Thanks. It works. I'm now using it to protect my garage.
 
Top