Reading magnetic cards (almost) for free

(Done in 2006)

The iron filings trick

Putting iron filings on the magnetic stripe and then tapping the card gently on a hard surface really works :

cardreader_ironThe individual bits are even becoming visible, but my iron filings were a bit too coarse. However, the position of the magnetic track(s) is cleary defined. Here, with an ALISE card (used in school restaurants), there’s just one track (which is, by the way, a  standard ABA 2, even though they state their magnetic technology is innovative and unbreakable). With a credit card, there are two such tracks visible.

Soundcard-based magnetic card reader

There are several software programs over the Web to decode magnetic cards using a computer sound card. But some websites will tell you that you can just connect a cassette player’s magnetic head directly to the microphone input of your PC, others will tell you that you do need a magnetic head designed for card readers, etc…
I’ve managed to build a working card reader using a magnetic head scavenged from a mono cassette player (I don’t know if stereo heads work, they should in theory) and a few other parts that amplify the signal from the head – the head did not give enough power to directly drive the input of the soundcard.


As you can see, all the parts are very common, and can probably be found in the cassette player you will scavenge the magnetic head from. Most NPN transistors are suitable, I used a 2N2219 because I had one available but there’s no need for such a powerful transistor.
The circuit uses “phantom power” from the soundcard: the microphone input provides a direct voltage of about 2.5V with an internal resistance of 1k. The 15k resistor and the 100uF capacitor filter out the alternative component of the signal, to provide a stable polarization voltage to the transistor. The transistor is polarized through the 120k resistor – you may want to fit this value to your particular transistor in order to get a reasonable voltage drop on the microphone input (about -1V) when the circuit is connected. I am aware this circuit is “dirty” and has unstable gain (which is not really a problem anyway, as you only read 0′s and 1′s), but it works, it’s easy to build, and it’s cheap.


The construction is also one of the cheapest, using a CD cover to provide the plastic bits, a piece of cardboard to tune the position of the head (first, determine coarsely where the magnetic track is using iron filings and put an appropriate thickness of cardboard, then, while swiping the card, adjust the position of the head to get best results, finally, stabilize the cardboard with some hot glue. You can also preferably use a couple of screws instead of the cardboard).
If you hear sound when you swipe the card, but the software fails to properly recognize the code, the magnetic head position is probably wrong. It’s very critical.

You can find a suitable software program here:

Comments are closed.