Instructables
Picture of Very Simple Arduino Electric Lock
This is a instructable for a very simple Arduino controlled electric lock.

The key idea here is to be very simple as this was more of a proof of concept prototype type of thing.

The Arduino is used as a switch to control the lock itself, and is set to interface with a Computer.

The Computer sends serial data to the Arduino in which allows the electronic lock to be opened.

The Computer itself allows many different ways of opening this lock such as just pushing a button, reading a bar code scanner, and even over Bluetooth with a Windows Mobile device.

I used this simple project as a fun way of learning the basics of a few different things,
such as Arduino programming, Bluetooth integration, Bar code scanners and Serial communication

 
Remove these adsRemove these ads by Signing Up

Step 1: Parts

lock1.jpg
nolock.png
yeslock.png
Well first you need a Arduino, i used a Diecimila but any type would work.

The lock i am using is La Gard ENV 1300 type lock, i bought like 6 of them for 10 bucks on EBay.
You can not use just any type of lock, like a regular door lock, it must be electronic based.

It needs to work in the following manner: Inside this lock is a deadbolt, now what keeps this deadbolt closed is a very simple electromagnet. When you put power through this electromagnet it allows the lock to be open. If it does not have this simple electromagnet inside then it will not work . A simple door lock that uses a key and pins and tumbler will not work.

I included a picture of the inside of the lock where you can see how it works: Power goes to the electromagnet which pulls back a pin that releases and frees a wedge. This wedge then allows the door to be unlocked.

Theoretically you could create your own electromagnetic lock, or use a simple motor or something but that is for a different instructable.

You will also need a basic transistor: I used a 2N2222 from radio shack

Now if you want to open it through other means than just the computer your need:

A Bluetooth phone, i am using a Touch Pro with Windows Mobile

A bar code scanner, i am using a Symbol CS1504

In the last picture you see a door knob, this door knob has a wooden square knob glued to the bottom to fit in the square peg on the lock, its used to open the lock.

daznovia7 months ago

would it works with a 12v working voltage operated electric door lock ?

RKlenka (author)  daznovia1 month ago

It should, you would just have to adjust all the resisters and stuff accordingly.

kingsleyumoh5 months ago

Its an awesome project. sir please what if you want to use a hand shape scan to control the lock?.

RKlenka (author)  kingsleyumoh1 month ago

Idea is the same. You just need a hand shape scanner to send something to the Arduino (or to the computer that passes it on) or could just make a Arduino powered hand scanner.

ekeesee1 month ago

This is probably a stupid question, but could you this this for Windows Phone 8? And would you need a bluetooth module to control this from that?

RKlenka (author)  ekeesee1 month ago

WP8 is a little tricky when it comes to bluetooth but it should be possible on WP8, though it wont work on WP7.

You can either do it through a computer like i did, or with a bluetooth module on the Arduino.

You should be able to also do with through a wifi based method as well.

gluvit5 months ago
This is great
rhymer281 year ago
Sir did you use any data base server to store the barcode?tnx.
RKlenka (author)  rhymer281 year ago
Not in this one. Though you could if you wanted to i guess. I think i just scanned the barcode before hand and saved it as CODE to have it to compare with. So no, i did not use a database to store the barcode.
nelo_0071 year ago
hola amigo me interesa el diagrama electronico me lo puedes proporcionar y las cosas que utilizaste para poder hacer este proyecto saludos
Can you guys help me out, I can't seem to find the right lock anywhere! I've looked for a week now, and nothing, any that I do find are with keypad and 80 dollars, Thanks,
Nick
RKlenka (author)  nickstewartroc2 years ago
Yea this lock is rather tricky, they cost more when they include the electronics:
This one looks like it has two but they might be different: http://www.ebay.com/itm/Lot-LaGard-Smart-Link-Electronic-Safe-Lock-Parts-Locksmith-/300655167002?pt=LH_DefaultDomain_0&hash=item460071c61a
same as above: http://www.ebay.com/itm/Lot-LaGard-Smart-Link-Electronic-Safe-Lock-Parts-Locksmith-/300655167023?pt=LH_DefaultDomain_0&hash=item460071c62f
I guess just keep checking for La gard locks: http://www.ebay.com/sch/i.html?_nkw=la+gard+locks
you could check with local locksmith and see if they have any of the lock units they dont want.
RKlenka (author)  nickstewartroc3 years ago
here is the cheapest one i can find at 45:
http://cgi.ebay.com/Gard-Combo-Guard-Electronic-lock-Kaba-Mas-3750-/120688325588?pt=LH_DefaultDomain_0&hash=item1c1995b3d4
not that many on ebay right not it seams:
http://cgi.ebay.com/SecuRam-Chrome-Electronic-Safe-Lock-LaGard-S-G-Amsec-/260738355156?pt=LH_DefaultDomain_0&hash=item3cb5378fd4

I guess just keep waiting and looking, what your paying most for is the keypad when we only need the lock, i guess you could contact them and ask if they would just sell you the lock.
tmhawley2 years ago
This is the exact project i'm trying to do. However, I can not find any of the dang locks for under 20$ and as I'm trying to do this for multiple doors this would be pricey. By chance anyone has any recent links to cheap electronic locks? All i can find are electronic door strikes and expensive keypad all in one electric door locks. Thanks for suggestions!
kelevra882 years ago
How did you create the application ??
RKlenka (author)  kelevra882 years ago
In Visual Studio 2008 with the code i listed above, should world in the Express editions as well
febbie3 years ago
can you give us a more detailed connection of the transistor with the arduino...i am really confuse on where to connect the ground and as well as the wires going to the lock.i hope you could help us..
febbie febbie3 years ago
thank you for being so helpful..we deeply aappppreeciiateeee iiiittt!!
we'll let you know what happened to our project when the right time comes..:)
RKlenka (author)  febbie3 years ago
I rewrote some parts and added a new diagram let me know if that helps
raziiq4 years ago
 Well First of all, its an amazing project. This is exactly what i am looking for.  I need a little of your help in this project.

I got the Arduino end of the Project, and the program is also simple, thanks for that. But i couldnt understand the Hardware part (The Lock part ) of the project. What actually going inside the lock is a bit fuzzy in my mind, can you please explain that in more detail.

Thanks in advance.


RKlenka (author)  raziiq4 years ago
Sure, the idea was to find a electronic lock that would unlock when power (5v) is sent to it or taken from it. That was all i had to do was to send it a signal with and it would unlock.

This lock i found on ebay, it i remember correctly is that it was used in a bank to secure the cash drawer.

How it works is that it has a dead bolt(the big grey bar sticking out) that is kept locked by a small gray wedge. This wedge has a hole in it, a pin is stuck through this hole and into a electro-magnent and a spring to keep the pin in place. When there is no power the spring pushes the pin through the hole in the wedge. The wedge then can not be open becouse the pin is in the way. But when given power the electro-magenet pulls the pin into the magents housing freeing the wedge so it can be unlocked. when power is removed the spring pushes the pin back into place with the wedge.

This lock though must be turned (the door knob in the pictures) to move the dead bolt, the dead bolt does not open on its own.

You can find a few like this on ebay, just make sure your buying the lock unit and not the keypad unless, your want the keypad. I got 4 of these for like 5 bucks.
raziiq RKlenka4 years ago
Thank you for that kind explanation. I thought you added something to that ordinary lock. So basically lock has got all the things like Spring and wedge by default and you are controlling the current using the pins of Arduino, so basically Arduino is acting like a switch here.

BTW do you know the actual name of this door lock??

I found this lock, but dont know if its gonna work like your lock or not?

cgi.ebay.com/Slightly-Used-Schlage-Deadbolt-Door-Lock_W0QQitemZ280437876852QQcmdZViewItemQQptZLH_DefaultDomain_0
RKlenka (author)  raziiq4 years ago
Nope the one you listed is just a plain old deadbolt lock, try ebaying for electronic lock, start at the cheapest price and your find some:
http://cgi.ebay.com/DAMAGED-HIGH-SECURITY-GUN-SAFE-ELECTRONIC-LOCK-LA-GARD_W0QQitemZ290381081936QQcmdZViewItemQQptZLH_DefaultDomain_0?hash=item439c0fad50
or
http://cgi.ebay.com/Lagard-3600-electronic-safe-lock_W0QQitemZ300378252492QQcmdZViewItemQQptZLH_DefaultDomain_0?hash=item45eff064cc
or
http://cgi.ebay.com/Lagard-3600-electronic-safe-lock_W0QQitemZ300378252446QQcmdZViewItemQQptZLH_DefaultDomain_0?hash=item45eff0649e
or
http://cgi.ebay.com/Sargent-Greenleaf-Used-Electronic-Safe-Lock-For-Parts_W0QQitemZ320462290269QQcmdZViewItemQQptZLH_DefaultDomain_0?hash=item4a9d0a7d5d

The lock i have is a La Gard ENV 1300
Hi RKlenka,

Firstly, thanks for sharing an excellent project, pretty neat and well done.
Just wondering however, as to are these the $8.99 locks that are found all over eBay now ? All of those other links do not show up, as they are obviously quite dated (9-10 months old).

cheers,
F74
RKlenka (author)  falcon744 years ago
Added a image collage if that helps.

Some EBay links:
http://cgi.ebay.com/LG-High-Security-Electronic-Lock-Keypad-Mod-3260-/280561484827?pt=LH_DefaultDomain_0&hash=item4152c4841b

http://cgi.ebay.com/AMSEC-ESL10-ELECTRONIC-SAFE-LOCK-/110585396489?pt=LH_DefaultDomain_0&hash=item19bf673d09

http://cgi.ebay.com/LAGARD-Electronic-lock-6-digit-CODE-3800-type-GUN-SAFE-/220667625063?pt=LH_DefaultDomain_0&hash=item3360d0be67

and maybe even this one
http://cgi.ebay.com/Diebold-Lubricated-Lock-17408A-Keyless-Electronic-NEW-/110582245802?pt=LH_DefaultDomain_0&hash=item19bf3729aa

and if all else fails i might have a few somewhere still
raziiq RKlenka4 years ago
After some hectic months with my Uni Study now i have some free time to try this project, but the problem is i still cant find myself an electronic Lock, the ones i searched on the internet are really expensive.
raziiq RKlenka4 years ago
 Thank you for your instant reply. I ll look at these locks, thanks :)

Hoping for your kind support in future 
shelley_fox4 years ago
Hi, this is a great little project and I'm really looking forward to trying it out!  Could you please give me the specs for the transistor that you've got in there?  Also, is there any way that you could include a little schematic of how it is wired in, I can't quite make out how you've done your connections from the pictures.

Thank you!
RKlenka (author)  shelley_fox4 years ago
It is using a 2N2222 transistor there like 3 bucks for a box of 10 or something at radio shack, 

The signal from the Digital port is connected to the transistors base.
The power from the Arduino is going through the lock back out and to the collector on the transitor
Then it is going out the emitter to the Ground on the Arduino

Ill try and get a schematic up
lemonie4 years ago
Can you take the plate of to show the mechanics of the electromagnetic lock?

L
RKlenka (author)  lemonie4 years ago
Yes i will add it to the parts area
lemonie RKlenka4 years ago
I see it - thanks

L