Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Need Pro Help: Building an Audio Based Magnetic Card Reader

Status
Not open for further replies.

jordan rodgers

New Member
Hello.

I want to build an Audio based magnetic card reader from scratch and I was wondering if this concept is feasible.


Using a mini magnetic card reader like these:
https://tinyurl.com/pmc2rdy

Then connecting the tape head reader it to a 2.5mm audio plug like these:

https://prntscr.com/58te7z

Then connecting 2.55mm cable to my computer which records the card info as a WAV or MP3 file on my computer. Then decoding the sound file to card data for transactions in my store.

Is that possible?
 
Your card reader link only takes me to some website, not a specific card reader?

A Magnetic stripe card is only going to stream data and that data will be whatever was written to the card in accordance with the formatting in the link I provided. That said a card reader will read a card, that is all it does, if you want to write to cards you need a card writer. I do not see how you can place a wave or MP3 file on the magnetic card strip?

You could write some software so each time a card is swiped, depending on the data a certain wave or MP3 file would run on the computer. You could do the same with a bar code reader.

Ron
 
Last edited:
OK, I think I see what is going on. The German gentleman looks like he hacked an old cassette audio tape recorder/player and removed the read and write heads. He then uses the write head to read the magnetic strip on a card. When he makes the little drawing of the connector he is using a stereo connector. There is the Left Channel, Right Channel and Common. He ties the Left and Right Channels together and adds a Capacitor for signal coupling but makes no mention of the Capacitor Value and in his drawing uses a resistor symbol to simulate the coil of the read head. So he has a read head using a capacitor to couple to the computer Line In audio. I don't quite get the capacitor he used because as far as I know most PC sound is AC coupled at the input, also where he draws a resistor I believe an inductor would better represent what we actually have. That said, we are tying a left and right channel together and going into the computer. Generally I believe the Mic In is for low level signals and the Line In is for higher level signals. You would likely use the Mic In of the computer.

Finally to see what you actually have you can use a software program like Audacity which you can download here. Back to what I mentioned earlier, all you will see or hear is data. Even if you placed analog data on the strip, like audio, it would play like an audio cassette but you would have to swipe the card at the same speed the magnetic tape runs at. Digital audio is a different animal I suggest that you read this Wiki as to what goes on with digital audio.

Overall I don't see this working but if you want to see what data on a magnetic strip sounds like by all means give it a try. You can even take an old cassette tape and break it open and tape it to an index card and try reading and writing to it. If nothing else it should be entertaining and educational.

Ron
 
The hardware is easy, just get a $2 card reader.
You mite be able to pickup some kind of noise, but how are you going to try and decode it in to something useful?
 
I don't quite get the capacitor he used because as far as I know most PC sound is AC coupled at the input, also where he draws a resistor I believe an inductor would better represent what we actually have.
The mic input is generally mono, with one channel providing the power supply to the mic (through a resistor). The capacitor is to block that DC.

Connecting the cassette head to the microphone input provides a simple way to read a magnetic card. The track data is self-clocking, and in the cards I read (a student card, and a bus pass) years ago gave results similar to those shown in http://www.gae.ucm.es/~padilla/extrawork/soundtrack.html (there's also software available there for reading & decoding to binary).

There's an attachment for phones (Square) that does exactly what you're writing about (allows credit card details to be read and sent to an online store), with the recorded signal shown in **broken link removed** and **broken link removed** . You can see that the signal is being overdriven a fair bit, but is still readable.

Details of the data on track 2 of the card http://en.wikipedia.org/wiki/ISO/IEC_7813

So in short, yes, it's possible and not complex. You'd be best to process the PCM data on the user's computer, and sent only the decoded data to your shop server (w/ SSL).
 
OK thanks for the info dougy;

I guess I would have to wonder if all plastic cards are encoded the same way still.

So now what will he do with the binary bits, they will need to be decoded and imported to do anything useful.

Just what does the OP want to do with the data collected from customer cards?

I for one would not hand a credit card over to someone with a DIY card reader.

If it is credit cards the OP wants to read then there should be some sort of security.
 
I guess I would have to wonder if all plastic cards are encoded the same way still.
I'm guessing so; the waveforms had similar properties between present day and over a decade ago.
So now what will he do with the binary bits, they will need to be decoded and imported to do anything useful.
It's not encrypted, and just needs to be decoded into characters.
Just what does the OP want to do with the data collected from customer cards? If it is credit cards the OP wants to read then there should be some sort of security.
If it's for his store, then it would most likely be credit cards that he wants to deal with. The track contains data that you can read visually from the front of the card. The security used should be the same as for any other online purchases, i.e. HTTPS/SSL.
 
Hello.

I want to build an Audio based magnetic card reader from scratch and I was wondering if this concept is feasible.


Using a mini magnetic card reader like these:
https://tinyurl.com/pmc2rdy

Then connecting the tape head reader it to a 2.5mm audio plug like these:

https://prntscr.com/58te7z

Then connecting 2.55mm cable to my computer which records the card info as a WAV or MP3 file on my computer. Then decoding the sound file to card data for transactions in my store.

Is that possible?

Looks to me like the OP wants to read a card encoded with a .wav or MP3 file? That is what the original post seems to imply anyway. I don't quite get it. This link I posted earlier covers the standardized format for the tracks.
https://en.wikipedia.org/wiki/Magnetic_stripe_card

I guess I don't get the reference to .wav or MP3 file?

Ron
 
I guess I don't get the reference to .wav or MP3 file?
I thought he said he was going to record from the sound card, save the recording to a .wav/.mp3 file, then process it and send the resulting decoded card details to his store. It's just a superfluous intermediary step; obviously the PCM data from the sound card can be processed in-memory without first saving it to a file.
 
Yes the OP should need need to use audio at all, the tape head can read the digital signal.
I think it is just a convenient way to get it into the computer without an interface.
 
The mic input is generally mono, with one channel providing the power supply to the mic (through a resistor). The capacitor is to block that DC.

Connecting the cassette head to the microphone input provides a simple way to read a magnetic card. The track data is self-clocking, and in the cards I read (a student card, and a bus pass) years ago gave results similar to those shown in http://www.gae.ucm.es/~padilla/extrawork/soundtrack.html (there's also software available there for reading & decoding to binary).

There's an attachment for phones (Square) that does exactly what you're writing about (allows credit card details to be read and sent to an online store), with the recorded signal shown in **broken link removed** and **broken link removed** . You can see that the signal is being overdriven a fair bit, but is still readable.

Details of the data on track 2 of the card http://en.wikipedia.org/wiki/ISO/IEC_7813

So in short, yes, it's possible and not complex. You'd be best to process the PCM data on the user's computer, and sent only the decoded data to your shop server (w/ SSL).


Great. So If I got this right, I Can use a 1 track head like this one here:
eDNmMHg.png


bind the left and right audio like this:

**broken link removed**

If that's the case I was wondering what kind of wire to use and what a ground (GR) is? Also how to ground it properly.
 
bind the left and right audio like this:
No that wiring is not right.
Tie your head across the left or right terminals and ground.
You should only need mono input, either the left or the right channel input.
Depending on your software application.
 
No that wiring is not right.
Tie your head across the left or right terminals and ground.
You should only need mono input, either the left or the right channel input.
Depending on your software application.


Ok,

9hmr8Pk.png


That's the proper setup yes?

Also what is the ground setup?
 
Then connecting 2.55mm cable to my computer which records the card info as a WAV or MP3 file on my computer. Then decoding the sound file to card data for transactions in my store.
So, if I understand you correctly, you want to swipe a credit card, decode it, and use the info later to shop in online shops?
 
you need a connection to the GR terminal and one more to either L or R but not both necessarily depending on your software.
Once again the hardware is easy, the software to use it is the hard part.
Do you have the software?
Does it need both channels to work?
 
Status
Not open for further replies.

Latest threads

Back
Top