Hi everybody !
I just got my brand new NFC Shield from Adafruit and I'd like to use it with LibNFC.
I installed everything correctly on both Ubuntu & Backtrack.
The shield is on an Arduino Uno and connected to my computer using the USB cable plugged in the Arduino.
I think I might need a FTDI cable to communicate with my computer.
Could you tell me if there's a way to do that simply using the USB cable plugged in the Arduino ?
If that's not possible, can I build my own cable easily ? I'll buy one otherwise...
Just a last question : I also have an Arduino Leonardo but the shield doesn't seem to work fine with it. Will Adafruit release a library for this Arduino soon ?
Thank you very much for your time and patience.
Kind regards.
Kate.
NFC Shield for Arduino - PN532 & LibNFC
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: NFC Shield for Arduino - PN532 & LibNFC
You should be able to just be able to directly connect to the UNO with a USB cable. The UNO should show up as something like /dev/ttyUSB0 or /dev/ttyACM0.BANNED_Salade wrote:Hi everybody !
I just got my brand new NFC Shield from Adafruit and I'd like to use it with LibNFC.
I installed everything correctly on both Ubuntu & Backtrack.
The shield is on an Arduino Uno and connected to my computer using the USB cable plugged in the Arduino.
I think I might need a FTDI cable to communicate with my computer.
Could you tell me if there's a way to do that simply using the USB cable plugged in the Arduino ?
If that's not possible, can I build my own cable easily ? I'll buy one otherwise…
I have unbuntu 11.04, and the UNO shows up as /dev/ttyACM0: Have a look at LadyAda's tutorial on connecting to Linux:
http://www.ladyada.net/learn/arduino/lesson0-lin.html
Unfortunately, the pinout on the Leonardo is not compatible with the NFC shield. The shield would require hardware as well as software modifications in order to work with the LeoJust a last question : I also have an Arduino Leonardo but the shield doesn't seem to work fine with it. Will Adafruit release a library for this Arduino soon ?
-
- Posts: 11
- Joined: Sun Aug 12, 2012 3:24 pm
Re: NFC Shield for Arduino - PN532 & LibNFC
Thanks for your message. Unfortunately, LibNFC doesn't seem to find my arduino and my NFC shield.
When I plug in my arduino, Ubuntu links it to /dev/ttyACM0. I also created a symbolink link from /dev/ttyUSB0 to /dev/ACM0 (just in case...)
Are you sure it is possible to use LibNFC without a FTDI cable and just with the Arduino Uno ?
Am I missing something ? nfc-list always says : "pn53x_check_communication: Operation timed-out"
Do I need to upload a special program to my Arduino ?
Thanks for your help
When I plug in my arduino, Ubuntu links it to /dev/ttyACM0. I also created a symbolink link from /dev/ttyUSB0 to /dev/ACM0 (just in case...)
Are you sure it is possible to use LibNFC without a FTDI cable and just with the Arduino Uno ?
Am I missing something ? nfc-list always says : "pn53x_check_communication: Operation timed-out"
Do I need to upload a special program to my Arduino ?
Thanks for your help
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: NFC Shield for Arduino - PN532 & LibNFC
Sorry - I thought you were asking about connecting to the arduino. For LibNFC you'll need an FTDI Friend or an FTDI cable.
http://www.adafruit.com/products/284
http://www.adafruit.com/products/70
http://www.adafruit.com/products/284
http://www.adafruit.com/products/70
-
- Posts: 11
- Joined: Sun Aug 12, 2012 3:24 pm
Re: NFC Shield for Arduino - PN532 & LibNFC
Hi! I'm back.
It's been a while, but I have a FTDI friend now.
I don't understand very well how to wire it, and i've seen it was possible to mess up with the +5V on the Shield (should I have taken the breakboard?).
Here is a photo of what I have now. Could you please help me wiring it correctly?
I just want to use the Shield with my computer (LibNFC and stuff...).
Will I be able to connect it with a USB cable?
Thank you very much for your help and sorry for my dumbness.
Kate.
It's been a while, but I have a FTDI friend now.
I don't understand very well how to wire it, and i've seen it was possible to mess up with the +5V on the Shield (should I have taken the breakboard?).
Here is a photo of what I have now. Could you please help me wiring it correctly?
I just want to use the Shield with my computer (LibNFC and stuff...).
Will I be able to connect it with a USB cable?
Thank you very much for your help and sorry for my dumbness.
Kate.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: NFC Shield for Arduino - PN532 & LibNFC
Hi, Kate -
To use the FTDI Friend with the NFC Shield, you simply connect the TX, RX, and GND lines between the Friend and the shield.
You can power the shield by leaving it plugged into an arduino, or you can power the shield stand-alone by also connecting the 5V line from the Friend.
There is a six-hole area where you can solder either a male or female header. This is where the TX and RX lines connect (you can also permanently solder wires directly to the holes, without using a header strip, if you plan to always use the shield this way).
Connect the shield to the Friend as follows:
Friend Shield
TXO SS
RXI MOSI
5V 5V
GND GND
For 5V and GND, there are open holes on the shield, right next to the 5V and GND holes where the arduino header pins are soldered.
Finally, you need to configure SEL0 and SEL1 for UART mode. Melt a blob of solder to bridge across the copper pads at SEL0, and make sure that there is NO connection between the pads at SEL1. Note that, once you do this, the shield will no longer work with the arduino, since the shield is no longer configured to communicate with either SPI or I2C. If you want to go back to using the shield with the arduino, you will have to undo the changes you made to SEL0 and SEL1
To use the FTDI Friend with the NFC Shield, you simply connect the TX, RX, and GND lines between the Friend and the shield.
You can power the shield by leaving it plugged into an arduino, or you can power the shield stand-alone by also connecting the 5V line from the Friend.
There is a six-hole area where you can solder either a male or female header. This is where the TX and RX lines connect (you can also permanently solder wires directly to the holes, without using a header strip, if you plan to always use the shield this way).
Connect the shield to the Friend as follows:
Friend Shield
TXO SS
RXI MOSI
5V 5V
GND GND
For 5V and GND, there are open holes on the shield, right next to the 5V and GND holes where the arduino header pins are soldered.
Finally, you need to configure SEL0 and SEL1 for UART mode. Melt a blob of solder to bridge across the copper pads at SEL0, and make sure that there is NO connection between the pads at SEL1. Note that, once you do this, the shield will no longer work with the arduino, since the shield is no longer configured to communicate with either SPI or I2C. If you want to go back to using the shield with the arduino, you will have to undo the changes you made to SEL0 and SEL1
-
- Posts: 11
- Joined: Sun Aug 12, 2012 3:24 pm
Re: NFC Shield for Arduino - PN532 & LibNFC
Thank you very much for your clear explanations.
I had done a few tests close to what you describe, but I had used the wrong pins for SS and MOSI.
I'll try again with the right ones, hope it will work fine.
I'm also looking for a temporary solution to solder the selector 0. For now, I have a tiny piece of copper held by a plastic clip.
It would be nice to have jumpers on those connections.
Thanks again for your help
Kate.
I had done a few tests close to what you describe, but I had used the wrong pins for SS and MOSI.
I'll try again with the right ones, hope it will work fine.
I'm also looking for a temporary solution to solder the selector 0. For now, I have a tiny piece of copper held by a plastic clip.
It would be nice to have jumpers on those connections.
Thanks again for your help
Kate.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: NFC Shield for Arduino - PN532 & LibNFC
You can solder a cut-off resistor lead across it. Un-solder and lift one end to disconnect. The NFC breakout has jumper pins, but the recommended mode for NFC shields is I2C, so the jumper pins weren't used. Maybe in the future we could drill the pads, giving users the option to add jumper pins. I'll pass along the suggestion.I'm also looking for a temporary solution to solder the selector 0. For now, I have a tiny piece of copper held by a plastic clip.
It would be nice to have jumpers on those connections.
-
- Posts: 11
- Joined: Sun Aug 12, 2012 3:24 pm
Re: NFC Shield for Arduino - PN532 & LibNFC
Thank you for your answer. I know i'm complaining about things I could find on the breakout board, but I thought it would be nice to have only one board for both serial and Anrduino use.
Guess I'll have to stick to the Arduino usage because I wasn't able to make it work the way you described.
I properly connected the MOSI and SS pins but I think there is no communication between the board and the FTDI friend...
Guess I'll have to stick to the Arduino usage because I wasn't able to make it work the way you described.
I properly connected the MOSI and SS pins but I think there is no communication between the board and the FTDI friend...
-
- Posts: 11
- Joined: Sun Aug 12, 2012 3:24 pm
Re: NFC Shield for Arduino - PN532 & LibNFC
This is driving me crazy
I had a close look to the datasheets, searched across lots of forums, tried other pins.
I just can't make it work.
Do I have to change the baud rate of my FTDI friend ? Do the MOSI and SS pins match the TX and RX serial connections ?
The FTDI friend communicates with LibNFC (the debug is clear) but nothing reaches the shield.
Any idea ? I'd really love to play with it
I had a close look to the datasheets, searched across lots of forums, tried other pins.
I just can't make it work.
Do I have to change the baud rate of my FTDI friend ? Do the MOSI and SS pins match the TX and RX serial connections ?
The FTDI friend communicates with LibNFC (the debug is clear) but nothing reaches the shield.
Any idea ? I'd really love to play with it
-
- Posts: 5
- Joined: Wed Nov 21, 2012 10:47 am
Re: NFC Shield for Arduino - PN532 & LibNFC
BANNED_Salade wrote:This is driving me crazy
I had a close look to the datasheets, searched across lots of forums, tried other pins.
I just can't make it work.
Do I have to change the baud rate of my FTDI friend ? Do the MOSI and SS pins match the TX and RX serial connections ?
The FTDI friend communicates with LibNFC (the debug is clear) but nothing reaches the shield.
Any idea ? I'd really love to play with it
I have the same doubt but I suppose the concept is tx with rx
- ktownsend
- Posts: 1447
- Joined: Thu Nov 05, 2009 2:18 am
Re: NFC Shield for Arduino - PN532 & LibNFC
Normally with UART the RXD pin on one side gets connected to the TXD pin on the other side, and vice versa for the other pin. The UART connection should work out of the box but libnfc can also be extremely finicky if it isn't built correctly or depending on the version, and I found some versions simply wouldn't detect the board even if it was properly connected. I have also only ever used Ubuntu and we have no means to verify anything else.
Have you looked here, BTW? ... http://www.ladyada.net/products/rfidnfc/libnfc.html
You also need to be sure that you are setting the PN532 to use UART as a bus, but this is really only easy to do with the breakout (which also contains a connector for the FTDI cables on purpose). I would really recommend using the breakout board since it was designed for libnfc, and we can only guarantee and directly support the shield in the intended use of I2C with an Arduino since this is the scenario that they are tested with during manufacturing.
Have you looked here, BTW? ... http://www.ladyada.net/products/rfidnfc/libnfc.html
You also need to be sure that you are setting the PN532 to use UART as a bus, but this is really only easy to do with the breakout (which also contains a connector for the FTDI cables on purpose). I would really recommend using the breakout board since it was designed for libnfc, and we can only guarantee and directly support the shield in the intended use of I2C with an Arduino since this is the scenario that they are tested with during manufacturing.
-
- Posts: 11
- Joined: Sun Aug 12, 2012 3:24 pm
Re: NFC Shield for Arduino - PN532 & LibNFC
Hi !
That's what I did : TX to RX and RX to TX.
Board in UART mode (SEL0 closed).
I had already read the tutorial from Ladyada.
I'll try compiling other versions of Libnfc.
Edit : 1.4, 1.5, 1.6 : same problem. No ACK received from PN532.
That's what I did : TX to RX and RX to TX.
Board in UART mode (SEL0 closed).
I had already read the tutorial from Ladyada.
I'll try compiling other versions of Libnfc.
Edit : 1.4, 1.5, 1.6 : same problem. No ACK received from PN532.
- ktownsend
- Posts: 1447
- Joined: Thu Nov 05, 2009 2:18 am
Re: NFC Shield for Arduino - PN532 & LibNFC
What are you powering the board with? When the magnetic field is active these boards draw a decent amount of current.
-
- Posts: 5
- Joined: Wed Nov 21, 2012 10:47 am
Re: NFC Shield for Arduino - PN532 & LibNFC
Hi, I'm the same point of BANNED_Saladektownsend wrote:What are you powering the board with? When the magnetic field is active these boards draw a decent amount of current.
Same tests, same problems... (also tested with latest libnfc 1.6rc1) "ERROR: Unable to open NFC device" ALWAYS
And to answer about current: I also tried to power the shield with external cc 5v power supply, same situation.
Any idea at this point ?
Please be positive and constructive with your questions and comments.