RFID / NFC Shield

From ElecFreaks
Jump to: navigation, search


RFID/NFC Shield is a Near Field Communication interface for Arduino build around the popular NXP PN532 integrated circuit and SPI communication between Arduino and NFC Shield.. RFID/NFC is a short-distance radio technology that enables communication between devices that are held close together. RFID/NFC traces its roots in RFID technology and is an open platform technology standardized in ECMA-340 and ISO/IEC 18092.

RFID/NFC technology is regulated by Near Field Communication Forum which standardizes NFC communication between devices -- how they pair, share data and allow a secure transaction to happen.NFC Forum develops and certifies device compliance with NFC standards . NFC operate on ISM band of 13.56 MHz Frequency. NFC communication range is up to 10 cm. But, this is limited by the antenna and power radiation design. Most devices work within a range of 10mm. NFC Shield antenna is designed to work within a range of 1cm. NFC Shield provides all necessary circuitry for PN532 like 27.12Mhz crystal, power supply. It also beaks-out the I/O pins of PN532 for easy access.

Model: SHD-NFC

Arduino Shield NFC 01.jpgArduino Shield NFC 02.jpgArduino Shield NFC 03.jpg


  • Arduino Shield compatible. No soldering required.
  • SPI interface. Hence, most Arduino pins are available for other applications.
  • Built in PCB Antenna.
  • Supports both 3.3V and 5V operation.
  • Socket to connect other shields.

Application Ideas

  • Use as a RFID reader with Mifare One tags (ISO14443 Type-A) and cards (13.56Mhz).
  • Build visiting card sharing system.
  • Build attendance systems.
  • Design authentication systems.
  • Read Smart Posters.
  • Securely exchange small data with other NFC devices
  • Use with Seeeduino ADK Main Board for creating mobile NFC applications.
  • And other endless possibility.




Hardware Installation

More Detail :

Arduino Shield NFC 08.jpg Arduino Shield NFC 05.jpg Arduino Shield NFC 04.jpg Arduino Shield NFC 07.jpg Arduino Shield NFC 06.jpg


The PN532 software library for NFC Shield is derived from Adafruits PN532 Library.The original library provides API for reading Passive Target ID of Mifare Card/Tags. This is enough for card/tag identification purpose. We have added APIs for authentication, reading from and writing to Mifare Cards/Tags. The software library only provides low level functionality. Users have to implement NFC application layer(if required).

Please Note: Arduino 1.0 users have to change the #include <WProgram.h> lines to #include <Arduino.h> in PN532.cpp and PN532.h.

Quick Start Demo

A simple sketch which reads the Passive Target ID from MIFARE cards and tags. Passive Target ID is an unique, permanent and read-only number programmed on to the MIFARE card by the manufacturer. This number is used to identify one card from another.

  • Connect the NFC Shield to Seeeduino / Arduino as shown above.
  • Compile and upload the program to Arduino.
  • Bring a Mifare Card near the NFC Antenna as shown above.

Includes important code snippet. Demo code like :

#include <PN532.h>
 * Corrected MISO/MOSI/SCK for Mega from Jonathan Hogg (www.jonathanhogg.com)
 * SS is the same, due to NFC Shield schematic
#define SS 10
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
  #define MISO 50
  #define MOSI 51
  #define SCK 52
  #define MISO 12
  #define MOSI 11
  #define SCK 13
PN532 nfc(SCK, MISO, MOSI, SS);
void setup(void) {
  uint32_t versiondata = nfc.getFirmwareVersion();
  if (! versiondata) {
    Serial.print("Didn't find PN53x board");
    while (1); // halt
  // Got ok data, print it out!
  Serial.print("Found chip PN5"); Serial.println((versiondata>>24) & 0xFF, HEX); 
  Serial.print("Firmware ver. "); Serial.print((versiondata>>16) & 0xFF, DEC); 
  Serial.print('.'); Serial.println((versiondata>>8) & 0xFF, DEC);
  Serial.print("Supports "); Serial.println(versiondata & 0xFF, HEX);
  // configure board to read RFID tags and cards
void loop(void) {
  uint32_t id;
  // look for MiFare type cards
  id = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A);
  if (id != 0) {
    Serial.print("Read card #"); Serial.println(id);


Version Tracker

Revision Descriptions Release
v1.0 Initial public release date


How to buy

Click here to buy: http://www.elecfreaks.com/estore/rfid-nfc-shield-shd-nfc.html

See Also

Other related products and resources.


This documentation is licensed under the Creative Commons Attribution-ShareAlike License 3.0 Source code and libraries are

licensed under GPL/LGPL, see source code files for details.

External Links

Links to external webpages which provide more application ideas, documents/datasheet or software libraries