Abstract:
A slotted rotor is fixed to a manual shaft operatable by using a shift lever. The slotted rotor is turnable in a restricted angle about the manual shaft. The rotor has a slot in arc segment a, slots in arc segment b, slots in arc segment c, slots in arc segment d, and slots in arc segment e that are arranged concentrically about the manual shaft, in that order starting from the manual shaft. As the rotor turns, the slots in arc segments d, e cause incremental pulses to be generated. Based on the number of pulses, a control unit detects deviation from the planned neutral position and establishes a correct neutral position. The position detecting apparatus and method make it easy for a worker to perform the neutral position alignment of a neutral start switch and to maintain the alignment after the switch has been mounted.

Description:
BACKGROUND OF THE INVENTION 
     The invention relates to a position detecting apparatus for detecting the position of a shift lever of a vehicle and a position detecting method using the apparatus, and more particularly to a position detecting apparatus that has a learning function enabling the setting of the correct neutral (&#34;N&#34;) position by using the learning function of a control unit, and a position detecting method using the apparatus. 
     DESCRIPTION OF RELATED ART 
     A conventional switch for detecting the position of a vehicular shift lever employs a structure described in, for example, Japanese patent application publication No. HEI 6-280973. The position detecting switch is mounted on the casing of an automatic transmission by inserting a rotative shaft rotatable together with the operation of a shift lever into a through hole formed in the casing of the automatic transmission and then fitting a position detecting switch into the rotative shaft while aligning the rotative shaft with a through hole formed in the switch. 
     When the switch is fitted on the rotative shaft, a pivotable member of the switch couples to the rotative shaft to become pivotable together with the rotative shaft. The position detecting switch is then turned about the rotative shaft until the pivotable member is aligned with a predetermined position of the position detecting switch (for example, the center of the &#34;N&#34; range). The position detecting switch is then fixed to the automatic transmission casing in the aligned position by a bolt or the like. 
     However, since the conventional art described above requires a worker to align and fix the position detection switch when mounting the position detecting switch on the automatic transmission casing, the art takes many manhours. In addition, since the position detecting switch is aligned and fixed according to a determination by the worker, the conventional art makes it difficult to achieve exact alignment of the detecting switch, leading to precision deterioration. 
     SUMMARY OF THE INVENTION 
     Accordingly, it is an object of the invention to provide a position detecting apparatus that eliminates the problems stated above, that is, eliminates the need to align the detecting switch when mounting it on an automatic transmission casing, so as to reduce the required manhours and improve precision, and to provide a position detecting method using the apparatus. 
     (1) According to an aspect of the invention, there is provided a position detecting apparatus comprising means for detecting a signal indicating the position of a shift lever; means for outputting incremental pulse signals that increment throughout the entire positional range of the shift lever; and a control unit for establishing a predetermined correct position on the basis of the signal indicating the position of the shift lever and the incremental pulse signals. 
     (2) Preferably, the position detecting apparatus described in the paragraph (1) further comprises memory means for storing various ranges determined within the entire positional range of the shift lever and the predetermined correct position; pulse signal number detecting means for detecting the number of pulse signals generated by shift operation on the basis of the incremental pulse signals; calculating means for calculating a difference between the number of pulse signals generated by a shift from the predetermined correct position to a neighboring range and the number of pulse signals that are generated by a shift from a mounted position to the neighboring range and that are detected by the pulse signal number detecting means; and correcting means for, on the basis of a calculation result provided by the calculating means, correcting the various ranges stored in the memory means so that the mounted position coincides with the predetermined correct position. 
     (3) In the position detecting apparatus described in paragraph (2), it is preferred that the incremental pulse signals comprise two lines of signals that are shifted 90° in phase from each other, and that direction detecting means be provided for detecting a shift direction by using a combination of the two lines of signals, and that the position of the shift lever be detected on the basis of the direction detected by the direction detecting means and the number of pulse signals detected by the pulse signal number detecting means. 
     (4) In the position detecting apparatus described in the paragraph (3), it is preferred that the means for detecting the signal indicating the position of the shift lever and the means for outputting incremental pulse signals that increment throughout the entire positional range of the shift lever comprise a rotor rotatable in accordance with operation of the shift lever; a plurality of groups of slots formed in the rotor; and photosensors arranged on a stationary member corresponding to the groups of slots, the means for outputting incremental pulse signals comprising two outside rows of slots provided in the rotor and the photosensors corresponding to the two outside rows of slots. 
     (5) In the position detecting apparatus according to any one of the paragraphs (1) to (4), the predetermined correct position can be established in more than one of the various ranges. 
     (6) According to another aspect of the invention, there is provided a position detecting method comprising the steps of detecting a signal indicating a position of a shift level and outputting incremental pulse signals that increment throughout the entire positional range of the shift lever; inputting the signal indicating the position of the shift lever and the incremental pulse signals to a control unit; determining a difference between the number of pulse signals generated by a shift from a predetermined correct position to a neighboring range and the number of pulse signals generated from a mounted position to the neighboring range; correcting various ranges stored in memory means on the basis of the difference; and detecting the position of the shift lever on the basis of direction of a shift and the number of pulse signals with reference to the corrected various ranges. 
     (7) In the position detecting method described in the paragraph (6), the predetermined correct position can be established in more than one of the various ranges. 
     With the simple structure described in the paragraph (1) comprising means for detecting a signal indicating the position of a shift lever; means for outputting incremental pulse signals that increment throughout the entire positional range of the shift lever; and a control unit for establishing a predetermined correct position on the basis of the signal indicating the position of the shift lever and the incremental pulse signals, the position detecting apparatus eliminates the need for a worker to perform position alignment when mounting a position detecting switch so that the required manhours can be reduced and the precision can be improved. 
     Further, since the position detecting apparatus described in paragraph (2) further comprises correcting means for correcting the various ranges so that a mounted position will coincide with the predetermined correct position, on the basis of a calculation result provided by the calculating means for calculating a difference between the number of pulse signals generated by a shift from the predetermined correct position to a neighboring range and the number of pulse signals that are generated by a shift from the mounted position to the neighboring range and that are detected by the pulse signal number detecting means, the apparatus eliminates the need for a worker to perform position alignment when mounting a position detecting switch so that the required manhours can be reduced and the precision can be improved. 
     Since the position detecting apparatus described in the paragraph (3) detects the position of the shift lever on the basis of the direction detected by the direction detecting means and the number of pulse signals detected by the pulse signal number detecting means, the apparatus allows for detection of the position of the shift lever with reference to the corrected ranges. 
     With the structure described in the paragraph (4) wherein the means for detecting the signal indicating position of the shift lever and the means for outputting incremental pulse signals that increment throughout the entire positional range of the shift lever comprise a rotor rotatable in accordance with operation of the shift lever; a plurality of groups of slots formed in the rotor; and photosensors arranged on a stationary member corresponding to the groups of slots, and the means for outputting incremental pulse signals comprises two outside rows of slots provided in the rotor and the photosensors corresponding to the two outside rows of slots, the position detecting apparatus allows for increased intervals between the slots formed in the rotor for outputting incremental pulse signals and, therefore, prevention of misdetection by the photosensors. 
     With the structure described in the paragraph (5) wherein the predetermined correct position is provided in each of the various ranges, correction with respect to the position can be performed every time the shift lever is operated, thus maintaining the precise position detection. 
     Since the position detecting method described in the paragraph (6) allows the position detecting switch to be mounted with a rough precision and achieves position alignment simply by operating the shift lever, the method will reduce the required manhours and improve the precision. 
     With the method described in the paragraph (7) wherein the predetermined correct position is provided in each of the various ranges, correction with respect to the position can be performed every time the shift lever is operated, thus maintaining the precise position detection. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The foregoing and further objects, features and advantages of the invention will become apparent from the following description of preferred embodiments with reference to the accompanying drawings, wherein: 
     FIG. 1 is a plan view of a rotor of a position detecting switch according to an embodiment of the position detecting apparatus of the invention; 
     FIG. 2 is a sectional view of the embodiment of the position detecting apparatus of the invention; 
     FIG. 3 indicates output signals from a photosensor according to the embodiment; 
     FIGS. 4(a) to 4(d) illustrate the generation of incremental pulses from the photosensor according to the embodiment; 
     FIG. 5 is a plan view of a position detecting switch according to another embodiment of the position detecting apparatus of the invention; 
     FIG. 6 is a flowchart illustrating the operation of setting the position detecting apparatus according to an embodiment; and 
     FIG. 7 is a table showing the number of pulses and shifting direction with respect to positions determined with reference to the &#34;N&#34; position of the position detecting apparatus according to an embodiment. 
    
    
     DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS 
     Preferred embodiments of the invention will be described hereinafter with reference to the accompanying drawings. 
     A position detecting switch using a photosensor according to an embodiment will first be described with reference to FIGS. 1 to 3. A slotted rotor 2 is fixed to a manual shaft 1 of an automatic transmission. The slotted rotor 2 is turnable within a restricted angle about the manual shaft 1, which is operated by using a shift lever. 
     The rotor 2 has a slot 3 in row a, slots 4 (4 1 , 4 2 ) in row b, slots 5 (5 1 , 5 2 ) in row c, slots 6 in row d, and slots 7 in row e that are arranged concentrically about the manual shaft 1, in that order starting from the manual shaft 1. The portion of the rotor 2 other than the slots serves as a light reflector. 
     A base board 12 fixed to a casing 11, corresponding to the slotted rotor 2 carries five photosensors (photointerrupters) 13-17 each of which is composed of a light emitting element and a light receiving element. The photosensors 13-17 are aligned radially to the rotor 2, along a single radius, and positioned where arcs transcribed by the slot 3, the slots 4 (4 1 , 4 2 ), the slots 5 (5 1 , 5 2 ), the slots 6 and the slots 7 intersect the radius, respectively. The output signals from the photosensors are input to a control unit (ECU, that is, a computer). 
     The operation of the position detecting switch will be described. 
     (1) If an array of sensors 13-15 are positioned under the slotted rotor 2 corresponding to the &#34;P&#34; range by rotation of the slotted rotor 2, the light from the light emitting element of the photosensor 13 passes through the slot 3 and is not received by the light receiving element of the photosensor 13, so that the photosensor 13 outputs an OFF signal &#34;0&#34;. In this situation, the photosensor 14 does not face any slot. Therefore, the light from the light emitting element of the photosensor 14 is reflected by the slotted rotor 2 and received by the light receiving element of the photosensor 14, so that the photosensor 14 outputs an ON signal &#34;1&#34;. The light from the light emitting element of the photosensor 15 passes through a slot 5 1  and is not received by the light receiving element of the photosensor 15, so that the photosensor 15 outputs the OFF signal &#34;0&#34;. Thereby, the control unit 18 can determine that the shift lever is in the &#34;P&#34; position. 
     (2) If the manual shaft 1 is turned counterclockwise rotating the slotter rotor 2 until the photosensors 13-15 are positioned relative to the &#34;R&#34; range of the slotted rotor 2, the light from the light emitting element of the photosensor 13 passes through the slot 3 and is not received by the light receiving element of the photosensor 13, so that the photosensor 13 outputs the OFF signal &#34;0&#34;. Because the photosensor 14 does not face a slot, the light from the light emitting element of the photosensor 14 is reflected by the slotted rotor 2 and received by the light receiving element, so that the photosensor 14 outputs the ON signal &#34;1&#34;. Similarly, because the photosensor 15 does not face a slot, the light from the light emitting element of the photosensor 15 is reflected by the slotted rotor 2 and received by the light receiving element, so that the photosensor 15 outputs the ON signal &#34;1&#34;. Thereby, the control unit 18 can determine that the shift lever is in the &#34;R&#34; position. 
     (3) If the manual shaft 1 is further turned counterclockwise moving the slotted rotor 2 until the photosensors 13-15 are positioned relative to the &#34;N&#34; range of the slotted rotor 2, the light from the light emitting element of the photosensor 13 passes through the slot 3 and is not received by the light receiving element of the photosensor 13, so that the photosensor 13 outputs the OFF signal &#34;0&#34;. Similarly, the light from the light emitting element of the photosensor 14 passes through the slot 4 1  and is not received by the light receiving element, so that the photosensor 14 outputs the OFF signal &#34;0&#34;. However, because the photosensor 15 does not face a slot, the light from the light emitting element of the photosensor 15 is reflected by the slotted rotor 2 and received by the light receiving element, so that the photosensor 15 outputs the ON signal &#34;1&#34;. Thereby, the control unit 18 can determine that the shift lever is in the &#34;N&#34; position. 
     (4) If the manual shaft 1 is further turned counterclockwise until the photosensors 13-15 are positioned relative to the &#34;D&#34; range of the slotted rotor 2, the photosensor 13 does not face the slot 3. Then, the light from the light emitting element of the photosensor 13 is reflected by the slotted rotor 2 and received by the light receiving element of the photosensor 13, so that the photosensor 13 outputs the ON signal &#34;1&#34;. Conversely, the light from the light emitting element of the photosensor 14 passes through the slot 4 1  and is not received by the light receiving element, so that the photosensor 14 outputs the OFF signal &#34;0&#34;. Because the photosensor 15 does not face a slot, the light from the light emitting element of the photosensor 15 is reflected by the slotted rotor 2 and received by the light receiving element, so that the photosensor 15 outputs the ON signal &#34;1&#34;. Thereby, the control unit 18 can determine that the shift lever is in the &#34;D&#34; position. 
     (5) If the manual shaft 1, with the slotted rotor 2, is further turned counterclockwise until the photosensors 13-15 are positioned relative to the &#34;3&#34; range of the slotted rotor 2, none of the photosensors 13-15 faces a slot. Then, the light from the light emitting elements of each the photosensors 13-15 is reflected by the slotted rotor 2 and received by their respective light receiving elements, so that the photosensors 13-15 output the ON signal &#34;1&#34;. Thereby, the control unit 18 can determine that the shift lever is in the &#34;3&#34;, position. 
     (6) If the manual shaft 1, with the slotted rotor 2, is further turned counterclockwise until the photosensors 13-15 are positioned relative to the &#34;2&#34; range of the slotted rotor 2, neither of the photosensors 13, 14 faces a slot. Then, the light from the light emitting elements of the photosensors 13, 14 is reflected by the slotted rotor 2 and received by the respective light receiving elements, so that the photosensors 13, 14 output the ON signal &#34;1&#34;. Conversely, the light from the light emitting element of the photosensor 15 passes through a slot 5 2  and is not received by the light receiving element of the photosensor 15, so that the photosensor 15 outputs the OFF signal &#34;0&#34;. Thereby, the control unit 18 can determine that the shift lever is in the &#34;2&#34; position. 
     (7) If the manual shaft 1, with the slotted rotor 2, is further turned counterclockwise until the photosensors 13-15 are positioned relative to the range of the slotted rotor 2, the photosensor 13 does not face the slot 3. The light from the light emitting element of the photosensor 13 is reflected by the slotted rotor 2 and received by the light receiving element, so that the photosensor 13 outputs the ON signal &#34;1&#34;. Conversely, the light from the light emitting element of the photosensor 14 passes through the slot 4 2  and is not received by the light receiving element of the photosensor 14, so that the photosensor 14 outputs the OFF signal &#34;0&#34;. Similarly, the light from the light emitting element of the photosensor 15 passes through a slot 5 2  and is not received by the light receiving element of the photosensor 15, so that the photosensor 15 outputs the OFF signal &#34;0&#34;. Thereby, the control unit 18 can determine that the shift lever is in the &#34;L&#34; position. 
     As described above, the control unit 18 can determine the position of the shift lever by reading the output signals from the photosensors 13-15. 
     According to this embodiment, the slots 6, 7 are arranged at predetermined intervals, radially outside the slots 5. The slots 6 and 7 are arranged to provide a 90° phase shift between the pulses generated thereby. The slots 6 are associated with to the photosensor 16, and the slots 7 are associated with the photosensor 17. 
     As the slot rotor 2 is turned from the &#34;P&#34; position to the &#34;L&#34; position, the photosensors 16, 17 generate pulse signals d, e that are shifted 90° in phase from each other as shown in FIG. 3. Pulses are formed at each rise and fall of the pulse signals. According to this embodiment, 64 pulses are generated for the entire turning range of the shift lever. 
     The generation of the pulses will be described with reference to FIGS. 4(a) to 4(d), which illustrate the generation of incremental pulses from the photosensors according to the embodiment. 
     Referring to FIG. 4(a), a photosensor (photointerrupter) 30 comprises a light emitting diode 31 and a phototransistor 32 that are connected in parallel facing each other. The slotted rotor (not shown) is provided in the light path between the light emitting diode 30 and the phototransistor 31 as previously described. The photosensor 30 is powered by Vcc (5 V). The cathode of the light emitting diode 31 and the phototransistor 32 of the photosensor 30 are grounded via a resistor 33 and a resistor 34, respectively. A signal line A leading from a circuit line between the phototransistor 32 and the resistor 34 is connected to an inverter 35. A signal line B from the inverter is connected to a control unit (not shown). 
     As the slotted rotor (not shown) is turned, the phototransistor 32 switches on and off, depending on whether reflected light is received as discussed above, producing output voltage V through the signal line A as indicated in FIG. 4(b). 
     The inverter 35 converts the output voltage V into a rectangular pulse waveform as indicated in FIG. 4(c). 
     Because the slots 6, 7 of the slotted rotor are arranged to produce a 90° phase shift, the rectangular pulse waveforms as indicated in FIG. 4(c) are generated in such a fashion that the waveforms are shifted 90° in phase from each other as indicated in FIG. 4(d). 
     Because of the two output pulse waveforms, the combination of signals on the &#34;+&#34; side of a predetermined position from the combination of signals on the &#34;-&#34; side always differ from each other, the control unit is able to determine the direction, that is, the &#34;+&#34; direction or the &#34;-&#34; direction. 
     In addition, the number of pulses obtained by counting the rise and fall of each pulse enables the control unit to determine position. 
     Thus, the embodiment also makes it possible to perform the learning for the position detecting switch to determine position, which will later be described in detail. 
     Although the position detecting switch according to the embodiment employs photosensors, the position detecting switch may employ a contact mechanism comprising stationary and movable contact pieces, according to the invention as shown in FIG. 5. FIG. 5 is a plan view of a position detecting switch of another embodiment of the position detecting apparatus of the invention. 
     A terminal plate 21 has mounting portions by which the terminal plate 21 is fixed to a fixture portion. The terminal plate 21 carries stationary contact pieces 23-27 that are arranged in a pattern similar to that of the slots of the rotor described above. A movable contact piece 29 is fixed to a manual shaft 28. 
     As a shift lever (not shown) is operated, the manual shaft 28 is turned together with the movable contact piece 29, so that ON-OFF signals will be generated from the stationary contact pieces 23-25 as in the embodiment described above. By reading in such signals, a control unit (not shown) can determine the position of the shift lever. 
     By using the pulse signals from the stationary contact pieces 26, 27, the learning, or counting, by the position detecting switch to determine position can be performed. 
     In addition, the position detecting switch may be formed by using magnetic sensors. In such a position detecting switch, the movable part may be a magnet and the stationary parts may be Hall elements or magneto-resistance elements. 
     Next described will be the setting of the &#34;N&#34; position by the learning function using the position detecting switch according to the invention. 
     FIG. 6 is a flowchart illustrating the operation of setting the position detecting apparatus according to an embodiment of the invention. 
     (1) First, a position detecting switch is mounted on the casing of an automatic transmission in step S1. It is not necessary to perform position alignment in this step. 
     (2) The shift operation is performed to shift to another position in step S2. 
     (3) By using the incremental pulses generated by the slots of the rows d and e, it is determined which of the directions the shift operation is performed in, that is, the &#34;-&#34; direction or the &#34;+&#34; direction, in step S3. 
     (4) It is determined in step S3 that the shift has been performed in the &#34;-&#34; direction, the number of pulses generated for achievement of a shift to another shift position is detected in step S4. 
     (5) Then, the number a of pulses is examined in step S5. For example, if the number a of pulses generated for achievement of the shift to the &#34;R&#34;, or reverse position, equals 3, this means that the position detecting switch has been mounted in the correct position, according to the embodiment. In this case, the setting operation immediately proceeds to step S16 to perform position detection. 
     (6) If it is determined in step S5 that the number a of pulses is less than 3, that is, a&lt;3, it is then determined in step S6 that the deviation of &#34;N&#34; position is (3-a) number of pulses in the &#34;-&#34; direction. 
     (7) Then, the map is corrected by shifting it by (3-a) number of pulses in the &#34;-&#34; direction in step S7 followed by the position detection in step S16. 
     (8) It is determined in step S5 that the number a of pulses is greater than 3, that is, a&gt;3, it is then determined in step S8 that the deviation of &#34;N&#34; position is (a-3) number of pulses in the &#34;+&#34; direction. 
     (9) The map is then corrected by shifting it by (a-3) number of pulses in the &#34;+&#34; direction in step S9 followed by the position detection in step S16. 
     (10) On the other hand, if it is determined in step S3 that the shift operation has been performed in the &#34;+&#34; direction, the number of pulses generated for achievement of a shift to another shift position is detected in step S10. 
     (11) Then, the number b of pulses is examined in step S11. For example, if the number b of pulses generated for achievement of the shift to the &#34;D&#34;, or the drive position, equals 3, this means that the position detecting switch has been mounted in the correct position, according to the embodiment. In this case, the setting operation immediately proceeds to step S16 to perform position detection. 
     (12) If it is determined in step S11 that the number b of pulses is less than 3, that is, b&lt;3, it is then determined in step S12 that the deviation of &#34;N&#34; position is (3-b) number of pulses in the &#34;+&#34; direction. 
     (13) Then, the map is corrected by shifting it by (3-b) number of pulses in the &#34;+&#34; direction in step S13 followed by the position detection in step S16. 
     (14) If it is determined in step S11 that the number b of pulses is greater than 3, that is, b&gt;3, it is then determined in step S14 that the deviation of &#34;N&#34; position is (b-3) number of pulses in the &#34;-&#34; direction. 
     (15) The map is then corrected by shifting it by (b-3) number of pulses in the &#34;-&#34; direction in step S15 followed by the position detection in step S16. 
     If shift operation is performed in the &#34;-&#34; direction in a case as indicated in FIG. 3 where the correct position is 1, and the mount position is 2 so that a&lt;3 and b&gt;3, the map is corrected by shifting it by (3-a) number of pulses in the direction through steps S4-S7 followed by position detection. 
     If shift operation is performed in the &#34;+&#34; direction, the map is corrected by shifting it by (b-3) number of pulses in the &#34;-&#34; direction through steps 10, 11, 14, 15 followed by position detection. 
     The number of pulses and shift direction from the &#34;N&#34; position to the various shift positions are shown in FIG. 7. More specifically, the &#34;N&#34; range lies over 2 to -2 in pulse number from the center of the &#34;N&#34; position, that is, two incremental pulses in the &#34;+&#34; direction and two incremental pulses in the &#34;-&#34; direction from the center of the &#34;N&#34; position. The &#34;R&#34; range is from -3 to -14 in pulse number, that is, 3 to 14 incremental pulses in the &#34;-&#34; direction. The &#34;P&#34; range is at -15 in pulse number and below. 
     Conversely, the &#34;D&#34; range is from 3 to 10 incremental pulses in the &#34;+&#34; direction. The &#34;2&#34; range is from 11 to 17 incremental pulses in the &#34;+&#34; direction. The &#34;2&#34; range is from 18 to 26 incremental pulses in the &#34;+&#34; direction. The &#34;L&#34; range is 27 or more incremental pulses away &#34;+&#34; the direction from the center. 
     If the position detecting switch is mounted in a position outside the &#34;N&#34; range, the map will be corrected by counting the incremental pulses, so that position detection can be performed. 
     While the invention has been described with reference to what are presently considered to be preferred embodiments thereof, it is to be understood that the invention is not limited to the disclosed embodiments. To the contrary, the invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.