How to Create a Locked Door Detector with Arduino

arduinobutton

I'm trying to build a device that alerts me when I leave home without locking the door. I have a little space inside the door (width 8mm x height 130mm x depth 8mm) where I plan to install the microcontroller, a small button that gets pressed when the piece of metal of the door slides in (door locked), a battery and a rf transmitter.

The questions are:

  • push buttons can detect the pushed/unpushed state of the button, or they simply give me a single "one-time" signal when the button is pressed ?

  • do you think the space available is enough for this project ?

Best Answer

There are two kinds of push buttons. There are some with a lock mechanic (which will remain on the last state until it's pressed again) and there are some without this lock (which will remain open/closed while the button is pressed).

The problem I can see with the push buttons as sensors in this case is because they have limits of activation. Sometime they will wear and lose sensibility or even they will not switch anymore. Datasheets specifies it, usually is about hundreds of thousands or millions times.

I think the space is enough, but it will relies on your skills designing the PCB.