PN532 and Data Logging Sheild

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

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
CharlesDavis
 
Posts: 24
Joined: Sun Apr 06, 2014 1:10 am

Re: PN532 and Data Logging Sheild

Post by CharlesDavis »

I have the SD card with SlotSelect on pin 10 - the default for the datalogging Shield, and am using pinD9 for the SlotSelect for the PN532 card (Breakout) the rest of the MISO, MOSI and CLK are common to both ...

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: PN532 and Data Logging Sheild

Post by adafruit_support_bill »

That sounds right. Let me check with the other engineers to see if there are any known compatibility issues between these boards or libraries.

CharlesDavis
 
Posts: 24
Joined: Sun Apr 06, 2014 1:10 am

Re: PN532 and Data Logging Sheild

Post by CharlesDavis »

adafruit_support_bill wrote:That sounds right. Let me check with the other engineers to see if there are any known compatibility issues between these boards or libraries.
Thanks for that, Bill.

I have another SDcard/proto shield, which runs the software with no crashes, except that without the PN532 installed, I get a couple errors .... What this is telling me is that it is the PN532 which must be interfering with the bus lines when the following is loaded ....
#define SCK  (13)
#define MISO (12)
#define MOSI (11)
#define SS   (9)

Adafruit_PN532 nfc(SCK, MISO, MOSI, SS);


User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: PN532 and Data Logging Sheild

Post by adafruit2 »

we haven't tried them together, you should try PN532 on i2c (the shield is i2c by default!) instead, that will at least get rid of bus contension problems

CharlesDavis
 
Posts: 24
Joined: Sun Apr 06, 2014 1:10 am

Re: PN532 and Data Logging Sheild

Post by CharlesDavis »

adafruit2 wrote:we haven't tried them together, you should try PN532 on i2c (the shield is i2c by default!) instead, that will at least get rid of bus contention problems
This is the PN532 Breakout Board I am using .... How do you suggest I interface the SDA line to the Arduino ? It is a Bi-Directional data-line (Isn't it ? ) and will need to be level-shifted to match the 5V Arduino ... so should I tie SDA to pins 3&4 (for example) and tie pins 2&5 together to connect to SDA on the Arduino (these are the 4050 pins ...) then use another buffer in the 4050 for the SCL ?? I trust that IRQ can go direct to pin D2 (Arduino) ... ??

Thanks for all your help ....

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: PN532 and Data Logging Sheild

Post by adafruit_support_bill »

Code: Select all

It is a Bi-Directional data-line (Isn't it ? ) and will need to be level-shifted to match the 5V Arduino 
As long as your i2c pullups are to 3.3v, there should be no problem. The Arduino will handle 3.3v logic signals.

CharlesDavis
 
Posts: 24
Joined: Sun Apr 06, 2014 1:10 am

Re: PN532 and Data Logging Sheild

Post by CharlesDavis »

adafruit_support_bill wrote:

Code: Select all

It is a Bi-Directional data-line (Isn't it ? ) and will need to be level-shifted to match the 5V Arduino 
As long as your i2c pullups are to 3.3v, there should be no problem. The Arduino will handle 3.3v logic signals.
Does this mean I do not need a 4050 level-shift ? Just to use 1k (?) pull-ups to 3v3 for SCL and SDA ? ... and what about the reset ? ( i saw a refrence to resetting the PN532 board during setup in the library ...

Thanks

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: PN532 and Data Logging Sheild

Post by adafruit_support_bill »

The pullup resistor value is not especially critical. We use 10K on many of our i2c boards.

The reset line is a different story. Unlike the i2c bus, this signal is driven directly by the Arduino & you should use a level shifter.

CharlesDavis
 
Posts: 24
Joined: Sun Apr 06, 2014 1:10 am

Re: PN532 and Data Logging Sheild

Post by CharlesDavis »

adafruit_support_bill wrote:The pullup resistor value is not especially critical. We use 10K on many of our i2c boards.

The reset line is a different story. Unlike the i2c bus, this signal is driven directly by the Arduino & you should use a level shifter.
OK, Thanks - so ... is the I2C bus driven 'open collector' by the Arduino ?

Also - is the reset line into the PN532 the one labeled 'RSTOUT_N' on JP4 between IRQ and SCL ? ... seems a strange lable for an input line ;-)

CharlesDavis
 
Posts: 24
Joined: Sun Apr 06, 2014 1:10 am

Re: PN532 and Data Logging Sheild

Post by CharlesDavis »

Aaah ... found another issue ... on the datalogger shield, the I2C is already pulled-up to 5v for the rtc !! (with 2k2)

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: PN532 and Data Logging Sheild

Post by adafruit_support_bill »

RSTOUTN is and output - indicating that the device is in a reset state. The reset input is RSTPDN, and that appears to have a 10K pullup on it. Not If you drive that 'open collector' with the Arduino, you shouldn't need a level converter.

The pullups on the logger shield would be a problem though. You could remove them. As long as there is one set of pullups on the bus it will work.

CharlesDavis
 
Posts: 24
Joined: Sun Apr 06, 2014 1:10 am

Re: PN532 and Data Logging Sheild

Post by CharlesDavis »

Ok, thanks. Will the RTC work if the I2C is pulled up to 3v3 ?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: PN532 and Data Logging Sheild

Post by adafruit_support_rick »

You could also use our I2C level-shifter
https://www.adafruit.com/product/757

The RTC should work with 3.3V pullups

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: PN532 and Data Logging Sheild

Post by adafruit_support_bill »

The RTC should work with 3.3v pullups. But Rick has a good point. If you do use a level shifter, it should be an 'i2c friendly' one.

CharlesDavis
 
Posts: 24
Joined: Sun Apr 06, 2014 1:10 am

Re: PN532 and Data Logging Sheild

Post by CharlesDavis »

Thanks, Guys. I will try first with 3v3 pull-ups and report back. I will use a 4050 gate for the reset, though

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

Return to “Arduino Shields from Adafruit”