Building a single-button 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.

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.

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.

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!