Skip to content

markojavorac/nfc_platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adafruit PN532 NFC/RFID + PCB Build Instructions

By: Marko Javorac Toronto, Canada

Introduction

NFC/RFID technology has been a staple in the world for decades. From security to automation, this technology can implemented in a varity of ways. This guide will help you up and running using the Adafruit PN532 board with your Rasberry Pi. final2

Prerequistes

Due to its nature, a few skills will be required that are beyond the scope of this guide. A few helpful links are provided below.

Time Commitment

The time required can vary depening on a few factors. If recive your parts, prepare Raspberry Pi, and install required libraries

Bill of Materials/Budget

The toal cost of this project can very depending on how much equipment you have access to and the PCB providers. The average cost will be around $150. A fulll breakdown of the costs is avaliable here.

Hardware Required

Software Required

  • RaspianOS running on a Raspberry Pi Model 3

Mechanical Assembly

To enable comunicattion between the Pi and the PN532 Board, you will have to choose a communications protocol and solder jumpers on the designated protocol. For this tutorial we will be using I2C. The jumpers are included in the PN532 kit. top side of sensor bottom side of sensor jumpers

I2C

To enable I2C or any other communication protocol, the jumpers must be configured correctly. Setup table is below. communications table

Initial Software Configuration

We will now be shifting our focus over to the sofware side. To interact with the board and use nfc functionality, we will be using an open source library called libnfc. The is a basic but powerful package of libraries that will get us going and be foundation to your future projects. We will again assume you understand how to setup and run Debian on a Pi.

This official libnfc guide will walk you through installing the library. This website contains a plethora of information regarding NFC and should be your goto for troubleshooting the software side.

Power Up

We will give it quick test to make sure all our components are working. A prototyping breadboard is a great way to do this. The pins must be configured the right way for our sensor. Be extra careful as you do this to not damage you board.

  • Pin01 --> 3.3V
  • Pin03 --> SDA
  • Pin05 --> SLC
  • Pin06 --> GND

proto 1 proto 2

Running the i2cdetect program will let you know if your PI can actually see the i2c device. Your address might vary from mine and thats fine. The goal is just get an address.

i2c detect

Using libnfc, we can run a simple poll program that when a card is detected, it will state simple information and confirm we can read nfc cards.

i2c detect

PCB / Soldering

Our PCB is designed in EAGLE and the file is provided in PCB folder of this repository. Notice that I went through multiple iterations of the PCB to get a design that worked for me. Unless you have a PCB printing station avaliable to you, You will have to use an online printing soultion. A quick look up online will help you find the right one. It is also possible to find PCB printers in your area. There are a variety of pros and cons to each that you willl have to decide for yourself.

pcb schmatic.

You will have to solder headers and resitors where shows in the images below. Follow the soldering guide linked at the top.

pcb top1 pcb top2 pcb top1 pcb top2

NOTE:

This PCB is not the final one provided in the repository. It has a modifcation so you don't need to drill and rewire as I had to. In the future, I will repost an image of the final one.

Case

Although it it not necessary to have a case, protecting your hardware is a great idea. In this repo, there is a case design cad file that is to be used with a sheet of acrylic. It is not a perfect case but it will get the job done

Bringing it all together.

You should now be able to combine the pcb, board, and PI onto one neat unit. final1 final2 final3

Production Testing

This guide helps you make one unit but scaling up to commercial introduces a new dimension of challenges. Condensing board design, cost-effective materials, and dedicated read-only nfc board are possible avenues to explore when considering commercial opportunities.

Wrapping up

By following these instructions, you should be able to get your own PN532 board working on the Rasberrry Pi and begin exploring NFC projects with confidence. If you have any comments or suggestions please email me at [email protected].

-Marko

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE.md file for details

Acknowledgments

  • The undying support of my family and friends, in particular Jacob Ladan and Denald Demirxhiu.
  • All the faculty and support staff at Humber Collage

Releases

No releases published

Packages

No packages published