Timer Didnt work (Fridge Alarm Door)

Alec_t

Joined Sep 17, 2013
14,280
Is the voltage at the R1/LDR junction being pulled down below ~4V when the LDR is illuminated?
Is the LDR illuminated continuously for at least 20 sec, to allow C1 to discharge below the Trig threshold?
By my reckoning, the combination of R2 and R3 should be about 370k for a 20 sec delay.
 

Audioguru again

Joined Oct 21, 2019
6,673
Replace diode D1 with a piece of wire so that pin2 of the 555 goes low when the LDR is lighted.
The 10k resistance of R1 is very low then you need a very bright light on the LDR to make it conduct enough. Try 100k instead.
 

Thread Starter

enciklinux

Joined Dec 8, 2021
13
Is the voltage at the R1/LDR junction being pulled down below ~4V when the LDR is illuminated?
Is the LDR illuminated continuously for at least 20 sec, to allow C1 to discharge below the Trig threshold?
By my reckoning, the combination of R2 and R3 should be about 370k for a 20 sec delay.
It continuously beeping as soon as LDR turned on. which is weird it was supposed to wait atleast 20sec
 

MisterBill2

Joined Jan 23, 2018
18,170
The circuit for the first timer does not look right for the delay that you want. The function should be to start the timing cycle when the input goes low, and the circuit does not look right for that.
 

PeteHL

Joined Dec 17, 2014
473
@enciklinux
What you want the circuit to do is sound the buzzer if the light stays on for more than 20 seconds continuously, is that correct? In other words, someone accessing the fridge (keeping the fridge's door open) for less than 20 seconds won't trigger the alarm, but if the door is not fully closed and thus the refrigerator's light stays on for more than 20 seconds, then the buzzer should sound.
 
Last edited:

MisterBill2

Joined Jan 23, 2018
18,170
@enciklinux
What you want the circuit to do is sound the buzzer if the light stays on for more than 20 seconds continuously, is that correct? In other words, someone accessing the fridge (keeping the fridge's door open) for less than 20 seconds won't trigger the alarm, but if the door is not fully closed and thus the refrigerator's light stays on for more than 20 seconds, then the buzzer should sound.
That is how they work!! I still think that the first timer circuit is not right. The first timer need to trigger on a falling edge.
What is the intention of that diode at the input?
In fact, where did this circuit come from??
 

Alec_t

Joined Sep 17, 2013
14,280
Replace diode D1 with a piece of wire
D1 is needed so that C1 discharges at a known rate via R2 and R3 (which combined are actually too high in value for a 20 sec delay), instead of discharging through the unknown/variable resistance of the LDR.
The circuit for the first timer does not look right
I initially thought that, but it simulates ok (though the timing needs adjusting).
 

MisterBill2

Joined Jan 23, 2018
18,170
The only circuits that I see that have pins #2 and #6 connected are oscillator circuits. What you need is an arrangement where the timer stays reset until timer is allowed to time because there is light. The problem with using a 555 timer is that it stays in one state untill it is triggered, at which time it immediately switches to the other state for the time duration, and then it switches back to the initial condition. This application requires, instead, a timer that stays in one condition until after it has been triggered and the time period has elapsed, at which point it changes state and stays in that second state until it is reset. So a 555 is not the correct circuit for the time delay part of this application, UNLESS you are willing to add quite a few more components. The second 555 just generates tee sound, that is OK. Just power U2 from a large capacitor that is charged through the LDR, so that when the light is on the supply voltage starts rising, and after a while the oscillator starts making noise. And when the light switches off the capacitor will discharge and the alarm will become silent.
 

Alec_t

Joined Sep 17, 2013
14,280
The U1 part of the circuit is unconventional but actually does the job. Here's how :-
1) Before power-up, C1 is in the discharged state and Q is low.
2) At power-up, with LDR non-illuminated, C1 charges up rapidly via R1/D1 and crosses the Trig threshold. Q is now high, so there is a second charge path for C1 via R2 and R3.
3) Q remains high (and hence the buzzer activates) for the brief time it takes for C1 to reach the Thr threshold.
4) Q now goes low (turning the buzzer off), but C1 remains charged to near the supply voltage, because R1 is much less than R2+R3.
5) Only when the LDR is illuminated can the charge path via D1 be blocked. This then allows C1 to discharge via R2/R3.
6) Provided the illumination is maintained for at least the required period the discharge takes the Trig pin below its threshold, allowing Q to go high again to re-activate the buzzer.
 

MisterBill2

Joined Jan 23, 2018
18,170
The U1 part of the circuit is unconventional but actually does the job. Here's how :-
1) Before power-up, C1 is in the discharged state and Q is low.
2) At power-up, with LDR non-illuminated, C1 charges up rapidly via R1/D1 and crosses the Trig threshold. Q is now high, so there is a second charge path for C1 via R2 and R3.
3) Q remains high (and hence the buzzer activates) for the brief time it takes for C1 to reach the Thr threshold.
4) Q now goes low (turning the buzzer off), but C1 remains charged to near the supply voltage, because R1 is much less than R2+R3.
5) Only when the LDR is illuminated can the charge path via D1 be blocked. This then allows C1 to discharge via R2/R3.
6) Provided the illumination is maintained for at least the required period the discharge takes the Trig pin below its threshold, allowing Q to go high again to re-activate the buzzer.
The description sounds reasonable, I guess, but the TS complains that it does not work that way. It might also have something to do with not having that capacitor on pin 5 that all of the application literature always shows.
And of course there is the complaint from the TS that it is not working as intended.
 

Alec_t

Joined Sep 17, 2013
14,280
The description sounds reasonable, I guess, but the TS complains that it does not work that way.
LTspice says it does work that way. If the TS is only allowing the light to be on for 20 secs then it won't work with the timing component values shown in the schematic (which give a delay of ~33 sec).
 

sghioto

Joined Dec 31, 2017
5,379
It continuously beeping as soon as LDR turned on. which is weird it was supposed to wait at least 20sec
That indicates D1 is shorted or C1 is open or not connected.
When working properly the buzzer should be delayed when the LDR is illuminated then cycle ON and OFF until the fridge door is closed again.
 

PeteHL

Joined Dec 17, 2014
473
How is it possible for timer U2 in the circuit of post #1 to function as an oscillator with discharge terminal 7 not connected to the circuit?
 

MisterBill2

Joined Jan 23, 2018
18,170
Just because a simulator with perfect components shows a circuit functioning is not a verification that the circuit will work in the real world. And, given that the complaint is that the alarm starts immediately tends to imply that it is more than a time constant issue. The complaint did not seem to be that the alarm failed to trigger after 20 second, but rather that it triggered as soon as the light was detected.

This must be a very special simulator in that it can make even incorrect circuits function correctly.
 
Top