Arduino Magnetic Stripe Decoder

184,075

478

61

Published

Introduction: 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.

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.

Step 2: Software


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.

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.....

Share

    Recommendations

    • Make it Move Contest

      Make it Move Contest
    • Clocks Contest

      Clocks Contest
    • Oil Contest

      Oil Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    61 Comments

    You're saying that I should connect CLK to pin 3 (OC2B) on the Arduino, but then you don't use pin 3 in the code. When googling I find that pin 3 has something to do with a timer. But unless you declare it to be that way, it's always giving a LOW signal since it's an IO pin, right? So is there a real point in connecting CLK to pin 3? I'm asking because I need to get it working on an RPi too and it doesn't have an OC2B pin.

    i have this reader can u help me which wires i have to use for ?
    thank u

    unnamed.jpg

    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.

    1 reply

    I also like you I used a Panasonic player and I Got the Problem of question marks, you come've Solved ????

    How could you not mention the fact that this device doesn't read track 1?

    http://media.digikey.com/pdf/Data%20Sheets/Omron%20PDFs/V3A%20Series.pdf

    Where's the code located? I don't see it.

    Where is the code?

    I'm trying but nothing works. Can someone help-me, Im trying to use a CIS LCM-040 module

    Tx

    well the .PDE file loaded to my board and i see it was rapidly blinking and then it said uploadiing done..... but it didnt read the card reader... not sure what's up with this.

    1 reply

    does anyone have the schematic and code for this project? Thanks any help appreciated.

    2 replies

    heres coding https://www.instructables.com/files/orig/FIO/E4OW/FJBYZ4TE/FIOE4OWFJBYZ4TE.tmp

    heres plans let me know how it turns out.
    http://m-cdn.dashdigital.com/make/vol01/#pg106

    (where its says cover... change to page 106 if not set to 106

    got a 404 on that link?

    Good night ..

    eae guys, someone has the source code that uses eel? because I searched and found it here in sete..quem have put ae ..

    goodnight my name and Paul teclo of Brazil, people seek out the parents or friends to assist me in this work there with projects or even to experience here in Brazil terminals electronics yet most are magnetic taja like to know if you or someone read this material there is some way to try it lar and logical to get some profit out of it, I do what has to be done here in Brazil and send your part if you are interested send me an e-mail or you or someone who has interest.

    hugs
    Paul

    1 reply

    me add nilton.ss@live.com

    whatsshap (63)92392003

    if you already have a magnetic strip reader why would you need to use other hardware with it?

    1 reply

    Magnetic stripe readers aren't independent devices, they always connect to a system of some kind to actually use the data, like a Point Of Sale system or security system. Just a mag stripe reader doesn't do anything. Plus this is really just a launching point for many other options, he is just showing how to read mag stripes using an Arduino

    user

    im getting different results. when i click monitor serial port it shows numbers and symbols. but now what you have, which version of the arduino do you have? the program that is. im using 22

    1 reply

    What baud rate are you using?

    i have a tranz 330 terminal i want to retrieve the track two information on HELP! : )