Abstract:
An angular position detector for an internal combustion engine includes a toothed wheel with a missing tooth and a sensor providing a pulse train as the teeth pass the sensor. To provide an accurate datum position signal a micro-computer receives the pulse train and outputs the datum signal when the period between successive pulses is significantly shorter than the preceding period.

Description:
This is a continuation of application Ser. No. 625,893, filed June 29, 1984, now abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     This invention relates to an angular position detector suitable for use in an internal combustion engine control system. 
     It is already known to employ a toothed wheel on the engine crankshaft with a fixed sensor which provides a pulse train as the wheel rotates, the pulse train being used to provide information about both the speed and angular position of the crankshaft. It is, however, necessary, when measuring the angular position to provide a signal at a specific datum position so that the position of the crankshaft can be measured from that datum position. GB-A No. 2065310 discloses the idea of omitting one of the teeth. The time intervals between the pulses are measured and when a time interval more than 1.5 times longer than the previous one is detected it is assumed that the &#34;missing tooth&#34; is passing the sensor and the next arriving pulse is treated as defining the datum position. 
     It is desirable for accurate engine timing control to ensure that the datum position is close to the top dead centre position in respect to one of the cylinders of the engine. Accordingly, it is proposed in GB-A No. 2065310, to put the &#34;missing tooth&#34; at this top dead centre position, the datum position then being, say, 10° behind this top dead centre position. 
     With such an arrangement, however, problems can arise during engine starting, particularly in very cold conditions. In such conditions the load on the starter motor during each compression stroke can be such as to reduce the instantaneous cranking speed sufficiently to make an inter-pulse interval (other than that occurring at top dead centre) 50% longer than the previous interval, due to the reduced cranking speed so that a false datum position signal is produced where there is no gap detected, due to a false detection of the usual spacing between adjacent teeth or the gap. 
     SUMMARY OF THE INVENTION 
     It is an object of the present invention to provide a position detector in which this disadvantage is avoided without adding extra teeth or specially shaped teeth. 
     An angular position detector in accordance with the invention comprises a toothed wheel having a missing tooth, a sensor device producing a pulse train as the teeth of the toothed wheel pass it, and a discriminating circuit connected to said sensor device and producing a datum signal in response to recognition of the passage past the sensor device of the missing tooth by measuring the time intervals between the pulses of said pulse train, characterised in that said discriminating circuit recognises said missing tooth by detecting when an interpulse interval is significantly shorter than the preceding interval. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     In the accompanying drawings, 
     FIG. 1 being a block diagram of an example of the invention, 
     FIG. 2 the flow sheet of the relevant part of the programme of a micro-computer included in FIG. 1, and 
     FIG. 3 is a block diagram of another example of the invention. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     As shown in FIG. 1 the detector includes a toothed wheel 10 mounted on an internal combustion engine crankshaft 11 and coacting with a variable reluctance sensor 12 associated with an amplifier switching circuit 13 which produces a pulse train consisting of pulses synchronised with the passage of the leading edges of the teeth of wheel 10 past the sensor 12. The wheel 10 has one tooth missing, the wheel being arranged on the crankshaft at a position such that the pulse which would have been produced as the missing tooth passes the sensor, coincides with the top dead centre position of one of the cylinders of the engine. 
     The output of the circuit 13 is applied to an input of a micro-computer 14 which is shown in FIG. 1 as controlling the ignition coil 15 of the spark ignition system of the engine. The detector may, however, be used to control other engine timing functions if required. 
     The relevant part of the stored programme of the micro-computer is shown in FIG. 2. The routine shown includes a decision 100 as to whether a tooth edge signal has been received, which is repeated until a tooth edge signal arrives. The count in a software counter is then read (101) and stored (102) in a register &#34;THIS TOOTH PERIOD&#34;. The counter is zeroed and re-started (103) for the next cycle. Now a decision 104 is made as to whether the content of the &#34;THIS TOOTH PERIOD&#34; register is less than the product of a detect factor (e.g. 0.65) and the content of a &#34;PREVIOUS TOOTH PERIOD&#34; register. If a &#34;yes&#34; decision is reached the reference signal is generated (105). The content of the &#34;THIS TOOTH PERIOD&#34; register is then transferred to the &#34;PREVIOUS TOOTH PERIOD&#34; register before returning to the beginning of the routine. 
     Turning now to FIG. 3, the alternative example of the invention shown therein makes use of a special interface circuit between the amplifier/switching circuit 13 and the micro-computer 14, to generate the reference signal at the appropriate tooth edge signal. This interface circuit includes four latch circuits 20 to 23 in cascade which are clocked by a 2 MHz clock signal to produce signals .0.B, .0.C and .0.E respectively 0.5 US, 1 US and 2 US after the tooth edge signal .0.A. A programmable frequency divider 24 divides the 2 MHz pulse train by a number M determined by the micoprocessor 14, and the divided pulse train is counted by a counter 25, reset periodically by the .0.B signals. Each .0.A signal causes a latch 26 to be loaded with the count in counter 25 and the content of latch 26 controls the division ratio of a second programmable frequency divider 27 which divides the 2 Mz pulse train by such latch content. In steady conditions, i.e. when successive .0.A signals are equally spaced, the output of divider 27 is M×f (where f is the frequency of the .0.A signals). 
     For generating the reference signal after detection of the missing tooth, there is provided another counter, which is a presettable Johnson counter 28 loaded periodically with a count M×Q (where Q is a detect factor, e.g. 0.65) which is clocked by the ouptut of the divider 27. To this end the output of divider 27 is connected to one input of a NAND gate 29, the output of which is connected to one input of a NOR gate 30, the output of which is applied to the CLOCK input of counter 28. The .0.C signal is applied to the PRESET/ENABLE input of the counter 28 and to the other input of NOR gate 30 so that counter 28 is preset when the .0.C is high and counts when such signal is low. A NAND gate is connected to the stage output (except the LSB output) of counter 28 and its output is connected to the D input of a latch 32 which is clocked by the output of divider 27. The Q output of latch 32 is connected to an input of NAND gate 29 and also to an input of an AND gate 33 which also receives the .0.B signal. The output of gate 33 is applied to the SET input of a flip-flop 34, the RESET input of which receives the .0.E signal. 
     When the .0.A signal frequency is fixed the counter 28 reaches its 11 . . . . 10 state in every cycle so that the output of gate 31 goes low at some point before the next .0.B signal arrives. Thus, latch 32 is set with its Q output low so that gate 29 inhibits further counting in that cycle. In the cycle in which the missing tooth passes the detector, however, the counter 25 will reach twice its normal count so that in the next cycle the frequency of the output of divider 27 is half its normal value. The result of this is the output of gate 31 and that of latch 32 have not gone low when the next .0.B pulse arives, so that flip-flop 34 is set and its Q output goes high for 1.5 US, providing the reference pulse.