Doorbell Combo Lock Can Open Your Garage Door

Sometimes I get enough away from writing about other people’s accomplishments long enough to actually do my own hacks. Most recently I developed a combination lock that opens the garage door. The idea isn’t original, it is based on [Alan Parekh’s] button code project, but I did develop my own hardware and software. A four digit code is entered by pressing the button a number of times for the first digit, and waiting for a flash of an LED inside before moving on to the next digit. If the correct code is entered the door opens.

My version centers around an ATtiny13. I originally downloaded [Alan’s] code in hopes that I could port the PIC firmware over pretty easily. Unfortunately it was written in BASIC so I just took what I knew about the interface and wrote my own program. I developed on an ATmega168 so that I would have no trouble running out of programming space, and was able to optimize my code down to 964 bytes to fit on the tiny13.

The hardware is quite simple. I purchased a lighted doorbell from Home Depot and swapped out the light bulb for an LED. I choose this because the doorbell mounts in a 5/8″ hole in the trim of the garage door and is easily overlooked. I’m quite happy with the results, and if you want to play around with the idea, you can easily build the circuit on a breadboard and use another LED for the load rather than including a relay. Hit the link at the top of this post for the schematic, code, and build images.

24 thoughts on “Doorbell Combo Lock Can Open Your Garage Door

    1. @Winston: right now I have he entry timeout set for 1.5 seconds which might be a bit long. The confirmation blinks are 600ms. So, it would be four timeouts and four blinks: 8.4 seconds plus the time it takes you to press the button for each digit.

      I don’t use it too much so it doesn’t bother me to take 15 seconds to get in the garage.

      @Diego: There’s a switch next to the voltage regulator to cut the power to the board. But we also always lock the door into the house from the garage and when we leave town we unplug the garage door opener.

      @Osgeld: Don’t sound surprised, I know what I’m doing.

    2. I agree this is a good design. Very simple. I think I would have used a Morse Code sequence instead of 255 available codes per digit. It seems pressing the button 100 times if your code was that for a full digit is a little time consuming.

      I would just have a string of Morse Code. (ex. SOS) … — …

      The code is pretty clean. But having to press a button about 400 times would piss my button pushing finger off. I also would not give feedback letting you know it was the right code. Have a default press like 10 sec to let the system know your starting. All other inputs before this initialization would be ignored. After the correct code, the door opens. Then it looks & acts almost like a doorbell.

  1. I would have made it react to rhythmic tapping. “La Bamba” opens the garage door, “Louie, Louie” turns the light by the door on or off, “Shave and a Haircut” opens the trap door under the welcome mat…

  2. This does not work for any new garage door openers. All the new ones, in order to piss off the home owners, use a special serial communication over the damned wires. you no longer have a contact closure you can use to trigger the door. makes us integrators upset that idiot companies like Genie made it hard for us to integrate the garage door opener for customers.

  3. diego:

    Just add another function – 3 incorrect attempts, and it calls the police or a neighbor –
    pulse dialing is easy, and the message chip from a recordable greeting card would do the trick.

  4. @diego, you realize locks and most security systems do nothing to stop people who really want to get in right? Locks only work on honest people and stupid thieves.

    Mike, nice job.

  5. @Mike: Thanks for info. ~15s is quite long, but I doubt that’s as much of an inconvenience as going to get the key and putting it back afterwards.

    @McGuiver: Rather than proper Morse, I’d be tempted to go for just a certain combination of short and long taps. The number of possible combinations being 2 ^ number of taps. 1000 combinations from 10 taps with no need to wait between tapping them isn’t to be sniffed at, though I guess it wouldn’t be long until HAD featured an arduino and linear actuator “manual button-pressing brute force cracker” project.

    1. That’s more what I was thinking. I can always remember Morse code though.

      Being in the security business, I would want to debug this thing very well. I wouldn’t want it crashing or something and having the garage door open. I thought about doing something similar in the past with one of my Axis 241-Q (video encoder) outputs. Tie one of the outputs to a ttl relay, then have the relay control the opener. Then I could VPN in from my iPhone and hit the output. You just never know how a malfunction can trigger something wierd. I love the idea, and he was very motivated. Great little project.

  6. Very interesting. It’s be cool to set it up so that a single push gets passed on and the door bell actually rings. Of course, when a code is being entered (i.e. a second push before the timeout), any signal to the door bell should be intercepted. Wouldn’t want the neighbors hearing the code.

Leave a Reply to diegoCancel 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.