I was thinking how I would go about building a remote control lock with an Arduino (or better yet a Raspberry Pi when I get one) and thought I'd check to see if any were available for sale. Schlage has something at a ridiculously high price with a monthly fee of $9-$13 or so. Insanity!

So I'm back to thinking about building one myself. I'm thinking the Pi would have its own web server and wifi interface to connect to my router. I'm pretty sure I can mange the software side of things but need some direction on the hardware.

How would you do it, if you were going to build one? What other hardware would I need to lock and unlock the door? A servo? A general purpose lock that I modify? How?

  • \$\begingroup\$ From a security standpoint, keep the receiver section completely separate from the servo section. Ultimately the receiver should transmit what it receives to the servo side (possibly through encryption) where the data is checked and if correct, opens the servo and probably sends a signal back to the user so they know what happened. \$\endgroup\$ Oct 10, 2012 at 7:32
  • \$\begingroup\$ you could easily use motors.shop.ebay.com/i.html?_nkw=door+lock+actuator , and connect it to one of GPIO.But the problem is security as Garrent Fogerlie said. \$\endgroup\$ Oct 10, 2012 at 7:54
  • \$\begingroup\$ Sorry if this is a dumb question, but I'm not following: could you explain the security problem in more detail? I'm picturing using the Pi to provide a web-based interface (probably a graphical switch that shows the status of the lock, and toggles when I click it, something that would work on a phone screen) which I could access both inside and outside my wifi network. I assumed the Pi would directly control the servo. (No?) Are you saying have one Pi (or other device) as the web server, and another Pi (or Arduino) to control the servo? \$\endgroup\$
    – iconoclast
    Oct 10, 2012 at 19:12

1 Answer 1


This is not a hard project. Firstly you'll need to get an electronic lock.

Electronic lock

They're pretty cheap (less than £20). These kind of locks require 12v to operate. An arduino can't directly provide this kind of voltage, or even the kind of current required by the lock, so you'll need a driver to interface.

Whenever I need a driver for this level of current and voltage (and especially if it's an inductive load as this is) then I always reach for my trusty ULN2803. It has 8 high current drivers, which is overkill here, but at least it gives you the option of actuating loads of locks. The other benefit of the device is that it has inbuilt diodes to cope with the inductive kickback when the lock switches off.

Wiring up an electric lock

  • \$\begingroup\$ Awesome! Thanks for all the detail. Are there any electronic locks that you would especially recommend (or avoid)? Or will pretty much anything I can find work fine? \$\endgroup\$
    – iconoclast
    Oct 10, 2012 at 19:16
  • \$\begingroup\$ I've never actually used one, although I've wanted to, so I can't offer any experience. If there's a security shop near you, you could go and take a look at some. \$\endgroup\$ Oct 10, 2012 at 19:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.