Arduino Projects

PN532 NFC RFID with Arduino Pro Micro for Beginners

PN532 NFC RFID with Arduino Pro Micro:

 

PN532 NFC RFID with Arduino Pro Micro for Beginners- In my previous article, I designed and made my own Arduino Pro Micro. And today, I am going to use it with the PN532 NFC RFID module. If you want to learn how to design a professional PCB in Altium Designer, How to fix design errors in seconds, how to generate Gerber files, How to order cheap yet high-quality PCBs from PCBWay, how to order your SMD components, How to place and solder tiny SMD components, how to burn a bootloader on Arduino Pro Micro. Then you should read my article on the Arduino Pro Micro.

I have already made several beginner, intermediate, and advanced-level projects on the PN532 NFC RFID module. And the PN532 is so far the best RFID module because it has got different interfaces

allpcb circuit

HSU (High Speed UART)

I2C and

SPI




I have already explained how to use all these interfaces in a getting started tutorial. Now, the reason I am using the PN532 NFC RFID module with the Arduino Pro Micro is that there is no video and article about how to use the PN532 RFID module with the Arduino Pro Micro. And moreover, it uses less power as its parts are designed for low-power consumption so if it’s used with the Arduino Pro Micro; some high-end user products can be designed.

PN532 NFC RFID with Arduino Pro Micro

As you might know, I have started a complete series on products designing. And I am going one step at a time. First, I designed a 5V and 3A power supply, and I tested it with the Arduino, ESP32, Raspberry Pi, Raspberry Pi Pico, ESP32 Camera module, ESP8266, and Sensors, etc. Even I have used it to charge my cell phone. So, I am pretty satisfied with this 5V and 3A power supply.

Next, I made myself an Arduino Pro Micro, I have already tested it and it works flawlessly. So, what I am going to do next, is to use this 5V and 3A power supply to power up the Arduino Pro Micro to control some LEDs using the PN532 RFID module. I will keep testing it for a few days and if everything goes well then I will combine this 5V and 3A power supply on a single PCB with the Arduino Pro Micro. And then I can do whatever I want. So, without any further delay, let’s get started!!!



Amazon Links:

Arduino Pro Micro

PN532 NFC RFID Module

*Disclosure: These are affiliate links. As an Amazon Associate I earn from qualifying purchases.



PN532 RFID Interfacing with Arduino Pro Micro:

circuit diagram of PN532 NFC RFID with Arduino Pro Micro

The VCC and GND pins of the PN532 RFID module are connected with the Arduino Pro Micro 3.3V and GND pins. While the SCL and SDA pins of the RFID module are connected with the SCL and SDA pins of the Arduino Pro Micro.

scl and sda pin of PN532 NFC RFID with Arduino Pro Micro

On my Arduino Pro Micro, I have clearly labeled the SCL and SDA pins. And even I have clearly labeled the SS, MOSI, MISO, and SCLK pins. So, this way I don’t have to remember these pins. Anyway, on the readymade Arduino Pro Micro Pin 2 is the SDA and Pin 3 is the SCL.

Two LEDs are connected with the digital pins 4 and 5 through 330-ohms current limiting resistors. So, that’s all about the connections. Now, let’s start with the required libraries.



PN532 Arduino Library:

It doesn’t matter if you start with HSU, I2C, or SPI, first you will need to download all the required libraries.

Download PN532 RFID Module Library

Simply download the above WinRAR folder, extract it, and double-click to open the folder.

PN532 NFC RFID with Arduino Pro Micro library

You can see inside this folder we have all the required libraries, so simply copy these folders and paste it into the Arduino libraries folder.

Now, that we have the required library. Now, let’s go ahead and take a look at the programming.

PN532 Arduino Pro Micro Programming:

This is the same code from my getting started article on the PN532 RFID module. This time I only changed the pin numbers. While everything else remains exactly the same. Anyway, I uploaded the code into the Arduino Pro Micro.

To find the Tag IDs. Simply, open the Serial monitor, and start scanning your RFID tags.

finding rfid tag id usimg PN532 NFC RFID with Arduino Pro Micro

Then come back to your code and replace my Tag IDs with yours. It’s just that simple. So, let’s go ahead and start the practical demonstration.



Practical Testing:

This is the most important part especially if you are a beginner. If you are just getting started with the Arduino and RFID module and you are performing your initial experiments, then you can use your Laptop or computer to power up the Arduino board; there is no need to use an external power supply. And if you think, you need an external power supply to power up your Arduino board and all the other electronics using a 12V adaptor or a 12V battery or a lipo battery pack, or a lithium ion battery pack, or even a solar panel then I highly recommend using a 5V and 3A powers supply. Because with 3A you can power up pretty much all the sensors and the majority of the breakout boards and motors. Anyway, let’s first start with the Laptop as the power source and then I will use my designed 5V and 3A power supply.

Laptop as a Power Source:

live testing of PN532 NFC RFID with Arduino Pro Micro

I successfully controlled the two LEDs using my designed Arduino Pro Micro and the PN532 NFC RFID module while using my Laptop as the power source. The LED is dim because I am using a higher value of the current limiting resistor 330-ohm. For this LED the recommended resistor value is 40 ohms as per the formula.

V = IR

R = V/I

R = (3.3 – 2.5) / 20mA

R = 0.8/20mA

R = 40 ohms.

But to be on the safe side and to increase the LED life span, you can use a 100 ohm resistor. Unfortunately, I didn’t had this resistor so I used the 330 ohm resistor.



5V 3A Power Supply:

PN532 NFC RFID with Arduino Pro Micro

So, now that, I have successfully tested my designed 5V 3A power supply and my designed Arduino Pro Micro with the PN532 NFC RFID Module. So, in one of my upcoming tutorials, I will use these on a single PCB. For the practical demonstration watch the video tutorial given below.



Watch Video Tutorial:

Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button