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

Step 1: Parts

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.

<p>Will this work if I use a Single Door Magnetic Lock?</p>
If its a simple electronic one that just needs a current of some kind to open then it should work fine.
<p>Thanks. Its just a simple magnetic door lock.<br></p>
<p>Thanks. Its just a simple magnetic door lock.<br></p>
If I wanted to use multiple barcode ( s ) to open one lock could I
<p>would it works with a 12v working voltage operated electric door lock ?</p>
<p>It should, you would just have to adjust all the resisters and stuff accordingly. </p>
<p>You would need to provide a separate 12 volt supply to the lock, not use the 5volts from the arduino. Depending on the amount of current (not voltage) the lock uses, you may need a mosfet instead of a transistor.</p>
<p>A mosfet is a type of transistor.</p>
<p>You are correct. I should have said &quot;a mosfet instead of a basic transistor like this.&quot;</p>
<p>Its an awesome project. sir please what if you want to use a hand shape scan to control the lock?.</p>
<p>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. </p>
<p>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? </p>
<p>WP8 is a little tricky when it comes to bluetooth but it should be possible on WP8, though it wont work on WP7. </p><p>You can either do it through a computer like i did, or with a bluetooth module on the Arduino.<br><br>You should be able to also do with through a wifi based method as well.</p>
This is great
Sir did you use any data base server to store the barcode?tnx.
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.
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,<br>Nick
Yea this lock is rather tricky, they cost more when they include the electronics:<br>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&amp;hash=item460071c61a<br>same as above: http://www.ebay.com/itm/Lot-LaGard-Smart-Link-Electronic-Safe-Lock-Parts-Locksmith-/300655167023?pt=LH_DefaultDomain_0&amp;hash=item460071c62f<br>I guess just keep checking for La gard locks: http://www.ebay.com/sch/i.html?_nkw=la+gard+locks <br>you could check with local locksmith and see if they have any of the lock units they dont want.
here is the cheapest one i can find at 45:<br>http://cgi.ebay.com/Gard-Combo-Guard-Electronic-lock-Kaba-Mas-3750-/120688325588?pt=LH_DefaultDomain_0&amp;hash=item1c1995b3d4<br>not that many on ebay right not it seams:<br>http://cgi.ebay.com/SecuRam-Chrome-Electronic-Safe-Lock-LaGard-S-G-Amsec-/260738355156?pt=LH_DefaultDomain_0&amp;hash=item3cb5378fd4<br><br>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.
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!
How did you create the application ??
In Visual Studio 2008 with the code i listed above, should world in the Express editions as well
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..
thank you for being so helpful..we deeply aappppreeciiateeee iiiittt!!<br>we'll let you know what happened to our project when the right time comes..:)<br>
I rewrote some parts and added a new diagram let me know if that helps
&nbsp;Well First of all, its an amazing project. This is exactly what i am looking for. &nbsp;I need a little of your help in this project.<br /> <br /> 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.<br /> <br /> Thanks in advance.<br /> <br /> <br />
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.<br /> <br /> This lock i found on ebay, it i remember correctly is that it was used in a bank to secure the cash drawer.<br /> <br /> 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.<br /> <br /> 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.<br /> <br /> 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.
Thank you for that kind explanation. I&nbsp;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.<br /> <br /> BTW do you know the actual name of this door lock??<br /> <br /> I found this lock, but dont know if its gonna work like your lock or not?<br /> <br /> <a href="http://cgi.ebay.com/Slightly-Used-Schlage-Deadbolt-Door-Lock_W0QQitemZ280437876852QQcmdZViewItemQQptZLH_DefaultDomain_0?hash=item414b666874" rel="nofollow">cgi.ebay.com/Slightly-Used-Schlage-Deadbolt-Door-Lock_W0QQitemZ280437876852QQcmdZViewItemQQptZLH_DefaultDomain_0</a><br />
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:<br /> http://cgi.ebay.com/DAMAGED-HIGH-SECURITY-GUN-SAFE-ELECTRONIC-LOCK-LA-GARD_W0QQitemZ290381081936QQcmdZViewItemQQptZLH_DefaultDomain_0?hash=item439c0fad50<br /> or<br /> http://cgi.ebay.com/Lagard-3600-electronic-safe-lock_W0QQitemZ300378252492QQcmdZViewItemQQptZLH_DefaultDomain_0?hash=item45eff064cc<br /> or<br /> http://cgi.ebay.com/Lagard-3600-electronic-safe-lock_W0QQitemZ300378252446QQcmdZViewItemQQptZLH_DefaultDomain_0?hash=item45eff0649e<br /> or<br /> http://cgi.ebay.com/Sargent-Greenleaf-Used-Electronic-Safe-Lock-For-Parts_W0QQitemZ320462290269QQcmdZViewItemQQptZLH_DefaultDomain_0?hash=item4a9d0a7d5d<br /> <br /> The lock i have is a La Gard ENV 1300
Hi RKlenka,<br><br>Firstly, thanks for sharing an excellent project, pretty neat and well done.<br>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).<br><br>cheers,<br>F74
Added a image collage if that helps.<br> <br>Some EBay links:<br>http://cgi.ebay.com/LG-High-Security-Electronic-Lock-Keypad-Mod-3260-/280561484827?pt=LH_DefaultDomain_0&amp;hash=item4152c4841b<br><br>http://cgi.ebay.com/AMSEC-ESL10-ELECTRONIC-SAFE-LOCK-/110585396489?pt=LH_DefaultDomain_0&amp;hash=item19bf673d09<br><br>http://cgi.ebay.com/LAGARD-Electronic-lock-6-digit-CODE-3800-type-GUN-SAFE-/220667625063?pt=LH_DefaultDomain_0&amp;hash=item3360d0be67<br><br>and maybe even this one<br>http://cgi.ebay.com/Diebold-Lubricated-Lock-17408A-Keyless-Electronic-NEW-/110582245802?pt=LH_DefaultDomain_0&amp;hash=item19bf3729aa<br><br>and if all else fails i might have a few somewhere still
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.
&nbsp;Thank you for your instant reply. I ll look at these locks, thanks :)<br /> <br /> Hoping for your kind support in future&nbsp;<br />
Hi, this is a great little project and I'm really looking forward to trying it out!&nbsp; Could you please give me the specs for the transistor that you've got in there?&nbsp; Also, is there any way that you could include&nbsp;a little schematic of how it is wired in, I can't quite make out how you've done your connections from the pictures.<br /> <br /> Thank you!
It is using a 2N2222 transistor there like 3 bucks for a box of 10 or something at radio shack,&nbsp;<br /> <br /> The signal from the Digital port is connected to the transistors base.<br /> The power from the Arduino is going through the lock back out and to the collector on the transitor<br /> Then it is going out the emitter to the Ground on the Arduino<br /> <br /> Ill try and get a schematic up<br />
Can you take the plate of to show the mechanics of the electromagnetic lock?<br /> <br /> L<br />
Yes i will add it to the parts area<br />
I see it - thanks<br /> <br /> L<br />

About This Instructable




More by RKlenka:Powermat your carTransparent lockscreen for Windows Phone 7 MangoPowermat your phone (in this case my HTC Arrive)
Add instructable to: