I2C wiring for PN532 NFC/RFID breakout board

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
adekyn
 
Posts: 1
Joined: Sun Aug 26, 2012 11:14 am

I2C wiring for PN532 NFC/RFID breakout board

Post by adekyn »

Hi,

Has anyone wired up the "PN532 NFC/RFID controller breakout board (v1.3)" (not the shield) to an Arduino UNO using the "I2C" protocol?

The tutorial link for the product mentions that I2C is the default for the "shield" version, but then shows how to wire the "breakout board" for SPI, using the supplied 4050 for level shifting.

http://www.ladyada.net/products/rfidnfc/wiring.html

Per the previously mentioned I2C info, it uses "Digital pin #2" as an interrupt, so I can see how the 4050 might be used here, but the other two pins are Analog 4 and 5 - and I haven't any idea how this should be wired with the breakout board.

I want to use I2C, due to its "shared bus" properties. I want to use one Ardunio to read from a small array of NFC readers(different addresses), so "stacking the reader" onto the Arduino via a shield was not a necessary or desired requierment - which is why I bought the breakout board.

Thanks

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: I2C wiring for PN532 NFC/RFID breakout board

Post by adafruit »

it does not have level shifting, so check out our i2c level shifter, you will need it between all the 3.3V logic stuff (such as the NFC shield) and the 5V arduino

http://adafruit.com/products/757

allsey87
 
Posts: 1
Joined: Thu Mar 27, 2014 4:30 am

Re: I2C wiring for PN532 NFC/RFID breakout board

Post by allsey87 »

Hi, I'm in need of a couple further things to be clarified here.

First up, could you update the schematic pointed to by https://www.adafruit.com/products/789? It is not correct, it is pointing to the schematic for https://www.adafruit.com/products/364. The differences are that one board uses jumpers to select I2C / SPI, while the other uses solder joints to select one or the other. Furthermore the first board appears to have a number of mosfets enabling the PN532 to connect via I2C or SPI, however these are not visible in the schematic as it is the wrong version...

Secondly, do you have any information about what appears to be a contradiction in the user manual and the datasheet for the PN532? The connections to I0 and I1 seem to be reversed in these documents.

I[1..0] description from full datasheet
I[1..0] description from full datasheet
I[1..0] description from full datasheet
fds.png (87.52 KiB) Viewed 2335 times
I[1..0] description from user manual
I[1..0] description from user manual
I[1..0] description from user manual
um.png (36.69 KiB) Viewed 2335 times
Cheers!

User avatar
nichis
 
Posts: 9
Joined: Sat May 10, 2014 6:59 pm

Re: I2C wiring for PN532 NFC/RFID breakout board

Post by nichis »

adafruit wrote:it does not have level shifting, so check out our i2c level shifter, you will need it between all the 3.3V logic stuff (such as the NFC shield) and the 5V arduino

http://adafruit.com/products/757
Is the same if I use the HEF4050B level shifter that you provide with the breakout board?

User avatar
adafruit_support_mike
 
Posts: 67447
Joined: Thu Feb 11, 2010 2:51 pm

Re: I2C wiring for PN532 NFC/RFID breakout board

Post by adafruit_support_mike »

The HEF4050 won't work for I2C.

In I2C, a 1 is represented as a low-resistance connection to GND. A 0 is represented as a high-resistance connection to GND. That allows multiple devices to share a single pull-up resistor without getting in each other's way.

The HEF4050 uses CMOS logic, where a 1 is represented by a low-resistance connection to VCC and a 0 is represented by a low-resistance connection to GND. CMOS outputs can't share the same wire.. if one is trying to pull HIGH while the other is trying to pull LOW, you get problems.

User avatar
cinmay
 
Posts: 20
Joined: Tue Aug 26, 2014 5:39 am

Re: I2C wiring for PN532 NFC/RFID breakout board

Post by cinmay »

adafruit_support_mike wrote:The HEF4050 won't work for I2C.
The HEF4050 uses CMOS logic, where a 1 is represented by a low-resistance connection to VCC and a 0 is represented by a low-resistance connection to GND. CMOS outputs can't share the same wire.. if one is trying to pull HIGH while the other is trying to pull LOW, you get problems.
What do you recommend using instead of the HEF405?

Also I have noticed significant read speed improvements for the shield using I2C over the breakout using SPI. Is this correct or am I doing something horribly wrong?

User avatar
adafruit_support_mike
 
Posts: 67447
Joined: Thu Feb 11, 2010 2:51 pm

Re: I2C wiring for PN532 NFC/RFID breakout board

Post by adafruit_support_mike »

If you just need level-shifting, I'd suggest one of these: https://www.adafruit.com/products/757. They're made specifically for I2C.

WRT an apparent speed difference between I2C and SPI, there are too many free variables to pin down a specific problem. Wiring is usually the first culprit.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”