I'm working on a basic window-switch activated alarm that runs on 12v. When the window is opened, the window switch activates the alarm sounder.

The issue is if the window is immediately closed again, the alarm stops. What I'm asking is, how can I wire the sounder to either continually sound or sound for a certain amount of time, regardless of whether the window is shut again or not?

This project is a basic burglar alarm.

  • \$\begingroup\$ Do you plan on using a microcontroller (recommended)? If yes, then it is easily handled in software. \$\endgroup\$ – Mattman944 Aug 11 at 23:59
  • 1
    \$\begingroup\$ Simple DC latches include a D FF, a dual gate SR FF and an SCR. e.g. a CD4xxx series quad NAND IC can be used as a mic or piezo sensor amplifier , diode cap for a peak detector a Gate to detect this AC coupled level to set a dual gate Set-Reset Flip Flop which then drives a transistor to drive a horn, speaker , or piezo alarm \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Aug 12 at 0:45
  • \$\begingroup\$ I write about something that could be used to do what ask, here. (Assuming that opening the window closes a switch, anyway.) \$\endgroup\$ – jonk Aug 12 at 1:15

You can use a relay to latch on when the switch is closed momentarily:


simulate this circuit – Schematic created using CircuitLab

In order to shut off the alarm, you would need to turn off the power source to unlatch the relay (or by disconnecting power or earth from the relay itself).

  • \$\begingroup\$ Would the relay not unlatch when the switch current is stopped? \$\endgroup\$ – connersz Aug 12 at 11:08
  • \$\begingroup\$ Once the relay coil is energised through the window switch, the relay contacts are closed, providing another path from battery to relay coil. This keeps the relay coil energised even when the window switch opens again. \$\endgroup\$ – Jason Aug 13 at 5:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.