Introduction: Reading RFID Tags With an Arduino

Picture of Reading RFID Tags With an Arduino

In this project, you'll learn to read an RFID tag using the Innovations ID-12 reader and an Arduino Duemilanove.

Step 1: Let's Get Started!

Picture of Let's Get Started!

We'll be using the ID Innovations ID-12 to perform the task of reading an RFID tag. At a minimum, it requires +5V, ground, and a digital pin (on the Arduino) that we will utilize for serial communication.

The ID-12 operates at 9600bps and has an LED output pin. This LED output is great! We can use this to verify if the ID-12 is reading the tag even before it is connected to the Arduino!

The ID-12 has unusual pin spacing. Pick up the breakout board from SparkFun (SEN-08423 ) to make it easily fit on your breadboard.

All of ID Innovations readers read at a frequency of 125 kHz. Any 125 kHz RFID tag will do.

Step 2: Okay, Let's Start Wiring

Picture of Okay, Let's Start Wiring

Okay, before we even start messing with the Arduino, let's get the ID-12 wired up. Follow the wiring layout above using your breadboard and jumpers to make the necessary connections.

I did not show an LED connected to the LED pin (10), but it's a good idea to use this at first for read verification. Also, I prefer to insert a small capacitor (100nF) between +5V and ground to keep the power clean.

Once the ID-12 has been connected it's time to bring out the Arduino! Connect TX (D0, Pin 9) from the ID-12 to RX on the Arduino.

Step 3: Time for Some Code!

Picture of Time for Some Code!

This first sketch will test to make sure the ID-12 is working correctly. The Arduino waits for serial comms and prints the output. We can see that output using the serial monitor. The output may look like junk, but it is, in fact, the unique ID for our RFID tag. We will use this ID in the next sketch.

Copy the code below and paste it into a new sketch. Verify, compile, and upload. When it has finished uploading, pass the RFID tag over the reader. If you have the LED pin on the ID-12 connected to an LED, you should see the LED blink. This indicates a succesful read. If the Arduino is wired and working correctly, you should see 12 hexadecimal characters in the serial monitor. This is the tag's unique identifier.

I should mention that you MUST disconnect the Arduino RX pin while uploading the sketch, otherwise, you will get an error.

----------------------------------------------------------------------------------
/* RFID ID12 */

char val = 0; // variable to store the data from the serial port

void setup() {
Serial.begin(9600); // connect to the serial port
}

void loop () {
// read the serial port
if(Serial.available() > 0) {
val = Serial.read();
Serial.print(val, BYTE);
}
}
----------------------------------------------------------------------------------

Step 4: Final Sketch

Picture of Final Sketch

So, at this point, you should have a unique identifier for your RFID tag. We are going to insert it into the attached code file. I'm not going to explain how the code works. I leave that as an exercise for you.

Take your unique identifer, slice off the last two characters so you are left with 10 characters. For example, I read 2900940E9526 as my identifier. So, I will use 2900940E95. 26 is the ID's checksum. Don't worry about this. Insert your identifier in the code where it says [INSERT IDENTIFIER HERE]. You can also add your name in the [ADD YOUR NAME HERE].

Remember when we connected ID-12 pin 9 to the Arduno RX. We're going to free up the RX pin and relocate that connection to digital pin 4. That's it!

Verify, compile, upload, and run. Open the serial monitor and scan your card. You should see something like my output.

Congratulations! We have a working RFID reader!

FUTURE:
If we dig through the code, we will see 'futureOutput' defined for pin 12. This pin goes high for two seconds after a successful, authorized card read. It can be used to control a relay to perform a number of many different things. That is up to you!

Also, at the end of the code is the 'unlock()' function. This defines what happens during the unlock process. Code could be added here to initiate another sequence, perhaps X10 protocol to control a home appliance? You may see that from me in the future *WINK WINK*.

(IGNORE THE NEXT/LAST STEP. The editor freezes when I try to edit it, hanging on 'UPDATING'. So, it's staying there until I figure out how to get rid of it.)

Step 5: Final Sketch

Picture of Final Sketch

So, at this point, you should have a unique identifier for your RFID tag. We are going to insert t into the code below. I'm not going to explain how the code works. I leave that as an exercise for you.

Okay, remember when we connected ID-12 pin 9 to the Arduno RX. We're going to free up the RX pin and relocate that connection to digital pin 4. That's it!

Now, take your unique identifer, slice off the last two characters so you are left with 10 characters. For example, I read 2900940E9526 as my identifier. So, I will use 2900940E95. 26 is the ID's checksum. Don't worry about this. Insert your identifier in the code below where it says [INSERT IDENTIFIER HERE]. You can also add your name in the [ADD YOUR NAME HERE].

--------------------------------------------------------------------------------------------------------------------------------
/**
 * RFID Access Control
 *
 * Some of this code was inspired by Tom Igoe's RFID tutorial
 * From the ID-12 example code on the Arduino Playground
 * And HIGHLY based on Jonathan Oxer's project at:
 * http://www.practicalarduino.com/projects/medium/rfid-access-control
 */

// Set up the serial connection to the RFID reader module. In order to
// keep the Arduino TX and RX pins free for communication with a host,
// the sketch uses the SoftwareSerial library to implement serial
// communications on other pins.
#include

// The RFID module's TX pin needs to be connected to the Arduino.

#define rxPin 4
#define txPin 5

// Create a software serial object for the connection to the RFID module
SoftwareSerial rfid = SoftwareSerial( rxPin, txPin );

// Set up outputs
#define futureOutput 12
#define ledPin 13

// Specify how long the output should be held.
#define unlockSeconds 2

// The tag database consists of two parts. The first part is an array of
// tag values with each tag taking up 5 bytes. The second is a list of
// names with one name for each tag (ie: group of 5 bytes). You can expand
// or shrink this as you see fit. Tags 2 and 3 are only there for example.
char* allowedTags[] = {
"[INSERT IDENTIFIER HERE]", // Tag 1
"2900940E95", // Tag 2
"ABC123DE45", // Tag 3
};

// List of names to associate with the matching tag IDs
char* tagName[] = {
"[ADD YOUR NAME HERE]", // Tag 1
"Mark Trussell", // Tag 2
"NAME 3", // Tag 3
};

// Check the number of tags defined
int numberOfTags = sizeof(allowedTags)/sizeof(allowedTags[0]);

int incomingByte = 0; // To store incoming serial data

/**
* Setup
*/
void setup() {
pinMode(ledPin, OUTPUT);
digitalWrite(ledPin, LOW);
pinMode(futureOutput, OUTPUT);
digitalWrite(futureOutput, LOW);

Serial.begin(9600); // Serial port for connection to host
rfid.begin(9600); // Serial port for connection to RFID module

Serial.println("RFID Reader Initialized");
}

/**
* Loop
*/
void loop() {
byte i = 0;
byte val = 0;
byte checksum = 0;
byte bytesRead = 0;
byte tempByte = 0;
byte tagBytes[6]; // "Unique" tags are only 5 bytes but we need an extra byte for the checksum
char tagValue[10];

// Read from the RFID module. Because this connection uses SoftwareSerial
// there is no equivalent to the Serial.available() function, so at this
// point the program blocks while waiting for a value from the module
if((val = rfid.read()) == 2) { // Check for header
bytesRead = 0;
while (bytesRead < 12) { // Read 10 digit code + 2 digit checksum
val = rfid.read();

// Append the first 10 bytes (0 to 9) to the raw tag value
if (bytesRead < 10)
{
tagValue[bytesRead] = val;
}

// Check if this is a header or stop byte before the 10 digit reading is complete
if((val == 0x0D)||(val == 0x0A)||(val == 0x03)||(val == 0x02)) {
break; // Stop reading
}

// Ascii/Hex conversion:
if ((val >= '0') && (val <= '9')) {
val = val - '0';
}
else if ((val >= 'A') && (val <= 'F')) {
val = 10 + val - 'A';
}

// Every two hex-digits, add a byte to the code:
if (bytesRead & 1 == 1) {
// Make space for this hex-digit by shifting the previous digit 4 bits to the left
tagBytes[bytesRead >> 1] = (val | (tempByte << 4));

if (bytesRead >> 1 != 5) { // If we're at the checksum byte,
checksum ^= tagBytes[bytesRead >> 1]; // Calculate the checksum... (XOR)
};
} else {
tempByte = val; // Store the first hex digit first
};

bytesRead++; // Ready to read next digit
}

// Send the result to the host connected via USB
if (bytesRead == 12) { // 12 digit read is complete
tagValue[10] = '\0'; // Null-terminate the string

Serial.print("Tag read: ");
for (i=0; i<5; i++) {
// Add a leading 0 to pad out values below 16
if (tagBytes[i] < 16) {
Serial.print("0");
}
Serial.print(tagBytes[i], HEX);
}
Serial.println();

Serial.print("Checksum: ");
Serial.print(tagBytes[5], HEX);
Serial.println(tagBytes[5] == checksum ? " -- passed." : " -- error.");

// Show the raw tag value
Serial.print("VALUE: ");
Serial.println(tagValue);

// Search the tag database for this particular tag
int tagId = findTag( tagValue );

// Only fire the strike plate if this tag was found in the database
if( tagId > 0 )
{
Serial.print("Authorized tag ID ");
Serial.print(tagId);
Serial.print(": unlocking for ");
Serial.println(tagName[tagId - 1]); // Get the name for this tag from the database
unlock(); // Fire the strike plate to open the lock
} else {
Serial.println("Tag not authorized");
}
Serial.println(); // Blank separator line in output
}

bytesRead = 0;
}
}

/**
* Fire the relay to activate the strike plate for the configured
* number of seconds.
*/
void unlock() {
digitalWrite(ledPin, HIGH);
digitalWrite(futureOutput, HIGH);
delay(unlockSeconds * 1000);
digitalWrite(futureOutput, LOW);
digitalWrite(ledPin, LOW);
}

/**
* Search for a specific tag in the database
*/
int findTag( char tagValue[10] ) {
for (int thisCard = 0; thisCard < numberOfTags; thisCard++) {
// Check if the tag value matches this row in the tag database
if(strcmp(tagValue, allowedTags[thisCard]) == 0)
{
// The row in the database starts at 0, so add 1 to the result so
// that the card ID starts from 1 instead (0 represents "no match")
return(thisCard + 1);
}
}
// If we don't find the tag return a tag ID of 0 to show there was no match
return(0);

--------------------------------------------------------------------------------------------------------------------------------

Comments

MichaelF396 (author)2017-01-24

I was getting the FFFFFFF issue and other intermittent read issues.

The only thing that fixed it was to follow step 2 correctly with the wiring.

Ensure that you are using the +5V and NOT +3.3V

Tie pin 1(GND) and 7(FORMAT) together and connect to Ground

Tie pin 2(RES) and 11(+5V) together and connect to +5V

Pin 9 (D0) goes to RX on the Arduino

Pin 10 (LED) should go to an appropriate resistor, LED then Ground.

RaihaanU (author)2016-10-30

Anyone get an LED light but no output to serial monitor? I feel quite lost. In other sketches, the monitor outputs 13 255's?????!!! Any help would be appreciated!

golmuhendis (author)2016-02-20

Hi,

I am trying to upload hex code to arduino with rfid tag. But I can not achive it.

Can you show me a way? Thanks.

BhriguC (author)2015-12-26

hey, I am trying to read tag ID 93EDFAD10055 but I am getting the following. Where might I be going wrong. Thanks!

Tag read: 00FFFFFFFF
Checksum: FF -- passed.

VALUE: ÿÿÿÿÿÿÿÿÿÿ

ahmadz10 (author)2015-10-03

hi

happy to contact you :)

I want to ask, I want to make the project a barrier gate. I want to ask is the arduino code and RFID to set the dc motor 90 degrees.

I have prepared a tool that is: RFID ID-12, Driver mosfet, dc motor and arduino. please help me how can I make dc motors move upwards if the RFID tag is detected by the arduino and RFID reader.

Thank you

John Trzon (author)2014-12-26

Does anybody have a code for id12 or id20 to make it work with 1602 lcd ?

umind1 (author)2014-11-29

can anyone here can give me a codes for RFID using arduino mega? plss send me, for my project, send here, pj.rosales18@gmail.com thank you very much

AshwillP (author)2014-11-18

What is the read- and frequency range of this reader?

AshwillP (author)2014-11-18

What is the read- and frequency range of this reader?

AshwillP (author)2014-11-18

What is the read- and frequency range of this reader?

aksharma (author)2014-06-13

my rfid displays random values like 255 7 0 107 190 ..... rather than hex. how to fix this?

meanshulsharma (author)aksharma2014-11-06

which RF module are you using?

kamra (author)2014-07-05

Hi,
I have ES 125R RFID reader,can any one tell me how to connect it to arduino
A1 ,A0 ,0/P , GND , +5V , R , TX

meanshulsharma (author)kamra2014-11-06

power the reader by connecting em to arduino's VCC and GND. tx of the reader goes to pin 10 or ard and "0" pin of ES 125R goes to pin 11 of arduino. then run this program:

=============

#include <SoftwareSerial.h>

SoftwareSerial RFID(10, 11);

void setup() {

Serial.begin(9600);

Serial.println("Serial Ready");

RFID.begin(9600);

Serial.println("RFID Ready");

}

void loop() {

int index =0 ;

char unit;

String msg;

while(RFID.available()>0){

unit = RFID.read();

index++;

msg += unit;

if(index == 12) {

Serial.print("Tag ID: ");

Serial.println(msg);}

}

}

=============

hkhan30 (author)2014-10-29

i have a rfid related project that im workin on and im using the id 20la version...but first i need to identify the tags...i have run the code but there is nothing on the serial monitor...even though the led turns on when a tag is near the rfid

charles1111 (author)2014-09-03

Hello,

I had the problem with the 'Tag read: FFFFFFFFFF' too and I solved it with help from dzoka at github.

Here is the working script:

-----------------------------------------------------

/**

* RFID Access Control

*

* Some of this code was inspired by Tom Igoe's RFID tutorial

* From the ID-12 example code on the Arduino Playground

* And HIGHLY based on Jonathan Oxer's project at:

* http://www.practicalarduino.com/projects/medium/r...

*/

// Set up the serial connection to the RFID reader module. In order to

// keep the Arduino TX and RX pins free for communication with a host,

// the sketch uses the SoftwareSerial library to implement serial

// communications on other pins.

#include <SoftwareSerial.h>

// The RFID module's TX pin needs to be connected to the Arduino.

#define rxPin 4

#define txPin 5

// Create a software serial object for the connection to the RFID module

SoftwareSerial rfid = SoftwareSerial( rxPin, txPin );

// Set up outputs

#define futureOutput 12

#define ledPin 13

// Specify how long the output should be held.

#define unlockSeconds 2

// The tag database consists of two parts. The first part is an array of

// tag values with each tag taking up 5 bytes. The second is a list of

// names with one name for each tag (ie: group of 5 bytes). You can expand

// or shrink this as you see fit. Tags 2 and 3 are only there for example.

char* allowedTags[] = {

"0006733125", // Tag 1

"2900940E95", // Tag 2

"ABC123DE45", // Tag 3

};

// List of names to associate with the matching tag IDs

char* tagName[] = {

"Gunther", // Tag 1

"Mark Trussell", // Tag 2

"NAME 3", // Tag 3

};

// Check the number of tags defined

int numberOfTags = sizeof(allowedTags)/sizeof(allowedTags[0]);

int incomingByte = 0; // To store incoming serial data

/**

* Setup

*/

void setup() {

pinMode(ledPin, OUTPUT);

digitalWrite(ledPin, LOW);

pinMode(futureOutput, OUTPUT);

digitalWrite(futureOutput, LOW);

Serial.begin(9600); // Serial port for connection to host

rfid.begin(9600); // Serial port for connection to RFID module

Serial.println("RFID Reader Initialized");

}

/**

* Loop

*/

void loop() {

byte i = 0;

byte val = 0;

byte checksum = 0;

byte bytesRead = 0;

byte tempByte = 0;

byte tagBytes[6]; // "Unique" tags are only 5 bytes but we need an extra byte for the checksum

char tagValue[10];

// Read from the RFID module. Because this connection uses SoftwareSerial

// there is no equivalent to the Serial.available() function, so at this

// point the program blocks while waiting for a value from the module

if(rfid.available() > 0) { //Dazu gebastelt

if((val = rfid.read()) == 2) { // Check for header

bytesRead = 0;

while (bytesRead < 12) { // Read 10 digit code + 2 digit checksum

if(rfid.available() > 0) {

val = rfid.read();

// Append the first 10 bytes (0 to 9) to the raw tag value

if (bytesRead < 10)

{

tagValue[bytesRead] = val;

}

// Check if this is a header or stop byte before the 10 digit reading is complete

if((val == 0x0D)||(val == 0x0A)||(val == 0x03)||(val == 0x02)) {

break; // Stop reading

}

// Ascii/Hex conversion:

if ((val >= '0') && (val <= '9')) {

val = val - '0';

}

else if ((val >= 'A') && (val <= 'F')) {

val = 10 + val - 'A';

}

// Every two hex-digits, add a byte to the code:

if (bytesRead & 1 == 1) {

// Make space for this hex-digit by shifting the previous digit 4 bits to the left

tagBytes[bytesRead >> 1] = (val | (tempByte << 4));

if (bytesRead >> 1 != 5) { // If we're at the checksum byte,

checksum ^= tagBytes[bytesRead >> 1]; // Calculate the checksum... (XOR)

};

} else {

tempByte = val; // Store the first hex digit first

};

bytesRead++;

} // Ready to read next digit

}

// Send the result to the host connected via USB

if (bytesRead == 12) { // 12 digit read is complete

tagValue[10] = '\0'; // Null-terminate the string

Serial.print("Tag read: ");

for (i=0; i<5; i++) {

// Add a leading 0 to pad out values below 16

if (tagBytes[i] < 16) {

Serial.print("0");

}

Serial.print(tagBytes[i], HEX);

}

Serial.println();

Serial.print("Checksum: ");

Serial.print(tagBytes[5], HEX);

Serial.println(tagBytes[5] == checksum ? " -- passed." : " -- error.");

// Show the raw tag value

Serial.print("VALUE: ");

Serial.println(tagValue);

// Search the tag database for this particular tag

int tagId = findTag( tagValue );

// Only fire the strike plate if this tag was found in the database

if( tagId > 0 )

{

Serial.print("Authorized tag ID ");

Serial.print(tagId);

Serial.print(": unlocking for ");

Serial.println(tagName[tagId - 1]); // Get the name for this tag from the database

unlock(); // Fire the strike plate to open the lock

} else {

Serial.println("Tag not authorized");

}

Serial.println(); // Blank separator line in output

}

bytesRead = 0;

}

}

}

/**

* Fire the relay to activate the strike plate for the configured

* number of seconds.

*/

void unlock() {

digitalWrite(ledPin, HIGH);

digitalWrite(futureOutput, HIGH);

delay(unlockSeconds * 1000);

digitalWrite(futureOutput, LOW);

digitalWrite(ledPin, LOW);

}

/**

* Search for a specific tag in the database

*/

int findTag( char tagValue[10] ) {

for (int thisCard = 0; thisCard < numberOfTags; thisCard++) {

// Check if the tag value matches this row in the tag database

if(strcmp(tagValue, allowedTags[thisCard]) == 0)

{

// The row in the database starts at 0, so add 1 to the result so

// that the card ID starts from 1 instead (0 represents "no match")

return(thisCard + 1);

}

}

// If we don't find the tag return a tag ID of 0 to show there was no match

return(0);

}

-------------------------------------------------------------

Bye

Charles

aksharma (author)2014-06-13

please, send me the coding for Arduino to read rfid tags

lgotje (author)2013-03-17

Can someone help me, when i upload the last script to arduino and scan my cards i get the following:

RFID Reader Initialized
Tag read: FFFFFFFFFF
Checksum: FF -- passed.
VALUE: ÿÿÿÿÿÿÿÿÿÿ
Tag not authorized

MrkTrussell (author)lgotje2013-03-25

Check your baudrate. Also, Did you Change:

Serial.print(val, BYTE)

To:

Serial.write(val); //sends as char

?

Yadunund (author)MrkTrussell2013-12-06

Hey Mark,

For the final sketch, there is no "Serial.print(val, BYTE) "
Kindly suggest how to fix the error.

Rixterz (author)2013-09-28

Hey, this code works and doesn't give symbols:

char read;
void loop ()
{
while(RFID.available() > 0)
{
read = RFID.read(); //Read from the RFID reader
Serial.print(read); //Print results to the computer
}
}

mattltm (author)2013-09-24

I have the same problem as others here.

I am running the full code and am receiving 'Tag read: FFFFFFFFFF' .

Is there a fix for this?

mabnz (author)2013-07-22

I'm getting the 'Tag read: FFFFFFFFFF' also, yet the reader works fine when I use it with the USB RFID reader from Sparkfun.

Any ideas? Really frustrating. When I hook the RFID reader up to the Arduino itself, it's fine, but when I use the full code (on the last page of your tutorial) it prints 'FFFFFFFFFFF' when reading a tag.

raaj25 (author)2013-04-03

I want to interface ARDUINO UNO R3 with MIFARE OEM VER 3.0 RS-232 RFID module.I interface it with max232 IC for RFID module.RFID module has 5 pins 1. receiver 2. Transmitter 3. CTS(Clear to Send) 4. GROUND and 5. Vcc
CTS is used in Hardware handshaking mode. CTS signal goes low for only 6ms,in this time the command is to be transmitted and Data to be received.I used many codes but getting no results.Plz. HELP.
Rajender Beniwal
jattbeniwal@gmail.com

davestewart53 (author)2013-03-30

I got the Jonathon Oxer rfid garage opener code to work now by loading arduino version 20 from the web site and it works perfectly now

davestewart53 (author)2013-03-30

I have the same problem with FFFFFFF showing up see github fix for FFFFFFF I can't seem to get it to work as I don't actually don't know where to put the code they suggest also I am using V 1.0.4 Arduino software and there is an issue with 1.0.2
see https://github.com/freetronics/RFIDLockShield/issues/1

any help will be gratefully recieved

lgotje (author)2013-03-25

Baudrate is good. Also i did change the lines!

alxch (author)2013-01-12

I have the same problem : http://img442.imageshack.us/img442/2999/arduinorfid.png

MrkTrussell (author)alxch2013-01-14

Did you Change:

Serial.print(val, BYTE)

To:

Serial.write(val); //sends as char

?

czarlesnomad (author)2012-12-27

my rfid displays random symbols rather than hex. how to fix this?

MrkTrussell (author)czarlesnomad2013-01-14

Did you Change:

Serial.print(val, BYTE)

To:

Serial.write(val); //sends as char

?

rwehner11190 (author)2012-10-09

The 'BYTE' keyword is no longer supported by Arduino

MrkTrussell (author)rwehner111902012-10-31

It's an easy fix.

Change:

Serial.print(val, BYTE)

To:

Serial.write(val); //sends as char

chough42 (author)2012-09-18

Excellent. I'm trying to research RFID for a game project some buddies and I are developing. We'd like to have a Reader scan a tag at a location, then play an audio file to send the player to the next location (like a puzzle-hunt). I'm very new at this, but it seems like an Arduino could handle this. Do you have any suggestions about where to get started? Or possible design ideas? Any help is greatly appreciated...

MrkTrussell (author)chough422012-09-27

Start with this project. The only thing you would need to add is an audio shield and a couple lines of code to handle it.

drBen (author)2011-10-20

Hi, Is it possible to connect more than one RFID reader?
I am looking for a solution for 20-30 readers and the Information which RFID Key was hold on which Reader.

MrkTrussell (author)drBen2011-10-20

20-30 readers reporting to 1 Arduino is probably out of the question, but you can use more than one by implementing the SoftwareSerial library which allows multiple serial connections at once utilizing the Arduino's digital i/o pins.

Suggested Reading: http://www.arduino.cc/en/Tutorial/SoftwareSerial

drBen (author)MrkTrussell2011-10-20

Thanks.
What about the Arduino Mega with 54 digital input/output pins?
If i understand you right, with the software serial solution i can define 2 digital pins as an serial data connection.
With a Mega Board this is a possibility of 27 RFID Readers.
Right?

MrkTrussell (author)drBen2011-10-20

I haven't experimented with multiple serial devices. I would assume that any Arduino would be overwhelmed trying to read ~27 incoming bits simultaneously in a few microseconds (worst case scenario = all readers operating at once).

Handling asynchronously received data from multiple serial devices turns out to be a difficult task.

One would need to implement a way to only read a device which is active and assign priorities when two or more devices are active at the same time.

drBen (author)MrkTrussell2011-10-20

ok... difficult...

MrkTrussell (author)drBen2011-10-20

Then again, maybe the Arduino can handle it.

To quote the SoftwareSerial tutorial, "The software serial connection can run at 4800 baud or 9600 baud reliably."

It does not list a maximum number of connected devices. One would have to experiment to see if it could work.

newflavour (author)MrkTrussell2012-08-16

you can use a multiplexer to connect 16 of these to one serial pin. see here for a tutorial.
http://bildr.org/2011/02/cd74hc4067-arduino/

and here for the originating source article:
http://bildr.org/2011/02/rfid-arduino/

raykholo (author)drBen2012-07-08

Arduino Mega has 4 HARDWARE serial connections. This means that the chip can buffer messages inside it, waiting for the Serial.read() command if multiple readers engage simultaneously. I wouldn't use more than a few SoftwareSerial instances unless I knew for certain that only one reader could be triggered at a given time (for example if you have an authentication sequence, where the next reader does you no good until the current one has reported back the correct string. In that case, you could even connect them all to the same serial rx and use the digital pins to enable/ disable them individually such that only one reader (the one you want to be reading at that moment) was enabled at that time. And if you're really short on pins you could do this with a single arduino rx pin and the 3/4 pins it takes to wire up a shift register or multiplexer IC.

nilved (author)2012-03-28

I have never worked with RFID but I think its awesome and I'd like to start working with it how much do they cost and where can I get them?

MrkTrussell (author)nilved2012-03-28

Look in the text on Step 1. Both the "ID Innovations ID-12" and the breakout board (SEN-08423) are hyperlinks. Follow the links to SparkFun where you can purchase them.

Robot Lover (author)2011-10-16

I meant parallax RFID reader

Robot Lover (author)2011-10-16

Great project! I have only used the parallax RFID tag. Maybe I should purchase one of these. Thanks for the great instructable!

About This Instructable

255,232views

322favorites

License:

More by MrkTrussell:Reading RFID Tags with an Arduino
Add instructable to: