NFC - mozilla/project_haiku.iot GitHub Wiki

#NFC

Using Adafruit PN532 RFID/NFC Breakout and Shield

Adafruit's breakout-board for the PN532 provides breadboard-friendly layout for experimenting with NFC and RFID. It is capable of reading and writing to a range of the most common NFC tag variants, with both passive tags and the active NFC devices (e.g. controller to controller to exchange data like the phone bump use cases.) Adafruit provides a walkthrough for wiring up their breakout to a Arduino, and a library and example code for the simpler uses cases - writing and reading NDEF data to tags.

We're interested in NFC specifically to explore use cases that promote the physicality and spatial. Maybe we have tokens that can be bumped or placed on a smart surface to assign tasks, set reminders, configure or create relationships between objects. The goal of the exploration is to better understand the opportunities and the important parameters involved: range, power requirements, working with stacked or overlapping tags. And to start to understand how complexity might grow with multiple functions on one device.

Demos

  • NFC + Arduino Writing a URI to Ultralite NFC tag using an Arduino, following Adafruit's wiring guide and example code
  • NFC + ESP8266 Writing a URI to Ultralite NFC tag using a ESP8266.

NFC Antenna and Range

There are limitations on how small a controller device can be due to the physics involved:

"13.56 MHz. The corresponding wavelength is 22 meters long - this means to get a nice half-wave dipole antenna (that radiates well) we would need a device about 11 meters in length"

Source: Antenna-Theory.com.

Essentially, reducing the antenna dimensions reduces the effective range. The antenna on Adafruit's breakout board is about 45mm x 60mm.Currently, we're measuring approx 100mm for a Mifare Classic tag, 50mm for an Mifare Ultralight tag, which agrees with documentation. Make the antenna smaller and that range is reduced. (Also, it may be difficult to source smaller antenna components as this size is the same which is widely adopted in cell phones.) There are similar trade-offs for passive tags: the smaller Ultralight tags are about 25mm diameter, the Mifare classic is closer to credit-card size.

Data Storage

Mifare Classic have 1024 bytes of data storage (EEPROM), the Mifare Ultralight has a capacity of 64 btyes. Data types can include Absolute URIs, Mime Media Records as well as arbitrary/custom encoded data.