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