RFID Tag Reading and Writing ( TfCD Project)


Introduction: RFID Tag Reading and Writing ( TfCD Project)

In this instructable you will learn how to write and read RFID tags.

The completeness of instrument sets in the hospital is crucial for a well-performed operation. In order to get an easier and quicker overview of which instruments are present in an instrument set in the hospital, RFID tags could be applied to the instrument trays in the hospital. The RFID chip could then deduce which instruments are present in the instrument trays.

RFID receivers are essentially radio wave emitters that receive information back from the tags with which they are communicating. RFID tags come in three main categories:

  • active
  • passive
  • semi-passive

Active tags are provided with a power source, with the advantage of adding other powered sensors. Passive tags draw power from the inductive coupling of the antenna, the power that is supplied by the tag. Semi-passive tags return the signal passively, but are powered by a battery for additional integrated circuits, making it possible to send extra information to the receiver, without the additional cost of an active tag.

We used passive tags for prototyping and checked if we can identifiy two different parts of the instrumentation ( tibia and femur were used, as you will see in the code).

Step 1: What Do You Need?

The list of materilas fot this project:

  • RFID reader-writer (MFRC522 )
  • Arduino Uno or similar
  • Two colored LEDs ( colour of your choice)
  • RFDI tags or cards ( at least two)
  • Connector cables
  • Breadboard
  • Resistors for the LEDS
  • USB cable
  • Computer with Arduino software installed

Step 2: Connecting the MFRC522 to the Computer

Connect the RFID reader as shown on the connection schematics.

Step 3: Connect LEDs

Connect the LEDs to the digital ports of your choice ( in the picture port 3 and 6 are used, with 220 Ω resistors). Mind that the long leg of the LEDs is connected to power.

Step 4: Write the RFID Tags

Upload the attached code to the Arduino board. The code is based on the one used here.

This is the line of code in which you can determine the ID of the tag. You can insert another string in the place of "this_is_femur___" as long as it is 16 characters long.

byte blockcontent[16] = {"this_is_femur___"};//an array with 16 bytes to be written into one of the 64 card blocks is defined

You can write with the help of this code as many tags as you want, just change the 16 byte string between tags.

Step 5: Read the Tags

Upload the code provided to the Arduino board.

Check the code of the cards and adapt the following lines accordingly:

byte knownTacTibia[4] = {015,69,63,233};// card Tibia
byte knownTacFemur[4] = {199,9,186,121}; // tag femur

Now your device will be able to identify the RFID tags, and the LED corresponding to the tag will light up. This is demonstrated in the video attached.



    • Creative Misuse Contest

      Creative Misuse Contest
    • Clocks Contest

      Clocks Contest
    • Oil Contest

      Oil Contest