edit

Grove - NFC

Near Field Communication (NFC) is a set of short-range wireless technologies. It is behind daily applications such as access control system and mobile payment system. Grove NFC features a highly integrated transceiver module PN532 which handles contactless communication at 13.56MHz. You can read and write a 13.56MHz tag with this module or implement point to point data exchange with two NFCs. Grove NFC is designed to use I2C or UART communication protocols, and UART is the default mode. In addition, we assign an independent PCB antenna which can easily stretch out of any enclosure you use, leaving more room for you to design the exterior of your project.

Version

Version Data Change
Grove NFC V1.0 December 11,2015 inital
Grove NFC V1.1 Augest 31,2016 Add TP2/TP3 Pad on the back of the PCB, to switch the I2C and UART

Specifications

  • Working Voltage: 3.3V
  • Working Current:
    • Static Mode: 73mA
    • Write/Read Mode: 83mA
  • Support host interface: I2C, UART(default).
  • Serve for contactless communication at 13.56MHz.
  • Support ISO14443 Type A and Type B protocols.
  • Max operating distance for detecting NFC tags is 28mm depending on current antenna size.
  • Support P2P communication.
  • Dimensions: 25.43mm x 20.35mm

Tip

More details about Grove modules please refer to Grove System

Platforms Supported

Arduino Raspberry Pi BeagleBone Wio LinkIt ONE

Caution

The platforms mentioned above as supported is/are an indication of the module's hardware or theoritical compatibility. We only provide software library or code examples for Arduino platform in most cases. It is not possible to provide software library / demo code for all possible MCU platforms. Hence, users have to write their own software library.

Hardware overview

The default setting is UART, if you need to change it into I2C, then you should do some soldering at first.

Cut following connections:

  • TP1 to UART
  • TP2 to RX
  • TP3 to TX

Solder following connections:

  • TP1 to I2C
  • TP2 to SCL
  • TP3 to SDA

Getting Started

Note

If this is the first time you work with Arduino, we strongly recommend you to see Getting Started with Arduino before the start.

The Grove - NFC supports I2C and UART, if you use Seeeduino V4.2 or(Arduino UNO), we suggest you to use I2C. If you use Seeeduino Lite(Arduino Leonardo) or Seeeduino Mega(Arduino Mega) we suggest you to use UART.

Play with Seeedunio V4.2

Hardware

Materials required

Seeeduino V4.2 Base Shield Grove - NFC NFC Tags
enter image description here enter image description here enter image description here
Get One Now Get One Now Get One Now Please Prepare yourself

Note

1 Please choose 13.5MHZ, ISO14443 NFC Tags, or the Grove - NFC module may can not read the tag.

2 Please plug the USB cable gently, otherwise you may damage the port. Please use the USB cable with 4 wires inside, the 2 wires cable can't transfer data. If you are not sure about the wire you have, you can click here to buy

3 Each Grove module comes with a Grove cable when you buy. In case you lose the Grove cable, you can click here to buy.

4 For this demo, you can work without the baseshild, for the Seeeduino V4.2 has a on-board Grove I2C connector.

  • Step 1. Connect Grove - NFC to port I2C of Grove-Base Shield.

  • Step 2. Plug Grove - Base Shield into Seeeduino V4.2.

  • Step 3. Connect Seeeduino V4.2 to PC via a USB cable

If you are using Arduino UNO you can connect the signal as below.

Arduino/Arduino Mega Grove - NFC
SCL RX
SDA TX
GND GND
5V VCC

Software

Write the Tag

  • Step 1. Download PN532 library. Extract the PN532.ZIP file and copy the 4 folders(PN532, PN532_SPI, PN532_I2C and PN532_HSU) into Arduino's libraries folder.(For example in my computer the library is located in D:\Software\WorkWork\arduino-1.8.5\libraries)

  • Step 2. Download Grove-NFC-libraries-Part.

  • Step 3. Refer to How to install library to install Grove-NFC-libraries-Part library for Arduino.

  • Step 4. Open “WriteTag” code via the path: File → Examples → Grove-NFC-libraries-Part-master → WriteTag.

  • Step 5. Upload the code. If you do not know how to upload the code, please check How to upload code.

  • Step 6. Open the Serial Monitor of Arduino IDE by click Tool-> Serial Monitor. Or tap the Ctrl+Shift+M key at the same time. Set the baud Rate 9600

  • Step 7. Use the Grove - NFC to get close to an NFC Tag. If everything goes well, you will get the following information.

1
2
3
4
NDENDEF Writer
Scan NFC tag

Write successfully

Read the Tag

  • Step 1. Open “ReadTag” code via the path: File → Examples → Grove-NFC-libraries-Part-master → ReadTag.

  • Step 2. Upload the code. If you do not know how to upload the code, please check How to upload code.

  • Step 3. Open the Serial Monitor of Arduino IDE by click Tool-> Serial Monitor. Or tap the Ctrl+Shift+M key at the same time. Set the baud Rate 9600

  • Step 4. Use the Grove - NFC to get close to an NFC Tag. If everything goes well, you will get the NFC Tag information in the Serial Monitor.

Play with Seeeduino Lite

Hardware

Materials required

Seeeduino Lite Base Shield Grove - NFC NFC Tags
enter image description here enter image description here enter image description here
Get One Now Get One Now Get One Now Please Prepare yourself
  • Step 1. Connect Grove - NFC to port UART of Grove-Base Shield.

  • Step 2. Plug Grove - Base Shield into Seeeduino Lite.

  • Step 3. Connect Seeeduino Lite to PC via a USB cable

Software

  • Step 1. Download PN532 library. Extract the PN532.ZIP file and copy the 4 folders(PN532, PN532_SPI, PN532_I2C and PN532_HSU) into Arduino's libraries folder.(For example in my computer the library located in D:\Software\WorkWork\arduino-1.8.5\libraries)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "PN532_HSU.h"
#include "PN532.h"
#include "NfcAdapter.h"

PN532_HSU interface(Serial1);
NfcAdapter nfc = NfcAdapter(interface);

void setup(void) {
    Serial.begin(115200);
    Serial.println("NDEF Reader");
    nfc.begin();
}

void loop(void) {
    Serial.println("\nScan a NFC tag\n");
    if (nfc.tagPresent())
    {
        NfcTag tag = nfc.read();
        tag.print();
    }
    delay(5000);
}
  • Step 5. Upload the demo. If you do not know how to upload the code, please check How to upload code.

  • Step 6. Open the Serial Monitor of Arduino IDE by click Tool-> Serial Monitor. Or tap the Ctrl+Shift+M key at the same time. Set the baud Rate 9600

  • Step 7. Use the Grove - NFC to get close to an NFC Tag. If everything goes well, you will get the NFC Tag information in the Serial Monitor.

Resources

Project

Particle Photon + Grove NFC + Grove LCD via I2C Use Particle Photon to read UID of a NFC Card and display on LCD, all with I2C.

Tech Support

Please submit any technical issue into our forum.