Getting Started with Serial RFID Reader

This pictorial step by step guide you show you how you can connect a serial RFID Reader to your PC using USB Port. Before you begin please read the following tutorial on RFID Technology and its application to make yourself familiar with it.

Also you will need the following modules, they can be purchased from our online store.

Fig.: Serial RFID Reader.

 

Fig.: USB to TTL Converter.

 

Fig.: RFID Tags (Comes with the Reader).

The RFID Reader is used to read the tags. The tags can be used to identify peoples. For example in a electronic door lock, the user just need to bring a tag (which can be a card or keychain) near the antenna. The system identify the user and present a welcome message (like "Welcome Mr. Steve"), then it prompts for password. Its like your ATM card but the advantage is that you don’t need to bring it out from your wallet. Just touch the wallet to the antenna, and that’s it!

The USB to TTL Module is used to connect the RFID reader to PC.

Connect the RFID reader to USB/TTL Converter as show in in the image below.

RFID USB Connection

Fig.: Connections.

The connection is simple. All the PIN names are written on the PCBs itself so no confusion while wiring. After that attach the antenna to the RFID reader module.

RFDI Antenna

Fig.: RFID Antenna.

 

RFID Antenna

Fig.: RFID Antenna Connected.

 

RFID Setup

Fig.: The Whole Setup.

Now make sure the data mode select jumper is towards the ‘U’ side.

Fig.: Mode Select Jumper.

Finally connect the USB to Serial Converter to your PCs USB port.

USB Port

Fig.: USB Port.

 

USB to Serial

Fig.: USB to Serial (TTL) Connected.

 

USB to Serial

Fig.: USB to Serial (TTL) Connected.

On PC, Start Real Term. It is a terminal program used to send receive text data over serial ports. RealTerm can be download from this link.

RealTerm

Fig.: RealTerm Window.

On RealTerm Window, go to port tab and select the settings as shown below.

  • Baud = 9600
  • Port = Port Number Assigned to the CP2102 Module. (Can be found out from, Right Click My Computer, Properties->Hardware->Device Manager->Ports)
  • Parity = None
  • Data bits = 8
  • Stop Bits =1
  • Hardware Flow Control =NONE

The Top black portion on the Realterm window shows the data received from the port. When you bring a tag near the Antenna, the green LED on the RFID Reader will blink and the data will be shown on real term. The above images shows three data packets. The same tag was brought close three times.

Interpreting RFID Data Packet.

The RFID data packet is made up of 14 bytes. The first is a start byte whose ASCII value is decimal 2. This is shown in RealTerm as STX. Then their are 10 ASCII chars which is the ID of tag in HEX format. After that their is a two byte check sum, this is also in hex. Finally their is a end byte whose ASCII value in decimal is 3. It is shown in RealTerm as ETX.

For example in our case card data is 3D006217D7 so the checksum is calculated as follows.

(3D) XOR (00) XOR (62) XOR (17) XOR (D7)

You can use Windows Calculator is Scientific Mode (View -> Scientific) to calculate the above. Make sure the calculator is in HEX mode.

The result comes to be 9F

Which you can see is present as checksum in the above packet (shown in RealTerm)

To convert the tag number to decimal leave the first two digits on the tag data and take the rest 8 digits. Ex

Tag Data 3D006217D7. Leave 3D and take 006217D7. Paste that in Windows calculator (in HEX mode) and change to Decimal mode by clicking "Dec" which is placed next to "Hex". Calculator will convert the data to decimal number. You can confirm that this number is also printed on the tag. In our case it comes to be

6428631

Which was printed on our tag!

RFID Tag Keychain

Fig.: Check out the number printed on tag.

Related

Facing problem with your embedded, electronics or robotics project? We are here to help!
Post a help request.

Avinash

Avinash Gupta is solely focused on free and high quality tutorial to make learning embedded system fun !

More Posts - Website

Follow Me:
FacebookLinkedInGoogle Plus

19 thoughts on “Getting Started with Serial RFID Reader

  • By phani chakravarthi - Reply

    thank you very much avinash sir..!!
    very useful to me..!!
    i and my friend thought of doing. nice to find this which helps in guiding us..!!

    • By Avinash - Reply

      @Phani

      How I helped you?

      Which RFID Module you are having? Where you have got it?

  • By Pido - Reply

    what type of tag does it use? LF, HF? and can I use other external antenna because I need a wider range. Pls help.

  • By phani chakravarthi - Reply

    @avinash:

    sorry for the late reply avinash..!! i’m in your contacts of facebook..i regularly check your posts..so in that manner i checked about rfid post and video..I have no idea about RFID before checking your post..i read few of your posts inyour site,so i was benefited with the info in your site(in that way it helped me)..then thought of doing it as a part of mini project with slight changes in application..we (team of two) thought of buying the required from you sir..!!but our mini project proposal was rejected on RFID due to few reasons.(by our lecturers).but we are really interested in doing it..so will buy the components required from you in coming days..!!very sorry for the late reply..!!

  • By rakesh.satvik - Reply

    hello avinash!!!
    i had asked u abt wiegand communication in my previous comment.. i dint get the reply nor the display in ur website… pls help me out… plssss

  • By Arko - Reply

    Thank you so much sir..I m into a project with my friends..the project is a key finder..So basically we are trying to track the key in a room using rfid..we want to find out the exact position of the key by interfacing the rfid scanner with a pc..how do we get the position of the key inside a room..pls help us..

  • By Mitul Shah - Reply

    Hello, Mr. Avinash! I am Mitul and currently studying M.Tech(CS) at IIT Roorkee actually I was thinking of doing a project on something similar to this, what I want is to locate real-world objects tagged with this RFID reader from a easy to use GUI. Like if you want to find missing keys or wallet in your room. For that I will be using RFID reader and tags which contains textual description of read-world object it is attached to. So there are some questions in my mind
    1. What if tag is not in straight line with reader? like you will place a reader in room somewhere and tag(i.e. key) can be anywhere else can this reader detect its presence ??
    2. Can I use reader of different ranges for this like to cover some area of room or whole room?

    Please reply as soon as possible.

  • By Mitul Shah - Reply

    @Arko : hii I am also thinking of doing the same ?? can I get your email address?? so we can talk about this..

  • By giri - Reply

    @avinash
    sir, i’m doing a project on asset tracking and i’m developing a middleware using java where it records the data of the assets. The problem is how can i get the id number from Real term s/w(window) to my desired application or java program. could you please help me regarding this issue.

  • By aysha - Reply

    i too ve same question like Mr.Giri sir.im doing project on employee tracking using java..i ve 2 doubt..firstly i dnt knw hw to get the id number real term software in order to use in my java coding.. secondly,cn i write an information into the rfid tag..if yes,then hw?im looking forward as i need to submit my title requirement in two days..plz help me

    • By giri - Reply

      me too searching for how to get info from real term, but couldn’t know how.. i’m trying in another way if it works i’ll inform u. And yes we can write info into the rfid tag if it is an active rfid tag otherwise, if it is a passive tag we can’t. just we need to develop the interface which relates to the corresponding tag..

  • By giri - Reply

    @avinash
    sir, i bought the rfid reader from your store but couldn’t get the “USB to TTL module” as it says it is out of stock. can i use USB TO UART bridge in place of it? if so please send the tutorial how to use it (how to connect it with RFID) if not please make it availble as it i’m in strong need. Hope you understand…

  • By Jay Trivedi - Reply

    Hello Sir,
    I have rfid reader from robokits and i want to interface it with arduino uno. So can u give me some hint on how to interface and how to get the code from reader to CPU?

    • By Avinash - Reply

      @Jay Trivedi,

      We do NOT like Arduino’s nor do we work with it. Nor we have any interest in working with Robokits parts. So we cannot help you sorry 🙁

    • By giri - Reply

      I don’t know exactly with arduino, but if you are coding in java you can use RXTX library and get the tag details..

      • By Avinash -

        @Giri,

        Yes you are right.

  • By Suresh Chand Verma - Reply

    Here is any project regarding DRM Receiver i.e. receiving data serially and displaying them on LCD Panel like 2X16 Alphanumeric or any other……

  • By Rajeev - Reply

    I want to send the unique id read by RFID reader to distant place so it’s required to have RFID reader which can be interfaced with xbee module. Please suggest any…

  • By param - Reply

    Hi Avinash
    Thanks for the great info
    is there a way to use rfit reader and tag to login to the windows replacing the username and password.

Leave a Reply

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


7 − two =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>