RFID Reader with MFRC522 and PIC18

Project Description:

This project implements RFID Card/Tag Reader with MFRC522. It connects to a host PC through an optional RS485 or RS232 port. Firmware is coded using Microchip MPLAB IDE and XC8 Compiler. Host PC User Interface is coded using C# Windows Form Application. Host app configures the board and read/write tag/card serials.

Key Components:

  • MFRC522
  • PIC18F26K22


  • RS232 or RS485 Communication
  • +9 … +24V DC Power Input
  • Onboard Switching Power Supply
  • Buzzer

Main Board: Please beware that RS485 and RS232 chips are not to be installed together. Choose one!

Antenna Board: Please beware that you need to install only one (1) XTALL on the antenna board, either Y1 or Y2. Which package you have.

PIC18 Code

Diptrace PCB File1

Diptrace PCB File2


  1. Hi,
    i was searching your contact.
    I want to use your Antenna design, i converted it in Eagle drawing.
    I could pay for your work.
    Is this antenna design working?

    1. Hi Vladimir;

      No need for any payment. my email is msuzer1@gmail.com. I will be glad to assist you for your project, if I can.

      The antenna design is tested and it works. The performance may depend on PCB thickness, copper weight per area etc. But I choose to use the defaults given by pcb manufacturer, 1.6mm thickness and 1 oz per square foot area. With these values, it can detect tag closer than 5cm.

      Feel free to ask me your questions here or via email.

    2. Hi Kirilov,
      How could you draw Eagle from .dip files? I need an example for antennas. Please help me.
      Thanks in advance for your work.

    1. Hi Reza;

      The source code is already given at the bottom of the post.

      I directly draw the PCB without schematics, for small projects like this one. Thus I don’t have schematic, sorry.

  2. Hi. I’d like to ask if this antenna has been tested? What approximate read distance was achieved? Just approximately, i.e. closer than 5cm, 10cm, etc.
    Also, what thickness of copper was used to fabricate the PCB antenna?

    1. Hi Matt;

      Sorry for the delay, somehow the website did not notify me about your comment.

      The antenna is tested. It works with tag being closer than 5 cm. The board is 1.6mm thick and the copper is 1oz per square foot area. However, these values are not the optimized values, they are just the defaults given by pcb manufacturers. Another configuration may increase or decrease the performance.

  3. hello, nice work !!!

    can the components be general purpose or must they have particular characteristics … for the optimal functioning of the antenna ???

    thank you so much

    1. Hi Deca, thanks.

      Antenna is a special part. Resistor, inductor and capacitor values must be exact. As you can see, there are two XTALLs drawn on the antenna pcb. This is just to let you choose one, whichever you have, i.e., you must install only one XTALL!

    1. Eric, just click the “Diptrace PCB File2” below the post. You will need to install Diptrace application on your pc to view/modify the file.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.