Pages: [1] 2   Go Down
Author Topic: Magnetic reader  (Read 2911 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi there, I'm working on a project where I have to read a magnetic stripe like the ones on credit cards, i have a magnetic-head like this one, https://www.cardreaderfactory.com/support/index.php?/Knowledgebase/Article/View/15/1/magnetic-read-head-connections
The thing is that I'm unable to get any signal at all, currently I've connected the Track 3 pin to an amplifier and the output to the pin A0 on the arduino, I'm connecting the "head common" pin to ground, and I'm printing in the serial monitor the value on the pin A0, however it remains 0 ... any ideas on what I'm doing wrong, I've read on the forums something about using the ADC for this, can you guys explain a little about this, if this is the case?? =O

Thank you very much in advance!!

chuck
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34165
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The signal out of a magnetic read head is tiny, much smaller than you need to make any impact on the A/D converter on an arduino.
You need an amplifier in order to boost the signal to a suitable level. Google for - magnetic card reader schematics

This is a typical one:-
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey thanks for the answer, although I think you upload an image I'm unable to see it =S ... and also another question, should I connect the head common pin to ground???

Many thanks in advance  smiley
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34165
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
although I think you upload an image
Yes I did, I can see it.
The link is:-
http://www.hackersrussia.ru/Cards/Images/cop2.gif
Is your ISP blocking Russian web sites, naughty.
If so just google for a schematic. 

Quote
should I connect the head common pin to ground???
It depends on the circuit of the amplifier.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks I'm looking at the schematics now, I found it weird in the amplifier for the +6V supply in the positive terminal of the op-amp, and also in the -input what is the write node?? the 393 if I'm not wrong it's a comparator isn't it with a pull-up resistor at the output, I think I'm interpreting this right
as far as the head common pin I think in this diagram should be connected to the (-)input right? and the track-3 (in my case) to the (+)input, but do you have what kind of signal should I be expecting to get in the arduino?? and can I read it directly in an analog input pin??

Thanks again smiley
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34165
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
if I'm not wrong it's a comparator isn't it with a pull-up resistor at the output,
Yes that is right.
Quote
, but do you have what kind of signal should I be expecting to get in the arduino??
Yes it is a digital signal, because of that comparator. It will output pulses with the data being encoded in the pulse width. So you connect it to a digital input not an analogue one.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok thanks a lot, I'm testing it in this moment, I'll let you know smiley
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I'm able to read the signal now smiley I'm not using the comparators only the amplifier and I'm reading the signal through the analog input pin in the arduino, however now I want to get the data from that signal, I'm thinking that I need the ADC but how can I do this since the encoding of the data in the magnetic stripe doesn't change in amplitude but in space between the peaks,

any ideas??

thanks a lot
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
any ideas??

Yes, don't attempt to process the mag head signal via A/D, that way leads only to madness. The mag head signal needs to be conditioned and processed as a digital signal only. Trying to decode the encoding used to generate that signal in the analog domain is just wrong.

Lefty

Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34165
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Use the comparator and feed it into a digital input. Then you can use the pulse in function to measure the width of the signals. That's where the data is.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, first thing tomorrow I'll got for the comparators and try to get the data from the card by this way, I was trying to use an interrupt to "catch" the signal peaks and store 'em in an array to generate the F2F signal.

I'll try with the comparators,

Thanks a lot for all the help
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, first thing tomorrow I'll got for the comparators and try to get the data from the card by this way, I was trying to use an interrupt to "catch" the signal peaks and store 'em in an array to generate the F2F signal.

Nothing prevents you from using interrupts once the signals (clock and data) has been conditioned and turned into a digital signals. In fact a cardreader project posted here several years ago did just that, the clock pulse wired to a arduino interrupt pin and the data wired to any digital input pin.

Lefty


I'll try with the comparators,

Thanks a lot for all the help
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi I'm at this moment building the circuit with the comparators, I'm planning in using the interrupt to check when the card is being swiped, as far as the clock signal that lefty mentions I should feed the arduino with, where this signal come from?? the circuit with the comparators uses no clock right?? it just generates the F2F wave from the read head, am I wrong??

Cheers, smiley
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey by the way, in the circuit the comparator has a retro to the (-)input, why is this? I've never seen this kind of circuit using a comparator

thanks smiley
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi I'm at this moment building the circuit with the comparators, I'm planning in using the interrupt to check when the card is being swiped, as far as the clock signal that lefty mentions I should feed the arduino with, where this signal come from?? the circuit with the comparators uses no clock right?? it just generates the F2F wave from the read head, am I wrong??

Cheers, smiley

My reference to a clock and data signal was in regards to using those cheap surplus credit card readers (I got one for $5) where the analog conditioning and decoding of the low level analog read head signal is done internally and the user is given just TTL level digital output signals including serial data, serial clock, and card detected signals.

 As you are taking on this low order conditioning yourself you will have to understand the magnetic encoding method being used before you can decode it properly. There are magnetic encoding methods that include both clock timing information as well as data value information on the single magnetic track and you are tasked with extracting the clock and data information from the composite analog signal. As I have no idea what encoding/decoding method you will be dealing with I can't give any better or more specific information or advice on the subject.

Good luck with your project.


Lefty
Logged

Pages: [1] 2   Go Up
Jump to: