Views: 0 Author: Site Editor Publish Time: 2022-03-22 Origin: Site
RFID (Radio Frequency Identification) is a system used to transmit data over short distances (usually less than 6 inches). Usually, only one of the two devices needs to be powered, while the other is a passive device. It can easily be used for items such as credit cards, smart keys and pet collars since there is no need to worry about battery life. The downside is that the reader and the information holder (i.e., credit card) must be in very close proximity and can only hold a small amount of data. Here is the information I found on how to connect RFID and arduino RFID card.
This passage is going to talk about the followings of connect RFID sensor to arduino:
1)Step 1 Quick Start: Wiring
2)Step 2: Adding a library
3)Step 3: Programming the Arduino
4)Step 4: Read RFID tags
Quick Start: Wiring
Step 1: Connect the SDA slot on the RFID to the Digital 10 slot on the Arduino.
Step 2: Connect the SCK slot on the RFID to the Digital 13 slot on the Arduino.
Step 3: Connect the MOSI slot on the RFID to the Digital 11 slot on the Arduino.
Step 4: Connect the MISO slot on the RFID to the Digital 12 slot on the Arduino.
Step 5: The IRQ slot should be disconnected from the Arduino.
Step 6: Connect the GND aka ground slot to ground on the Arduino.
Step 7: Connect the RST to the Digital 5 slot on the Arduino.
Step 8: Connect -3.3V to 3.3v to the Arduino.
Assume you have already downloaded the Arduino software to your computer.
1. Download the AddicoreRFID library that needs to be added to the Arduino library.
2. Open the Arduino IDE and navigate to Sketch> Include Library. a drop-down menu will appear. Click the option to "Add .ZIP library..."
3. A window will open. Navigate to the current location of the AddicoreRFIDlibrary downloaded above and open it. (After installing the library, the bottom left corner of the IDE should show "Added the library to your library. Please check the "Include Libraries" menu")
4. You can confirm that the library is installed by navigating to Sketch > Include Libraries again. The AddicoreRFID library should now be displayed in the "Contributed Libraries" list.
After installing the AddicoreRFID library in the previous steps, the library will be available for sketching, but any example sketches contained in the library may not be displayed in File > Examples until after restarting the Arduino IDE.
1. Restart the Arduino IDE by closing all currently open Arduino IDE windows, then opening the Arduino IDE.
2. While the Arduino IDE is open, navigate to "File" > "Examples" > "AddicoreRFID". Select the "Addicore_RFID_Example" sketch. This will open a sketch that will be used with the RFID module we previously connected to the Arduino.
3. Now connect the Arduino to the computer and upload the code.
With your Arduino programmed with the "Addicore_RFID_Example" sketch and still plugged into your computer, you can open the Serial Monitor by clicking the Serial Monitor icon or by pressing CTRL + SHIFT + M.
If not already selected, click the drop-down selection in the lower right corner of the Serial Monitor window to set the serial baud rate to 9600 baud, then select 9600 baud.
3. Now, remove one of the RFID cards or key fobs included with the RFIDAddiKit and place it close to the white graphic printed on the RFID-RC522 module.
4. Once the module has read the RFID tag, your serial monitor should display an image similar to the second image above
5. Make a note of the serial number. It is located on the last line of the data and is the first number (not 100001, 1010101), it should look like a regular number, for example " 59" or " 68"
6. Now close the serial monitor and enter this number in the code of the AddicoreRFID sketch, which appears as
// It should really check all pairs, but for now we will only use the first one
If (str  == 156)
*replace " 156" with the number you get from the serial monitor when scanning the RFID card or FOB
In addition to that, you can change the message in " Hello Craig! Any message you want. I chose "Hello Caitlin".
Finally, upload the changes to Arduino by pressing the right arrow in the Arduino software window
Finally, you can make sure your programming is working properly by turning on the serial monitor again and waving the key fob or card near the sensor to see if the message appears and if you have programmed it correctly.