2

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 ?

AntonioM
  • 23
  • 1
  • 3
  • 1
    How will it alert you? Why not alert you every time then you can choose to lock the door or not? – Andy aka Jul 23 '15 at 14:07
  • 1: the push button will give a single one time signal when the button is pressed, the arduino is fast enough to detect this signal ( simply check arduino) pushbutton example and check "denouncing" 2 :as I imagine, this space is vertical and opening and closing the door creates a horizontal force which cant be used to with the pushbutton ( correct me if I am wrong) – Sabir Moglad Jul 23 '15 at 14:13
  • check this link, https://m.youtube.com/watch?v=ZszlVVY1LXo this guy did something similar using a raspberry pi – Sabir Moglad Jul 23 '15 at 14:15
  • How will it know whether you *left* home without locking the door or you *arrived* home without locking the door? – Roger Rowland Jul 23 '15 at 14:26
  • @Andyaka My idea was to use a raspberry to manage the alert conditions, which would include detecting my cell phone on the network. – AntonioM Jul 23 '15 at 16:11
  • @RogerRowland see comment above, it should send alerts only when my cell phone is not at home ;) – AntonioM Jul 23 '15 at 16:15
  • 1
    ty @SabirMoglad, but I'd like to fit everything in the little space available inside the door – AntonioM Jul 23 '15 at 16:16

4 Answers4

3

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.

Pedro Quadros
  • 749
  • 1
  • 8
  • 20
2

Instead of using a button you could make it so that when the lock is in the locked position it completes the circut (i.e touches a conductive material) which would change the state of the input pin on the ardunio.

Good luck!

Bill098
  • 21
  • 1
2

I am working on a similar project and I'll be using a "roller lever limit switch". You can find them for around 1 or 2 dollars for 10 switches on ebay.

tst
  • 21
  • 1
1

I would use a reed relay instead a mechanical push button.
Attach a tiny magnet (e.g. a sticky magnet tape) on the door lock moving piece and the reed relay tube on the door frame.

Alexxx
  • 909
  • 5
  • 11
  • I was also considering this solution, but I should find a very tiny magnet, and a way to attach it to the metal piece, which is also rounded on the front. – AntonioM Jul 23 '15 at 16:10
  • This is why I was suggesting the sticky magnetic tape. You can buy a small roll in any craft store. The tape is flexible and sticky on one side. You can easily cut a tiny piece. – Alexxx Jul 23 '15 at 16:50