0

PN532 BoB on I2C mode ?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

PN532 BoB on I2C mode ?

by xylitol on Thu May 14, 2015 11:38 am

Hello, how do i wire the PN532 BoB if i want to use it over i2c ?
As there is explanation for SPI but almost nothing for the i2C mode on learn.adafruit i'm a bit lost.
i keep the same wiring as the SPI and just add two 1.5K resistors between SCL and 3.3V, and SDA and 3.3V and change the jumpers ?

is my picture correct ?
Image

xylitol
 
Posts: 7
Joined: Fri Jan 24, 2014 3:46 pm

Re: PN532 BoB on I2C mode ?

by xylitol on Thu May 14, 2015 11:42 am

i've forgot to say, i'm using a Mega 2560.

xylitol
 
Posts: 7
Joined: Fri Jan 24, 2014 3:46 pm

Re: PN532 BoB on I2C mode ?

by franklin97355 on Thu May 14, 2015 12:17 pm

Could you post clear, detailed pictures of both sides of your board showing any soldering you have done and the connections to it? also check your jumper settings to make sure they are correct for i2c.
Attachments
2015-05-14_09h15_25.png
2015-05-14_09h15_25.png (4.41 KiB) Viewed 741 times

franklin97355
 
Posts: 19052
Joined: Mon Apr 21, 2008 2:33 pm
Location: Lacomb, OR.

Re: PN532 BoB on I2C mode ?

by xylitol on Thu May 14, 2015 1:03 pm

Hi franklin97355,
For the moment i just followed the original wiring of the SPI mode found here: https://learn.adafruit.com/assets/2715
I've reproduced exactly the same things as the picture, and the breakout board is working fine.

But i want to use this breakout board on i2C mode now, and i have no idea on how to do the wiring and there is no example on adafruit site.
so that why i'm asking an i2c wiring example.

xylitol
 
Posts: 7
Joined: Fri Jan 24, 2014 3:46 pm

Re: PN532 BoB on I2C mode ?

by adafruit2 on Thu May 14, 2015 11:25 pm

yah this was designed basically for SPI, the i2c example is essentially the shield:
https://learn.adafruit.com/adafruit-pn532-rfid-nfc
set the jumpers, connect ~10K pullups from SDA & SCL to 3.3V and use the I2C connections. you will also need to connect IRQ

adafruit2
Site Admin
 
Posts: 17170
Joined: Fri Mar 11, 2005 7:36 pm

Re: PN532 BoB on I2C mode ?

by xylitol on Fri May 15, 2015 7:54 am

still don't get it
so the Breakout board version can't do i2c ?
jumpers is not a problem changing the position is easy but related to the wires... what's should i do ? and where does wires go ?
where should i connect IRQ ?
what is this story of 10k resistor ? wasn't 1.5k on the tutorial ?
what are the i2c connections ? and how do i connect them ?
you totaly lost me guys, i have no idea of what's am i doing now

xylitol
 
Posts: 7
Joined: Fri Jan 24, 2014 3:46 pm

Re: PN532 BoB on I2C mode ?

by mbahojlo on Fri Jun 05, 2015 6:38 am

I have exactly this same problem. Tutorial nothing say about i2c, please correct it. Show simple wire diagram and info about resistors. and sel to take i2C

mbahojlo
 
Posts: 7
Joined: Fri May 29, 2015 6:45 am

Re: PN532 BoB on I2C mode ?

by franklin97355 on Fri Jun 05, 2015 4:50 pm

Tutorial nothing say about i2c, please correct it.
But it does on this page i2c pins on the Uno are marked as SDA and SCL or A4 and A5. and the instructions say to add 1.5K resistors between those pins and 3.3v. Is there something else you have a question about? Also the Breakout was designed to be used primarily with SPI and the fact that i2c also works is a bonus.

franklin97355
 
Posts: 19052
Joined: Mon Apr 21, 2008 2:33 pm
Location: Lacomb, OR.

Re: PN532 BoB on I2C mode ?

by mbahojlo on Mon Jun 08, 2015 9:39 am

On
https://learn.adafruit.com/adafruit-pn5 ... out-wiring
I have white screen:

502 Bad Gateway
nginx

mbahojlo
 
Posts: 7
Joined: Fri May 29, 2015 6:45 am

Re: PN532 BoB on I2C mode ?

by franklin97355 on Mon Jun 08, 2015 11:41 am

The learning system was down for a while. Try again, it should work now.

franklin97355
 
Posts: 19052
Joined: Mon Apr 21, 2008 2:33 pm
Location: Lacomb, OR.

Re: PN532 BoB on I2C mode ?

by xylitol on Sun Jun 14, 2015 6:55 pm

The problem is the lack of clarity related to the note.
so if i understand i have just:
SCL/SDA lines with 1.5k resistor and 3v+gnd, just 4 wires to the Breakout board to the arduino, nothing else ?
i don't need to connect the MISO/SCK/IRQ and all the HEF4050BP stuff ?

xylitol
 
Posts: 7
Joined: Fri Jan 24, 2014 3:46 pm

Re: PN532 BoB on I2C mode ?

by mhamilt on Thu Jun 21, 2018 12:03 pm

Following up on this thread as it is a little sad to see it rot without a clear solution.

I am very much a novice so any corrections are always greatly appreciated.

For connecting the PN532 Breakout to an Arduino using I2C do the following (referencing the diagram attached)

  • Change SEL0 [ON] and SEL1 [OFF] on the PN532 for I2C Mode
  • There should be dedicated SDA and SCL pins on your Arduino or micro-controller of choice. Make sure that there is a pull-up resistor connected on these pins
  • Connect SDA (Orange) and SCL (Green) pins of PN532 to the corresponding SDA and SCL pins of the Arduino
  • Connect IRQ (Cyan) to the correct pin on Arduino. In the example code by Adafruit this is the #define macro PN532_IRQ
  • Connect the reset pin RSTOUT_N (Ochre) to the Arduino. In the example code by Adafruit this is the #define macro PN532_RESET

That would be all that is needed to get you going. There was a question of the benefit of I2C over SPI. As I understand it I2C allows for the PN532 to communicate without need of the 4050 chip that is supplied with the PN532 by Adafruit. I may be entirely wrong, let me know if that is the case.

PN532_I2C.png
Wiring for PN532 to Arduino via I2C
PN532_I2C.png (264.18 KiB) Viewed 170 times

mhamilt
 
Posts: 1
Joined: Thu Jun 21, 2018 11:47 am

Re: PN532 BoB on I2C mode ?

by allcaps on Sat Sep 08, 2018 5:57 pm

Thanks for posting this info @mhamilt. I can confirm this works with one correction: I think the 1.5k resistors need to be tied to 3.3V for pull-up? Maybe it works to tie them to ground as shown in your diagram but I did not try it.

Here's how mine is wired...
Attachments
i2c-1-web.jpg
i2c-1-web.jpg (642.23 KiB) Viewed 51 times

allcaps
 
Posts: 1
Joined: Sat Sep 08, 2018 5:46 pm

Please be positive and constructive with your questions and comments.