Anda di halaman 1dari 7

Home Sign Up!

Explore Community Submit


All Art Craft Food Games Green Home Kids Life Music Offbeat Outdoors Pets Ride Science Sports Tech

Arduino magnetic stripe decoder


by powerpants on July 31, 2008 Table of Contents intro: Arduino magnetic stripe decoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . step 1: Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . step 2: Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . step 3: Use it! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . step 4: Where do I go from here? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Make Magazine Special Offer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2 3 4 4 5 5 5 6 6 6

http://www.instructables.com/id/Arduino-magnetic-stripe-decoder/

intro: Arduino magnetic stripe decoder


This instructable shows how to use some freely available code, an arduino, and a standard magnetic stripe reader to scan and display the data stored on magnetic stripe cards such as credit cards, student IDs, etc. I was inspired to post this after reading the intro to magnetic stripe reading and Stripe Snoop that is found in MAKE magazine Volume 1. That tutorial details how to interface a stripe reader to a game port interface, but I have a mac laptop, so I don't have a game port interface! Also, I think that the arduino suite of hardware/software is much more integrated and easy to understand for beginners than the "traditional" approach presented on the Stripe Snoop website and MAKE magazine. However, this application simply shows the data that's on a magnetic stripe; it does not have any of the more advanced features that Stripe Snoop does. The last step of this instructable has some links to more in-depth information about this topic for those who are interested.

Image Notes 1. Magnetic Stripe Reader 2. Arduino

step 1: Hardware
Obviously, you first must obtain a magnetic stripe reader. I'm using an Omron V3A-4K that I ordered from digikey. It cost me $20.00 or so. If you can't find one of these, any standard TTL reader will do. Don't worry about buying one of the fancy harnesses that they sell. There are breakout pads on the circuit board inside of the reader. Once you have received your reader, pop off the side cover, and solder wires to the pads as shown in the picture. Of course, if you have a different reader, the wiring will probably be different. In this case, consult your reader's datasheet to locate the necessary pads. Next, connect the wires to the Arduino's digital pins as follows: DATA - 2 CLK - 3 LOAD - 5 Finally, connect the +5v and GND to their respective terminals on the Arduino board.

http://www.instructables.com/id/Arduino-magnetic-stripe-decoder/

Image Notes 1. GND 2. +5V 3. DATA 4. CLK 5. LOAD

Image Notes 1. Reader with the cover removed

Image Notes 1. Magnetic Stripe Reader 2. Arduino

Image Notes 1. Supply wires 2. DATA, CLK, and LOAD wires

step 2: Software
This step is easy. Simply load the attached sketch on to your Arduino. Note: I didn't write this code, I found it here. I've just attached it here for convenience.

http://www.instructables.com/id/Arduino-magnetic-stripe-decoder/

File Downloads
Arduino_Magstripe_Reader.pde (4 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'Arduino_Magstripe_Reader.pde']

step 3: Use it!


Finally, simply open the serial connection in the arduino applet, and start swiping cards! The decoded data from the card will appear in the window as soon as you swipe one.

http://www.instructables.com/id/Arduino-magnetic-stripe-decoder/

Image Notes 1. Pei Wei Gift Card!

step 4: Where do I go from here?


If you're interested in learning more about magnetic stripe cards, the attached article, "A Day in the Life of a Flux Reversal" by Count Zero is required reading. This document is pretty much the bible on the nuts and bolts (volts?) of how magnetic stripes physically work. It also contains information about the standard formatting of the tracks on magnetic stripes, which is helpful in interpreting data that you get from the setup shown in this instructable. Also, check out Stripe Snoop. This software requires a slightly more complicated hardware setup, but comes with a database of known card formats and will attempt to parse human-readable data out of any card that you swipe through it. For example, if you swipe your credit card or driver's license, it will recognize it, and show you all of your personal information that is stored on that card! Although, since this setup outputs data directly to the serial port of the computer, I'm sure that with a little code hacking it wouldn't be too hard to get this reader to interface directly to Stripe Snoop.....

File Downloads
magstripe.txt (43 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'magstripe.txt']

Related Instructables

http://www.instructables.com/id/Arduino-magnetic-stripe-decoder/

Advertisements Make Magazine Special Offer

Comments
25 comments Add Comment

y4m4 says:

Feb 20, 2009. 8:32 AM REPLY I did this and it works nicely. I used the Panasonic reader that only costs $3.50 from All Electronics. Check out my site below for details. http://cal.freeshell.org/?entry=entry090218-191455

akatsuki666 says:
finaly a code with no errors

Feb 8, 2009. 2:38 PM REPLY

amando96 says:
very true!

Feb 19, 2009. 11:46 AM REPLY

akatsuki666 says:
scrach that when i put in the code from the "here" button off step 2 it works (wooot)

Feb 8, 2009. 2:34 PM REPLY

akatsuki666 says:

Feb 8, 2009. 2:31 PM REPLY the software when put into my arduino skech it said error (this is for anything i put into my skech) anycode i put in there from any instructable it always has a error about it!!!!!!!!! anyone wana help me??????????????????????????????????

_sleeper_ says:
ok it is a very good instructable, but what about all that electronic inside the reader? Is there not already a microcontroler?

Jan 16, 2009. 4:26 PM REPLY

sychie says:

Jan 6, 2009. 8:05 AM REPLY i want to know how the magnetic stripe reader is being connected to the computer that will appear the information inside the cards. i want also to if its programmable because after that i want it to be saved the information with my created program. i wish you would help me.tenx a lot...

netstat says:
Why in the diagram your are using data, clock and load But in the code theres only Data and Load

Nov 23, 2008. 5:01 PM REPLY

test professor says:

Nov 14, 2008. 2:01 PM REPLY has anyone come across any information on how to encode the card and then read it on a reader. I do not want to pay a lot of money for the encoder. So I would like to make my own encoder. not just copy but but put what i want on the card. this would be great for clubs or mine. see ya

m1sterb0b says:

Aug 9, 2008. 5:41 PM REPLY Where can I get a card reader that can read all 3 tracks? Also if I read through this correctly, the one you purchased reads only one track (right?), so if I get one that reads all 3 tracks then how can I tell which pins to solder wires to to hook up to the arduino ?

milo0is0hot0 says:
ebay :P they were selling 3 track readers for 30/$60 in cluding delivery

Sep 27, 2008. 6:34 AM REPLY

njakol says:

Aug 21, 2008. 1:48 PM REPLY Really nice Instructable! I think you could feed the raw data you get from your reader to stripesnoop, look at this : http://ossguy.com/ss_usb/ http://ossguy.com/ss_usb/ He has built an usb stripe reader and writes: "This adapter converts electrical signals from a TTL magnetic stripe reader into 1's and 0's that are "typed" on the USB keyboard device that the adapter registers when it is plugged into a computer. This string of 1's and 0's can be fed into Stripe Snoop using ss -i or saved to disk for later analysis" So you should be able to do something like that. Yes, I read little in the docs that come with stripesnoop, it has "input mode" where you can take any bitstream as input (via stdin) so just do

http://www.instructables.com/id/Arduino-magnetic-stripe-decoder/

yourbitstream | ss -i, in linux at least. Maybe you have to convert it to binary first, I don't know. I have to try this myself soon, the problem is that the stripe-reader I have is of some unknown model and I don't know which of the cables is for what, but it is 5 of them so I think I should be able to use it, if I only find out which ones are the right ones. Does anybody have any ideas on how to find out?

uknative says:

Aug 8, 2008. 3:48 PM REPLY I have built this with a different reader. A Panasonic one that I got off of Allelectronics. The only problem I have is that the data is all questions marks. If anyone has any suggestions please send them my way. I did just get this to work five minutes ago so I may be able to figure it out. Thanks for the great instructable to get me started.

mutface says:
Does anybody know how to get this same program to work with a basic stamp?

Aug 7, 2008. 11:49 AM REPLY

Ziexomon says:

Aug 6, 2008. 7:00 AM REPLY how would you encode the data from the card onto the magnetic stripe card spoofer? to lets say take a student ID scan it and encode the data onto the spoofer to use it to unlock a door?

eatmoreart says:

Aug 5, 2008. 6:44 AM REPLY This is wicked awesome, and I am going to make one of my very own. One question - does the software support all three tracks on a card, or just one? Digikey says the card reader is Track 2 only - what if you had one that was 1, 2, & 3 track?

powerpants says:
no, it's only track 2....

Aug 5, 2008. 4:32 PM REPLY

AnarchistAsian says:
i give it a 4.5, and it's one of my fav's now.

Aug 5, 2008. 3:38 PM REPLY

twenglish1 says:
awesome how much did the Arduino Board cost

Aug 5, 2008. 12:59 PM REPLY

dark sponge says:


The Arduino Diecimila costs about 35$

Aug 5, 2008. 1:26 PM REPLY

twenglish1 says:
ok cool i think im going to buy one

Aug 5, 2008. 2:35 PM REPLY

powerpants says:
Glad you guys like it!

Aug 2, 2008. 11:41 PM REPLY

Jackhole says:
This is an amazing Instructable!

Aug 1, 2008. 11:29 AM REPLY

DarkStarPDX says:

Aug 1, 2008. 11:11 AM REPLY Wow, you must have read my mind! I just assembled my first Arduino a couple of days ago and yesterday I was wondering how I could hook up a magnetic stripe reader to it... BTW, I built the awesome DorkBord (DorkBotPDX).

alex-sharetskiy says:
Awesome!

Jul 31, 2008. 10:49 PM REPLY

http://www.instructables.com/id/Arduino-magnetic-stripe-decoder/

Anda mungkin juga menyukai