Step 3: How do we emulate a card?

So the next step was to identify how to pretend to be a card - I wanted a card that I could type a card number into, so it had to have a microprocessor on it, was well as a keypad to allow the data to be keyed in.

The ATMega  manipulates the 125kHz RF field by using a bridge rectifier.  When the output of the micro is low, the diodes in the bridge are allowed to be turned on by the current induced in the coil,  this effectively short it out.  The reader detects the additional load, and a bit transition is detected.

The job of the micro is simply to turn the output on and off in a way that makes sense to our reader.  So I created a board that had the micro, a power supply, keypad, and some status LEDs on it.

The attached PDF is the full schematic of the project.

You may notice that c6 is 0pF -  That is intentional  c6 is a placeholder component allowing me to either use a 1000pF surface mount cap, or a 1000pF through hole cap.

The coil is 100 turns of fine wire would on an open former that is just smaller than the card border.

By any chance would anyone be selling one of these. I would love one of these but dont have the paitence so I would happily buy one.
Just to add this is to test my home locks. I have 4 on rfid and well this key looks much better than a white card for when I have gloves on my xEM implant wont read through leather glove for obvious reasons.
<p>This is great. if it cud be made smaller and rugged, and with a way of &quot;spiting&quot; more codes , stored before, at a press of a switch, a dream. I'm a careless person and i kill around 4-6 RFID tokens / year, the dumb thing is, sometime i get them not working on Saturday or Sunday :P </p>
<p>can we make a pcb antenna on the back side ?</p>
<p>SMD component sizes please ?</p>
Hello drj113. I am trying to use this page to make the key. Can you list all the things you used in this project? Thanks.
bottom right*
<p>I also want to ask, how did you program the microcontrolller? Do i need to buy an Arduino Dumaelianove? And what is that green thing at the bottom left?</p>
<p>Awesome ,, Bro for we enter the data , we must know the what is the data it should be accept for that we have to know the data .... instated of we have to change the emulator into a reader and emulator and as well as key pad in the meaning we have the chance to know what is the data their using and would we emulate the same through our;s circuit</p>
<p>that is great . i want to make it fo myself</p>
<p>Theoretically, could you write the code so that it runs through every possible rfid code combination (similar to a password hacking program) until one of them works, or are there too many combinations for that to be efficient?</p>
Assuming a standard 18-number code for a lock, there would be 158,789,030,400 possible combinations to it. An RFID reader, on average, takes 5 seconds to register a card, verify it's credibility, and reset the lock for a different pass code. It would take 25,559 years to enter all of the possible codes into the lock. Technically, it's possible, but not entirely feasible.
When I was playing with this project, I found it easier to stand beside people, reading their cards, and then programming this card to duplicate theirs. I never implemented a rolling code as it would take too long.<br>
<p>I bought a RFIDler at Derbycon a couple of weeks ago and having trouble getting started with it, I really wish someone would make an instructable for one of those. </p>
<p>Hi. Sorry for bad English.</p><p>Noticed some mistakes. The diagram shows a ATmega8 microcontroller, in the article you say that ATMega168 was mounted on board, but the image on the finished board I see Atmega328 installed. <br><br>I understand that for the project is suitable for mega168 and mega328, but on Schematic - ATmega8 microcontroller will not work and it is misleading. Please correct the error, or specify exactly what MCU you used.</p><p>Thank you!</p>
It is interesting that *ANY* of the actual encoded number was printed on the card it's self. Twenty years ago I was designing systems that used the original Wiegand cards (the protocol that the cards use, 36 bit) and they had protocols that ensured that the printed numbers in no way matched the encoded numbers. It is not unusual that the facility code is not printed on the cards. - RJ
Yea - I would have thought that Security 101 would be to not disclose the numbering... But sadly, in 3 samples that i have decoded thus far, that simply isn't the case.
hi, excellent project there... but i have a few questions <br>1- i have a card,with the number on the back , i can decode most of the portion of the number but how do i find the facility code? and the total number of bits including the starting bits and the ending bits. <br>2- i don't have the card reader so how can i see the bit pattern sent by that RFID card. <br>3- is there any way i can receive the whole bit stream sent by my rfid card?
Cool - Thanks for the questions.<br><br>The only way of getting the facility code is to read a card. It is rarely printed on the card itself<br><br>The only way to see the bit pattern is using a card reader. I built my own - there are lots of simple designs.<br><br>
Hey thanks for the reply , but i wanted to know how can i build a card reader (without using any module) using only micro controllers (pic AVR etc) and stuff.. can u give me a link to it <br>and just wandering if 8051 can be used in making the reader ?
helo ? u there ? <br>
Sorry for the late reply, I was away. <br> <br>You can certainly use an 8051 to read a card - You have to build all of the electroinics yourself though. <br> <br>Here is a link to a project that I found helpful. <br> <br>http://www.proxclone.com/reader_cloner.html <br> <br>Soirry, but my reader is not a completed project that is at the stage where it can be released as an Instructable. <br> <br>
I'm experimenting with the RFID. <br>with my little knowledge ^ ^'. <br> <br>Please help me comparing your design using diode bridge and some other design using a transistor. (like this one : http://www.instructables.com/id/Stupid-Simple-Arduino-LF-RFID-Tag-Spoofer/?ALLSTEPS). what the difference (pros/cons)? <br> <br>I'm see that using transistor is more simpler but I don't know if there is any trade of? <br> <br>Thanks for your contribute :D
That is an interesting way of doing it.<br><br>The thing to consider is that the output of the micro already has a transistor anyway... So this is simply duplication.<br>
Should the windings and diodes alone be read by the reader or does it need to be connected to the arduino for anything to happen? I built the 100 windings with the diodes and resitstor and nothing is happening. I'm pretty sure that is to be expected, but I just wanted to be sure. <br>Thanks!!!
OK, got the program opened and verified. I made an arduino device that reads #bits, facility code, and card number from any weigand card. I'm going to use your instructions to prove to my boss (I'm in the security installation business) that weigand can be hacked and copied very easily. This will get our customers to move to newer and more advanced technologies.
Hit enter far too soon.<br><br>Well done, it works beautifully against the Chinese card systems that are prevalent.<br>
I tried that. The Arduino IDE just opens it with one REALLY long line. Would you be willing to email it to me? t.c.roth@sbcglobal.net. If not, I will try to enter it manually.
done :-)
This is an awesome project! But I can't download the Arduino sketch, it just opens as a text document. Any reason why? <br>
It is a problem with instructables - Just save the text document as a .pde file
RFIDSpoofer_Instructables:3: error: expected constructor, destructor, or type conversion before '&lt;' token <br>RFIDSpoofer_Instructables:90: error: 'ROWS' was not declared in this scope <br>RFIDSpoofer_Instructables:108: error: 'ROWS' was not declared in this scope <br>RFIDSpoofer_Instructables:123: error: 'Keypad' does not name a type <br>RFIDSpoofer_Instructables.pde: In function 'void setup()': <br>RFIDSpoofer_Instructables:147: error: 'EEPROM' was not declared in this scope <br>RFIDSpoofer_Instructables.pde: In function 'void PowerDown()': <br>RFIDSpoofer_Instructables:375: error: 'SLEEP_MODE_PWR_DOWN' was not declared in this scope <br>RFIDSpoofer_Instructables:375: error: 'set_sleep_mode' was not declared in this scope <br>RFIDSpoofer_Instructables:376: error: 'sleep_enable' was not declared in this scope <br>RFIDSpoofer_Instructables:377: error: 'sleep_mode' was not declared in this scope <br>RFIDSpoofer_Instructables.pde: In function 'void LoadFacility()': <br>RFIDSpoofer_Instructables:431: error: 'NO_KEY' was not declared in this scope <br>RFIDSpoofer_Instructables:434: error: 'keypad' was not declared in this scope <br>RFIDSpoofer_Instructables:470: error: 'EEPROM' was not declared in this scope <br>RFIDSpoofer_Instructables.pde: In function 'void LoadCardID()': <br>RFIDSpoofer_Instructables:491: error: 'NO_KEY' was not declared in this scope <br>RFIDSpoofer_Instructables:494: error: 'keypad' was not declared in this scope <br>RFIDSpoofer_Instructables:533: error: 'EEPROM' was not declared in this scope <br>RFIDSpoofer_Instructables.pde: In function 'void loop()': <br>RFIDSpoofer_Instructables:571: error: 'keypad' was not declared in this scope <br>RFIDSpoofer_Instructables:573: error: 'NO_KEY' was not declared in this scope <br>
it looks like you have not loaded the keypad or eeprom library.<br><br>Also - what version of the Arduino software are you using?<br>
How could the range of this spoofer be increased? I'm interested in using this to gain access to my college dorm without having to scan my ID right next to the reader.
I'm curious about that too.
The only think I could think of is increasing the antenna size, or making the project be an active transmitter - That's an area that I had not experimented with.<br><br>
Hi my key has the numbers:<br>20307 1196689-1<br>I don't know what the code would be for it. Could you please help me?
seen this? <br> <br>no credit given :( <br> <br>http://www.instructables.com/id/A-Universal-RFID-Key-1/
Hey,<br><br>Thanks for that - From the links, it looks like he made it as a present for a friend.<br><br>It is sad that he didn't attribute the original project.<br><br>But while it is irritating that he took my name off the board we have a big mish-mash of cultures that should be respected here on Instructables, and I am stoked that at least he had a go at the project.<br><br>Doug<br><br><br>
Ahhhhh - it took a while for me to see this..... C4 was not chosen intentionally :-)
wow, just wow. : ) <br>
Why Thank you :-) This was a fun project.
Hello, <br>How your antenna measures wide and long? your image is not accurate and how did turn you do ? <br>Thanks.
Still acting weird :/ <br>Sorry about so many question. <br>1) The two small circle labeled as vcc connect directly to the positive of the battery which is also the connection 1 on P1. <br> <br>2) I got caps that have polarity or C3 and C5, C3's positive toward the vcc circle, and C5's positive toward connection 1 on P2. <br> <br>Are both of them sound right? <br> <br>Thanks!
Oh and can you also tell me in each mode, which LED should be on to indicate the mode? Thanks <br>
so far my sequence look like this: <br> <br>Power ON <br>Pin3 LED ON <br>Push Mode <br>&gt;&gt;Pin3 LED ON <br>Push Mode <br>Pin2 and Pin3 LED ON <br>Push Mode <br>Pin3 and Pin4 LED ON <br>Push Mode <br>Pin2, Pin3, and Pin4 LED ON <br>Push Mode <br>Pin2 and Pin3 LED ON <br>Push Mode <br>Back to &gt;&gt; <br> <br> <br> <br>As you can see, Pin3 is always on, I'm guessing that is some to do with the fact that its TX pin. <br>Also for some reason, Pin2 LED only light up faintly, probably because I'm using a really bright LED so the Atmega don't have enough juice to power that? <br>(I'm using the same LED through out the board) <br>Last, Pin5 LED never light up :/
The mode is displayed in binary - 0001 = 1, while 0101 = 5 <br> <br>And - you are right with serial enabled then you will have the TX pin on all the time - I normally disable the serial interface. <br> <br>Doug <br>

About This Instructable




Bio: I have a background in digital electronics, and am very interested in computers. I love things that blink, and am in awe of the physics ... More »
More by drj113:A Grey HatA Programming Jig for our DougsWordClock.com DeskClock BoardsThe Wordclock Grew Up!
Add instructable to: