Picture of Arduino Combination Door Lock: Lockduino
Ready to put a combination lock on your door to keep out intruders? You've come to the right place! In this i'ble I will show you step by step how to make a combination lock for your door!

Watch this video of the finished product!


What did you make?
Hi, I'm 15, and I made Lockduino! It's a lock that is controlled by 4 potentiometers and a pushbutton. It may also be controlled by IR in the future :?
I just used some perf board, ribbon cable and basic electronics to make it. I got so mad with the perf board (my dremel is very tiny and doesn't cut well) so I brandished my oscillating saw and zzzzzzzip! Whoops! Maybe next time I should be a little more careful ;-).
How did you make it?
Tell us how you got the idea for the project.
We were staying a rental cabin in the mountains for the weekend and I was utterly enthralled by the electronic keypad that you typed in your cabin code to get it. You type in the code and heard, "WRRAANT" and the door popped open. So I decided to make one; modified. Hence I present to you: Lockduino! 
Did you work with anyone else?
Nope. Just me!
Did your plan and ideas change as you worked on the project?

No, not really. I pretty much stuck the same plan the whole time.
Where did you make it?
I made it all in my room on my electronics work table and downstairs by our computer (for programming Arduino).  A lot of running up and down the stairs!
How did the project connect to other activities in your life?
Well, it keeps out my friends when I don't want them in my room, it keeps my stash of equipment safe and sound!
What did you learn?
What I learned was how to properly use if statements with Arduino. It took some time  but I got the hang of it. You can see this thread to see how I was in misunderstanding about how to construct my if statements!

Remove these adsRemove these ads by Signing Up
1-40 of 54Next »

can you please help me.. I followed your connections but my LED lights wont light up and my servo is not functioning properly :( I used this for my elective project..

FoamboardRC (author)  electric_guy1 year ago
Did you use a ribbon cable?
yes I used the ribbon cable.. I passed the project but the LED is still not working but the servo works fine :)
FoamboardRC (author)  electric_guy1 year ago

I'm glad you passed! Well it's very difficult for me to help you because there are a number of things that can be wrong. Try checking these things:

1) LEDs are wired correctly, Cathode (shorter lead) to GND, and the

Anode to the correct pin on the Arduino.

2) In the sketch make sure which pins the LEDs are supposed to be connected to, then trace your LED connections and see if they go back to the correct pin.

3) Nothing is shorting out

4) Bad LEDs

I'm sorry I can't really help you further, as I cannot see your project. Good luck!

ok.. thanks for the tips :)

Hello! Good day. Can I ask for the schematic diagram of this project (Arduino Combination Door Lock: Lockduino). Can you please send it to my email, Thanks!
FoamboardRC (author)  lovelyjoy7671 year ago
Hey! I just realized that I haven't made a schematic would you please give me a couple of day since I'm busy. I need to make one anyways.
I am tired and I didn't read much (and am currently unable to view the comment on this i'ble) so I don't know if you mentioned whether it would be possible to change the code or not... Otherwise, I am 100% impressed by this creation.
FoamboardRC (author)  ashigaru-sha1 year ago
Ok! I clearly gave instructions on how to make the code and change it! Maybe you should have a nice, long rest, then come back after a cup of coffe and read it again :). I hope you can understand it.
mweaver81 year ago
i took apart my comuter and found a cable labled "FD" connected to the floppy disc drive

the computer is still working
GpaSteve1 year ago
I have built this, but i get a "error compiling" .
If I remove all the code for the servo it works fine. Any suggestions?
9mag9 GpaSteve1 year ago
Have you installed your Arduino(I think you only need to do this with the Mega 2560 and ADK) correctly? You can do this by (windows) going to device manager and right clicking the unknown device and click update driver software. Then click "browse my computer for software" and browse to the location of your Arduino folder. Once there click on the folder that says drivers(do not expand it). Lastly click open. That should install the drivers. I forgot to install the drivers on my Arduino when I was working with some led and they just did random things.
FoamboardRC (author)  GpaSteve1 year ago
GpaSteve, I just think I know what your problem is. You most likely haven't installed the servo library. Is this true?
Servo library is loaded. Will remove and reload and see if that fixes it
Thanks for the response
FoamboardRC (author)  GpaSteve1 year ago
I'm not sure what your problem is because that's the code that is running on my Arduino right now. Can you take a screenshot of the error and the highlighted text? Thanks!

And, what is the name of your servo library folder, is it just named 'Servo' or is it something else like 'Servo.h'?
Error message:
Error Compliling
C:\Users\steve\Documents\Arduino\libraries\Servo\Servo.cpp: In member function 'int Servo::readMicroseconds()':
C:\Users\steve\Documents\Arduino\libraries\Servo\Servo.cpp:327: error: 'clockCyclesPerMicrosecond' was not declared in this scope

Folder is servo, servo.h is in this folder.

Thanks for your assistance

FoamboardRC (author)  GpaSteve1 year ago
Steve I honestly have absolutely no idea what is the problem. You will have to ask a forum.
Does Arduino highlight any certain text? Can you post a pic of the highlighted text? Thanks.
No text is highlighted.
Thanks for all your assistance. I will ask around.

FoamboardRC (author)  GpaSteve1 year ago
Ok. I'm sorry. I don't think it's the code because it's running on my door as I type.

Good luck.
Not sure what happened but its working now. Thanks again for you help
shaddoty2 years ago
If statements are annoying it took me about a week to figure them out (really annoying)
But I figured it out and it turned out to be a simple syntax error Stupid me
FoamboardRC (author)  shaddoty2 years ago
Yeah were you doing this???

if (this == this) ; {} (adding the semicolon)
instead of this?

if (this == this) {}

Because that's what I do all the time :D
Robbiezxc2 years ago
hi relay liked this you explained the code witch helped me out loads as i am new to arduino and try ting to make a model rocket launcher with a keypad lcd and relay not having must look but think this will help me get some where but i noticed that you disabled the copy on you code would you send me the code so i can try this out thanks
FoamboardRC (author)  Robbiezxc2 years ago
Hey robbi! I'm really glad I was able to help you! Actually, I did not disable copying. Yes, I know, it shows a circle with a cross, but all you have to do is simply to click, drag and select the text. You can do that or you can click in the gray area and hit ctr-A to select all the text within the box.

Glad you appreciate!

Don't forget to give it a vote :D
shaddoty2 years ago
this is genius i want to try this with slider pots to open a secret compartment
FoamboardRC (author)  shaddoty2 years ago
Or you can wait until I make version two that uses a "credit" card- so all you have to have is a thin slit somewhere where you put in the card, then it pops open :D
mazingo2 years ago
Wow, congratulations! That's a smart idea and I bet it was incredibly fun to make.

You've got a great future :)
FoamboardRC (author)  mazingo2 years ago
Yes I had TONS of fun making it!

Encouragement like yours keeps me going. Thank you very much!
Ceralor2 years ago
|Whatever the FD Drive is!

..I am so old and I'm only 25, holy moly. ;_;

Neat project! But I hope you're joking about the FD Drive comment..?
FoamboardRC (author)  Ceralor2 years ago
No really, I have no idea what a FD drive is! I guess the only thing would be Floppy Disk? Dude, that's old school stuff! I use SD cards, micro SD cards, USB drives, and micro USB drives. Floppy disks, CDs, tapes- I know nothing ;-)
jmiddea2 years ago
Great job, I love your creativity. Be carefull with the power outages when the door is closed with you outside the room ;-)
FoamboardRC (author)  jmiddea2 years ago
Haha yes! Actually my doorknob is very bad, so if I turn the doorknob really, really hard it will come open. You gave me a idea, I should make a backup power supply :D

Why not provide for a "through the door" power supply, so the Arduino is not even turned on until you insert an "electronic key"? That would provide power to the board and servo, and make it even more secure.
FoamboardRC (author)  stringstretcher2 years ago
Yeah I could put a DC jack on the side of my wooden frame! That would be cool!
I may do that in one of my future locks- there's more to come. This one was just for play, nothing realistic. I'll make a real one for a safe some time.
privatier2 years ago
Very nice project ...
Please change your name: give yourself a boost for completing such projects.
Get rid of the loser: you are a winner!
FoamboardRC (author)  privatier2 years ago
Haha yes I was thinking about changing my name but I have totally no idea what to change it to! Everything already seems taken!

And thanks!
welderhero2 years ago
i really like the idea of "one off" security systems. Having store bought stuff just seems to me that the bad guys get a guide as to how to defeat them. Home made one of a kind could take too long to figure out. One must of course resist the temptation to show everyone "how cool" your locks are. Keeping your home and personal defense abilities and plans a secret is the way to go.
FoamboardRC (author)  welderhero2 years ago
Yeah, I would never spend all that money on security systems when I could make one for about 1/4 the price (if not less). I have plans for a better lock than this one, using similar concepts, but it's a lot harder to open the just turning four knobs. Like you said, I could tell you, but that would give away my the key to my house :D. I made my i'ble just to give you an idea of how to make one then you can expand of that. Haha, come to think of it, it would be quite senseless to make an i'ble of a lock for your front door :D.
Istarian2 years ago
I think you could make something simpler with reed switches (ones that you can control with a magnet). You just make several rotatable reed switch modules (rotatable for configurable combination), then make a interface outside like you have and attach a magnet to the moving piece so that the magnet is where the number is (in front of or behind the perf board). Then you just need to detect the state of four switches and you're good. With some multiplexing or creative logic gates you could maybe merge into one signal line. You just MAKE a circuit taking in 4 input states that only gives a 1 when they're all on (three AND gates, single quad-gate AND chip).
FoamboardRC (author)  Istarian2 years ago
Yep Yep, I'm sure you could do something like that!
1-40 of 54Next »