About UsResearchOpportunities
PublicationsResourcesSite Map
 

ECE385F Lab Pages - Cardreader lab

You should find this lab significantly easier than the previous NTSC lab. This lab simply implements a card reader with an Atmel 8515. The trick is to understand what each line of the cardreader corresponds to. We will not be giving out any sample code, it should be easy for you to write the code given your experience in the previous labs. You may want to use the extra time to work on your final project.

Getting a cardreader

Cardreaders are available from Active Surplus for $1.50 to $2.00, we also have a small supply of cardereaders which will be handed-out.

Also, read the information I have included here. This article will help you understand how a cardreader works.

Magnetic Strip Card Reader using Interrupts

Reverse Engineering the Card Reader:
Once you find out which pins are power and ground there are three lines you concerned with:
Note that most card readers are able to read two data tracks. Most cards with a magnetic strip will encode data on both tracks. The two tracks are usually encoded at different frequencies (the term frequency here is used quite loosely). There are usually two clock lines corresponding to the two data lines, one clock/data line is usually at a higher frequency than the other.
You can figure it out by hooking up LEDs and resistors wired in series to the pins you are trying to figure out.

The dataline will be a flicking LED
The clock line will be a dim LED (like PWM)
The card present line will be on while the card is in the reader and moving

If you connect the lines from the cardreader to an oscilloscope, it should be quite easy to detect which line is which.

See the oscilloscope trace in a picture of a card reader in action (for a project called "sight license").

"License to Sit", a recent project that uses the card reader may, provide some useful background by way of examples that you can find here, here, and here.

Grading:

Activity Mark
Reverse engineer the card reader and display clock and data signals on scope. Show that the card reading driver works as well. Show that (and explain how) you reverse engineered the card reader. You can test this with any modern identification card.
1
Use the LCD display to output the data from track 1 (low-frequency track).
2
Use the LCD display to output the data from track 2 (high-frequency track).
2
Use the LCD display to output the data from track 1 then track 2.
2
Use the cardreader to control another device. For example, you could have the AVR match a "known card" and then make a servo motor move (maybe to open a door). Any other ideas will be accepted, maybe "access denied" or "access granted" on an NTSC display.
2
Survivability directorate
1