Method and apparatus for detecting a reference position of a rotating scale with two sensors
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     This invention relates to a method and an apparatus for detecting a reference position of a rotating scale, and more particularly, to a method and an apparatus for detecting a reference position used for a rotary encoder for reading the displacement of a grating formed along the circumferential direction of a rotating scale. 
     Heretofore, as a measuring instrument which can measure the displacement of an object to be measured in the unit of submicrometers, there has been known an optical encoder in which a laser beam is irradiated on a diffraction grating (scale) linked to an object to be measured, an interference light is formed by superimposing a pair of diffracted lights produced by the diffraction grating with each other, and the displacement of the diffraction grating, that is, the displacement of the object to be measured is measured according to a signal obtained by photoelectrically converting the interference light. 
     The present applicant has disclosed a method for detecting a reference position (an origin) of a scale in this kind of encoder in Japanese Patent Public Disclosure (Kokai) No. 62-200223 (1987). In the method disclosed by this publication, a mark for detecting a reference position formed on a scale is optically detected, and the reference position of the scale is detected with a very high resolution. Although this method can be applied to a linear scale and a rotary scale, our investigations show that problems sometimes arise, especially when this method is applied to a rotary scale mounted to a small rotating mechanism. 
     In the method disclosed by the above-described publication, a mark, or marks, consisting of a rectangular reflective film is, for example, provided on a rotating scale, and a rectangular or an elliptic beam spot extended in the direction of the radius of the scale is formed on the scale by irradiating a laser beam on the scale. A reflected light beam produced when the mark crosses the beam spot is then detected by two photosensors disposed in different positions so that detection timings for the reflected light beam are different to each other, levels of output signals from the two photosensors are compared with each other, and the reference position of the scale is detected with excellent accuracy based on the levels of the output signals. 
     However, if a deviation of the scale or an inclination due to a slanting of the rotation shaft occurs in the rotating scale during its rotation, the detection timings for the reflected light by the two photodetectors shift in the same manner, as shown in FIG. 1, FIG. 2 and FIG. 3, and the reference position is misdetected. 
     In FIGS. 1 and 2, there is shown a laser diode 1, a collimating lens 2, a half-mirror 3, a cylindrical lens 4, a rotating scale 5, a mark 6 for detecting a reference position, a rotation shaft 7 of the rotating scale 5, and photosensors 8 and 9. Light from the laser diode 1 is made a parallel light by the collimating lens 2, and the parallel light is directed to the half-mirror 3. The parallel light reflected by the half-mirror 3 is converted into a linear light beam by the cylindrical lens 4, and a linear beam spot extended in the direction of the radius of the scale is formed on the scale 5. When the mark 6 passes through the linear spot, the light beam reflected by the mark 6 is directed to the photosensors 8 and 9 via the cylindrical lens 4 and the half-mirror 3. 
     The mark 6, the linear beam spot and the photosensors 8 and 9 are set so that levels of output signals A and B from the photosensors 8 and 9 coincide with each other only when the center line of the mark 6 and the center line of the linear beam spot coincide with each other, and detection of the reference position of the rotating scale 5 is performed according to a coincidence of output signals A and B from the photosensors 8 and 9. Now, if the rotating scale 5 shifts 0.5 μm in the direction of the X--X&#39; axis which orthogonally crosses the rotation shaft of the scale and is displaced from the position indicated by the full line to the position indicated by the dotted line, as shown in FIG. 1, detection timings of the reflected light beam from the rectangular mark 6 on the rotating scale 5 by the photosensors 8 and 9 shift as shown in FIG. 3. That is, the timing t 1  at which levels of the output signals A and B of the photosensors 8 and 9 coincide with each other shifts to t 1  &#39;. Pulses depicted at an upper portion of FIG. 3 are reference (origin) signals corresponding to the reference position of the scale 5, produced according to a coincidence of levels of the output signals A and B. The reference signal is misdetected by the deviation of the scale 5. 
     The shift from the timing t 1  to the timing t 1  &#39; corresponds to the shift of the reference position of the scale 5 by 0.5 μm along the circumferential direction of the scale 5. Hence, when the diameter of the scale 5 is 20 mm, an error of {tan -1  (0.5/10000)×3600}≅ about 10 angular seconds is produced. 
     On the other hand, if the rotation shaft 7 of the scale 5 is slanted to tilt the scale 5 as shown in FIG. 2, the incident positions of the light beam reflected by the mark 6 on the photosensors 8 and 9 are shifted, and output timings of the output signals A and B from the photosensors 8 and 9 are shifted. For example, when a lens having a focal length f=5 mm is used as the cylindrical lens 4, the error in detecting the reference position becomes tan -1  {5×tan (1/60×2)/10}×60=20 angular seconds, for the tilt of the rotation shaft 7 of 20 angular seconds. 
     In general, when a rotating scale is mounted to a small rotating mechanism using a bearing and the like, it is very difficult to prevent deviation of the shaft of 0.5 μm or less, or prevent slanting of the shaft of 10 angular seconds or less. 
     Accordingly, in conventional methods, it is difficult to exactly detect a reference position of a rotating scale. 
     SUMMARY OF THE INVENTION 
     It is an object of the present invention to solve the problems of the prior art. 
     It is another object of the present invention to provide a reference-position detection method and a reference-position detection apparatus always capable of exactly detecting a reference position of a rotating scale. 
     In accordance with one aspect of the invention, a reference-position detection method for detecting a reference position of a scale comprises the steps of (1) supplying the first and second patterns to the scale, (2) detecting the first pattern with a first detection sensor and detecting the second pattern with a second sensor, wherein the timings detected by the first and second sensors are different from each other, with the first and second patterns and the first and second sensors being arranged so that detection timings of the first and second patterns shift inversely to each other in response to a deviation in attitude of the scale from its predetermined attitude, and (3) determining the reference position of the scale according to the detection made in the detection step. 
     In accordance with another aspect of the invention, a reference-signal detection apparatus for detecting a reference position of a scale using first and second patterns provided on the scale comprises (1) first detection means for detecting the first pattern, and (2) second detection means for detecting the second pattern with a detection timing different than a detection timing of the first pattern detected by said first detection means, said first and second detection means being arranged so that detection timings of said first and second patterns shift inversely to each other in response to a deviation in attitude from a predetermined attitude of the scale, and wherein the reference position of the scale is determined in accordance with output signals of said first and second detection means. 
     In accordance with a further aspect of the invention, a reference-position method used in a rotary encoder for detecting a reference position of a rotating scale of the encoder comprises the steps of (1) supplying first and second patterns to the rotating scale so that a line connecting the patterns substantially passes through the center of said rotating scale, and one pattern is situated at a side opposite to another pattern relative to said center of rotation, (2) detecting the first pattern with a first sensor and the second pattern with a second sensor, with the detection timings of the first and second sensors being different from each other, said first and second sensors being arranged so that detection timings of the first and second patterns shift inversely to each other in response to a change in attitude of the rotating scale, and (3) determining the reference position of the rotating scale according to the detection made in the detection step. 
     In accordance with yet a further aspect of the invention, a reference-position detection apparatus used in a rotary encoder for detecting a reference position of a rotating scale using first and second patterns supplied to the rotating scale of the encoder so that the line connecting the patterns substantially passes through the center of rotation of the rotating scale, and one pattern is situated at a side opposite to another pattern relative to the center of rotation, comprises (1) illuminating means for illuminating the rotating scale by first and second radiant beams, said first and second radiant beams being directed to the scale so that the line connecting respective incident positions of the radiant beams on the rotating scale substantially passes through the center of rotation, and one of the radiant beams is incident on a side opposite to another radiant beam relative to the center of rotation, (2) a first sensor for receiving the first radiant beam reflected from the first pattern and for generating a first signal with a level which changes in accordance with a change in the relative position of the first pattern relative to the first radiant beam, and (3) a second sensor for receiving the second radiant beam reflected from the second pattern and for generating a second signal with a level which changes in accordance with a change in the relative position of the second pattern relative to the second radiant beam, said second signal being generated with a timing different from that of the first signal, and the reference position of the rotating scale being determined in accordance with levels of the first and second signals coinciding, and wherein the first and second sensors are provided so that generation timings of the first and second signals shift inversely to each other in response to a change in attitude of the rotating scale. 
     In a further aspect of the invention, a reference-position detection means for detecting a reference position of a scale comprises the steps of (1) supplying first and second patterns to the scale, (2) detecting the first pattern with a first sensor and generating a first signal, (3) detecting the second pattern with a second sensor and generating a second signal with the first and second patterns, the first and second sensors being arranged so that detection timings of the first and second patterns shift inversely to each other in response to a deviation in attitude of the scale from a predetermined attitude, and (4) determining the reference position of the scale in accordance with the first and second signals coinciding. 
     In yet another aspect of the present invention, a reference-position detection method for detecting a reference position of a scale using predetermined patterns formed on a scale comprises the steps of (1) generating first and second signals with respective predetermined timings by detecting the predetermined patterns, wherein the timings for generating the first and second signals shift inversely to each other in response to a change in attitude of the scale, and (2) determining the reference position according to the first and second signals. 
     In accordance with an additional aspect of the invention, a displacement measuring apparatus, such as an encoder, for generating an incremental signal by reading a gradation formed on a scale comprises detection means for detecting a pattern formed on the scale and generating a signal indicating a reference position of the scale, a displacement of the scale being monitored according to the signal and the incremental signal, and wherein said detection means is capable of compensating for a variation in the reference position as a result of a change in attitude of the scale. 
     The various features, concrete methods and configurations of the present invention will become more apparent from the embodiment to be described later. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIGS. 1 and 2 are explanatory diagrams showing a conventional method for detecting a reference position; 
     FIG. 3 is a graphic diagram for showing a problem in the conventional method for detecting a reference position; 
     FIGS. 4A-4D are schematic diagrams showing an embodiment of the present invention; and 
     FIGS. 5A-5C are graphic diagrams for showing the effect according to the method of the present invention. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     FIGS. 4A and 4B are schematic diagrams showing an embodiment of the present invention. FIG. 4A shows the configuration of an optical system, and FIG. 4B shows the arrangement of a mark pattern for detecting a reference position on a rotating scale. FIG. 4C is a partial schematic diagram which sees the optical system shown in FIG. 4A from the direction Y&#39;--Y in FIG. 4A. FIG. 4D is an explanatory diagram showing the detection principle of the mark pattern by the optical system shown in FIG. 4A. 
     A laser diode is used for a light source 1 in this case. A collimating lens 2 makes the laser light beam from the light source 1 a parallel light beam. A beam splitter 3a divides the light beam from the collimating lens 2 into two light beams. There is also shown a reflecting mirror 10 and beam splitters 3b and 3c. A rotating scale 5, as an object to be detected, along the circumferential direction of which a diffraction grating 100 is formed, is rotated making the center O of a rotating shaft 7 the center of rotation. 
     Cylindrical lenses 4a and 4b, generatrices of which nearly coincide with the direction of the radius of the rotating scale 5, focus light beams from the beam splitters 3b and 3c in the circumferential direction (tangential direction) of the rotating scale 5, shape the beams into an elliptical shape extended in the direction of the radius of the rotating scale 5, and irradiate the beams perpendicularly on portions separated from each other on the rotating scale 5. Patterns 6a and 6b for detecting the reference (origin) position consist of rectangular reflecting films made of Al, Au or the like, and are disposed facing each other relative to the center O of rotation on a straight line passing through the center O of rotation of the rotating scale 5, as shown in FIG. 4B. The patterns 6a and 6b are provided so as to be located on radii (distances from the center O) r a  and r b , respectively. Photosensors 8 and 9 have photosensing members having an identical size, and receive the light beams reflected by the rectangular patterns 6a and 6b via the cylindrical lenses 4a and 4b and the beam splitters 3b and 3c, respectively. In the present embodiment, as shown in FIG. 4C the photosensors 8 and 9 are disposed by being shifted to the same side relative to the optical axis 11 of the cylindrical lenses 4a and 4b. The distances from the optical axis 11 to the centers of photosensors 8 and 9 are equal to each other. The cylindrical lenses 4a and 4b have the same focal length, and are diposed so that they form beam spots which have the same dimensions and shape on the rotating scale 5. The mark patterns 6a and 6b also have the same dimensions. The widths of the mark patterns 6a and 6b in the direction of their movements are set to about 1/2 of the widths of the beam spots. Accordingly, as shown in FIG. 4D, if the mark pattern 6b passes through, for example, the corresponding beam spot while moving from the right to the left in FIG. 4D, the amount of light incident upon the photosensor 9 gradually increases from the moment when the left-side edge of the mark pattern 6b passes through the optical axis 11, reaches the maximum value when the mark pattern 6b passes through a predetermined position, and subsequently decreases as the mark pattern 6b leaves the predetermined position. 
     In FIG. 4C, if the rotating scale 5 is rotating so that the mark pattern 6b moves from the right to the left in FIG. 4C near the optical axis 11, the mark pattern 6a moves from the left to the right in FIG. 4C near the optical axis 11. As described above, the light beam reflected from the mark pattern 6b starts being incident upon the photosensor 9 from the position where the mark pattern 6b verges on the optical axis 11. On the other hand, since the mark pattern 6a is situated at a side opposite to the mark pattern 6b relative to the center O of rotation of the rotating scale 5, the light beam reflected from the mark pattern 6a starts being incident upon the photosensor 8 from the moment when the mark pattern 6a is situated at a position separated from the optical axis 11. Accordingly, the detection timings of the mark patterns 6a and 6b by the photosensors 8 and 9 are shifted to each other, and the photosensor 8 starts generating a photoelectric conversion signal earlier than the photosensor 9 does. 
     Now, in FIG. 4D, if the rotating scale 5 is shifted, for example, to the left, the mark pattern 6b approaches the optical axis 11 although the rotating scale 5 have not rotated a predetermined amount. Hence, the timing for the light beam reflected from the mark pattern 6b to be incident upon the photosensor 9 is advanced. At this time, since the mark pattern 6a is shifted to a direction being separated from the optical axis 11, the timing for the light beam reflected from the mark pattern 6a to be incident upon the photosensor 8 is delayed. Accordingly, as will be described later, the detection timings of the mark patterns 6a and 6b by the photosensors 8 and 9 are shifted in reverse directions to each other. The situation is identical when the rotating scale 5 is tilted due to slanting of the rotation shaft 7. 
     As described above, in the present embodiment, laser light beam from the light source 1 is made a nearly parallel light beam by the collimating lens 2, the light beam is directed to the cylindrical lenses 4a and 4b disposed at sides opposite to each other relative to the rotation shaft 7 via the beam splitters 3a, 3b and 3c and the mirror 10, and two elliptic beam spots are formed on portions separated from each other on the rotating scale 5 by the cylindrical lenses 4a and 4b. Photosensing timings (pattern detection timings) of respective reflected beams produced when the rectangular patterns 6a and 6b provided on the rotating scale 5 pass through respective beam spots by the photosensors 8 and 9 are shifted to each other. FIG. 5A is an explanatory diagram showing output signals A and B obtained from the two photosensors 8 and 9 at this time. The photosensor 8 starts detecting the pattern 6a from the time t A , and the photosensor 9 starts detecting the pattern 6b at the time t B . At this time, the time t 1  corresponding to the cross point (a point where levels of the two output signals coincide with each other) of the illustrated curves of the output signals A and B corresponds to the reference position (origin point) of the rotating scale 5. 
     The levels of output signals from the photosensors 8 and 9 change in accordance with the positional relationship between the beam spot on the scale 5 corresponding to the one photosensor 8 and the pattern 6a, and the positional relationship between the beam spot on the scale 5 corresponding to the other photosensor 9 and the pattern 6b. 
     Now, if the center O of the rotating scale 5 is deviated in the direction of the X--X&#39; axis as shown in FIG. 1, the photosensing timing of the photosensor 8 delays to produce the signal A 2  as shown in FIG. 5B. On the contrary, the photosensing timing of the photosensor 9 advances to produce the signal B 2 . As a result, respective signal outputs as shown in FIG. 5B can be obtained. At this time, the time t 2  corresponding to the cross point of the output signals A 2  and B 2  becomes identical to the time t 1  in FIG. 5A. 
     Similarly, when slanting of the rotation shaft 7 such that the rotating scale 5 rotates around the Y--Y&#39; axis occurs, the photosensing timing of the photosensor 8 delays to become the time t A3 , but the photosensing timing of the photosensor 9 advances to become the time t B3 , as shown in FIG. 5C. As a result, the time t 3  corresponding to the cross point of the signal outputs A 3  and B 3  becomes identical to the time t 1  in FIG. 5A. 
     That is, in any case, the time corresponding to the cross point of the signals A and B from the photosensors 8 and 9 does not change. 
     Particularly, in the present embodiment, a light beam from the single light source 1 is divided into two light beams, which are directed to respective detection systems (3c, 4b, 6b and 9: 3b, 4a, 6a and 8). Hence, the present embodiment has the feature that if the light emission intensity of the light source 1 changes, the detection timing never shifts as shown in FIG. 5C. 
     As described above, in the present embodiment, by separately providing the rectangular patterns 6a and 6b at predetermined positions on the line passing through the center O of rotation on the rotating scale 5 and disposing the two photosensors 8 and 9 with being shifted to each other at the same side from the optical axis 11 of the cylindrical lenses 4a and 4b, an error produced when detecting the reference position (origin position) is removed using output signals obtained from the two photosensors 8 and 9 even if the rotating scale is displaced from a normal state (position), and hence highly accurate detection becomes possible. Although, in the present embodiment, the positions of the photosensors 8 and 9 are shifted from the optical axis 11, the photosensors 8 and 9 may be disposed so that their centers coincide with the optical axis 11, and the patterns 6a and 6b may be formed at positions shifted by a predetermined amount to each other at the same side relative to a line passing through the center O of rotation. 
     In the present embodiment, the distances from the center O of rotation of the two rectangular patterns 6a and 6b are slightly changed from each other for the purpose of obtaining one reference-position signal for every rotation of the rotating scale 5. The patterns 6a and 6b are disposed so that the reflected light beams from the patterns 6a and 6b are received only by separate photosensors 8 and 9, respectively. 
     The diffraction grating 100 formed on the rotating scale 5 is a gradation scale for detecting the amount of rotation of the rotating scale 5, and is read by a scale-reading apparatus (not illustrated). Signals from the photosensors 8 and 9 are also input to a processing circuit within this apparatus. In this circuit, a reference signal corresponding to the reference position of the rotating scale 5 is generated according to the coincidence of levels of the respective signals. According to the reference signal, an absolute signal indicating the absolute position of the rotating scale can be formed from an incremental signal obtained by reading the diffraction grating 100. 
     Reading of the diffraction grating 100 is performed by irradiating a laser beam on the diffraction grating 100, having+1st-order diffraction light beams generated by the diffraction grating 100 interfere with each other, and performing photoelectric conversion of an interference light formed by the interference. By the photoelectric conversion, pulses are sequentially generated in accordance with the displacement (rotation) of the diffraction grating 100, and incremental signals are provided. Since the configuration of a scale-reading apparatus which performs such a reading is shown, for example, in the above-described Japanese Patent Public Disclosure (Kokai) No. 62-200223 (1987), a detailed explanation thereof will be omitted in the present application. 
     An incremental encoder provided with a scale and a reading apparatus of this kind performs displacement measurement with an extremely high resolution. The reference-position detection method and apparatus according to the present invention can sufficiently exhibit their performances even when used in such an encoder. 
     Although, in the embodiment shown in FIGS. 4A and 4B, the patterns for detecting the reference position are reflective patterns formed by reflective films made of Al, Au or the like, transparent patterns the circumferences of which are surrounded by reflective films or light-absorbing films may be provided. Furthermore, the shape of the patterns is not limited to a rectangular shape, but the patterns may have various shapes, such as a circular shape and the like. Three-dimensional marks may also be provided. 
     Moreover, magnetized patterns which are magnetized in a predetermined direction may also be used with other optical patterns of this kind. Detection of the magnetized patterns may be performed by a magnetic sensor. In addition, the scale as an object is not limited to an optical scale as shown in FIGS. 4A and 4B. Accordingly, for the gradation scale, a magnetic scale as well as an optical scale having many aligned slits may be used, as well as not using a diffraction grating at all. 
     As described above, the present invention may be practiced in various forms, and is not limited to the aspects illustrated in the present embodiment.