Introduction: NFC Ring Lock Box

Picture of NFC Ring Lock Box

Hi everybody!
Welcome to my first instructable! I apologize in advance for my poor level in English.
In this step-by-step guide I am going to teach you how to build a simple and very cheap NFC Ring Lock Box !

Step 1: What You'll Need

Picture of What You'll Need

Ok first, the idea was to create a box locked from the inside. Many different designs were described and easy to make with Instructables but I decided to create mine.

It had to be the cheapest possible and be able to fit in the top of the box. Also to not take too much storage space.

Cheap Box. I used an unfinished wooden box because you can paint and decorate it however you want. There are many wooden boxes here. But it was too expensive for me so I went here.

Inside system lock. Mine.

Switch. Rocker

Battery and its MicroUSB/USB cable. Mine. It has to be a 5V battery that can be charged and deliver power simultaneously.

Arduino Nano and its MiniUSB/USB cable. Very cheap.

Servo SG90. Very cheap.

PN532 Elechouse NFC. Best One

NFC RING to unlock the box. Official

Micro USB Female to USB Female Adapter. Like this one.

And for sure you'll also need some Basics Tools: 3 Hands, Screwdriver, Driller, Soldering kit ...

Step 2: Connect the NFC Reader/writter and the Servo SG90 Motor to the Arduino Nano

Picture of Connect the NFC Reader/writter and the Servo SG90 Motor to the Arduino Nano

If you received the same SERVO as me, the 3 pins are stuck together. You must detach them from themselves before continuing.

Connect the red wire to the 5V of the Arduino Nano.
Connect the black to the ground GND.
Connect the white wire to the Digital 3.

For the PN532 you can read this but I will tell you everything you need to know to make it work ;)
First you need to put your PN532 into the I2C mode.
Solder the 4 pin connector.

VCC connect to 3.3V, ground to ground, and Analog 5/SCL and Analog 4/SDA.

Just look at the picture.

Step 3: Software

First you need to download the software to use the Arduino Nano.
And then the libraries files to put in your Library folder in your Arduino folder.
You can find help here and here.
And finaly download my sketch called "Nairod785" for this project.

The only thing you need to change is this line:

if (ringUid=="47d6b2b62880" || ringUid=="47c9b2b62880"){
change it with the Uid of your NFC tags, NFC Ring...

You can get the Uid of your NFC Ring by running on the Arduino the example sketch in the PN532 folder called ISO14443A_uid.

Note: Each tag, so each side of the ring has a different uid, that's why you must scan both of them and then enter the 2 UID.

Upload the sketch to the Arduino Nano and test it.

Step 4: Prepare the Box

Picture of Prepare the Box

I did some wood burning as you can see.
I used my pen to draw the different shapes and my soldering kit to burn the wood a little.
Drilled 2 holes for the "external interface" : power ON/OFF and micro USB female to charge the battery and to have access to the arduino in case we need to change the sketch or debug the box.
Paint it and it is almost finished!
Fix the internal lock system.

Step 5: Putting It All Together

Picture of Putting It All Together

Look at my diagram, you have to connect everything like this.

After testing the reading distance with the PN532 board, I realized that the wood between the ring and the PN532 was too big, so I had to scratch the wood a little to reduce the wood's thickness.

When everything seems to work, find the good position for the SERVO and then fix/glue everything to the wood.

You can add plexiglas to protect the circuit if you want.

Step 6: Finished

Picture of Finished

Feel free to comment, ask questions.

I would be pleased to help anyone in need of assistance.

Thanks to:
John McLear and Lokki


JosephS329 (author)2017-12-05

I'm trying something very similar and your code works great with the NFC module and some NFC badges I have. However, when I tried with an NFC ring I bought on Ebay I could not get it to read. I don't see your ring for sale anymore. Can you provide the specifications of the ring so I can purchase a similar one? Thanks for your time.

Nairod785 (author)JosephS3292017-12-12

Hey check this out
Of course, you can find it on Google by typing NFC Ring
You're welcome

RolfJ6 (author)2016-10-18

Very good, I used part of your code to solve my problem.

Do you know how to use an Android with NFC?

My NFC tag changes every time i read it.

I would like to use my phone to unlock a door.

RyanB139 (author)2016-08-23

Hey! Awesome box! I have and RFID/NFC chip in my hand and it only has one number. I put number in both spots and uploaded the script just fine, but when I scan hand nothing happens. Any clues? Thanks

tobyv3 (author)2016-07-21

when i try to upload i get this error message back, any suggestions, thanks for whatever help you can offer

Arduino: 1.6.9 (Windows 10), Board: "Arduino Nano, ATmega328"

C:\Users\mom\Documents\Arduino\libraries\PN532\PN532.cpp: In member function 'uint8_t PN532::mifareclassic_WriteNDEFURI(uint8_t, uint8_t, const char*)':

C:\Users\mom\Documents\Arduino\libraries\PN532\PN532.cpp:551:56: warning: narrowing conversion of '(((int)len) + 5)' from 'int' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]

uint8_t sectorbuffer1[16] = {0x00, 0x00, 0x03, len + 5, 0xD1, 0x01, len + 1, 0x55, uriIdentifier, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};


C:\Users\mom\Documents\Arduino\libraries\PN532\PN532.cpp:551:77: warning: narrowing conversion of '(((int)len) + 1)' from 'int' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]

uint8_t sectorbuffer1[16] = {0x00, 0x00, 0x03, len + 5, 0xD1, 0x01, len + 1, 0x55, uriIdentifier, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};


C:\Users\mom\Documents\Arduino\libraries\PN532\snep.cpp: In member function 'int16_t SNEP::read(uint8_t*, uint8_t, uint16_t)':

C:\Users\mom\Documents\Arduino\libraries\PN532\snep.cpp:82:31: warning: left shift count >= width of type [enabled by default]

uint32_t length = (buf[2] << 24) + (buf[3] << 16) + (buf[4] << 8) + buf[5];


C:\Users\mom\Documents\Arduino\libraries\PN532\snep.cpp:82:48: warning: left shift count >= width of type [enabled by default]

uint32_t length = (buf[2] << 24) + (buf[3] << 16) + (buf[4] << 8) + buf[5];


C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-ar: unable to rename 'core\core.a'; reason: Permission denied

exit status 1

Error compiling for board Arduino Nano.

Invalid library found in C:\Program Files (x86)\Arduino\libraries\Nairod_files: C:\Program Files (x86)\Arduino\libraries\Nairod_files

Invalid library found in C:\Program Files (x86)\Arduino\libraries\Nairod_files: C:\Program Files (x86)\Arduino\libraries\Nairod_files

MohamedI80 (author)2016-06-15

Hello friend can i ask after connecting the servo with arduino and pn532 together but when run the ISO14443A uid to get my uid it gives me Error while setting serial port parameters: 9,600 N 8 1 i want to know where is the error thanks

MahmoudS57 (author)2016-04-04

Can I use this NFC Arduino module instead of PN532 Elechouse NFC

Nairod785 (author)MahmoudS572016-04-04

You probably can but I recommend using the new KeyDuino made especially for the NFC ring ;)

MahmoudS57 (author)Nairod7852016-04-04

Thanks!! but keyduino and pn532 it's not in my country i found this after searching i'm just asking if it's ok
And i'll use tag instead of ring

KmsK (author)2016-01-22

Friend i have a lockbox it has locked because the battery is low thats why i went to shop to bring the battery but my friend has locked the lockerbox. In side the lockerbox. Ha no battery so i can not open it you know how to open means pless call me in this number 971568629552 because in the locker inside has my friends passports,visa all so i hope u can help me plesss

Nairod785 (author)KmsK2016-01-22

Call me on Skype as you as you can, my user ID is victus61

KaiB5 (author)2015-12-06

Cannot upload library. It says "library invalid". How can that be? Any ideas?

photobomber (author)2015-07-09

So do you turn on the circuit to activate the reader, or can you leave it on? I imagine the battery wouldn't last long if the arduino is always waiting for the ring. If so, any tips on how to save on battery drain?

Sutwin607 (author)2015-06-10


I like your project, it is very interesting. Since you have so much experience with NFC and locks, can you tell me if the whole system can be miniaturized to fit a tube the size of an electric tooth brusk?

Thank you and don't stop inventing cool ideas.


Nairod785 (author)Sutwin6072015-06-10

Hey Joe! Thanks for the compliments, and the answer to your question is: yes for sure! Well actually you need a NFL antenna to read the tag or the ring, and every Antena I saw on the market still big. But you still have a chance with the KeyDuino, check it out on the NFC ring forum. It's a minimalist NFC Ring reader built with arguing and USB!

If you have more question, Pm me :)

WX4ME (author)2015-01-14


Very impressive project

I'm wondering if i can just read/write using this NFC

because i have exactly the same one you use (the red one) but i couldn't find a single info or a way to do it

Thanx in advance

By the way I'm using Arduino mega 2560

Nairod785 (author)WX4ME2015-01-15

Of course you can read and write with this module PN532.
Any arduino will do the job I guess:)
Download the PN532 Elechouse library

WX4ME (author)Nairod7852015-01-16


I will check the link

hsudesmond (author)2014-12-01


I am having a bit of a problem with the software. When I found my rings NFC UID it was

0x4 0x72 0x87 0xBA 0x34 0x35 0x80 - using iso14443a_uid code

But for your code, you have it as a 12 digit number. which is not the case for my ring apparently. As well, if I wanted to use a UID with Length 4, how would I change the code?

please and thanks!

Nairod785 (author)hsudesmond2014-12-01

Your UID is 47482ba343580
Just delete the 0x and put the letters in minuscule. :)

hsudesmond (author)Nairod7852014-12-02

Hmmm... I tried that. And no change. I am sure that the ring works, I am sure the NFC module works. Any other ideas Nairod785? I also tried 47287ba343580 (assuming u just typed it wrong in the reply)

Nairod785 (author)hsudesmond2014-12-05

Yeas it should be 47287ba343580.
If it still doesn't work, read your PM.

Adambowker98 (author)2014-10-03


I really really like this! I'm planning on building one very soon. I'm not very good with Arduino (actually I have zero experience) so some parts of the code are confusing me. This in particular:

void loop() {


myservo.attach(3); // attaches the servo on pin 3 to the servo object "Digital 3"






myservo.attach(3); // attaches the servo on pin 3 to the servo object "Digital 3"




I don't get it because you say if the servo position is 1 ( if(pos==1) ), then attach to pin3, write to the servo, and set position to 2 (pos=2). Next, you say if(pos==3), write to the servo and set the position to 4. It's confusing because when will the position ever be 3? It starts as 1, then can be changed to 2. Thanks in advance for the help :)

Nairod785 (author)Adambowker982014-10-04

I don't really have the time to review my code, in fact I didn't have experience with arduino too.
But the sate "pos=3" and "pos=1" are set when it detects the ring.
Try the code and you'll see that it will works :)
If you really don't understand you can PM me.

if (ringUid=="47d6b2b62880" || ringUid=="47c9b2b62880"){



Scolasticus (author)2014-08-18


where did you get the circuit board from? I already got the battery but I need the board and the possibility to attach USB and Micro USB on it.

Nairod785 (author)Scolasticus2014-08-21

The circuit board was a part of the battery, I simply removed the case to just keek the battery and the board.
But you can find it on the internet I suppose.
I'm sorry to don't help you more than that.

Radtke.Felix (author)2014-08-18

Great project!

How can I build such a circuit board for the battery?

What type of battery is it? Lithium?

Thank you.

Gab94 (author)2014-08-12

Hi All,

Please to never buy this ring!

I tried on march to buy one, following the kickstarter campaign. I've payed the product, received a shipping anounce, without tracking information.

I'm waiting for 5months now... And they do not want to answer to me. A ring cost 29.99£ + 10£ when you are not in UK. Then they just stole me 40£.

You should not do the same error than me...

I'm trying to report this as fraud today. Good luck.

Nairod785 (author)Gab942014-08-12

Write something on the official forum, be sure they gonna listen. Don't be hateful, it's a new company, with less than 10 employees who are trying to do their best.
Post and the forum, explain everything while being polite and you'll receive your ring shortly.
Hope you will resolve this.

corim123 (author)2014-08-12

I'm trying to create something similar but with the RFID device in this link:

Being new to Arduino I'm a little confused on what exactly I'll have to modify to make this. Going to need to bring back some of my Java skills it seems. I just want to use RFID because I already have one that I use for work and is more practical for me.

corim123 (author)corim1232014-08-12

I know the code will essentially be something like this but wanted some feedback:

I won't have the servo and other parts for a couple weeks anyway but I want to go ahead and figure out the code as much as possible in the meantime.

Nairod785 (author)corim1232014-08-12

I can't help you very well because I was new to arduino too before this project and I only used the NFC library.
But maybe, let's PM ok? We'll post here if we figure out something.

Consider My Solution (author)2014-08-10

What the heck is a "NFC ring special edition with rainbow inlay?"

I wondered that also! It appears that it is a ring with a Near Field Communication chip embedded in it. Sounds pretty cool! You can Google it for more info

Johnkaye (author)2014-08-10

Google is your friend:

Great Instructable

If the link doesn't work Google: NFC ring special edition with rainbow inlay

This is awesome, you should enter the epilog contest!

About This Instructable




More by Nairod785:Infinity Mirror UV String ArtNFC Ring Lock Box
Add instructable to: