RFID - PN532 not working

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
marktn
Normal user
Posts: 62
Joined: 06 Nov 2015, 19:43

RFID - PN532 not working

#1 Post by marktn » 23 May 2023, 20:40

Hi,

I have an RFID - PN532, that is working.

I orderd 2 new RFID - PN532, that are not working? Is there some different in these, or is it broken?
It does not scan with i2c.

Same PIN and esp8266.

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: RFID - PN532 not working

#2 Post by Ath » 23 May 2023, 21:02

You (still) have the I2C Clockstretch limit set correctly? As this is one of the devices requiring that. Check in the docs if needed.
/Ton (PayPal.me)

marktn
Normal user
Posts: 62
Joined: 06 Nov 2015, 19:43

Re: RFID - PN532 not working

#3 Post by marktn » 23 May 2023, 21:11

Yes i did. I have one PN532 working, on esp8266. When switching to the new PN532, it does not scan anymore.

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: RFID - PN532 not working

#4 Post by Ath » 23 May 2023, 21:57

Can you see if a newer/different revision of the chip is mounted on the board? There may possibly be different revisions of these chips.

Is the board found during the I2C scan action from the Tools page? If so, configuring the task with Force Slow I2C speed enabled might help getting it to work, as the I2C scan is performed using the Slow speed setting.
/Ton (PayPal.me)

marktn
Normal user
Posts: 62
Joined: 06 Nov 2015, 19:43

Re: RFID - PN532 not working

#5 Post by marktn » 23 May 2023, 22:22

With the tool scan, it does not find anything. Only with the working device.

There is a small difference.
The first one is not working.
Second one is working.

I also see switches, in the corner. Am i right?
Attachments
notworking.jpg
notworking.jpg (145.81 KiB) Viewed 1692 times
working.jpg
working.jpg (197.74 KiB) Viewed 1692 times

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: RFID - PN532 not working

#6 Post by Ath » 23 May 2023, 23:33

I think you need to change switch 1 to the other position to set it to I2C mode, as shown in the table next to the switch. (I can't recall if I manually set that switch a few years ago when I initially connected it, have just used it as is for testing several times since then)
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: RFID - PN532 not working

#7 Post by TD-er » 24 May 2023, 00:00

Just looked at the board I have here and indeed the switches need to be changed.
PN532_dipswitches.jpg
PN532_dipswitches.jpg (314.8 KiB) Viewed 1677 times
As you can see by the slight indent in the tape, I also had to change one of them.

1) is to the right on my photo
2) is to the left on my photo

This is how I have used it for testing with ESPEasy.

marktn
Normal user
Posts: 62
Joined: 06 Nov 2015, 19:43

Re: RFID - PN532 not working

#8 Post by marktn » 24 May 2023, 20:27

Yes it is working!!

Thanks for your support. Espeasy is a great development! Still learning :D

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: RFID - PN532 not working

#9 Post by Ath » 24 May 2023, 21:04

Great, thanks for the update :)
/Ton (PayPal.me)

AtlantisUnion
Normal user
Posts: 14
Joined: 12 Jul 2023, 21:55

Re: RFID - PN532 not working

#10 Post by AtlantisUnion » 12 Jul 2023, 22:57

One additional question to this solved topic:
Is there any way to change the hard coded I2C Adress in the adapter (NORMAL Package) from 0x24 to 0x28?
Thanx in advance
Atlantis

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: RFID - PN532 not working

#11 Post by Ath » 12 Jul 2023, 23:33

Technically it seems to be possible to program another I2C address into the PN532, but that's not supported by the plugin.

As an alternative you can use an I2C multiplexer, that's supported by nearly all builds of ESPEasy (except for the Minimal builds), using a TCA9548a would provide you with 8 channels (separate busses), so 8 of these RFID receivers can be connected at the same time.
/Ton (PayPal.me)

AtlantisUnion
Normal user
Posts: 14
Joined: 12 Jul 2023, 21:55

Re: RFID - PN532 not working

#12 Post by AtlantisUnion » 13 Jul 2023, 01:08

Hi ATh

Thanks for this idea, in my case this will not help me out, because I have no problem with double adresses. My Hardware has only the unchangable adress of 0x28.
To be honest: I have a PN522 with I2C and a hard coded Adress of 0x28 and I hoped maybee this device will run with the Device PN532 because the device drivers for 522 always support only SPI and not I2C...

Thanks

Atlatis

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: RFID - PN532 not working

#13 Post by TD-er » 13 Jul 2023, 09:38

I have no idea whether the 522 is compatible with the 532.
If so, then adding a selectable I2C address is not a big deal and can easily be done.

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: RFID - PN532 not working

#14 Post by Ath » 13 Jul 2023, 21:29

AtlantisUnion wrote: 13 Jul 2023, 01:08 Thanks for this idea, in my case this will not help me out, because I have no problem with double adresses. My Hardware has only the unchangable adress of 0x28.
To be honest: I have a PN522 with I2C and a hard coded Adress of 0x28 and I hoped maybee this device will run with the Device PN532 because the device drivers for 522 always support only SPI and not I2C...
I've found this Instructables on HW-modding and configuring/programming the (MF)RC522 for I2C (though they talk about 'serial' after making the HW-mod... quite confusing) and reading tags, but it's quite a bit more than just adding another I2C address to the options list, so I don't think that'll work.

Actually, the NXP MFRC522 SPI board is supported by ESPEasy, and I expect that's the board you are using (haven't been able to find any reference to a PN522 so far, can you provide a link?). The plugin for MFRC522 is included in the ESPEasy Collection C builds, so if you can revert any HW mods you may have done to your board, you should be able to connect this board.
/Ton (PayPal.me)

Post Reply

Who is online

Users browsing this forum: No registered users and 30 guests