Unlock PC With RFID and Arduino Uno




Introduction: Unlock PC With RFID and Arduino Uno

This is my first Instructable. So in this project i am going to making unlocking your PC with RFID & Arduino Uno which most of the members have after doing this again you have to make few changes in order for to work like a normal arduino board again. So Lets Get Started :-

Step 1: Connecting RFID Scanner to Arduino UNO

The RFID Scanner has 8 Pins and we need 7 Pins from that

Arduino ----------------> RFID Scanner

D9 -----------------> Reset

D10 ------------------> SDA

D11 -----------------> MOSI

D12 -----------------> MISO

D13 -----------------> SCK

GND ----------------> GND

3.3V ------------------> 3.3V

Dont Change D11, D12, D13,

You can Change D9, D10 which are SDA And Reset but need to change in the code also the pins

Step 2: Changing Code and Uploading

First Add MFRC522 Library to Arduino IDE

MFRC522 LIbrary For Arduino IDE

Download the library and Extract it into libraries folder in Arduino Sketch Folder

Now Changing the Code

First go into the code and the UID Number to your UID no you want to gain access as in picture

the line highlighted in picture is the one you have to change in order for your card to work if you want to add more give space a comma again space and another UID of Card


content.substring(1) == "Card 1 " , "Card 2"

Changing the Keystrokes

First Go in the code to


buf[0] = 0;

buf[2] = 0x13; // Change this number 13 to the one in the USBKeyScan.PDF file the key you want to press when card scanned

Serial.write(buf, 8);


if you want to press more keys after one another

copy the code and paste it below the before one in if statement

and then change the number to key you want to press

now upload the code into Arduino uno By selecting correct board and correct COM Port

Step 3: Upgrading the Firmware of Atmega16U2 on Board

Download and Install the Software Atmel Flip 3.4.7 from Link Below

Atmel Flip 3.4.7 Software

Firmware Files first place a jumper on reset and ground and remove it like in the picture

Open Atmel Flip and select the firmware file Arduino-Keyboard-0.3.hex from File Tab -> Load Hex File


Select Run

Remove Usb And Plug it in Again

Step 4: Done

Now Scan the card you have programmed and test it

if you want to see mine which i made check below the video

sorry for video clarity

if you want to use it like normal arduino you have to run the firmware file called arduino-usbserial-uno.hex
and done

hope you enjoyed this project and if you have any questions dont forget comment down

and here is my youtube Channel link dont forget to subscribe in youtube

Akash World Youtube Channel

Microcontroller Contest

Participated in the
Microcontroller Contest

Be the First to Share


    • Make it Glow Contest

      Make it Glow Contest
    • First Time Author Contest

      First Time Author Contest
    • PCB Challenge

      PCB Challenge

    10 Discussions


    1 year ago

    my others rfid card that I don't set in the arduino ide also can enter the password.. how can this happen?


    Reply 1 year ago

    sorry for late reply i guess you should check in the if statement of cards like the one in 1st pic of step 2


    Answer 1 year ago

    sorry for late reply we can load hex file using the atmel flip software to the programmer chip and to load hex file onto the main mcu then use XLoader


    1 year ago

    hi man , can it work on windows 10 ?!


    Reply 1 year ago

    but you have to configure your keystrokes from pdf and it can work with any pc as it is recognized as hid device

    Yolo Pigeon
    Yolo Pigeon

    Question 2 years ago

    I followed your instructions but when I tried to scan my 2 cards to find there uids and I got this


    Answer 2 years ago

    change baudrate to 9600 and there should be no line in code with serial.print as the chip is no more usb2serial it is keyboard


    Reply 2 years ago

    No Problem for that i will make few more of my projects