Magnetic reader

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

Hi, I'm able to read the signal now :slight_smile: 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

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

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.

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

chuckcfs:
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

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, :slight_smile:

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 :slight_smile:

chuckcfs:
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, :slight_smile:

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

thanks a lot for the reply, in this project I've to use a magnetic head, not a pre-built reader so I'll have no clock data but that on the track itself, the encoding that I'll be dealing with (when I'm able to retrieve the F2F signal and the binary from that) is the ABA of the middle track of a credit card, however I've assemble the circuits on this forum and the one of this application note:
http://www.eettaiwan.com/ARTICLES/2001OCT/PDF/2001OCT04_AMD_CT_AN2112.PDF
However with both I'm having problems, the first (the one on this forum) the output changes from 0 to 1 even though I'm not swiping and when I pass the card it does nothing, the second one stays low all the time, and the voltages that I get are not the ones for the stable state presented in the app note, but I've built it three times from scratch with the same result every time
My magnetic head is working 'cause if I swipe it i can see the signal after amplification, however I'm unable to transform that signal to a F2F encoded wave :frowning:

any help??

thanks a lot

comparator has a retro to the (-)input

What does that mean?
The circuits in that PDF had no component parts, so you draw a schematic of what you actually are trying to build with real components.

I've built it three times from scratch with the same result every time

Looks like you keep making the same mistake then.

Hi i meant the comparator of the circuit that was posted here on the topic, it's the second post, as far as for the PDF I know it has no components, but I assemble it with real components and it doesn't work, I don't know what can be wrong since it's just amplifiers and comparators, and i test each of the part separately and all is working it's just that it doesn't give the voltages for the steady state that the pdf shows, and I think that i can wire it fine, so I don't know what can be =S

Of the other circuit that i mention (the one posted here) if you check it the comparator has a wire from the (-) input to the output through a resistance, that's what i call retro and on a comparator I have never seen one (at least that I remember)

Thanks again :slight_smile:

that's what i call retro

Never heard it called that before.

has a wire from the (-) input to the output through a resistance

Yes it is used to control the hysteresis of the comparator.

I know it has no components, but I assemble it with real components and it doesn't work,

Yes that is why I was asking for the schematic of what you are trying to make with real components an part numbers to see if you had made a mistake with the conversion into a real circuit. There could be a problem with the type of op amp you are using, the feedback components or anything, but just saying it doesn't work is not very conducive to trying to find out what is wrong.
Basically it is a digital circuit but made with analogue blocks of that anadigm device. So you could just as easily do it in the digital domain.

I suspect however that you are not even getting a signal out of the first amplifier, do you have a scope you can measure things with?

I've made the schematic and there is the output after i swipe the card:

0
0
8
20
6
11
687
4
14
16
1
6
2
449
667
91
12
642
547
528
179
449
1
2
11
52
485
10
344
3
447
295
7
4
413
14
6
359
477
447
2
280
445
402
476
1
174
325
359
443
406
1
8
1
409
403
3
372
175
251
1
322
8
386
350
296
428
232
419
183
22
400
279
25
322
355
373
347
432
326
1
22
2

is this acurate? and if it is, how can i convert it to binary code?

is this acurate?

How can anyone tell? What is the number supposed to be on the card?

how can i convert it to binary code?

It is already in binary, that is how it is stored in the computer. When you print it out it is converted to decimal.
Exactly what do you want to do with the number? If it is just to print it the look at the serial.print in the reference and see what you need to add to get it to output in binary.

Do you think that is better to use a ADC IC instead of LM393 comparator?

saprodx:
Do you think that is better to use a ADC IC instead of LM393 comparator?

for what? you haven't said what circuit you have, generally though no.

Using the schematic above, i think is better if i will use a ADC instead of LM393 comparator.

No because what you need here is a comparator to detect a threshold value or not.
All an A/D will give you is a number that you will have to compare against to get a binary value. The same effect can be had by simply varying the gain of the amplifier.