Author Topic: Make this RFID Circuit using Arduino  (Read 109 times)

Offline vivitern

  • High Voltage Enthusiast
  • *
  • Posts: 1
    • View Profile
Make this RFID Circuit using Arduino
« on: November 22, 2017, 08:36:13 AM »
I am sure every one of you has used RFID to get security access at least once at office, school, college, library etc.

The tag/card which you carry around has electronic chip embedded in it, the chip stores your identity electronically. Unlike barcodes, where card should be line of sight of the reader, RFIDs can be placed just near to reader to read the information.

Most of our smart cards use passive RFID technology, which means no power is required to read the information from the card. The reader powers the RFID chip and extracts information at the same time.

These kinds of tags can read information from millimetres to few feet, depending on the tag and application.

An active RFID tags are powered externally, these kinds of tags transmit the information up to 100 feet. The battery power consumption is optimized to last few years.

In this project we are going to look at passive RFID technology. We are using RC522 reader module along with arduino for extracting and displaying information. RC522(http://www.kynix.com/Detail/105270/RC522.html) module is commonly available at e-commerce websites and local electronics kits shop.

Illustration of RC522 reader/writer module:




Card and keychain type tags:



As we can see that, a part of the PCB is surrounded by conducting path in square shape on the reader; this will generate electromagnetic field for the tag at 13.56MHz frequency.

The generated EMF is picked by the tag and converts to sufficient voltage for the tag to operate, the tag will sends out the necessary information in pulse form back to the reader. The on-board microcontroller decodes the information.

How the Circuit Works


Make this RFID Circuit using Arduino
 

The schematic is very easy and self-explanatory, few jumper wires is enough to accomplish this project. We are going to power the arduino and RFID via USB port of the computer. The operating voltage of RC522 is 3.3V, do not connect 5V supply to the module and will damage the on-board components.

Author’s Arduino RFID circuit prototype :



That’s all the hardware connections, now let’s jump into coding.

Before uploading the program, download the library file from the following link and move to library folder of arduino IDE.

https://github.com/miguelbalboa/rfid.git

Program Code:
 

//-------------------------Program developed by R.Girish------------------//
#include <SPI.h>
#include <MFRC522.h>
#define SS_PIN 10
#define RST_PIN 9
MFRC522 rfid(SS_PIN, RST_PIN);
MFRC522::MIFARE_Key key;
void setup()
{
Serial.begin(9600);
SPI.begin();
rfid.PCD_Init();
}
void loop() {
if ( ! rfid.PICC_IsNewCardPresent())
return;
if ( ! rfid.PICC_ReadCardSerial())
return;
MFRC522::PICC_Type piccType = rfid.PICC_GetType(rfid.uid.sak);
if(piccType != MFRC522::PICC_TYPE_MIFARE_MINI &&
piccType != MFRC522::PICC_TYPE_MIFARE_1K &&
piccType != MFRC522::PICC_TYPE_MIFARE_4K)
{
Serial.println(F("Your tag is not of type MIFARE Classic, your card/tag can't be read :("));
return;
}
String StrID = "" ;
for (byte i = 0; i <4; i ++)
{
StrID +=
(rfid.uid.uidByte<0x10? "0" : "")+
String(rfid.uid.uidByte,HEX)+
(i!=3?":" : "" );
}
StrID.toUpperCase();
Serial.print("Your card's UID:");
Serial.println(StrID);
rfid.PICC_HaltA ();
rfid.PCD_StopCrypto1 ();
}

//-------------------------Program developed by R.Girish------------------//

 

Ok! What does the above program designed to function?

The above program will display the UID of the tag in serial monitor of IDE, when you scan on the reader. UID is unique identification number of the tag, it can’t be changed and it is set by the manufacturer.

OUTPUT:

Your card's UID:  FA:4E:B2   // this is an example.

Note 1: The each two values are separated by colon, which is done by the program; real values may not be separated by colon but, rather by space.

Note 2: Only NXP manufactured RFID tags are readable/writeable with the proposed setup, these are commonly and commercially used.

The UID is used to recognize the tag; the tag that comes along with the kit can store up to 1KB of information. There are other cards which can store up to 4KB of information or even more.

The process of storing and extracting the information from the tag is subject of another article.
If you have question, regarding this project, feel free ask in the comment section.

Offline Mads Barnkob

  • Administrator
  • High Voltage Engineer
  • *****
  • Posts: 396
  • Denmark
    • View Profile
    • Kaizer Power Electronics
Re: Make this RFID Circuit using Arduino
« Reply #1 on: November 25, 2017, 10:38:42 PM »
Hi Vivitern and welcome to the forum

You seem to have left out any links to your kit or the original article where all this was posted?

However it is still a interesting project and about the RFID chips being widely used/interact-able across "brands" of appliances is quite true. At work we got regular RFID cards for identification and entering restricted areas, at home a collegue got a alarm/security system with these small RFID keyring bricks, just for fun one day he scanned his work card at the alarm and it beeped for unknown key, so he went in administration part to add a new key and sure enough he could add he work ID card to the home alarm system, so it properly just work out from the UID.

Now a interesting part I would like to see is the possibility to read out the UID, build a new device that can broadcast it, so that I do not have to wipe my card at a scanner, but simply walk near the door I want to open :)
http://www.kaizerpowerelectronics.dk - Tesla coils, high voltage, pulse power, audio and general electronics

High Voltage Forum

Re: Make this RFID Circuit using Arduino
« Reply #1 on: November 25, 2017, 10:38:42 PM »

 


* Recent Topics and Posts

post Re: Steve Ward's Universal Driver 1.3: using IFD95 fibre optic receiver
[Dual Resonant Solid State Tesla coils]
matt0852
Today at 03:20:44 PM
post Re: Steve Ward's Universal Driver 1.3: using IFD95 fibre optic receiver
[Dual Resonant Solid State Tesla coils]
matt0852
Today at 03:06:07 PM
post Re: My first drsstc
[Dual Resonant Solid State Tesla coils]
oneKone
Today at 01:04:04 PM
post Re: Steve Ward's Universal Driver 1.3: using IFD95 fibre optic receiver
[Dual Resonant Solid State Tesla coils]
Mads Barnkob
Today at 09:10:16 AM
post Re: Hacking the IKEA 2000 Watt induction stove (5 parts)
[Electronic circuits]
chjarup
Today at 06:53:35 AM
post Re: new problem
[Dual Resonant Solid State Tesla coils]
Garyf
Today at 06:23:00 AM
post Re: Steve Ward's Universal Driver 1.3: using IFD95 fibre optic receiver
[Dual Resonant Solid State Tesla coils]
matt0852
December 13, 2017, 11:42:27 PM
post Re: new problem
[Dual Resonant Solid State Tesla coils]
Max
December 13, 2017, 04:16:45 PM
post Re: Steve Ward's Universal Driver 1.3: using IFD95 fibre optic receiver
[Dual Resonant Solid State Tesla coils]
Mads Barnkob
December 13, 2017, 08:41:17 AM
post Re: Steve Ward's Universal Driver 1.3: using IFD95 fibre optic receiver
[Dual Resonant Solid State Tesla coils]
matt0852
December 13, 2017, 03:35:30 AM
post Re: Highway to DRSSTC
[Dual Resonant Solid State Tesla coils]
Mads Barnkob
December 12, 2017, 09:36:30 PM
post Re: Highway to DRSSTC
[Dual Resonant Solid State Tesla coils]
Laci
December 12, 2017, 08:49:16 PM
post Re: Steve Ward's Universal Driver 1.3: using IFD95 fibre optic receiver
[Dual Resonant Solid State Tesla coils]
Mads Barnkob
December 12, 2017, 07:39:45 PM
post Re: DRSSTC: IGBT selection
[Dual Resonant Solid State Tesla coils]
matt0852
December 12, 2017, 04:09:13 PM
post Steve Ward's Universal Driver 1.3: using IFD95 fibre optic receiver
[Dual Resonant Solid State Tesla coils]
matt0852
December 12, 2017, 04:07:25 PM
post Re: First DRSSTC: PCB Critique needed!
[Dual Resonant Solid State Tesla coils]
Mads Barnkob
December 12, 2017, 11:21:12 AM
post Re: First DRSSTC: PCB Critique needed!
[Dual Resonant Solid State Tesla coils]
matt0852
December 12, 2017, 10:11:22 AM
post Re: DRSSTC: IGBT selection
[Dual Resonant Solid State Tesla coils]
Mads Barnkob
December 12, 2017, 09:35:46 AM
post DRSSTC: IGBT selection
[Dual Resonant Solid State Tesla coils]
matt0852
December 12, 2017, 03:43:27 AM
post Re: First DRSSTC: PCB Critique needed!
[Dual Resonant Solid State Tesla coils]
matt0852
December 11, 2017, 11:52:40 PM
post Re: new problem
[Dual Resonant Solid State Tesla coils]
Garyf
December 11, 2017, 11:27:15 PM
post Re: new problem
[Dual Resonant Solid State Tesla coils]
Mads Barnkob
December 11, 2017, 09:05:14 PM
post new problem
[Dual Resonant Solid State Tesla coils]
Garyf
December 11, 2017, 08:51:12 PM
post Re: First DRSSTC: PCB Critique needed!
[Dual Resonant Solid State Tesla coils]
Mads Barnkob
December 11, 2017, 07:14:11 PM
post induction heating/Blacksmithing
[Electronic circuits]
petespaco
December 11, 2017, 04:30:06 PM
post Re: First DRSSTC: PCB Critique needed!
[Dual Resonant Solid State Tesla coils]
matt0852
December 11, 2017, 02:49:10 PM
post Re: First DRSSTC: PCB Critique needed!
[Dual Resonant Solid State Tesla coils]
Mads Barnkob
December 11, 2017, 02:10:54 PM
post Re: Hacking the IKEA 2000 Watt induction stove (5 parts)
[Electronic circuits]
Mads Barnkob
December 11, 2017, 01:08:29 PM
post Re: FPS1000HD how-to, information and work flow collection
[High speed filming]
Mads Barnkob
December 10, 2017, 08:32:12 PM
post FPS1000HD how-to, information and work flow collection
[High speed filming]
Mads Barnkob
December 10, 2017, 08:31:47 PM
post First DRSSTC: PCB Critique needed!
[Dual Resonant Solid State Tesla coils]
matt0852
December 10, 2017, 03:43:19 PM
post Re: Hacking the IKEA 2000 Watt induction stove (5 parts)
[Electronic circuits]
chjarup
December 10, 2017, 10:49:22 AM
post Re: Highway to DRSSTC
[Dual Resonant Solid State Tesla coils]
Laci
December 09, 2017, 06:37:09 PM
post Re: What kind of oscilloscope to buy?
[Electronic circuits]
Hydron
December 09, 2017, 03:58:31 PM
post Re: What kind of oscilloscope to buy?
[Electronic circuits]
futurist
December 09, 2017, 03:35:22 PM
post Re: What kind of oscilloscope to buy?
[Electronic circuits]
petespaco
December 09, 2017, 05:08:54 AM
post FPS1000HD unboxing
[High speed filming]
Mads Barnkob
December 08, 2017, 11:15:54 PM
post Re: Hacking the IKEA 2000 Watt induction stove (5 parts)
[Electronic circuits]
Mads Barnkob
December 08, 2017, 07:54:06 PM
post Re: What kind of oscilloscope to buy?
[Electronic circuits]
Mads Barnkob
December 08, 2017, 07:29:29 PM
post Re: What kind of oscilloscope to buy?
[Electronic circuits]
futurist
December 08, 2017, 05:57:07 PM
post What kind of oscilloscope to buy?
[Electronic circuits]
petespaco
December 08, 2017, 04:39:48 PM
post Re: Hacking the IKEA 2000 Watt induction stove (5 parts)
[Electronic circuits]
petespaco
December 08, 2017, 04:22:31 PM
post Re: Hacking the IKEA 2000 Watt induction stove (5 parts)
[Electronic circuits]
Mads Barnkob
December 07, 2017, 10:03:07 PM
post Re: Tardief's DRSSTC
[Dual Resonant Solid State Tesla coils]
Mads Barnkob
December 07, 2017, 07:27:45 PM
post Re: Audio modulation by BUCK power supply
[Solid state Tesla coils]
Acid Byte
December 07, 2017, 06:33:43 AM
post Re: Tardief's DRSSTC
[Dual Resonant Solid State Tesla coils]
Tardief
December 06, 2017, 03:27:42 PM
post Re: WTS [DK]: NWL W00238 Capacitor 815 KVAR 1200 VAC 680 Ampere @ 10 kHz
[Sell / Buy / Trade]
Max
December 06, 2017, 01:56:20 PM
post Re: WTS [DK]: NWL W00238 Capacitor 815 KVAR 1200 VAC 680 Ampere @ 10 kHz
[Sell / Buy / Trade]
Mads Barnkob
December 06, 2017, 12:30:21 PM
post Re: WTS [DK]: NWL W00238 Capacitor 815 KVAR 1200 VAC 680 Ampere @ 10 kHz
[Sell / Buy / Trade]
Max
December 06, 2017, 11:04:26 AM
post Re: Royer Refinements
[Electronic circuits]
flyrod
December 06, 2017, 03:28:36 AM