I built an alarm circuit.
The plan
If a physical (door) contact (glued to the door) is interrupted (was disconnected by opening the door), an alarm should be signaled after 2 seconds. This is done via \$R_{Load}\$ which is a light bulb. When the contact is closed again, the alarm should remain switched on until I cancel it.
Edit: As I have seen, there is some misunderstanding here. It's up to me too. I want to clear the alarm with a separate button. Here you can see, for example, how a fire brigade beeper is alerted and you now have to press a certain button so that the red lamp stops shining. I mean that in principle.
How did I do that:
I used a 555 in flip flop circuit. I use an RC delay circuit to wait the 2 seconds. The contact must have remained open for 2 seconds. I did the circuit in PSpice for TI2020. Everything is currently working as it should. However, I had to cheat a bit because a lot of things just didn't compile in the simulation.
The opening and closing of the contact is simulated by \$U_3\$ and \$U_4\$.
The problems are:
1.) As soon as \$U_2\$ outputs the 6V voltage, the voltage should be taken from Trig input of the 555. To pull the voltage down, I unfortunately have to use a voltage-controlled switch because Pspice didn't let me connect “Trig” to “E” of a transistor. What can you do there?
2.) To cancel the alarm, “Threshold” must have more than 2/3 of the supply voltage. Believe me, I've tried everything. Time-controlled switch, pulse source back and forth until it finally worked. Strangely, \$V_4\$ must have a delay time of 0 seconds; everything else crashes (does that have real reasons? 🤨). In real, the transmission line should actually be connected to \$V_1\$ and a push button should be used.😕 What can you do there?
Unfortunately, I cannot offer you an .asc file.