This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information

NFC Reader with RaspberryPi GPIO

If you read my postings about NFC Reader, you know that I use an USB TTL module for the communication with my NFC Reader (UART mode). If you don't own such a module, it's not a big problem to connect the reader with GPIO pins of your RaspberryPi.


Change /boot/cmdline.txt, from:

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1


dwc_otg.lpm_enable=0 console=tty1

Change /etc/inittab, from:

#Spawn a getty on Raspberry Pi serial line
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100


#Spawn a getty on Raspberry Pi serial line
#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

Reboot your Pi.

Connect the Reader with following PINs:

GND -> PIN 6
TxD -> PIN 10 (= GPIO 15)
RxD -> PIN 8 (= GPIO 14)
VCC -> PIN 1 (3,3V) or PIN2 (5,5V)

(GPIO PIN overview)

Use serial port with the name /dev/ttyAMA0 for RxTx and configure RxTx e.g.

Successfully tested with eNFC.

7 Responses to “NFC Reader with RaspberryPi GPIO”

  1. Martynas says:

    Great advice! I just wanted to know if it is safe to hook up PN532 NFC RFID module to 5V?

    I am new to EE but here ( it mentions that it is safe to use 5V if the connected board has voltage regulator.

    Also here ( it mentions that boards with no 5V level shifting are not safe to Raspberry PI.

    Does PN532 NFC RFID module has any of these?

    P.S. I am now waiting for my RPI and PN532 NFC RFID module to arrive. Trying to read up as much as I can.

  2. rjahn says:

    We use the board with a Raspberry Pi (and a Beagleboard) and it works without problems. Read specs (NFC Kit) for more details. If you are unsure, use a TTL module. The board works on our Pi with and without TTL module.

    More details are available here.

  3. Chad says:

    What was the rating of the power supply you used with your Pi? I set my NFC board to HSU - soldered 0 > 1 together and left the other as is. I think that set it to 0 0 for HSU.

    Prior to doing that, it seemed it was power up from the pi, and the Pi remained on.

    Now after soldering, it seems to draw too much from the Pi - the red power light on the pi dims if I use 3.3v or goes right out if I use 5v and the power LED on the NFC board doesn't light up.

    I've tried power adapters from 5v .5a to 5v 1.0amp. Any suggestions would be appreciated!

  4. rjahn says:

    We use a standard power supply for Pis: 5V, 1200mA, but we also connect our Pis to (Laptop, Router) USB Ports.

    Our NFC board uses HSU: 0 0
    The red light flickers a little bit but the module works.

    If you have problems, you could try a TTL USB module.

  5. kinoko says:

    Is it possible to add a picture about how exactly you solder 0 and 0 to change it to HSU?(maybe a photo of your NFC board?)
    I connected 0 0 together, but the connection seems just short the device and my Pi just restart itself after connected (or it won't start while connected with NFC board).

Leave a Reply

Spam protection by WP Captcha-Free