Introduction: NFC Door Lock With the Qduino Mini (under $100)

Have you ever wanted to unlock your front door with just your bus pass, a tag, or an old hotel room key? Now you can with the NFC Door Lock, for under $100! It's a super compact Qduino Mini (Arduino-compatible) powered door lock that senses when there is an NFC tag present, unlocks your door using a Servo and multiple 3D printed parts, and makes absolutely no modifications to your current door lock - you can take it apart if needed in a few minutes! This is super useful & I hope to put it on all doors of my house - it's a relatively easy build in a few hours for an advanced user or a great weekend project for beginners!

-----------------------------------------------------------------------------------------------

If you love this project, please vote for it in the Coded Creations, Explore Science, and Automation contests! Just click on the orange vote button in the upper right hand corner and click vote! I would really appreciate it!

-----------------------------------------------------------------------------------------------

More on the Qduino Mini:

The Qduino Mini is a tiny Arduino compatible development board with a built in LiPo battery charger & fuel gauge - so you can remind yourself when it needs a little juice & you can charge while programming! It was funded on Kickstarter in March 2015: The Qduino Mini on Kickstarter:

-----------------------------------------------------------------------------------------------

The Qduino Mini is perfect for this project - it's LiPo powered & has to fit in a tiny space, but since the Qduino Minis won't be coming until the summertime, we still have you covered. You can still make this project with the SparkFun Pro Micro, LiPo Battery Charger, and LiPo Battery Fuel Gauge for a little over $100.

Step 1: Parts and Tools:

All parts and tools can be found at SparkFun Electronics, Adafruit, and on Kickstarter

Parts ($91 using Qduino Mini, $104 using other):

Qduino Mini(Qtechknow / SparkFun $25) OR Pro Micro (SparkFun, $20), LiPo Charger (SparkFun, $8) & LiPo Fuel Gauge (SparkFun, $10) - a $38 value

Adafruit NFC Shield (Adafruit, $40)

850mAh Lithium Polymer Battery (SparkFun, $10)

Servo - Medium Full Rotation (SparkFun, $14)

Right Angle Male Headers (SparkFun, $2)

Tools:

3D Printer + Filament

Hot Glue Gun + Glue

Soldering Iron + Solder

Small bit of 3M Dual - Lock or Velcro

Hook up Wire

Multimiter

X-ACTO Knife

Laptop

USB microB Cable

Step 2: 3D Printed Parts

Download all of the 3D model files on Thingiverse: you might have to modify the mounting plate to fit your door lock.

There are 4 parts total to print out:

  • Round Mounting Plate
  • Servo Head
  • Servo Mounting Blocks
  • NFC & Qduino Mini Housing

All parts can be printed in under 2 - 3 hours using a Bukito 3D Printer, and most printers should be able to complete it in less than 3 - 4 hours.

Step 3: Soldering & Cutting

First, take out some hook up wire, solder, the NFC Shield, the Qduino Mini, and the Right Angle Male Headers. Split off 3 pins from the block of male headers, and solder them to one edge of the proto space on the NFC Shield.

Wire & solder everything up using the diagram above. You may notice that the IRQ pin is on its own in the middle of the board - this is okay, solder to this pin.

Next, get out your X-ACTO knife and cut the trace between IRQ and D2 on the NFC Shield. Check your connection using the continuity setting on your multimeter.

Note: I will put up a wiring diagram for the Pro Micro/LiPo Charger/LiPo Fuel Gauge version soon.

Step 4: Coding

Install the Adafruit PN532 NFC library in your libraries directory. You can learn more about how to install an Arduino library here.

Upload the whats_my_tag.ino file to your Qduino Mini / Pro Micro & open up the Serial Monitor.

This program will walk you through how to add NFC tags ID's to the code so that you can open your door lock!

Have any problems with this? Leave a comment in the comments section:

Next, open the NFCdoorLockV2.ino sketch, and put in your tag ID #'s and upload!

Step 5: Mounting the Servo

Take out all of the 3D Printed parts & hot glue gun -

Unscrew the screws holding in the inside face of the deadbolt & take out the main mount, then screw it in, covering where the old plate used to be.

Take out the 3D printed Servo head & propeller Servo head - use the included screw to screw on the propeller Servo head. Hot glue the 3D printed Servo head onto the propeller Servo head.

Take out the two small Servo mounts. Hot glue these to the top of the main servo plate - reference the photo above.

Hot glue the Servo into the space made by these mounts - and you are finished!

Hooray!

Step 6: Mounting the Qduino Mini & NFC Shield

Place the whole assembly of the Qduino Mini & NFC Shield in the 3D printed box & attach the Servo cable to the Servo connector. Run the Servo cable through the little hole in the lower left hand corner, and put up against door.

Take out some pieces of 3M Dual Lock or Velcro. We'll use this to secure the Qduino Mini & NFC Shield to the door, and have access to it when we need to reprogram, debug, or charge.

Cut two pieces, roughly 2 inches (4-5cm) long pieces and place one on top of the round 3D printed Servo assembly, and one on the rounded bottom of the 3D printed box housing the Qduino Mini & NFC Shield. Now, push them together, and your door lock is complete!

Hooray!!!

Step 7: Complete!

Woohoo! We're super excited that you've finished your NFC Door Lock using the new Qduino Mini!

Make sure to check out the Qduino Mini!

https://www.kickstarter.com/projects/qtechknow/qduino-mini-arduino-compatible-battery-charger-and

Please leave any comments or questions you have below in the comments section - thanks!

Comments

author
apmahardy made it!(author)2015-03-26

Wow. The second the other wire diagram is up, I'm making one. Then when that little mini bad boy board comes out-- making another.

author
Qtechknow made it!(author)2015-03-27

Awesome!

author
D0doooh made it!(author)2016-09-08

Hi, i miss a wiring diagram for the Adafruit NFC Shield can you upload this?

thanks a lot

author
gendronw made it!(author)2016-07-24

The Qduino is a great design to start a battery based arduino project. You should seriously consider the use of sleep mode. I just don't understand why it is not implemented in any of Qtechnow projects !

author
JasonH28 made it!(author)2015-07-08

"I will put up a wiring diagram for the Pro Micro/LiPo Charger/LiPo Fuel Gauge version soon."

Please post the second diagram.

author
vinchenzo2611 made it!(author)2015-06-22

"I will put up a wiring diagram for the Pro Micro/LiPo Charger/LiPo Fuel Gauge version soon."

When will this be posted?

author
james.strayer made it!(author)2015-06-05

any chance you got around to creating a wiring diagram for the sparkfun pro micro version of this? It is a really cool project and I have everything ready to go, I even designed/printed a new lock housing to work with my Kwikset deadbolt http://www.thingiverse.com/thing:852169 Unfortunately this is my first Arduino project and am struggling to figure out the wiring for the pro micro controller...

author
piedrabob78 made it!(author)2015-05-23

how long does the battery in your project last?

author
qdogskillz made it!(author)2015-04-28

Just wondering, this is a continuous servo you listed, and in the code you send 180 and 0, sort of looking like angles. Are the 180 and 0 sent angles, or just code to make the servo turn and then the one second delay times it so they are at the right place?

author
Qtechknow made it!(author)2015-04-29

This is a continuous rotation servo, and the 180 and 0 are speeds.

author
qdogskillz made it!(author)2015-05-05

I'm trying to modify the code so that when the card is read, the lock opens, stays open for 5 seconds and then closes. This is what I have so far:

myservo.write(180); // Unlock door!

delay(1000);

myservo.write(90); //Stop rotation

delay(5000);

myservo.write(0); // Relock door

delay(1000)

Is this all I need?

author
sahirbray made it!(author)2015-03-31

Very cool.

author
Qtechknow made it!(author)2015-04-29

Thanks!

author
jshapz made it!(author)2015-04-21

So I made an account on here after creeping for years, just to tell you that you did an awesome job. We did this for my college senior project and made a commercial for it. We had like 500 NFC tags/stickers because at an IEEE meeting a speaker came to talk about NFC. They came is so many different sizes and shapes. I even put one in my shoe and did a James Bond thing while I did my actual presentation and unlocked the door

https://www.youtube.com/watch?v=X7qA3gBsYYQ

author
Qtechknow made it!(author)2015-04-29

Awesome! Thank you very much.

author
james.strayer made it!(author)2015-04-01

can I still use my key if the battery dies?

author
Qtechknow made it!(author)2015-04-01

Yes!

author
dan3008 made it!(author)2015-03-24

Cool project :) I wish international shipping wasn't so much, otherwise I'd be backing for 2 of these bad boys.
:( ah well. Thats the problem with living in the uk when all the cool stuff is in america...

author
Qtechknow made it!(author)2015-03-27

Thank you! If it is available for cheaper international shipping, I will let you know.

author
dan3008 made it!(author)2015-03-28

thanks :)

when the kickstarters over, and I'm next doing a sparkfun order, I'll probably get one then :)

author
nqtronix made it!(author)2015-03-24

If you don't care about shipping times you might want to check out some chinease sellers on aliexpress. They usually offer their products with free worldwide shipping which is uper usefull for us in europe. And it's usually cheaper, too.

The downside beside the ridiciously long shipping time is the risk for a low quality product or no product at all (if the parcel went missing).

Examples:

NCF reader:

http://www.aliexpress.com/item/RFID-NFC-PN532-Shield-IC-Card-Expansion-Boards-for-Arduino-with-White-Card/1935758273.html

Pro micro:

http://www.aliexpress.com/item/Free-Shipping-New-Pro-Micro-for-arduino-ATmega32U4-5V-16MHz-Module-with-2-row-pin-header/32237197302.html

author
dan3008 made it!(author)2015-03-24

funny you should mention that. I've just received 3 arduino nano clones, and 2 micro clones, from a seller on aliexspress.

yup, long delivery time, as expected, and no bootloader, but otherwise reasonable service.

Its the battery charger and monitor on the qduino I like the look of :)

author
Qtechknow made it!(author)2015-03-27

Thanks!

author
nqtronix made it!(author)2015-03-25

The on board battery chargers is indeed the dealmaker, I haven't seen a simliar arduiono board. It's just nicer to have a all-in-one solution rather than multiple seperate boards.

author
wewnamansaki26 made it!(author)2015-03-28

nice one.

author
Susitna made it!(author)2015-03-24

Amazing project. Thank You.

author
Qtechknow made it!(author)2015-03-27

Thanks!

author
stvmac11 made it!(author)2015-03-24

Nice job! Instead of a card or bus pass, have you looked into using an Android device? Using "Host-based Card Emulation", you can make an app that emulates a NFC card.

https://developer.android.com/guide/topics/connect...

author
Qtechknow made it!(author)2015-03-27

Thank you! I have been looking all over for how to do this - thanks for sharing & I will look into it.

author
pucksurfer made it!(author)2015-03-24

That's what I was thinking to

author
pucksurfer made it!(author)2015-03-24

Very cool project... Thinking about backing

author
Qtechknow made it!(author)2015-03-27

Thanks!

author
nqtronix made it!(author)2015-03-24

This is amazing! I'd love to open doores with just the tap of my phone.

One concern however is the security aspect. Do you have investigated how easy this is to hack?

author
Qtechknow made it!(author)2015-03-27

Thank you! This is very hard to hack - someone would have to know the exact NFC codes to get in, and there are millions out there.

author
sandilya.anisetty made it!(author)2015-03-25

Amazing project.. I liked it and voted for contest....

author
Qtechknow made it!(author)2015-03-27

Thank you!

author
ibenkos made it!(author)2015-03-26

This is awesome! Nice idea, thanks for sharing :)

author
Qtechknow made it!(author)2015-03-27

Thanks!

About This Instructable

45,402views

537favorites

License:

Bio: White House Maker Faire // 16 years old // CEO of Qtechknow, maker and electronics enthusiast, I teach Arduino classes, and put making into schools! My successful ... More »
More by Qtechknow:NFC Door Lock with the Qduino Mini (under $100)Qtechknow Robot Obstacle CourseYour Image on an Arduino! - TFT LCD Screen Guide
Add instructable to: