Using RFID in Your Projects

This blog post on RFID is an excerpt from Lesson B-11 of our Intro to Robotics program. Level B is the second level in Intro to Robotics and covers working with electronic components (including a variety of sensors), writing intermediate-level code commands in Python, and using a Raspberry Pi to control your electronics projects with the code you write. It contains 18 lessons including 65+ videos and 50+ projects and activities. Sample lessons and a full scope and sequence for Level B can be found here.

 

RFID stands for radio-frequency identification. This system was originally designed for powering a device using radio waves. The RFID receiver was powered by a transmitter sending radio waves at a very specific frequency. The receiver did not contain its own power source, instead it contained special circuitry to convert the incoming radio waves into power that could be used to power up additional circuits in the receiver.

RFID technology can now be seen everywhere. Automated toll collection is installed on many of highways. Most pets have RFID implants that allow for identification of the animal without any external markings like a collar or tags. Many businesses rely on RFID cards to manage employee access control, instead of handing out physical keys to the building.

 

How RFID Works

Modern RFID systems operate using readers and tags. The reader contains a radio transmitter and receiver, commonly referred to as a transceiver, as well as other circuitry to decode signals received from scanned tags. The reader is always broadcasting radio signals and waiting to hear back from a tag.

Tags, or cards, contain an antenna, circuitry to convert radio waves to DC power, a radio transceiver, as well as a tiny amount of storage that can be used to hold data specific to that card. When the card receives a radio signal in a specific frequency, the antenna will harvest energy from that signal, and power up the storage chip and the transceiver.

The card's transceiver will then send the contents of its tag back to the reader, which can happen over different distances based of the type of tag. Passive tags do not contain a power source and their distance is generally limited to anywhere between a few millimeters to a couple of inches, based on the design of the tag.

Breadboard circuit with RFID reader and tags

 

MFRC522 Tag Reader

The RFID reader included in the Intro to Robotics Level B kit runs on the MFRC522 chipset which can read and write 13.56MHz tags. The Raspberry Pi requires installation of a special library to communicate with the MFRC522, but once installed, communication with the device is very simple over the SPI bus.

These libraries do not support software SPI, so hardware SPI will be used to communicate with the reader. Using hardware SPI means that specific GPIO pins will be used for this communication, and that setting in the Raspberry Pi will need to be changed in order to enable hardware SPI. In the activities for Lesson B-11, you will install this library and change the SPI setting once the reader is wired up.

MFRC522 Tag Reader Pinout Diagram

 

RFID Tags

Tags can come in many shapes and sizes and can store different amounts of information. The tags in the Level B kit will hold 1KB (one kilobyte) of information. This is not a ton of room, but it is enough to store enough information to identify the card with a reader. Your program can then respond however you would like to the presence of the card.

The tags and library you will be using during Lesson B-11 support the reading of two values:

  • The card's UID value, or Unique ID, is a unique 12 to 13-digit value that is assigned at the time the card is manufactured. This value can be read but cannot be modified.
  • The card's text value is a 48-character field that can store any data you like. This could be anything from a single letter, number, or character, up to a complex string of all these combined. This value can be read and written by the MFRC522 reader.

RFID Card and Tag

 

This blog post on RFID is an excerpt from Lesson B-11 of our Intro to Robotics program. Level B is the second level in Intro to Robotics and covers working with electronic components (including a variety of sensors), writing intermediate-level code commands in Python, and using a Raspberry Pi to control your electronics projects with the code you write. It contains 18 lessons including 65+ videos and 50+ projects and activities. Sample lessons and a full scope and sequence for Level B can be found here.

Older Post
Newer Post
Close (esc)

Popup

Use this popup to embed a mailing list sign up form. Alternatively use it as a simple call to action with a link to a product or a page.

Age verification

By clicking enter you are verifying that you are old enough to consume alcohol.

Search

Your cart is currently empty.
Shop now