Magnetic strip reader with card using information feedback
Cross reference to related co-pending application
The sequence of entitled " magnetic strip reader with card using information feedback " submitted this application claims on 2 6th, 2013
Number for 61/736,116 U.S. Provisional Patent Application equity, the temporary patent application and the application are commonly assigned to this Shen
It asks someone, content is by reference to being clearly incorporated herein.
Invention field
The present invention relates to the system and method for the magnetic strip reader for being capable of providing card using information feedback.
Background of invention
Magnetic stripe card in magnetic stripe for storing various types of data.They are applied in different fields, including payment
Card, Gift Card, secure access control system, identification system and toy etc..Magnetic stripe card includes a modeling for being attached with magnetic stripe
Material or paper card.It is modified by the magnetized state to the iron-based ferromagnetic particle being embedded in magnetic stripe, data are magnetic
Coding is on magnetic stripe.It would generally be encoded on magnetic stripe there are three data-track.Magnetic card reader can be used to be retrieved for data.
Magnetic card reader includes a reading magnetic head and an adjacent card-brushing groove.Reading magnetic head includes a magnetic transducing
Device is electromagnetic coil in one example.The magnetic stripe of magnetic card reader is swiped through from the slot, and action of swiping the card will produce a mould
Quasi- magnetic signal, the signal are picked up by the magnetic sensor of adjacent reading magnetic head.Simulation magnetic signal includes that the magnetic of magnetic stripe is compiled
Code data.The intensity of simulation magnetic signal with magnetic code data is usually weaker, therefore reading magnetic head needs closely with magnetic stripe
Contact, with the signal-obtaining of acquisition " normal (good) ".In the magnetic card reader of manual operation, card-brushing groove includes two opposite
Wall, reading magnetic head is placed on one of wall so that when the magnetic stripe of magnetic card is placed in slot, the magnetic stripe of card with read magnetic
Head can be directed at position.Reading magnetic head is normally placed in a metal compartment, further includes all electronic circuits in compartment.Most
In the case of number, magnetic stripe can be read from both direction, that is to say, that can since any one end of slot swiped through magnetic card.
Magnetic stripe card is more cheap compared to other card techniques, and is easily programmed.However, magnetic stripe technology be also easy to happen misread,
The case where card abrasion and data corruption.Therefore, in some cases, magnetic card reader possibly can not successfully read magnetic card swipe letter
Breath.Such case may there are many reason, including swipe the card speed and the uniformity, card Aligning degree, magnetic code data deterioration with
And reading magnetic head failure etc..
When magnetic card reads failure, user generally has to reattempt to and swipe the card.However, in the feelings of no any error feedback
Under condition, user can not know the previous failure cause swiped the card and how correct.Therefore, there is the magnetic card Card Reader of feedback information
Device will be highly useful in terms of the magnetic card after improving card read failed reads success rate.
Invention overview
The present invention provides a kind of new magnetic card reader module for having card using information to feed back.This characteristic can substantially improve magnetic card
The user experience of card reader helps to make diagnosis to the reason of card read failed.
In general, on the one hand, the present invention provides a kind of magnetic card reader module comprising magnetic sensor and adjacent
Slot, microcontroller and application ware.The magnetic sensor is configured to pickup and is simulated caused by the swiped through slot of magnetic stripe
Magnetic signal.The magnetic stripe is attached on card, and includes the track with magnetic code data.The microcontroller be configured to by
Simulation magnetic signal is converted to digital signal, which is configured to analyze digital signal, and carries out digital signal
Soft-decision decoding, and output is generated, wherein the output includes magnetic code data and auxiliary information (side
Information), the auxiliary information provides card using information feedback.
The realization method of this aspect of the present invention may include one or more in following characteristics.The magnetic card reader
Module further includes amplifier and rectification circuit, and simulation magnetic signal is amplified through amplifier, and carries out rectification by rectification circuit, by
This generates a series of square pulses.Application ware includes that decoding algorithm is detected on an edge, is configured to determine two continuous warps
Spacing between the rising edge and/or failing edge of the pulse of rectification.Identified spacing is used as soft-decision parameter.It is remote
The rising edge and/or failing edge of the two continuous rectified pulses separated indicate that magnetic stripe brush speed is very fast.When two it is continuous
When spacing between the rising edge and/or failing edge of rectified pulse is equivalent to or is more than its height, to separate at a distance.
By the rising edge and/or failing edge of closely spaced two continuous rectified stream pulses, indicate that magnetic stripe brush speed is slower.When
Between the rising edge and/or failing edge of two continuous rectified pulses when being smaller than its height, for closely every
It opens.Magnetic card reader module further includes amplifier and analog-digital converter (ADC).Simulation magnetic signal amplifies through amplifier, and by ADC
Be converted to a digital signal.It by determining the position of the peak value in digital signal, and determines the spacing between continuous peak value, answers
Appliance is decoded digital signal.Identified spacing is used as soft-decision parameter.Microcontroller is also configured to determine magnetic
Item swipes speed, and provides magnetic stripe and swipe diagnostic message.It includes the pass that magnetic stripe swipes speed and time that magnetic stripe, which swipes diagnostic message,
System's figure.It further includes swiping the upper and lower bound of speed that magnetic stripe, which swipes speed and the relational graph of time,.Auxiliary information is additionally configured to
It is controlled by software command or hardware configuration.Auxiliary information is additionally configured to be controlled by input pin.Magnetic code number
According to further including error detection code.The error detection code includes a check bit to each encoded character, and this is answered
Appliance is also configured to determine the position of check errors position.Error detection code further includes a longitudinal direction to each data-track
Check bit, and the application ware is also configured to determine the position of longitudinal check error bit.
In general, on the other hand, the present invention provides a kind of method for reading in the data of magnetic stripe interior coding,
It includes the following steps.One magnetic card reader for including magnetic sensor and adjacent slot is provided.Magnetic sensor is configured to
It picks up and simulates magnetic signal caused by the swiped through slot of magnetic stripe.Magnetic stripe is attached on a card, and includes carrying magnetic code number
According to track.Next, being provided arranged to that the microcontroller that magnetic signal is converted to digital signal will be simulated.The microcontroller is also
It is configured to analyze digital signal, and carries out the soft-decision decoding of digital signal, and generate output, wherein the output
Including magnetic code data and auxiliary information, the auxiliary information provides card using information feedback.
Brief Description Of Drawings
Fig. 1 show the simplified block diagram of a reading magnetic head module;
Fig. 2 show a kind of simplified block diagram of reading magnetic head module of the present invention;
Fig. 3 is shown by a typical segments of the read magnetic flux signal of reading magnetic head in Fig. 2;
Fig. 4 show the magnetic flux signal by a typical segments after rectification circuit;
The typical segments and its sampled value in analog-digital conversion process that Fig. 5 show the magnetic flux signal;
Fig. 6 show a kind of block diagram of the possible embodiment for the reading magnetic head module that one includes rectification circuit;
Fig. 7 show a kind of block diagram of the possible embodiment for the reading magnetic head module that one includes analog to digital conversion circuit;
Fig. 8 A, which are shown, to be swiped speed and changes with time figure, is shown to start speed per hour and spend low swiping, and closed on
Speed is excessively high at the end of swiping;
Fig. 8 B, which are shown, to be swiped speed and changes with time figure, shows that user readjusts it and swipes behavior, so that brush
Dynamic speed is fallen within the scope of speed limit.
Detailed description of the invention
As described above, in some cases, magnetic card reader possibly can not successfully read magnetic card swipe information.Such case
Possible there are many reasons, including swipe the card speed and the uniformity, card Aligning degree, the deterioration of magnetic code data and reading magnetic head event
Barrier etc..
Specifically, the mode and speed swiped the card can influence the success rate of magnetic stripe reading.It is too fast, excessively slow or speed is uneven
Or other ill swipe the card normally result in card read failed.Alternatively possible reason is the deterioration of magnetic code data.Letter
Number weak, error in data or rail damage may make data-track that can not read.Certainly, alternatively possible reason is magnetic card Card Reader
The failure of device itself.Misalignment is also a possible factor between magnetic stripe and magnetic card reader.Its reason may be magnetic card, magnetic
Card reader or the problem of acting of swiping the card.
In most magnetic card reader modules, orbital data output is the simulation magnetic signal to being picked up by reading magnetic head
" hard decoder "." hard decoder " or " hard decision " or " hard decision decoders " refer to in the fixed set of one group of probable value (i.e. two
In system 0 or 1) in the decoding mechanism that works in the data that are taken or decoder.After hard decision, read about magnetic card
Any information taken can lose.However, the information that raw magnetic signal includes wants much more, these information potentially contribute to determine
Magnetic card reads the reason of failure.
When a magnetic card reads failure, user generally has to reattempt to and swipe the card.However, being fed back in no any error
In the case of, user can not know the previous failure cause swiped the card and how be corrected to it.Therefore, there is feedback information
Magnetic card reader after improving card read failed magnetic card read success rate in terms of will be highly useful.Card using information feedback makes user
Swipe the card speed or swiping card mode can be adjusted, with the possible cause of recognition failures, alternatively, if user knows that data on magnetic card has damaged
It is bad, then it can reduce number of retries.
The present invention provide it is a kind of based on " soft decoding " mechanism or " soft decision decoder ", the new of card using information feedback can be provided
Magnetic card reader module." soft decoding " or " soft-decision " or " soft decision decoder " refer to a kind of algorithm, such algorithm is used for
To being decoded with the data that error correction code is encoded.In addition in the fixed set of one group of probable value (0 i.e. in binary system
Or 1) in " hard decision " data except, the input of " soft decision decoder " is also possible to take in the entire scope of median
.This additional information indicates the reliability of each input data point, for providing better raw value.Therefore, exist
In the case of corrupted data, soft decision decoder is usually performed better than than hard decision decoders.
Referring to Fig. 1, reading magnetic head module 200 generally includes a reading magnetic head 202 and a microcontroller or decoder
203.Reading magnetic head 202 includes a magnetic sensor, picks up a simulation magnetic flux signal 201, and will input magnetic flux signal
201 are converted to an electric signal.Simulation magnetic flux signal 201 includes the magnetic code data of magnetic stripe.Microcontroller or decoder electricity
Electric signal is gone back to the data to be encoded on the track of magnetic stripe by road 203, and exports the digital track that will be used for other circuits
Data 204.Output data 204 is " hard decision decoders " as a result, it has one group of probable value (i.e. binary zero or 1)
Fixed set.Therefore, it when a card read failed, does not prompt any about why swiping the card the feedback of failure.
Referring to Fig. 2, reading magnetic head module 210 of the invention includes reading magnetic head 212, microcontroller 213 and application ware
215.Reading magnetic head 212 includes a magnetic sensor, picks up a simulation magnetic flux signal 211, and by 211 turns of magnetic flux signal
It is changed to an electric signal.Microcontroller 213 and application ware 215 handle the electric signal, with based on " soft decision decoder " mechanism come
Extract numerical value.Microcontroller 213 is based on by the analysis performed by " soft decision decoder " mechanism, output card using information (or auxiliary
Information) 214.If Card Reader success, the orbital data of magnetic stripe will be generated as an output.If occurred during Card Reader wrong
Accidentally, the possible cause that auxiliary information 214 will help user to determine card read failed.User can both carry out speed of swiping the card as a result,
Corresponding adjustment can also identify possible bad card when data are unreadable.
Binary system orbital data is encoded by using frequency/bifrequency (F2F) encoding scheme on magnetic card, in the program
In, bit 1 and bit 0 are indicated by the encoded signal with different interval.It is produced when the slot of the swiped through magnetic card reader of magnetic stripe
Magnetic flux be read magnetic head pickup, encoded orbital data taken out from magnetic stripe.Fig. 3 is shown from reading magnetic head front end
Analog signal output.Spacing distance between peak 100 and peak 101 is the half of the spacing distance between peak 110 and peak 111.
Signal pulse 100 and signal pulse 101 correspond to two bits 0.Pulse 110 and pulse 111 are in bifrequency, correspond to than
Spy 1.
Reading magnetic head module 220 as shown in FIG. 6 is respectively adopted in the present invention and reading magnetic head module 230 shown in Fig. 7 is right
Input magnetic signal 211 carries out two different decoding processes.Referring to Fig. 6, reading magnetic head module 220 includes reading magnetic head 221, puts
Big device 222, rectification circuit 223, microcontroller 224 and along detection algorithm 215a.Input magnetic signal 220 is read 221 turns of magnetic head
It is changed to an electric signal.The electric signal is amplified the amplification of device 222 first, then passes through rectification circuit 223.The subsequent analog telecommunications
It number is rectified circuit 223 and is converted to a series of pulses 120,121,122,123 (as shown in Figure 4), the position of pulse is by along detecting
Algorithm 215a is determined, is realized and is executed by microcontroller 224 along detection algorithm 215a.Interval between continuous impulse is calculated simultaneously
It is construed to bit 1 or bit 0.Fig. 4 show to raw electrical signal carry out rectification after, the series of pulses in gained waveform
120、121、122、123.Pulse 120 and pulse 121 correspond to the broad pulse of bit 0.Pulse 122 and pulse 123 are narrow arteries and veins
Punching, the two indicate bit 1 together.Rising edge 120a, 122a and/or failing edge 120b of pulse 120,121,122,123,
Interval between 122b is used as soft-decision parameter.Specifically, the edge separated at a distance indicates fast card-reading, it is closely spaced
Edge indicate swipe the card at a slow speed.When the spacing on edge is equivalent to or is more than its height, edge is to separate at a distance.When being smaller than for edge
When its height, edge is closely spaced.
Alternatively, rectification is not used, but the signal amplified is carried out by analog-digital converter (ADC) circuit
It samples and is converted into digital signal.Referring to Fig. 7, reading magnetic head module 230 includes reading magnetic head 231, amplifier 232, mould
Number converter (ADC) circuit 233, microcontroller 234 and algorithm 215b.Adc circuit 233 is to the letter caused by amplifier 232
It number is sampled, and is converted into digital signal, as shown in Figure 5.The position at the peak 130 in digital signal is true by algorithm 215b
Fixed, algorithm 215b is realized and is executed by microcontroller 234.Interval between continuous peak is calculated, and is interpreted bit 1 or ratio
Spy 0.These would generally retain more information by sampled data than rectified data, more useful for analysis and diagnosis.
Some microcontrollers can execute AD conversion in one or more input pin.AD converter may be microcontroller as a result,
The component part of device, and it is not necessarily an external circuit.Fig. 5, which is shown, is being amplified original signal in the wave obtained later
Shape.Sampled point 130,131 and 132 is converted into digital value, for processing.For example, 130 be local maximum, can be interpreted
The position at the peak of pulse.Either along detection data or in AD conversion data, before hard decision, one can be provided
Group soft-decision data.The subsequent soft-decision data is used for hard decision, to restore original encoded bit stream.Orbital data
It is encoded using some simple mechanism, to determine whether reading is normal or whether wrong.It is equal to be each encoded character
There are one check bit, to ensure that each character is correctly read.There are one longitudinal check positions for entire track, entire to ensure
Track is correctly read.If there is one or more check errors, then block reading failure, and should be abandoned.
In the present invention, it is exported as auxiliary information about the card using information of error reason.Along detection soft-decision number
In, the interval between is used for the speed that prompt is swiped the card.Wide interval pulse expression is swiped the card soon, and narrow interval pulse then indicates
It swipes the card slow.In AD conversion soft-decision data, the height at interval and peak between peak is used for the speed that prompt is swiped the card.Wide interval
Signal expression is swiped the card soon, and narrow blank signal then indicates to swipe the card slowly.Higher peak, which also illustrates that, swipes the card soon, and lower peak then indicates
It swipes the card slow.It is fed back to the user of card reader about the auxiliary information for swiping speed, user can change in subsequent retry in Card Reader
Speed is swiped into it.
In one implementation, the speed curve diagram 250 swiped the card is generated by application ware, and carries out graphical display, such as schemed
Shown in 8A and Fig. 8 B.Hodograph 250 respectively further comprises speed limit 251 and lower limit 251.Ideally, hodograph 255 should be located
Between speed limit 251 and lower limit 251, as shown in Figure 8 B.In addition, speed of uniformly swiping the card is for decoding the most
Favorably.However common situation is, the speed close to the initiating terminal 255a or end 255b of card reader and card reader middle part
The speed difference of 255c is very big.By checking rate curve 250 on the diagram, user, which can learn how to adjust, swipes speed,
So as to swipe speed uniformly and between speed limit 251 and lower velocity limit 252.
In addition, by analyzing soft-decision data, it may be determined that the position of check errors position.Microcontroller output error position,
It can help operating personnel accurately determine may code error or damage card.One common issue is that, due to operation
Personnel prematurely change the path of card, and at a bad position close to the end of card reader, card is bent or dog-ear.Such as
Fruit soft-decision data includes many mistakes after a certain specified point, then there are operating mistakes for its strong indication.
Several embodiments of the present invention are illustrated above.It should be understood, however, that without departing substantially from this
Under conditions of the spirit and scope of invention, it can be variously changed.Correspondingly, other embodiments are also included in following power
In the range of profit requires.