NFC Ring Lock Box by Nairod785



  • UPDATE !!!
    Aug 5, 2014
    TUTORIAL !
    http://www.instructables.com/id/NFC-Ring-Lock-Box/
    Here you are !
    Tell me if I need to change something.
    Maybe you want me to explain the sketch ?
    A video to show how it works in real time?

    28/05/2014
    Hello everyone!
    This thread is dedicated to the NFC Ring Lock Box by me, feel free to ask questions, I'd be happy to help you.
    Don't hesitate to check this thread frequently because I'll edit posts to add some text and pics ;)
    I'll try to be clear as possible despite english is not my first language.

    PICTURES

    Actually I received everything I needed to build it, just waiting for the ring which Lokki sent me in the context of Inventions.
    I am suppose to receive it in the next few days.

    Here is the list of what I'm using: (PM me if you want link for very cheap prices !)

    • Arduino Nano
    • PN532 Electro House NFC module
    • Wooden Box
    • Metal lock (for inside lock)
    • Converter Micro USB female to USB female
    • Servo SG90 (motor)
    • Battery 2600mAh
    • Round Rocker Switch

    Actually I'm working on the design of the box(woodburning and dye).
    It let me some time to think about the closing system(almost finished) and receiving the ring to test the software/hardware.

    29/05/2014

    How it works : The box is locked from the inside(NFC lock) and the outside(padlock). You need to open both lock to get access to the contents.
    I had the idea of a secret lock box when I saw this. But seriously? Copy his work and offer it as a gift?
    I had to create my own system. The first thing I noticed was the lack of free space in the box with his system: I wanted to hide it.
    So I put everything in the top of the box, it has 1cm of high, and everything fits perfectly.
    My system has to be self-sufficient, I added a battery(which can power and be charged at the same time, very important), and as little as possible -> Arduino Nano.
    We need a motion to open and close the lock system -> motor -> Servo SG90.
    It has a power switch, you power it when you need to open the box and unpower it when finish.
    It also has a micro usb female to charge the battery AND to edit the Arduino's sketch, if there's a problem.
    It also has a manual way to open the inside in case if nothing else works.
    On the upper face of the box I'll burn the wood (woodburnig) to indicate the location where we have to present the NFC Ring, where is the NFC Reader.

    Up to now I think that my system is complete, if you have comments or any ideas to improve it, please tell us.
    I'm not saying that is the best way to build a NFC lock box but that's how I see it.

    Requirements :

    • Software security/backdoor
    • Manual emergency
      To complete.

    Tutorial Steps :

    • Woodburning
    • Drill Holes
    • Dye the box
    • Try it with an NFC Ring
    • Stuck everything in place

    Next Edit : The inside lock system
    Arduino sketch and Arduino connections
    More pics



  • Any ideas ?



  • Guess what?
    Ring received!
    The dye is being dried.
    Just need to glue everything to the box ;)




  • Community Helper

    looks cool



  • The NFC Ring Lock Box if fully finished.
    Do you want me to make a video?


  • Community Helper

    Yeah go fo it, show us the working item!



  • Share
    and activate subtitles


  • Community Helper

    Excellent, that's great! Very cool!



  • Here is my sketch

    #include <Servo.h>
    #include <Wire.h>
    #include <PN532_I2C.h>
    #include <PN532.h>
    
    PN532_I2C pn532i2c(Wire);
    PN532 nfc(pn532i2c);
    
    Servo myservo;  // create servo object to control a servo
    int pos=1; // variable to store the servo position
    
    void setup() {
      nfc.begin();
      nfc.SAMConfig(); // configure board to read RFID tags 
    } 
    
    void loop() {
      if(pos==1){
        myservo.attach(3);  // attaches the servo on pin 3 to the servo object "Digital 3"
        myservo.writeMicroseconds(2000);
        pos=2;
        delay(400);
      }
      if(pos==3){
        myservo.attach(3);  // attaches the servo on pin 3 to the servo object "Digital 3"
        myservo.writeMicroseconds(580);
        pos=4;
        delay(400);
      }
      if(pos==2){
        myservo.detach();
      }
      if(pos==4){
        myservo.detach();
        delay(2000);
      }
      String ringUid;
      boolean success;
      uint8_t uid[] = {0, 0, 0, 0, 0, 0, 0};  // Buffer to store the returned UID
      uint8_t uidLength; // Length of the UID (4 or 7 bytes depending on ISO14443A card type
      success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, &uid[0], &uidLength);
    
      if (success & uidLength==7) {
    
        for (uint8_t i=0; i<7; i++){
          ringUid += String(uid[i], HEX);
        }
        if (ringUid=="hexadecimal number of inlay n°1" || ringUid=="hexadecimal number of inlay n°2"){
          if(pos!=4){
            pos=3;
          }
          if(pos==4){
            pos=1;
          }
        }
      }
    }


  • Very cool.



  • I'll post a link of the instructable and the final video in the next few weeks!



  • This idea very much interests me. Slightly different use than what I have in mind, but this I dig. Well done and thanks for giving me a fall project to brainstorm on.



  • I'll release a Tutorial in few days... sory for being late



  • TUTORIAL !
    http://www.instructables.com/id/NFC-Ring-Lock-Box/
    Here you are !
    Tell me if I need to change something.
    Maybe you want me to explain the sketch ?
    A video to show how it works in real time?


  • Community Helper

    Lokks good @Nairod785!



  • So cool! I really like this kind of project, great job :D


Log in to reply
 

Looks like your connection to NFC Ring Forum was lost, please wait while we try to reconnect.