{"id":393,"date":"2018-02-18T22:59:05","date_gmt":"2018-02-18T22:59:05","guid":{"rendered":"https:\/\/peterklemperer.com\/blog\/?p=393"},"modified":"2018-03-01T19:21:17","modified_gmt":"2018-03-01T19:21:17","slug":"nfc-v3-reader-with-arduino","status":"publish","type":"post","link":"https:\/\/peterklemperer.com\/blog\/2018\/02\/18\/nfc-v3-reader-with-arduino\/","title":{"rendered":"NFC v3 Reader with Arduino"},"content":{"rendered":"<p>Turns out there are playing cards available with NFC capability embedded in them. I&#8217;m helping a friend make an automated bridge table. The step I&#8217;m helping with in particular is reading the card inputs and pushing the information on to the host computer.<\/p>\n<p>The three options I found quickly were from Adafruit, Seed Studio, and then a cheap option on <a href=\"https:\/\/www.amazon.com\/HiLetgo-PN532-Module-Communication-Android\/dp\/B01I1J17LC\/ref=sr_1_1?ie=UTF8&amp;qid=1518993690&amp;sr=8-1&amp;keywords=pn532\">Amazon<\/a>. This tutorial is about the cheap option.<\/p>\n<p>Of the two boards that I received, one of the boards had multiple solder bridges between the pins of the PN532. Fortunately, the second board started up just fine, but I waisted a lot of time trying to boot the broken board.<\/p>\n<p><strong>Demonstration<\/strong><\/p>\n<p><iframe loading=\"lazy\" title=\"NFC v3 with Arduino\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/O_ue7NtKaZc?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>The best documentation I could find was at\u00a0<a href=\"https:\/\/github.com\/ftPeter\/sensor-debug-notes\/blob\/master\/NFC-V3-PN532\/PN532_Manual_V3-1.pdf\">PDF (linked)<\/a>. I personally only used the SPI mode, but I2C and serial modes are also listed as available.<\/p>\n<p><strong>Software Installation and Example Arduino Code<\/strong><\/p>\n<p>I was able to get the Red PN532 board working using the libraries supplied by Adafruit. For more details check out my GitHub repository:<br \/>\n<span class=\"repo-root js-repo-root\"><span class=\"js-path-segment\"><a href=\"https:\/\/github.com\/ftPeter\/sensor-debug-notes\" data-pjax=\"true\">sensor-debug-notes<\/a><\/span><\/span><span class=\"separator\">\/<\/span><span class=\"js-path-segment\"><a href=\"https:\/\/github.com\/ftPeter\/sensor-debug-notes\/tree\/master\/NFC-V3-PN532\" data-pjax=\"true\">NFC-V3-PN532<\/a><\/span><span class=\"separator\">\/<\/span><\/p>\n<p>Optional and more difficult: Configuring using the manufacturers code<\/p>\n<p><a href=\"https:\/\/github.com\/elechouse\/PN532\">I downloaded the git repository from Electrohub.<\/a><\/p>\n<p>The zip file (&#8220;PN532-PN532_HSU.zip&#8221;) contained five directories:\u00a0NDEF, PN532, PN532_HSU, PN532_I2C, and PN532_SPI. To install the libraries and example code, I copied the folders into my mac&#8217;s Arduino libraries folder: \/Users\/peter\/Documents\/Arduino\/libraries\/. Restarting the Arduino program revealed a PN532 section in File-&gt;Examples-&gt;PN532. The ido14443A _uid example is the program I&#8217;m using as the basis of my card reader.<\/p>\n<p><strong>Wiring the Board to the Arduino<\/strong><\/p>\n<p>I followed the instructions listed in the manual.<\/p>\n<p><strong>Configuring the Board<\/strong><\/p>\n<p>The configuration switches should be set as indicated on the board for SPI.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Turns out there are playing cards available with NFC capability embedded in them. I&#8217;m helping a friend make an automated bridge table. The step I&#8217;m helping with in particular is reading the card inputs and pushing the information on to &hellip; <a href=\"https:\/\/peterklemperer.com\/blog\/2018\/02\/18\/nfc-v3-reader-with-arduino\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[67,10],"tags":[],"class_list":["post-393","post","type-post","status-publish","format-standard","hentry","category-programming","category-toys"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1VqWo-6l","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/peterklemperer.com\/blog\/wp-json\/wp\/v2\/posts\/393","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/peterklemperer.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/peterklemperer.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/peterklemperer.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/peterklemperer.com\/blog\/wp-json\/wp\/v2\/comments?post=393"}],"version-history":[{"count":0,"href":"https:\/\/peterklemperer.com\/blog\/wp-json\/wp\/v2\/posts\/393\/revisions"}],"wp:attachment":[{"href":"https:\/\/peterklemperer.com\/blog\/wp-json\/wp\/v2\/media?parent=393"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/peterklemperer.com\/blog\/wp-json\/wp\/v2\/categories?post=393"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/peterklemperer.com\/blog\/wp-json\/wp\/v2\/tags?post=393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}