Go Down

Topic: Advice on making a door lock with a input pad! (Read 1 time) previous topic - next topic

caleb121341

HI guys! I want to make a door lock that I can put on my door so it will open when I input the correct code and a screen that will display text on the outside of the locked door so I will know if it is locked or not or so people can see it is locked and for them to go away! Any suggestions on how to approach this project and what parts i would need? Thanks!Thanks so much!

PaulS

The hardest part is going to be making the result look good.

How are you planning to actually lock and unlock the door? Electric locks make it easy, but installing one in an existing door frame/door while still looking good will not be easy. And, of course, you need power available to power the lock. And safety feature that allow you to still get in or out when there is a power failure, as might happen in the event of a fire.

The art of getting good answers lies in asking good questions.

Paul__B


HI guys! I want to make a door lock that I can put on my door so it will open when I input the correct code and a screen that will display text on the outside of the locked door so I will know if it is locked or not or so people can see it is locked and for them to go away!


Must be a teenager.

In case you do not realise, the usual approach to the lock is a 24VAC "door strike" which fits to the jamb and - as PaulS notes - must be neatly wired through the architrave.  When activated, it allows the bolt to slip out of the jamb.

If you follow that link, you will discover all sorts of interesting options; an electromagnetic lock might suit you better and can have a simple (red) LED indicator.

jeredk

I've done quite a bit with electric strikes so the hardware part isn't an issue for me.

I'm working on something similar and thinking about the code. I'm going to only have 8 inputs (game pad) either on USB or serial.
I'm new to coding arduino though and looking at other sketches for the best way to enter the combo.
Any suggestions or links to something that would explain it better are really appreciated.

Thanks,
Jered

Paul__B

There's rarely any actual "best" way.

Some thoughts:

You must use debouncing - in software.  I suppose if you are using a pre-manufactured input device which has a serial or USB (that's making it complex) input, this will be taken care of.

It must not give any response until the "enter" key is pressed.

In essence, it is a "state machine".  One straightforward way of doing this is to put the correct code into an array and set an index to step through the array as digits are entered.  A variable is initialised as TRUE and set to FALSE on any incorrect digit.  When "Enter" is pressed, if that remains TRUE and the index points to the end of the array, then (and only then) the lock is opened.

jeredk

Thanks, I appreciate the feedback.
After Thanksgiving I'll probably dive in to it and see what I can do.
I have a feeling it's going to be more annoying than it should be.


Jered

DVDdoug

Quote
I'm working on something similar and thinking about the code. I'm going to only have 8 inputs (game pad) either on USB or serial.
USB gets rather complicated...  It needs "intelligence" on both ends to get the protocol & communication right.  A game controller has all of the intelligence built-in, but you need a driver on the computer/controller end.   Microsoft provides some standard "human interface" drivers for Windows, but I have no clue how you'd make (or get) a USB game controller driver for the Arduino.   

Go Up