RoadTest: Integrating NFC with the NXP PN7150
Author: Attila Tőkés
Creation date:
Evaluation Type: Development Boards & Tools
Did you receive all parts the manufacturer stated would be included in the package?: True
What other parts do you consider comparable to this product?: NXP PN532 NXP MFRC522
What were the biggest problems encountered?: The RoadTest kit was unusable, because the FRDM-KW41Z boards were a wrong revision. On the software side there is no proper Aduino support, and were unable to contact NXP for help.
Detailed Review:
Hi Element14 Comunity,
Here is a little bit incomplete and little bit late RoadTest of the NXP PN7150 NFC module.
The initial idea of this Road Test was to do a practical comparison between to popular Arduino compatible NFC modules:
and the NXP PN7150 NFC module.
Unfortunately, I ended up wasting a lot of time to get the NXP PN7150 work with Arduino, so didn't had to much time to do too much tests.
The Road Test hardware looked promising.
We got:
{gallery} Road Test Kit |
---|
|
|
Here is some info extracted from the datasheet of the three modules:
NXP PN7150 | NXP PN532 | NXP MFRC522 | |
---|---|---|---|
RF protocols / modes |
|
|
|
Host Interfaces |
|
|
|
Supply Voltage |
|
|
|
Power consumption |
|
|
|
We can see that the NXP PN7150 is much more superior to the, NXP PN532 and NXP MFRC522 modules. It support the latest NFC protocols, support the standardized NCI host protocol and claims to have advanced lower power mode pooling.
Getting the PN7150 module to work was much trickier then I expected.
I started working with the hardware a little bit late, so luckily the other three road testers, Fred27, BigG and cjsieh found and example code for the PN7150 module, using the FRDM-KW41Z board provided for this road test:
NXP BLE-NFC Bridge Demonstration for IoT Use Cases
Not so luckily, they also found out that the FRDM-KW41Z provided in the road test is and older revision, and will not work with the PN7150 without some nasty hardware hacking:
https://www.element14.com/community/roadTests/2025#comment-151184
At this point I decided to not to bother with the FRDM-KW41Z board, but to use an Arduino/Genuino 101.
There were two option to get PN7150 working with the Arduino/Genuino:
First, I tried the ThomasBuhot/arduino-nfc library, but encountered some problems:
https://github.com/ThomasBuhot/arduino-nfc/issues/2
Next, I tried to port the PN7150 library from the MCUXpresso to Arduino. This looked promising, as I got the NCI communication working.
But, then the example fails at certain step of the configuration phase (NxpNci_ConfigureSettings):
#if NXP_CORE_CONF_EXTN
if (sizeof(NxpNci_CORE_CONF_EXTN) != 0)
{
isResetRequired = true;
NxpNci_HostTransceive(NxpNci_CORE_CONF_EXTN, sizeof(NxpNci_CORE_CONF_EXTN), Answer, sizeof(Answer), &AnswerSize);
if ((Answer[0] != 0x40) || (Answer[1] != 0x02) || (Answer[3] != 0x00) || (Answer[4] != 0x00)) {
serial_print("ext 2 failed"); <-- fails here, the PN7150 returns 0x0 0x0 0x0
return NXPNCI_ERROR;
}
}
#endif
Note: if anyone is interested, the code is attached as
Both the encountered problems were at the NFC Controller Interface (NCI) level. Unfortunately, because the NCI specs are paid (~$600), it's very hard for a maker to investigate these kind of problems.
At this point, Randall Scasny contacted NXP with the problem I encountered. But, we got no feedback so far.
Luckily, two GitHub users: copercini and timapus figured out how to the ThomasBuhot/arduino-nfc library working with the PN7150.
Using this, I was able to read several NFC / RFID cards and tags. The NFC-TagDetect.zip attachment contains the Arduino sketch used.
I wanted to do more tests with the PN7150, but unfortunately getting the module working already took too much more time than I planned to allocate to this RoadTest
Specs wise the NXP PN7150 looks like a very promising board, but it lacks for proper support for Arduino like boards.
The fact that NXP provided a Road Test kit that does not really works and they NXP provided no support with investigating the problem, is also a little bit strange.
The good part is that ultimately with support of the maker community we got the working Arduino library for the PN7150. This means we can actually use the board in project.
Cheers,
Attila