Robert Prast Midterm

Midterm:NFC Door Unlock
Documentation Date: 4/1/2017
Project Date:3/27/17
Professor Marcela
Partner:Roberto Noel

Objective: The goal of the midterm was to incorporate either a processing and/or ardiono idea into something unique, useful, or entertaining. For my group, we decided to go down the useful root and design a NFC enabled door unlock for the dorms.

Materials: Ardiuno Uno, DFRobot NFC Sensor, Miifare Card, Jumper Wires, Servo, Breadboard, Tape
Design: The intial idea came out of a creative solution to a small, but relavant problem. I wanted to streamline the process of unlocking your door by making a simple fix of NFC technology. The idea came from using our NYU cards-which work using NFC- on a daily basis to go into and out of the school. This card system is extreamly convienant and only requires you to have one item on you: your card. Extending this system to our dorms would allow us a quick way to unlock the door without a need to bring our keys with us and fumble around for them.
Our general design was quite simple, have a NFC reader and arduino on the outside of the door, that would control a servo motor to bring down the lock when the NFC module is activated. At first we wanted to use string on the servo to pull down the motor, however the string was not strong enough to pull down the lever. Therefore, we resorted to using duct tape and having it function as the binding force between the lever and the servo motor. This solution worked rather well after figuring out how to place the servo to get maximum torque. Since we already had the tape handy, we simply taped the NFC reader to the door with the arduino as well. In the end, the design aspect went quite well. The arduino schematics were also quite simple and easy to execute.

breadboard1 breadboard3 servo

Code: The code for the system was quiet simple, I used an imported library for the NFC specific module, that Professor Scott has showed me. After using this library, it was as simple as reading from any other sensor. Additioanlly, my partner and I both had worked with servos before so that was also quite easy. The NFC reader works by using the RX and TX pins on the serial communication protocol, so to read the NFC module it was like reading/listening on the serial port.

Conclusion/What I learned:
In the end, I learned more about User Experience Design and how to work within the SPI library and other imported library. This is extremely useful, since I know I will be using more custom libraries in the future-so this first time was great practice! Addtionally, I wanted to focus on a system that was as simple to use as possible for the User. Keeping this notion in my mind helped me develop a greater appreciation of UXD.

#include <Servo.h>
#include <PN532_HSU.h>
#include <PN532.h>
Servo servo;
PN532_HSU pn532hsu(Serial);
PN532 nfc(pn532hsu);
uint8_t MATCH[] = {69, 232, 180};
int tag;

void setup(void) {
  Serial.begin(115200);
  servo.attach(5);
  nfc.begin();
  nfc.SAMConfig();
}
void loop() {
  uint8_t success;
  uint8_t uid[] = { 0, 0, 0, 0, 0, 0, 0 };
  uint8_t uidLength;
  success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, uid, &uidLength);
  

  if (success) {
    Serial.println("SUCCESS");
    servo.write(0);
    delay(1000);
    servo.write(180);
  }
}

One thought on “Robert Prast Midterm

  1. Hi Robert,
    I’m glad you used a different type of technology, but it would have been good to add something new to a system that is already in the market.
    The design also needs more work, it should be more as a product that is ready to instal, rather than a prototype.
    In terms of documentation, it would be better to see more about your process of design, more comments about what things you think you should improve, and also have better documented the NFC Sensor and its library, and the Arduino circuit will help future students to use this too.

Leave a Reply