Thursday, May 29, 2014

The Magic of Magnetic Strips: Credit Card 101

In this example of commonplace electricity and magnetism applications, we have:

(Source: http://sayanythingblog.com/entry/price-caps-on-swipe
-fees-making-your-banking-more-expensive/)

Have you ever wondered how a credit card can keep track of the entirety of your financial life? Probably not. In 2012, about 26.2 billion credit card transactions and 47.0 debit card transactions were completed, with an overall non-cash transfer value* estimated at $79.0 trillion [1]. The average American held 1.96 active bankcards in 2012 [2], which has since increased to 2.19 in 2013 [3]. It is easy to see that most of us take credit cards for granted. 

*Note: this figure DOES include check transactions.

Cut to the Chase

The back of your credit card has a stripe on it, called a magnetic strip, which is filled with magnets of different strengths that represent 217 alphanumeric characters. These magnets identify your card and provide a variety of security features to protect your account [4]. When the card is scanned, the computer reads the security information and gains access to your account to deduct the proper amount of funds and complete your transaction.

The act of scanning the card is where the physics comes in. Credit card scanners also make use of induction, a phenomenon discussed in my earlier article about traffic light sensors. Faraday's Law describes the physical phenomenon by which credit cards work: a change of magnetic flux over a time interval induces a charge in a wire circuit. To further explain: the different strengths of magnets on the card cause a stronger or weaker voltage and current to travel through the wire. The voltage in the wire causes current to flow in the direction opposite of the card swipe. This resultant current is unique to every card because it reflects the sequence of magnets in the strip.
_________________________________________________________________________________

 A Bit More Detail...

The single most handy part of that piece of plastic that you take for granted is on the back; it's the strip that runs across the top of your card and might be silver or black. This is a magnetic strip, sometimes called a 'magstrip' for short. This space on your card is covered in tiny, iron-based magnets that make up three different sequences of information. The magstrip itself is divided into 3 distinct length-wise partitions called 'tracks', all of which are filled with identifying information about you and your bank account. 

The first track encodes a maximum of 76 alphanumeric digits constituting your account number, your name, your card's expiration date and security code, and some other security data specific to your card and account. The second track, with a maximum of 37 alphanumeric digits, contains more card security information, and the third track with 104 numeric characters contains information on your country and location, credit limit, and other miscellaneous card security features and codes. [4]

Magnetic strip technology works almost identically to the way in which a cassette tape is read: a moving magnetized source passes over the front of an electromagnet which then reads the data. The key here is movement. Magstrip card readers (and cassette tape readers) rely on induction to operate, which requires a change in magnetic field strength over time. The formal denotation of this is Faraday's Law, which reads as follows:
                                          

The Greek letter epsilon stands for emf--short for electromotive force--which is like a battery's voltage. The Greek letter phi in the equation signifies magnetic flux, which is discussed here, and the d/dt piece of the equation communicates that the emf/voltage changes as the quantity in the numerator (here it is phi) changes over time. Altogether, Faraday's Law outlines how a voltage can be generated from a magnetic source: the amount of flux must change with time.

Faraday's Law singlehandedly explains two important observations about the process of swiping a card:
1. The card must be moved across a sensor. This is because, as we just stated, the voltage in the wire circuitry of the card reader occurs because of a change in flux. If the credit card was statically held in the slot over the sensor, there is no change of flux because the same magnets are held over the sensor for extended periods of time. Once we slide the magnet through the slot, the different strengths of magnets within the magstrip pass over the electromagnet and generate a sequence of varying voltage strengths that are specific to your credit card.

2. The magnets have to be of different strengths for optimal combinations allowed (different patterns of flux change) All of those 217 alphanumeric digits in the three tracks within the magstrip that identify your card would not be possible if the magnets were all the same strength. To take an extreme example: let's say the magstrip is one continuous bar magnet that spans the length of the card. When scanned, two changes in flux would occur: an increase when the first end of the strip begins to pass over the card (change from reading air to reading magnet) and a decrease when the end of the strip passes over the magnet (change from reading magnet to reading air). There would be effectively no change in between because in our example, the same strength of magnet is read the entire time. How many different credit cards could be made with that pattern? Not very many. Having a large amount of small magnets of varying strengths drastically increases the number of different possible combinations.

A Bonus Question!

How do magnets 'erase' credit cards? What is it erasing?

The fact that magnets erase credit cards might (hopefully) be making more sense since we started this journey into the workings of magstrips.

We know that, on a basic level, the strip on the back of your credit card contains many small magnets. What happens when you put two magnets next to each other? They either attract or repel. Have you ever tried to push two repelling magnets together or hold two attracting magnets apart from each other at a very small distance? It's very hard to do, if not impossible! Those forces that your hands feel when you hold the magnets are the same forces that the magnetic particles feel when you put a magnet close enough to them. To some extent, you can control your hand because you have muscles that can exert a force to oppose the magnetic pull. The magnetic particles can do no such thing, and thus are relatively easy to move.

This is a big problem for the functionality of your credit card! Your card's electronic identity is precisely determined by the location of the magnets; the scanner generates a voltage and current sequence based on that pattern. Once you move some of those magnets around, you no longer have the same pattern (i.e. your pattern has been 'erased'). The generated voltage sequence does not match up to your correct information, which is why you can't process a transaction on your card.
_________________________________________________________________________________

Thank you for reading! If you have any questions or comments about what I've covered here (or any ideas as to what I should cover next), feel free to post a comment below! Alternatively, send me an email at nghagler@ucdavis.edu and include 'Blog' in the subject line to let me know what you think. Thanks!

No comments:

Post a Comment