Position detector

Abstract: A position detector includes a magnetic recording medium on which a prescribed magnetic pattern has been formed, a magnetoresistive element the amplitude value of which varies in response to the magnetic pattern, an amplifier for amplifying the output of the magnetoresistive element, the offset voltage of the amplifier output being variable, and output observing element for observing the output of the amplifier. The offset voltage of the amplifier is set based upon the results of observation provided by the output observing element. Adjustment of the offset voltage is thus set automatically.

Description: Field of the Invention: This invention relates to a position detector as defined in the preamble clause of claim 1 and known from DE-A-4029828. More particularly, this invention relates to a position detector which, by means of linear encoder composed of a scale portion on which a magnetic pattern has been recorded and a detector portion (magnetic head) comprising a magnetoresistive element that is moved along the scale portion to detect the magnetic pattern, is for detecting the position of, say, a carriage (e.g., a carriage carrying the printing head of a serial printer) on which the magnetic head is mounted. Since the position detector of the present invention preferably is applied to detection of carriage position, as set forth above, the invention is described in relation to improvements in a carriage position detector used heretofore. It should be noted, however, that the invention is not limited to such application. Description of the Related Art: Fig. 6 illustrates a prior-art example of a device for detecting the position of a carriage in a serial printer. The position detector includes MR elements (magnetoresistive elements) 11, 12 for reading a magnetic pattern formed on a magnetic recording medium (not shown). The arrangement is such that a constant current is supplied to these elements by operational amplifiers 103, 104 and transistors 105, 106. A differential amplifier 107 amplifies the difference between the outputs of the MR elements 11, 12 at a prescribed amplification factor. Since the outputs of the MR elements are 180° out of phase, the result of amplification by the differential amplifier 107 is a pseudo-sinusoidal signal output that resembles a sine wave. An inverting amplifier 108 amplifies the output of the differential amplifier 107 to a prescribed magnitude. The + input terminals of the amplifiers 107 and 108 are biased to prescribed values by resistors R1, R2 of identical resistance and a variable resistor VR1, respectively. The magnitude of the offset voltage of the output from the inverting amplifier 108 preferably is one-half the power-supply voltage, i.e., 1 / 2Vdd, in order that the maximum amplitude voltage of the inverting amplifier 108 may be utilized effectively, i.e., in order that the dynamic range will not be reduced. However, owing to a variance in the difference between the resistance values of the MR elements 11, 12 and in the input offset voltages possessed by the operational amplifying elements used in the differential amplifier 107 and inverting amplifier 108, the offset voltage of the inverting amplifier 108 differs for each circuit. Accordingly, a process for regulating the variable resistor VR1 is essential in the prior art. Further, the amplitude value of the output of inverting amplifier 108 also differs somewhat from one circuit to another owing to a variance in the difference between the resistance values of the MR elements 11, 12 and in sensor sensitivity. The output of this circuit is converted into a pulse signal by a comparator, which is the next stage. In order to obtain a stable pulse signal, it is undesirable if the amplitude value of the circuit output is too large or too small. Accordingly, in the prior art, difficulties caused by the aforementioned individual differences from one circuit to another are avoided by using MR elements suited to the prescribed output range. As a result, this has significant effects at the time of mass production of the MR elements and is an impediment to a reduction in the cost of the manufactured item. DE-A-4029828 discloses an apparatus for measuring the torque of a rotating shaft which delivers an offset corrected signal for e.g. an electric power steering apparatus, which is controlled in accordance with this signal. The signal from a torque sensor is A/D converted and the offset is numerically calculated. With the result of this calculation the value of the torque signal is corrected and outputted for further processing. SUMMARY OF THE INVENTION According, an object of the present invention is to provide a position detector in which adjustment of offset voltage is made unnecessary and amplifier dynamic range is capable of being utilized to the maximum extent. Another object of the present invention is to provide a position detector capable of dealing flexibly with a variance in the output of an MR element. A further object of the present invention is to provide a position detector in which adjustment of offset voltage is made unnecessary, amplifier dynamic range is capable of being utilized to the maximum extent and variance in the output of an MR element is capable of being dealt with in a flexible manner, the position detector being particularly suited to a serial printer having carriage on which MR elements are mounted. According to the present invention, the foregoing objects are attained for a position detector of the type under discussion with the characterizing features of claim 1. As a result, by making it possible to automatically set the adjustment of offset voltage, adjustment is not longer required. In addition, the dynamic range of the amplifier can be utilized to the maximum extent and it is possible to deal flexibly with a variance in the characteristics of the magnetoresistive element. Preferred embodiment are defined in the subclaims. In the following, the present invention will be described in conjunction with the accompanying drawings, in which similar reference characters designate similar parts throughout the Figures thereof. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram illustrating an embodiment of a position detector according to the present invention; Fig. 2 is a detailed circuit diagram showing the position detector of Fig. 1; Fig. 3 is a diagram showing the output signal of the position detector; Fig. 4 is a flowchart showing an example of control of the position detector; Fig. 5 is an external perspective view showing an example in which the position detector is applied to a serial printer; and Fig. 6 is a circuit diagram of a position detector according to the prior art. DESCRIPTION OF THE PREFERRED EMBODIMENT An embodiment of the present invention will now be described in detail. Fig. 1 is a block diagram illustrating an embodiment of a position detector according to the present invention. The position detector includes a magnetic head 1 comprising such components as an MR (magnetoresistive) element. The magnetic head 1 is brought into contact with a magnetic recording medium 2 magnetized at equal intervals in the longitudinal direction of a bar member, for example, and outputs an electric signal by being moved relative to the recording medium 2 in the direction of arrow K while the aforementioned contact is maintained. As will be described later, the magnetic head may be provided with two MR elements, namely first and second MR elements, or may be constructed as a single MR element, as illustrated. A constant-current circuit 3 is connected to the magnetic head 1 and supplies the magnetic head 1 with a prescribed current based upon the output voltage B of a D/A converter 6, and is connected to an amplifier 4 that amplifies the output signal of the magnetic 1 to a prescribed magnitude. The amplifier 4 is adapted to vary the offset voltage of its output based upon an output voltage A from the D/A converter 6, described below. A comparator 5 changes the output signal of the amplifier 4 to a pulse signal. A controller 10 comprises a CPU, a ROM·RAM and an I/O port circuit. The I/O port is used for input and output with respect to the D/A converter 6 and an A/D converter 7. On the basis of a command from the controller 10, the D/A converter 6 outputs set voltages that decide the current value of the constant-current circuit 3 and the offset voltage of the amplifier 4. The A/D converter 7 converts the analog output signal of the amplifier 4 to a digital signal and transmits the signal to the controller 10 as digital information. As shown in Fig. 2, a first MR element 11 and a second MR element 12 are connected to construct an arrangement corresponding to the magnetic head 1 of Fig. 1. Numerals 13, 14 denote operational amplifiers, and 15, 16 designate transistors. These correspond to the constant-current circuit 3 shown in Fig. 1. Numeral 17 denotes a differential amplifier and 18 an inverting amplifier. These correspond to the amplifier 4 in Fig. 1. The elements 11 ∼ 18 used may correspond to the elements 103, 104, 105, 106, 107, 108 of the conventional arrangement shown in Fig. 6. What distinguishes the arrangement of the present invention from that of the prior-art example may be summarized as follows, with reference to Fig. 2: (1) The output voltage A of the D/A converter 6, and not a voltage divided by a variable resistor, is connected to the + input terminal (the non-inverting input terminal) of the inverting amplifier 18. (2) The output voltage B of the D/A converter 6, and not a voltage divided by a resistor as in the prior art, is connected to the + input terminal of the operational amplifiers 13 and 15. Control performed by the controller 10 will now be described with reference to both Figs. 1 and 2. First, the controller 10 sets the offset voltage of the amplifier 4 and the current value of the constant-current circuit 3 to appropriate initial values by the outputs A, B of the D/A converter 6. The output signal from the amplifier 4 is observed via the A/D converter 7. Fig. 3 is a waveform diagram showing the output signal monitored via the A/D converter 7. In Fig. 3, V H , V L , V S and V O represent maximum value, minimum value, amplitude value and offset voltage, respectively. Though V H and V L can be monitored using a peak-hold circuit or the like, a more simple arrangement is to sample the output signal a number of times by the A/D converter 7, whereby the maximum and minimum values can be obtained. Further, V O can be obtained from the average of V H and V L or from the average of all sampled values. Similarly, V S can be obtained from the difference between V H and V L . The output voltage A of the D/A converter 6 is raised if V O is greater than a stipulated value and lowered if V O is less than the stipulated value. Thus, adjustment is performed in such a manner that V O becomes the stipulated value. Similarly, with regard to V S , the output voltage B of the D/A converter 6 is raised or lowered to increase or decrease the current value in such a manner that V S will attain a stipulated value. It should be noted that the stipulated value of V S is selected to be a value that will allow the dynamic range of the amplifier to be utilized to the maximum extent. Fig. 4 is a flowchart illustrating the control described above. When power is introduced to the apparatus to drive the magnetic head, the output voltages A, B of the D/A converter 6 are set to suitable initial values (step S1). Next, the output signal of the amplifier 4 is sampled by the A/D converter 7 (step S2). On the basis of the value obtained by this sampling operation, V O and V S are obtained by calculation, as described above (step S3). Next, it is determined whether the value of V O is greater than, less than or approximately equal to a stipulated value (step S4). If the value of V O is greater than the stipulated value, the output A of the D/A converter 6 is raised (step S5). If the value of V O is less than the stipulated value, the output A of the D/A converter 6 is lowered (step S6). If the value of V O is approximately equal to the stipulated value, then the program proceeds to step S7. Here it is determined whether V S is greater than, less than or approximately equal to a stipulated value. If the value of V S is greater than the stipulated value, the output B of the D/A converter 6 is raised (step S8). If the value of V S is less than the stipulated value, the output B of the D/A converter 6 is lowered (step S9). More reliable results can be obtained by repeatedly executing the processing of steps S2 ∼ S9. In accordance with the foregoing embodiment as described above, it is possible to obtain an excellent position detector wherein the need to adjust the offset voltage, which is necessary in the prior art, can be eliminated by a setting performed automatically on the side of the apparatus. In addition, the position detector obtained makes it possible to utilize the dynamic range of the amplifier to the maximum extent. Furthermore, in a case where the current value of the constant current also is adjusted, it is possible to deal flexibly with a variance in the output of the MR sensors. Fig. 5 is an external perspective view showing an example in which the position detector is applied to a serial printer. As shown in Fig. 5, the printer includes a carriage 21, which is indicated by the dashed line, that moves in the direction of arrow K as a feed screw 26 rotates. Carried on the carriage 21 is a recording head 22 which, while being moved in the direction of arrow K, records dots at a prescribed pitch P on paper 25 wound upon the outer peripheral surface of a platen 23. This is a serial recording operation of a so-called serial recording printing system. In order to carry out this recording operation, it is required that the movement of the carriage 21 and the recording operation of the recording head 22 (e.g., an ink jetting operation in an ink-jet recording system) be synchronized accurately. Accordingly, a magnetic recording medium 2, on which a magnetic pattern has been formed by magnetization at equal intervals in the longitudinal direction, is provided on a base 20 of the printer so as to lie parallel to the feed screw 26. The magnetic head 1, which is moved in the direction of arrow K while in contact with the magnetic pattern on the magnetic recording medium 2, is provided on the carriage 21. The magnetic head 1 is connected to the controller 10 of the position detector, which is secured to the base 20, via a flexible cable 24 that flexes as the carriage 21 moves. If the offset voltage in the above arrangement is adjusted when, say, the manufactured product is shipped, the adjustment is performed automatically, in the manner described above, as the carriage 21 is driven. This makes it possible to eliminate the adjustment time necessary at the time of shipping of the conventional printer. In addition, it is possible to utilize the amplifier dynamic range to the maximum extent. In a case where two MR elements, namely the first and second MR elements, are provided, use is possible even if there is some variance in the characteristics of the individual elements. It should be noted that the present invention is not limited to the illustrated embodiment but can be modified in various ways. The invention is applicable to devices other than serial printers. That is, the invention is broadly applicable to devices requiring accurate positioning in the driving operation. Such devices include an XY plotter in which a recording head travels in longitudinal and transverse direction, and a pen recorder in which recording is performed by a pen while the pen is moved at high speed. As many apparently widely different embodiments of the present invention can be made without departing from the scope thereof, it is to be understood that the invention is not limited to the specific embodiments thereof except as defined in the appended claims.

Claims: A position detector comprising: a magnetic recording medium (2) on which a magnetic pattern, recorded on at a prescribed pitch, is formed in a longitudinal direction; a magnetoresistive element (1) arranged so as to move along the magnetic pattern and having a resistance value which varies in dependence upon reading of the magnetic pattern (2); signal generating means for generating an electric signal that conforms to the variation in the resistance value of said magnetoresistive element (1); and an amplifier (4) for amplifying the electric signal from said signal generating means, outputting the amplified signal and varying an offset voltage of this amplified output; characterized by comprising: output observing means (7, 10) for observing the amplified output of said amplifier and producing a signal indicative of the result, said output observing means including sampling means for sampling the amplified output of said amplifier, thereby detecting a maximum value and a minimum value of said amplified output and outputting a result of detection; calculating means for calculating the offset voltage of said amplifier based upon the result of detection from said sampling means; wherein said output observing means further include amplitude calculating means for calculating the amplitude of the amplified output of said amplifier from the maximum value and minimum value; and wherein said position detector further comprise constant current supply means (3) for supplying said magnetoresistive element with a constant current, the value of the supplied constant current being variable; amplitude regulation means for regulating the amplitude of the amplified output of said amplifier by adjusting supply of current from said constant current supply means in dependence upon the amplitude calculated by said amplitude calculation means; and adjusting means for adjusting the offset voltage based upon the result, obtained from said output observing means, of observing the amplified output. A position detector according to claim 1, wherein said amplifier has an input terminal for varying an offset voltage of the amplifier output signal, and wherein said output observing means has an A/D converter for A/D converting the output of said amplifier, sampled by said sampling means, and supplying the A/D converted output to said calculating means, further wherein said adjusting means has an D/A converter for D/A converting a signal indicating the output from said output observing means and outputting the D/A converted signal into the input terminal of said amplifier. A position detector according to claim 1, wherein said constant current supply means has an input terminal, and wherein said amplitude regulation means has a D/A converter for D/A converting a signal corresponding to the amplitude calculated by said amplitude calculating means and supplying the D/A converted signal into the input terminal of said constant current supply means. A position detector according to claim 2, wherein said magnetoresistive element includes first and second elements, and wherein said amplifier has a differential amplifier which inputs electric signals corresponding to change of resistance values of the first and second elements and an inverting amplifier which inputs output from said differential amplifier and the output from said output observing means via the D/A converter. Use of the position detector as claimed in any one of the claims 1 to 4 in a recording apparatus.

Inventors: SUZUKI NORIYUKI, SUZUKI, NORIYUKI, SUZUKI, NORIYUKI, C/O CANON K.K.
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1994
Main classification: G01D3
IPC codes: G01D3, G01D5, B41J19