Introduction: Arduino Magstripe Emulator
Step 1: Parts
Thin piece of ferrous metal (about 1" x 4")
Spool of enamel-covered solid-conductor copper wire (you can get this in a set at Radio Shack)
Electrical Tape
Arduino
Step 2: Putting It Together
1. Get your metal shim and wrap about 2/3 of it in electrical tape. This prevents the sharp edges from cutting through the enamel on the wire you're going to wrap the shaft in.
2. Wrap the metal shim in wire. Just wrap and wrap. When I wrapped the wire I used an Ohm meter on the buzzing setting (not sure what the real name of it is, it's the setting where it buzzes when resistance is low between the leads). I connect one end to the metal shaft and the other end to one of the ends of the wire I'm winding. This way I make sure the metal shaft never cuts through the wire and connects to the metal shaft. If it does then I unwind the part I just wound and wind it differently.
3. Connect the ends of the wire to the Arduino
4. Push the sketch and your done.
Step 3: The Sketch
I've attached the code. Magstripes use Biphase Mark Code to encode the data. Here is more information on how this works http://en.wikipedia.org/wiki/Biphase_mark_code.
Attachments
Step 4: Attribution
A couple of other similar projects:
this project helped inspire mine:
http://www.soniktech.com/sdmce.php
this is another similar project:
https://www.instructables.com/id/Magnetic-stripe-card-spoofer/
15 Comments
9 years ago on Introduction
These are important reads if you want to learn a lot about magnetic cards and such:
http://www.phrack.org/issues.html?id=6&issue=37
http://blog.tehinterweb.com/?p=60
10 years ago on Introduction
question. Were do I put the the car ID code into. There are no comments telling you were to put the card data???
12 years ago on Introduction
Can I use a Arduino Pro Mini?
12 years ago on Step 3
Your code download link is messed up, it downloads as "FGD08X4GCJ0ZRF1.tmp", which I can rename to spoofMagstripe.pde but it was a bit confusing at first.
12 years ago on Introduction
Works perfectly!!
Anybody knows how to emulate the card's first track.
I read theory about and I don't know what seems to be the problem.
The second track works just fine, but first one is not.
I change start sentinel, I encode symbols in 7-bit instead of 5-bit for 2nd track, I add LRC byte at the end. I even tried to play much with the delay time between bytes - nothing works.
Any ideas? Anybody did it?
Any help wanted..
Best wishes!
13 years ago on Introduction
http://hackaday.com/2009/09/23/universal-cc/ =3
Reply 13 years ago on Introduction
Yeah, that was part of the inspiration for this one. I wasn't able to get mine to work exactly the way he has it. If I understand right from the schematic he's got one lead from the electromagnet connected directly to ground and is powering the other one. I tried that and my reader never picked it up. I modified it so each lead of the electromagnet is connected to a different digital pin on the Arduino so I could change the polarity on the electromagnet and it worked for me.
Reply 13 years ago on Introduction
If it was indeed "part of the inspiration for this one", please cite the original post in your writeup. Failure to do so violates the attribution clause in the NCSA license on the original material.
Reply 13 years ago on Introduction
purduecer, that's an interesting project as well, and one that apparently inspired the one that was linked to above (from hackaday). I haven't really looked at the MP3 player spoofer, looks interesting though. I don't have a problem citing that project, even though, again I haven't really looked at it much since I was specifically looking at using an Arduino.
13 years ago on Introduction
All you need is one diode to fix the voltage spike. Google for snubber diode. http://en.wikipedia.org/wiki/Flyback_diode
Reply 13 years ago on Introduction
Thanks for the tip, will this still work if you're switching polarity on the electromagnet? That's why I was thinking an H-bridge might be the way to go.
13 years ago on Introduction
The 'buzzing' ohm meter is called a continuity tester. :)!
Reply 13 years ago on Introduction
Thanks, I knew it was testing for continuity, should have made the leap to continuity tester ;-)
13 years ago on Introduction
You want to be REALLY careful driving an electromagnet directly from data pins. They aren't designed to handle the current, or the collapsing current kick back after the magnet shuts off. You can quickly be out a few pins with a setup like this.
Reply 13 years ago on Introduction
Good to know, I'll look at modifying the setup (maybe by building an h-bridge). I've actually been running like this for 3 or 4 months and haven't had a problem so far though.