Finally! It’s been about 3 months since my last arduino tutorial – I’ve been keeping busy as usual. I’ve been working on this one for some time. I got the parts months ago, made an outline a few weeks ago, prototyped the circuits and wrote the code last week, and did the filming over the last few days. I’ve upped the ante for my production capabilities on this video. I’m using two cameras (A Canon Vixia HF11 and a Canon EOS Rebel T3i Digital SLR), a fancy new Rode Shotgun microphone, and more tripods! I’ve also implemented some improved audio processing on my voice-overs, so let me know what you think!
RFID technology is really really fun in my opinion, and I’ve been wanting to implement it in a project for some time now. However, doing that can be challenging. But, thanks to the tutorial below, you should have no problems putting together a simple RFID-based security system! I explain the physics of how RFID works in the video, but if you’re a physics nerd like me, and you’re hungry for more, be sure to read up on RFID on wikipedia. In this video, I’ll explain how to setup an RFID reader (like this one) with your arduino, read some serial numbers, and use that data to make a secure entrance database.
You can download the files associated with this episode here:
Distributed under the GNU General Public (Open-Source) License.
Please Attribute and Share-Alike.
- Episode 12 Arduino Programs (Updated on 1/21/2012 to comply with Arduino 1.0 changes)
- Episode 12 Schematics and Datasheets
- Episode 12 Parts List
You can tell me the code?
The code is available for download in the post above. “Episode 12 Arduino Programs”
Hey i was wondering for the cooking hacks.com site, the prices for the components are in pounds right? so does that mean when we order the parts from that site that it will be higher in cost due to currency exchange rates?
It’s in Euro’s but yes there is an exchange rate. I think it calculates it for you during checkout.
Hey, thanks for you tutorial. It help me a lot: my rfid system works!!!
I’ve got a question, I need to change the baud rate to 38400. In the documentation, it says you can change it using a command CMD_SET_BAUD, but I have no idea of how to do it from Arduino. Is it possible?
Thanks a lot
Refer to how I issued the auto_read command. In that case, I had to send a 0x87 and the accompanying data. To change the baud rate, you’ll need to send a 0x52. Look at section 3.1.1 in the datasheet for how to structure the command.
hi i am from Nepal
i am trying to control serrvo motor through Xbee-pro with arduino i am able to control only one servo motor will you help me to write audrino code how can i control more than one servo motor through Xbee-pro using arduino uno
Ask projectronix.com guyz, they are really cool
cool vids! I did not really understand you said about the jumpers at 30:41. Can it cause any damage if the jumper is not setup properly?
It won’t damage it. Watch my 9th tutorial for an explanation of the jumpers.
great tutorials. just my 2 cents: in the code where you check if it’s your or your brother’s card, instead of if statement, how about:
j_card = j_card && (data[i] == jeremy[i])
should work, since it’s standard C syntax, but i understand you went with the “if” lines for simplicity’s sake… i just wonder if this’ll compile into smaller code…
and keep up the good work
Hey! Very nice tutorial!
I just got a Mifare 1k RFID reader but I cant send a command from my arduino mega :(
I cant send a byte array (like those Serial.print’s) from my tx pin
What i’m doing wrong? 0o
Is there any response? Are you specifying the right UART port? The mega has several.
Just wondering what is the read randge on the tags you have used?
RFID tags all have a very small range. It’s maybe 2 cm.
I’m a newby to the world of arduino but i get a long with it pretty well and your videos help a lot. Thanks for that.
I guess the datasheet your showing is from the rfid module of the reader you are using, right? If I am now using an other Reader can I still use the values you used for the header etc. ?
Better: Are the UART frames default?
No, they will likely change between chips, but the general process should be similar. The syntax will be different.
Hi, Its really wonderful tutorial,,, I have just one question, wheither is there way to make a configuration file / txt file that can be used for a user to enter tag IDs for maching,,,,I mean user dont have to enter IDs in arduino environment and compile every time if he/she would like to enter new card……
Yes, you can do this using an SD card with a txt file. I explain how to read data from from an SD card txt file in my datalogging tutorial. Check that one out.
Hi Jeremy, the videos are very helpful, thanx for uploading. I have one querry, After detecting the correct RFID tag, I want to add some more security i.e., I want to add 4 pin password facility in this application, can u help me out in this regards. Thanks
I do that in this project: https://www.jeremyblum.com/2010/04/03/arduino-powered-jack-in-the-box-toy/
You can download the source code.
Thanks Jeremy, brilliant work!!
I would like to inquire about your experience with NFC or Felica. Instead of a RFID i would like to do something similar with a NFC or Felica Card, can you kindly guide me to any of your videos or blogs with regards this?
Sorry, but I haven’t personally used NFC.
How to make a basic RFID reader…cz i wanna make a RFID based attendance system…so hw to make the circuit of reader..??? plz reply..its urgent…
I’ve downloaded this episode 12 program file. But i only see .ino file not the .pde. I still using the R2 Arduino. Can I have the code for R2 Arduino.
Please upgrade to the new version of the Arduino IDE
I’ve already found how to opened the .ino file. I opened it using Notepad++ and i can see your programming.
Thank you for the great tutorial ^_^
Very great tutorial. Helps me a lot. Thank you so much. You are awesome. Hoping for new tutorials.
Great tutorial i´m new to Arduino and made a search after seing this tutorial i just wanted to ask you if this RFID reader can be used with the arduino?
(it´s a Danish website but the text is in English)
i hope to hear from you soon
I’m trying to build the same FRiD reader. I just want to make sure i used the correct parts for this project.
is the Arduino XBee Shield Empty the one you used for your project?
Yes, it is.
Hi, Jeremy.. it’s work with RFID RDM6300 ?? :)
hello jeremy i have a project to do .. my ingredient is rfid reader rs 232,arduino duemilanove,max232,PC database.. you have other sample can help me with my project? i want arduino only read and write ..PC become the processing to compare the tag and save to database..
I wanted to ask if you can rewrite the unique ID of the RFID ID card of another card?
Your video blog is very detailed and invested!
Could you use a RFID Reader #28140 with two tags to do the rfid lab or will it not work
Would this work if i have my rfid connected like this… No XBEE, just the rfid board and arduino MEGA
-ground connected to ground
-TX of rfid to RX of arduino
-RX of arduino to TX of rfid
what differences in the code would I have?
Thank you so much for this episode! It was soooo helpful and awesome!
I’m trying to run the program and it giving this error. don’t know what to do.
Binary sketch size: 3130 bytes (of a 32256 byte maximum
tried changing port and other options giving on the arduino webpage
Just what I needed to know :D! Thanks!
Can we get timestamp when arduino reads rfid tags. if so what is the code snippet that reads and more info
You’ll need to use a real-time clock chip, or you can grab it from the computer if it i connected to one.
I ordered a RFID 125 KHz pack from cooking-hacks, but I am not able to get it working. If I have the rfid module attached and the jumpers in the USB -position, I get an error: “avrdude: stk500_getsync(): not in sync: resp=0xff”
I am able to send the program if the shield is not attached (it is instructed that way in cooking-hacks example video) but the reader does not still work.
Tried the jumpers in both positions (xbee/usb) no success!
The setup contains Arduino Uno Rev3 board that works ok (tried other applications).
Can anybody help?
hi, is it similar to rfid shopping card codes?
Hey I was wonder can you give me advice how can i make this project work with the xbee wireless chip
want to ask…what if we wish to read 2 or more tags simultaneously..?
Is it possible to send the tag ID over a network to a server, using a GSM module on the same arduino board? if possible could you please guide me through.
Yes that’s possible. I’m hoping to do a GSM tutorial in the near future.
Hey… I’m doing a project called RFID system lock using RFID cards and Arduino and a motor so just wanted to know ho to import the database I’ve created into Arduino or something like that
I am a grad student at Stanford.I am working at a lab where I am given the task to build an RFID attendance device.The objective of this would be to identify(log in) a student who uses a particular instrument and record the time of use.Thus we want to develop a simple,cheap,small RFID based product that can be installed with each instrument in the lab to track its usage.I have purchased a Teensy 2 arduino board, an RTC and a wifi interface.It would very helpful if you can help me with the Arduino coding for this project.I am completely new with Arduino,please help me out
I can’t write code for everybody who asks, unfortunately, or I’d have no time for my own work.You program the Teensy justl ike any other arduino. You can write the RFID code based on what I’ve written for this tutorial. As for the Wifi code, there are tons of examples on the arduino website. As you work on it, let me know if you have specific questions and I’ll try to help.
hello mr. Jeremy Bum..I have an arduino mega and a rfid reader connected to uart, but i don’t know how to connect there pins.I hope you can help me..thanks
Do how do I make the connection pins of rfid? MISO, SCK, SS, MOSI, RST?
I’m NEW to Arduino. I’ve recently found this Series and loved it!. Easy to understand, great amount of details, Thanks!.
I have a project in mind for a self-serving machine that reads/writes info from a smartcard. What I’d love to do is:
– Read SC id.
– Read SC credit balance.
– Be able to “buy” stuff with the balance and “charge the expense”.
– Write ‘new’ credit balance to SC.
– Write purchase order into a Log.
I was thinking of using this https://www.sparkfun.com/products/9440? and use the same RFID principles, but I’m not sure how to… Is there a library and schematics for me to go through?
The library used here will be sufficient for the reading. You’ll need to write some of your own, including an array of variables that keeps track of current credits, and adds and subtracts from them accordingly.
Jeremy, thanks for the tips, but I’m not sure how to connect the SmartCard reader/writter hardware and I don’t want to fry-it…
Great info, do you have any suggestions for increasing read range? RF power amplifier… larger antenna?
Active RFID would increase the range. RFID is intentionally short range, though.
Is it possible to have this program be time sensitive?
hello Mr. Jeremy, does it possible to read multiple tags at the same time? if then, what will the changes on this tutorial you’ve made? thanks a lot.
hey jeremy, great tutorial, I have a project with RFID same as this tutorial, but i shoud use arduino UNO, do you think that it might not be a problem if i use the code that u used in this tutorial, what is the different between UNO and MEGA? thanks
It will work fine with either.
Hi Jeremy! Before all, congratulations for your tutorial! I new in the Arduino world, so I asked you about a question. I’m working on a project with Arduino UNO and the RDM630 RFID module, using the serial port of the Arduino.
The problem is I can’t see nothing by the Arduino’s serial port, only the message I see is “Card ID – ÿÿÿÿÿÿÿÿÿ” and I think I’ve been ok connected all the pins. I was looking some codes of different people and it didn’t working.
Do you know where is the problem? I posted the link of the module: http://www.seeedstudio.com/wiki/index.php?title=125Khz_RFID_module_-_UART
That may mean your baud rate is set improperly.
PLS which XBee shield should i get. is the WRL-09132 – XBee Explorer Regulated okay for this, or am i gonna need to buy something else to attach to it.
also what about the USB XBee Adapter – ID: 247 is it okay?
Do you know where to get a full list of communication protocols? I recently bought the SM130 and the datasheet is incomplete in terms of communication protocols. I didn’t know if there was a way to read them off the device itself, or if I need to get them from an outside source. Any help is appreciated.
The problem what happends it is about the interface. The RDM630 has two different interfaces; TTL-RS232 or Wiegand. And we use Arduino’s Codes for the wrong hardware interface. So when I used a correct code for the interface of my RDM630, in my case Wiegand, the module runned perfectly.
Do you have a sample of your code using Wiegand?
I have a similar setup and running into the same problem. I appreciate any help you can provide.
I have been watching all your arduinos tutorials videos and I can’t wait for my arduino to arrive to start making “cool stuff” as you say, and I have a question. I wonder if putting together the sd card shield that you show in an early video with the RFID Card Reading , can be possible to make a wav. file and upload it to the sd card and make a code as the one that you did to play the melody every time you slide the card in front of the coil, so instead of play the melody, plays the wav. saying HELLO JEREMY. I think something like that is possible, isn’t it? and I don’t have a clue of how to do it? but I don’t want you to give me an answer of how to do it, just a simple (yes, it can be don or not, it can’t be done and If I will be needing something else to do it) because I want to try to do it by myself.
Don’t get me wrong, I just want to get fun braking my head apart trying to do it as you do with you creations hehehe. and maybe I would be asking you things that I don’t understand, If you don’t mind.
Thanks for your video tutorials I got fun watching them and I will be watching them again when I get my Arduino.
It’s possible, but you may want to get a wave shield.
Thats what I thought. I am gonna start look for one. Thanks!
Can you please tell me how can i use the rfid data entering the com port of my laptop to link an associative database..can you provide me any links which teach the same..i sahll be grateful
i have purchased Mifare YHY502CTGV33 RFID read/write module. but facing difficulties in interfacing with arduino duemilanove nano board. the module itself has a small microcontroller ATMEGA8A on it, so should we use another one, for read write application.
The Skylanders portal accepts 3 RFIDs “simultaneously” and keeps them lit up during the time they are on the portal. If one is removed and another RFID is placed on the portal it recognizes both actions while maintaining the other 2 remaining lit RFIDs. Does this require extra hardware (ie multiple coils), or extra software — or both?
I think you could accomplis this with one coil and some clever software, but I’m not positive.
Hi a buy a arduino + Xbee + RFID125khz when i upload to the arduino i have this message avrdude: stk500_getsync(): not in sync: resp=0x00 (avrdude: usbdev_open(): did not find any USB device “usb”) but if i take out the RFID from the xbee the upload work fine.
can you help me?/
That’s to be expected. You need to move the jumper on the shield.