Building A Single-button Combination Lock

single_button_arduino_combination_lock

[John Boxall] of Little Bird Electronics was thinking about combination locks, and how one might improve or at least change the way these locks work. Traditional combo locks can be implemented in a variety of ways, most of which we are all familiar with. Standard rotary padlock and keypad-based electronic safes work just fine, but he was interested to see how one might implement a single button combination lock.

[John] determined that the best, if not only way, to build this sort of lock would require him to measure button press intervals. In his case he decided to monitor the intervals between his button presses instead, but the concept is the same. He first tested himself to see how accurately he could press and release the button, leaving a one-second space between presses. After looking at the results he determined that he would need to incorporate at least a 10% margin for error into his code in order to compensate for human error.

He then created an Arduino sketch to test his idea, defining a set of key press intervals that could be used to ‘unlock’ his imaginary vault. It worked quite well, as you can see in the video demo below.

Now we’re not suggesting that you lock up your mint condition My Little Pony collection or your illegal arms stash with this type of lock, but it could be useful as an extra failsafe for certain projects/gadgets that you want to keep all to yourself.

[youtube=http://www.youtube.com/watch?v=eRtMYWTwv5c&w=470]

15 thoughts on “Building A Single-button Combination Lock

  1. I like that system much better jcinacio, but the knock-lock I also like better than this to be completely honest, this seems a bit too basic and simple – and frustrating to have to wait x seconds.

    But a rotating knob thing just has something appealing to it, and the ability to opt for hiding it is even more win :)

    Still, it’s nice to have options so we can all pick what we like best.

  2. Sounds a lot like the arduino secret knock lock. Only this one uses buttons, which are far more likely to give accurate data!

    I’ll stick to my rotator for now :P I could short the wires in that thing pretty quickly, even if it was in a case. Now, maybe with 3 keys, which all have separate rhythms that have to be in sync…..but that’s too hard to enter.

  3. Let it be known that on July 14th 2011 at 2:01PM hackaday.com fell to the brony hoards…. or at least the last blog I frequent to not mention ponies until now.

    OT: I can’t help but think it takes a bit too long to enter the code. But it’s an interesting idea and is implemented well.

  4. @Bob D

    I did a knock detection unit once – but i had a problem with (was living in a dorm at that time) it picking up sound from people slamming doors.

    It is a really nice idea, but if i was to do one again it should have some serious calibration added to it.

  5. Interesting idea…but I agree that morse code would work better…it wouldn’t even have to be real morse code…just make the difference between 0 and 1 based on how long you press the button, not how long you go between button presses…there is a reason that the world uses this standard, and it isn’t just coincidence or habit.

  6. Does anyone actually knock on doors in multiples of seconds? A Morse code S.O.S. takes <10s, and personally I'd be creeped out if someone knocked so slowly on my door. Seems like deci- or milliseconds should be the proper scale, thereby allowing Rachmaninov-fast entry codes as per (the original) Willy Wonka & The Chocololate Factory movie!

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.