Introduction: Magnetic Key Door Latch

About: IoT - Internet of Things. Iota - small thing. Thingamajig - An object whose name can't be recalled. Iotamajig - A little unnamed internet connected gizmo!

PLEASE NOTE: This project is a proof of concept for making a door latch that can be opened with a magnetic key. It should not be considered secure, as anyone with a magnet will be able to open the door. Or Magneto... he's always causing me grief.

That being said, I have a garden shed that I'm not really concerned about people breaking into, but I do like to keep locked. And I always have to go get the key. So I thought I would build a "hidden in plain sight" method to be able to open the door when I need it.

This is maybe slightly more secure than hiding the key under a piece of fake dog poo.. another route I was considering.

My intention is to put the reed switch in a random place on the inside of the shed (but not TOO far from the door), and basically swipe the outside of the wall with the magnet to activate the latch.

A future project will be to toss an Arduino or somesuch into the mix with a keypad as the activator.

Better uses might be inside your house: maybe a fun way to lock a kid's fort or bedroom - where they can control the placement of the switch and only those with the right magic can enter!

Step 1: What You'll Need

To build the prototype out:

Step 2: Set the Board Up

This setup is pretty straight forward. The electric strike (see here) I used runs on 12V, and only uses about 200 mA when the magnet is engaged. What's cool about this guy, is, it doesn't unlock the door, it lets the latch catch fall back, allowing you to just push the door open. To set it up:

  • Wire the barrel jack into the board.
  • Put the regulator in, connecting its + and - to the + and - from the jack.
  • Connect the Vout from the regulator to the Vin of the relay.
  • Connect the Grnd of the relay to ground (-) of the barrel jack.
  • To turn the relay on, you need to pull DOWN (ground out) its data input. To do that we'll connect one end of the reed switch the the Data pin of the relay, and the other end of the reed switch to Ground.
  • To hook the electric strike up, for the model I used, it has two contacts. It's wired so it works the same no matter which way you connect it (+ and - don't matter). Connect one side of it to Ground. Connect the other side to the NO connection of the relay. Connect the Common connection of the relay to the + side of the barrel jack.
  • DONE!

Step 3: Test It Out

Power it up. If you used the same components I used from my list, the regulator should have an LED light up, and the relay should have an LED light up. If you don't see two lit LEDs, check your wiring.

If your power is good, bring the magnet close to the reed switch. You should hear the relay kick on, and the electric strike should click as well.

Test the latch part of the strike, it should swing open with a push! Remove the magnet, the latch shouldn't be able to be pushed open.

Notice the sensitivity the reed switch has to the magnet. Mine easily activates from 1.5 inches away.

Step 4: Optional: More Permanent Build

I took the layout of the breadboard and soldered everything in to a proto board.

Everything fits nicely into the enclosure boxes I had - I just had to cut out a spot for the jack, and two slots: one for the wires to the reed switch, and one for the wires to the electric strike.

That's all there is to it! Now watch out for Magneto.