1

I am using a Light Dependent Resistor (LDR) and a laser to make an burglar alarm system.

My laser continuously projects beam on LDR and when the beam is interrupted the LDR starts to ring the electric bell.

Now I want the bell to ring as soon as laser is interrupted but to stop after some time. I know its possible but how can I do it? Shall I use IC 55 timer to add a delay, if so how?

  • Since you did not specify the "stop after some time" parameter, do not expect an accurate answer. – GR Tech Dec 09 '14 at 13:07
  • 1
    Related: [Transistor Delay](http://electronics.stackexchange.com/q/68223/17592) –  Dec 09 '14 at 14:41

2 Answers2

4

You can also use a simple RC charging circuit (where R is tunable) outputting on a comparator. This will provide you with a delayed digital signal, and you can use regular logic gates to command your alarm (be sure the end gate/driver is capable of driving your alarm), e.g.:

schematic

simulate this circuit – Schematic created using CircuitLab

enter image description here

The duration can be adjusted in many ways, the easiest would be to change R1 and/or R3. The schematic shows an example with approximately 3.8s of delay, from: $$1-e^{-\frac{t}{R1\times C}}=\frac{R3}{R2+R3}$$ You can also chain those delay blocks to get higher delays, if the components values skyrocket.

By the way, this is a simplified schematic that's not immune to noise. If you want to avoid the alarm glitching because of noise you'll have to add some hysteresis (c.f. Schmitt trigger). That's not complicated, only a couple of resistors in addition.

Edit: I'm assuming you already have a comparator/buffer following the LDR.

Mister Mystère
  • 9,477
  • 6
  • 51
  • 82
  • 1
    The solution with the logic gates will require an insane amount of inverters to give a noticeable delay, unless you put RC elements in between. – clabacchio Dec 09 '14 at 13:05
  • My answer is not about using inverters to accumulate delay, this is only for illustration. Please read my answer above. I have formatted in bold that I would replace those inverters by an RC+comparator. – Mister Mystère Dec 09 '14 at 13:08
  • So I got it right :) If you delay the *input*, you will still have a very short - delayed - pulse. What the OP asked (I believe) is an instantaneous but prolonged pulse. – clabacchio Dec 09 '14 at 13:13
  • Look at the diagram again: the AND gate makes the alarm ring straightaway but the output gets low when the delayed input catches up. I've just insisted on the fact that the RC output should be on IN- to get the waveform on the diagram. – Mister Mystère Dec 09 '14 at 13:20
  • Ok I don't want to argue, and I'll assume that by IN- you mean the lower input of the AND gate (it's not an opamp ;)). In that case it would work as you say, even though one inverter would be enough. – clabacchio Dec 09 '14 at 13:25
  • I don't think the OP wants a prolonged pulse, I understand it as "input is always high once the alarm is tripped, but I want to stop the alarm after some time" – Mister Mystère Dec 09 '14 at 13:26
  • No I mean the IN- of the comparator. This way no need for an inverter or a AND with one inverted input. – Mister Mystère Dec 09 '14 at 13:27
  • (-1) I just want to echo clabacchio, with out some RC's in between the inverters this is only going to give fraction's of a microsecond type delays. – George Herold Dec 09 '14 at 13:46
  • 1
    @MisterMystère by the way I get what you mean *now*, but perhaps you could use a different figure since it doesn't match your text (I know it's an example, but not really appropriate). Perhaps you can draw a schematic with the integrated editor. – clabacchio Dec 09 '14 at 14:11
  • @GeorgeHerold: I must be missing something here, but I didn't suggest using inverters for the delay. I suggested replacing them by a RC+comparator. Could it be possible that you and clabacchio have been misled by the illustration? I'll replace the figure. – Mister Mystère Dec 09 '14 at 14:13
  • 1
    OK much better! Yeah I guess the figure is what was bothering me. (There's no reason you couldn't use RC and schmitt trigger inverters either, as opposed to the comparator. (removing down vote.) – George Herold Dec 09 '14 at 14:37
  • 1
    Do you really need a comparator? This answer [here](http://electronics.stackexchange.com/a/68231/17592) (for a slightly different purpose, but with the same idea) uses a transistor. –  Dec 09 '14 at 14:40
  • You don't need a comparator if you're using a AND with inverted input and relying on the input threshold of the gate. This constrains in the choice of the AND gate (not a real problem) and also limits the maximum duration for a given set of RC components. However you would still require the delayed input to be inverted. – Mister Mystère Dec 09 '14 at 15:21
  • In the circuit you're referring to the transistor is used as a not-so-good comparator, based on the base PN junction conduction threshold. It doesn't make a difference here though. The problem with that transistor circuit is that you have to add an active load to increase the duration, instead of just plugging another block. It's a matter of preference if you don't have cost, reliability nor development time requirements. – Mister Mystère Dec 09 '14 at 15:26
  • With the solution I've presented I reckon you should be able to do ~3-5min with one block without worrying too much about the input impedance of the comparator. – Mister Mystère Dec 09 '14 at 15:33
  • This is a very clever solution, however I'm sure it's pragmatically incorrect. This can only work for delays less than the total interrupted time, ie the alarm can never be on once the burglar is no longer standing directly in front of the beam. You'd have to generate the input signal from another RC circuit and 555 timer in monostable mode to get the desired real-world results. A better option might be to instead use a relay in an RC configuration providing feedback to keep itself on after the initial trigger for a certain time period. – Mahmoud Al-Qudsi Jun 17 '16 at 11:52
2

The simplest way is probably to use a monostable multivibrator, using a 555. You can use a potentiometer to keep some flexibility on the duration of the alarm.

But an alternative that some may suggest is to use a simple microcontroller, that allows you to reconfigure it whenever you want.

clabacchio
  • 13,481
  • 4
  • 40
  • 80