Magstripe Reader - 3 Tracks

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
lzemail
 
Posts: 52
Joined: Tue May 29, 2012 5:00 pm

Magstripe Reader - 3 Tracks

Post by lzemail »

I bought this reader http://www.adafruit.com/products/853
I use Arduino Uno and Mega with the library and the Simple_Test sketch from PS2Keyboard.zip located at http://www.pjrc.com/teensy/td_libs_PS2Keyboard.html

I use a credit card gift card and an AAA membership card for testing.

Result:

After swiping these cards many times and after many "unrecognizable" outputs, the Arduino IDE serial monitor finally showed the information I can recognize (e.g. my name, card number, etc.), but only once. I tried many times again, I am unable to get the correct outputs anymore. Also, I tried swiping the card from either end of the reader with varying speed, and each time I tried, the output is different.

During the repeat testing, I didn't change the wiring. Please let me know what I am doing wrong. Thanks.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Magstripe Reader - 3 Tracks

Post by adafruit_support_bill »

Can you post a photo showing all your connections?

User avatar
lzemail
 
Posts: 52
Joined: Tue May 29, 2012 5:00 pm

Re: Magstripe Reader - 3 Tracks

Post by lzemail »

Notes for the attached photo: red (+5v), black(Ground),yellow(Clock) and blue(Data)

It is working now -- the outputs are recognizable now (e.g. card number, my name, etc.). Not knowing another other things to try, I tried with an external power supply (instead of using the USB from the computer) because I suspect it might not have enough power from the USB port. After applying the external power, I reset the Mega, swiped the cards, and it worked. I don't know if this is the only solution. Please let me know if you think I might be doing something else wrong, or there might be another way to fix this without the external power. Thanks.
Attachments
magstripe_reader_connection.jpg
magstripe_reader_connection.jpg (538.03 KiB) Viewed 687 times

User avatar
lzemail
 
Posts: 52
Joined: Tue May 29, 2012 5:00 pm

Re: Magstripe Reader - 3 Tracks

Post by lzemail »

After I posted it is working, now it stopped working again -- no changes made, and I get those random letters/numbers/symbols again. Maybe there is more to it other than (or in addition to) the external power supply. Ideas? Thanks.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Magstripe Reader - 3 Tracks

Post by adafruit_support_bill »

Intermittent behavior like that usually comes down to a bad connection somewhere. It looks like you are using good quality jumpers with pin connections on the end. How are they attached to the PS-2 connectors?

User avatar
lzemail
 
Posts: 52
Joined: Tue May 29, 2012 5:00 pm

Re: Magstripe Reader - 3 Tracks

Post by lzemail »

The data and clock: the reader PS/2 male end -- female-to-male jumper wires -- Mega
The +5V and Ground: the reader PS/2 female end -- male-to-male jumper wires -- Mega

Why are both ends of the reader PS/2 pins not the same, i.e. data and clock pins are only available on one end of the reader PS/2 connector? I guess it's for a "pass-thru" keyboard? Is there a schematic available for the PS/2 connectors wiring of this reader?

Anyway, I just tried again, and it is working now. I'll double check my wiring again to see if I can get a consistent outputs. Thanks.

User avatar
lzemail
 
Posts: 52
Joined: Tue May 29, 2012 5:00 pm

Re: Magstripe Reader - 3 Tracks

Post by lzemail »

I just want to report back the result: I double checked the wiring and made sure they all have solid connections, the reader is working, and I can get consistent correct outputs now. So, it looks like the bad connection is the problem as you pointed out. Thanks for the help.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Magstripe Reader - 3 Tracks

Post by adafruit_support_bill »

No problem. Thanks for following up! :)

User avatar
lanref83
 
Posts: 9
Joined: Fri Dec 05, 2014 5:25 am

Re: Magstripe Reader - 3 Tracks

Post by lanref83 »

Hi,
Please do you mind posting a sketch for this project? im currently trying to read data off cards using an UNO

Thanks!

User avatar
Franklin97355
 
Posts: 23912
Joined: Mon Apr 21, 2008 2:33 pm

Re: Magstripe Reader - 3 Tracks

Post by Franklin97355 »

@lanref83 How do you have your reader connected and what sketch are you running to read it?

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”