Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Failed to detect the PN532 - Rasp Pi Zero with PN532 Shield
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Failed to detect the PN532 - Rasp Pi Zero with PN532 Shield

by dangell7 on Sun Apr 12, 2020 2:49 pm

I posted an issue in github but was routed here...

First. I'm using the PN532 Shield v1.3. This shield says that to use SPI I need to "Close SEL0 and SEL1". There is no switch and there is only 2 flat solderable surfaces. This is NOT the breakout board....

So first, can someone help me figure out what that means? Do I just solder to make a connection and "close" the connection? Or is the connection closed mean that I don't do anything and leave the connection "closed"? Very confusing stuff.

I'm using the following:

Shield PN532 - v1.3 - Note SHIELD NOT BREAKOUT
Rasp Pi Zero - v1.3

I want to use SPI.

PI Pin# 17 (3.3v) to 532 5V
PI Pin# 25 (Gnd) to 532 Gnd (There are 2? Does it matter?)
PI Pin# 19 (MOSI) to 532 MOSI
PI Pin# 21 (MISO) to 532 MISO
PI Pin# 23 (SCLK) to 532 SCK
PI Pin# 24 (CE0) to 532 SS

The error I get is "Failed to detect the PN532"

All the tutorials say "D5". Can someone explain D5? Does this mean the physical pin D5? Or the BCM5? Again a little confused here...

Also, I can upload an image if someone is willing to help me?

dangell7
 
Posts: 4
Joined: Sun Apr 12, 2020 2:41 pm

Re: Failed to detect the PN532 - Rasp Pi Zero with PN532 Shi

by Foamyguy on Sun Apr 12, 2020 5:57 pm

Just to confirm, you are using this product: https://www.adafruit.com/product/789 with the Metro / Uno shield form factor but connecting it instead to Raspberry Pi Zero?

Sorry about the confusion with the SEL0 and SEL1 jumpers. I was only familiar with the breakout, not the shield so I didn't realize those were different.

It looks like the silkscreen on the device says how to switch to SPI:
Image

So you'll need to close those two jumpers. Close meaning connect the circuit, the two pads under SEL1 need to be connected together, and the two pads under SEL0 need to be connected together. But none of the SEL1 pads should be connected to any of the SEL0 pads. The should each only be connecting to their own partner pad.

It should look something like this:
Image

It's probably easiest to use a few pieces of wire or resistor leg and solder it into place between each of the sets of two pads.

For posting images you can upload the image to imgur or somewhere online first and then link it here. Or use the file upload button below the post editing box.

In the learn guide they use pin D5 I would think this means GPIO pin 5 on the RasPi which looks to be pin #29 from the diagram here: https://raspberrypi.stackexchange.com/a/94303/2990

Foamyguy
 
Posts: 39
Joined: Mon May 26, 2014 4:24 pm

Re: Failed to detect the PN532 - Rasp Pi Zero with PN532 Shi

by dangell7 on Mon Apr 13, 2020 9:47 am

Hey thank you so much for the reply.

As I figured, everything was connected as so.... you can sorta see in the image but it’s hard to tell...

Is there any way to test each connection separately? Test Miso, Mosi, etc?

I’m still getting the same error. Solder looks solid. Nothing is loose. I’m at my wits end with this and wondering if the board was faulty..

Here are the images: https://imgur.com/gallery/wRb0UWl

dangell7
 
Posts: 4
Joined: Sun Apr 12, 2020 2:41 pm

Re: Failed to detect the PN532 - Rasp Pi Zero with PN532 Shi

by Foamyguy on Mon Apr 13, 2020 1:57 pm

If you have a different SPI device that you could try testing with the Raspberry Pi that would help you verify that the Pi and it's communication pins are all working as expected.

How did you figure out which pins on the PN532 shield were MOSI, MISO, SCK, and SS? I see there are some of them labeled in a small row but it looks like those aren't in use from your picture.

It looks like you've got wires connected to the outside rows of pins on the shield which would ordinarily be stacked on the Metro / Uno headers. I do think some of those should work so you might have it wired correctly, but I'm not able to find anything showing which of those pins are which, I'm curious if you found that documented somewhere.

Another thought I had is it looks like you are feeding 3.3v power from the Pi into the 5v power pin on the PN532. I see in the photo that your power indicator LED is on, so perhaps this is not a problem. But I would think it may be better to connect that 3.3v pi pin to the PN532's 3v pin instead of the 5v one.

Foamyguy
 
Posts: 39
Joined: Mon May 26, 2014 4:24 pm

Re: Failed to detect the PN532 - Rasp Pi Zero with PN532 Shi

by dangell7 on Mon Apr 13, 2020 2:15 pm

Hey thanks again!!

Here is the schematic diagram. Although this one looks incomplete. I found one online but now I cant seem to find it. I got this from the github repo. I cant quite understand it yet, and I was basically just "assuming" that if that pin worked on the arduino., then it would work if I just soldered the wires. So I tried with ground, and power and that seems to work..

Also, the power I couldn't get the 3 v to work.. The power doesn't come on... But that was without everything soldered in tight. (Recommend this first to newbies like me having trouble) . lol

I don't have an spi device but maybe I can pick something small up because I'd like to have a test to know where and what is failing without trial and error.

Thank you again! I'm still trying to learn.
Attachments
PN532_shield_v1.3.png
PN532_shield_v1.3.png (63.69 KiB) Viewed 77 times

dangell7
 
Posts: 4
Joined: Sun Apr 12, 2020 2:41 pm

Re: Failed to detect the PN532 - Rasp Pi Zero with PN532 Shi

by Foamyguy on Mon Apr 13, 2020 2:52 pm

This page has got some of the schematics diagrams on it also. https://learn.adafruit.com/adafruit-pn5 ... /downloads

I'm not sure how different the shield is from the breakout, but I know in my case with the breakout I was able to use the 3v pin on the pn532 to power it. Possibly the shield makes it different though.

I would definitely recommend getting some other SPI device if you can, even something like a basic sensor should work for verifying as long it communicates via SPI.

Foamyguy
 
Posts: 39
Joined: Mon May 26, 2014 4:24 pm

Re: Failed to detect the PN532 - Rasp Pi Zero with PN532 Shi

by dangell7 on Mon Apr 13, 2020 5:09 pm

Here is the shield schematics for v1.0. I think I'm going to use this to try to see how well it matches up.
Attachments
libnfc_adafruit_nfc_pn532_shield_v1.0_schematic.png
libnfc_adafruit_nfc_pn532_shield_v1.0_schematic.png (69.75 KiB) Viewed 75 times

dangell7
 
Posts: 4
Joined: Sun Apr 12, 2020 2:41 pm

Re: Failed to detect the PN532 - Rasp Pi Zero with PN532 Shi

by kcx1 on Sat Aug 08, 2020 1:43 am

I'm having a similar issue with a raspberry pi 4 and the pn532 breakout board. Can't seem to get the SPI to connect.

Have you had any luck?

kcx1
 
Posts: 3
Joined: Sat Aug 08, 2020 1:11 am

Please be positive and constructive with your questions and comments.