Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Newbie questions about RFID

Status
Not open for further replies.
The RFID reader module does all the radio interaction, activates the tag or card and reads data from it, storing it internally.
(eg. The IC on the RFID circuit board, in that article).

The MCU treats that IC or module as a peripheral, either polling it for any data or (depending on the type or RFID interface) just eg. receiving a burst of serial data when a tag is brought in to range of the reader.

So, that project does not involve you in any of the "radio" stuff, that's all pre-built; just power and logic connections between the RFID board and your MCU.

Note there are several different RFID standards, some operating on about 125KHz and some at 13.56MHz
125KHz are most commonly used just for ID, like door entry or garage door openers.
13.56 MHz ones, such as the "Mifare" standard, often have onboard data storage and can be written to as well as read from. And they have a unique ID number, so they can be used as simple door entry etc.

This is someone's project to do the RF side as well using an arduino and a few components; 125KHz is a low enough frequency for the MCU to do some measurements on the signal and decode data.

It pretty much has the function of the RFID module in the article you link to, sending the card ID number by serial data:
 
So at first you need to enter the unique ID of the card first, right? Each card has a different ID and the reader reads the card ID?
 
The readers sends the card ID to whatever its connected to; it's up to you what you do with it.

If you making a card lock, you need some way of setting your part to store a new number, adding a "key" to the system, so it can compare it to check for a valid one in normal use.

Many MCUs have some built in EEPROM, or you can add an external SPI memory IC, so you can store whatever data you want.
You could use a switch input on one pin to change between storing a number and comparing with the number(s) already stored.
Another switch could be Erase, to clear it if a card or keyfob is lost.


If you want to make a door entry system, there are lots of wall mountable reader units on ebay etc., though they often have Wiegand format output rather than UART style serial.
That uses two data lines & pins on the MCU, one being pulsed for a zero bit and the other being pulsed for a one bit.
It's very easy to build up the full number, just a different way from a normal serial data string.

Search "Wiegand card reader" on ebay and you will find loads of things such as these:
 
Search "Wiegand card reader" on ebay and you will find loads of things such as these:

I tried to get it to read the UIDs of some cards, but some cards were unreadable, such as the company access card or the home access card.
Is it because these cards are encrypted? Or am I choosing the wrong sectors?
 
As I said earlier, there are two totally different frequency systems & any one reader only has a chance with cards using the same frequency.
And there are also different data standards in various cards/tags using each frequency.

eg. That ebay listing says it is for 125KHz "EM-ID" cards, so it won't work with 13.56 MHz and may not work with 125KHz ones that use different data formats.

These, for example, will read EM, three Hitag types and some MFRC series, which are all 125KHz types:

Or these read (and write, in some cases) several types of 13.56MHz cards/tags:

Between those, the read a large proportion of cards/tags in common use.

The datasheets linked in the item pages will give rather more info. Note that each module needs connecting to an appropriate antenna coil for its frequency to build a complete reader.

I've found that a lot of simple/low cost gear uses 125KHz types, while more complex and reprogrammable systems (where a card is updated rather than the reader having tags added or removed) tend to be Mifare or similar 13.56 MHz - eg. hotel room keycards.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top