NFC v3 Reader with Arduino

Turns out there are playing cards available with NFC capability embedded in them. I’m helping a friend make an automated bridge table. The step I’m helping with in particular is reading the card inputs and pushing the information on to the host computer.

The three options I found quickly were from Adafruit, Seed Studio, and then a cheap option on Amazon. This tutorial is about the cheap option.

Of the two boards that I received, one of the boards had multiple solder bridges between the pins of the PN532. Fortunately, the second board started up just fine, but I waisted a lot of time trying to boot the broken board.

Demonstration

The best documentation I could find was at PDF (linked). I personally only used the SPI mode, but I2C and serial modes are also listed as available.

Software Installation and Example Arduino Code

I was able to get the Red PN532 board working using the libraries supplied by Adafruit. For more details check out my GitHub repository:
sensor-debug-notes/NFC-V3-PN532/

Optional and more difficult: Configuring using the manufacturers code

I downloaded the git repository from Electrohub.

The zip file (“PN532-PN532_HSU.zip”) contained five directories: NDEF, PN532, PN532_HSU, PN532_I2C, and PN532_SPI. To install the libraries and example code, I copied the folders into my mac’s Arduino libraries folder: /Users/peter/Documents/Arduino/libraries/. Restarting the Arduino program revealed a PN532 section in File->Examples->PN532. The ido14443A _uid example is the program I’m using as the basis of my card reader.

Wiring the Board to the Arduino

I followed the instructions listed in the manual.

Configuring the Board

The configuration switches should be set as indicated on the board for SPI.

This entry was posted in Programming, Toys. Bookmark the permalink.

Leave a Reply