A magnetic card reader
So, I've had this reader for some time in my basement now and didn't know if it still worked. The reader was part of an access control installation in a computing center when ist was decided to abandon the magetic cards and use RFID cards instead. The old readers were unused then and I could get hold of some units. (We've reused one reader for an internal coffee-accounting-time-tracking back then, you can access the project page at the Internet Archive).
Knowing that this reader can be attached to a computer quite easily, I pulled out the reading part. The electronics label shows 5 volts, so I pulled up the lab power source and started measuring. After having had a look on the pcb layout, voltage measurements seemed reasonable after powering up. The reader contains a photo transistor to check if there's a card swiped through, this also seemed to work.
The reading electronics uses an Omron chip that does some kind of signal processing from the magnetic reading head (data on the tracks is normally encoded using differential manchester encoding). The spec for this chip is not public, so I needed to check on the signal outputs manually. The connection cable contains 3 wires transferring the bits. After hooking an 15$ logic analyzer to these, I started swiping cards.
After some tryouts using probes directly on the chip socket connector I mounted the latter on a breadboard which worked a lot better. I got some readings at last and noticed that the OMRON chip returns a clock and a data signal. The reading electronics also delivers a trigger if there's a card inserted.
The main goal was to be able to connect this reader to the PC. Instead of creating a pcb, I just used an Arduino UNO to read the signals from the electronics. The arduino can use the its serial interface to transmit the card data to the computer. I wrote a small program to deliver the raw (bit) data, decoding and parsing the card data can be better handeled on the receiving end.
To be able to use the reader more easily, I created a small pcb to get rid of the breadboard. Before that, the reader was powered by the lab power supply but as the consumtion was only 15mA at 5V, the Arduino can power this reader itself.
Software
For utilizing the reader, I've written an arduino program that pulls the data from the electronics and a python tool that is capable of decoding the card data. Depending on the card swiped, the python tool can interpret some data mainly for credit and financial cards.
The software is available on github.