DETECTION CIRCUIT WITH HYSTERESIS PROPORTIONAL TO THE PEAK INPUT VOLTAGE

Abstract: A detection circuit for discriminating an input voltage. The input voltage is converted into a log voltage by means of a voltage-to-current converter (13, 17, 19) and diodes (D1, D2). The zero crossings in the log voltage across the diodes (D1, D2) are sensed with a first comparator (21). A second comparator (23) senses the difference between the log voltage and the peak value of the log voltage, provided by a peak detector (27). A voltage proportional to absolute temperature (VPTAT) is substracted from the peak value in a subtracter (29). The outputs of the first (21) and second (23) comparator drive the set and reset inputs of a flip-flop (25). The output voltage of the flip-flop (25) changes polarity at the negative-swing zero crossings of the input voltage (Vi). For the positive-swing zero crossings, a hysteresis equal to a fraction or percentage p of the peak value takes place. Due to the logarithmic conversion a wide input voltage range can be handled. The hysteresis provides a high immunity to noise in the input voltage.

Description: Detection circuit with hysteresis proportional to the peak input voltage. The present invention relates to detection circuits. More particularly, it relates to a detection circuit comprising: a voltage-to-current converter for converting an input voltage to be detected to a current signal; diode means coupled to receive the current signal from the voltage-to-current converter for generating a log voltage signal across the diode means; a first comparator for comparing the log voltage signal with a reference voltage and for producing a first comparison signal. Such a detection circuit is generally known and can be used for detecting input voltages that range from a few hundred milli-volts to a few hundred volts. The input voltage is converted into an input current by the voltage-to-current converter. The output current of the voltage-to-current converter generates a log voltage across the diode means. The first comparator measures the zero crossings in the voltage at the diode means. In the automotive field, variable reluctance sensors (VRS) are used for detecting the position of the pistons and for measuring the rotation speed of the driveshaft. The VRS consists of an inductive sensor and a toothed wheel that is rotated by the engine. Thus, the signal amplitude from the VRS depends on the rotation speed of the toothed wheel, and can vary from a few hundred millivolts to several hundred volts. Due to the harsh automotive environment, considerable interference is added to this signal. As a result, a comparator circuit with a fixed hysteresis level is not capable of accurately detecting the VRS signal. U.S. Patent No. 4,117,757 discloses a rectangular waveform signal reproducing circuit for electronic musical instruments which reproduces a rectangular waveform from a monophonic signal having the same fundamental period thereof. The circuit comprises comparators having one input directly coupled to an input signal and the other input to a peak detector which receives the same input signal. The outputs of the comparators drive set and reset inputs of a flip-flop. U.S. Patent No. 3,767,938 discloses a zero sense after peak detection circuit. The circuit provided is a discriminator circuit capable of storing a rejection level which is a predetermined percentage of a valid input signal. The circuit comprises a comparator in parallel with a peak detector. The outputs of the comparator and the peak detector drive set and reset inputs of a flip-flop. Upon exceeding the stored rejection level by a succeeding input signal, an indicator is reset by the input signal whereby a zero crossing detection circuit sets the indicators as the input signal passes through zero volts. A noise signal never exceeds the predetermined rejection level and thus the indicator is not reset. It is an object of the present invention to provide an accurate detection circuit capable of handling a wide range of input voltages. The present invention provides a detection circuit which is characterized in that the detection circuit further comprises: peak detector means for sensing the log voltage signal across said diode means and for generating a peak voltage signal proportional to the peak value of the log voltage signal; a second comparator having inputs coupled to receive the peak voltage signal and the log voltage signal for comparing the peak voltage signal with the log voltage signal and for producing a second comparison signal; offset means for providing an offset voltage to one of the inputs of the second comparator; and a flip-flop having set and reset inputs for receiving the first comparison signal and the second comparison signal and an output for producing an output signal. In this way a hysteresis proportional to the peak value of the input signal is obtained that is a fixed ratio of the peak value of the input voltage over a wide input voltage range. The offset voltage may be temperature dependent in order to match the temperature dependency of the diode means. For this purpose the offset means may comprise a bipolar differential transistor pair with scaled transistors, the bases of the transistor pair forming the inputs of the second comparator. By scaling the size of the differential pair transistors a systematic offset voltage is created with the same temperature characteristics as the log voltage across the diode means. Further advantageous embodiments of the invention are specified in the dependent claims. Other objects and features of the present invention will become apparent from the following detailed description considered in connection with the accompanying drawings which disclose several embodiments of the present invention. It should be understood, however, that the drawings are designed for the purpose of illustration only and not as a definition of the limits of the invention. In the drawings, wherein similar reference characters denote similar elements throughout the several views: FIG. 1 is a block diagram of a logarithmic compression circuit of the prior art; FIG. 2 is a block diagram of an embodiment of a detection circuit according to the invention; FIG. 3 is a graphical representation of the desired output waveform generated by the circuit of FIG. 2; FIG. 4 is a schematic diagram of the differential voltage-to-current converter and current amplifier of the circuit shown in FIG. 2; FIG. 5 is a schematic diagram of a peak detector and a comparator for use in a detection circuit according to the invention; FIG. 6 is a block diagram of an embodiment of a detection circuit according to the invention; FIG. 7 is a block diagram of an embodiment of a detection circuit according to the invention; FIG. 8 is a block diagram of an embodiment of a detection circuit according to the invention; FIG. 9 is a schematic diagram of a peak detector and a comparator for use in a detection circuit according to the invention; and FIG. 10 is a schematic diagram of an embodiment of a detection circuit 2 according to the invention. FIG. 1 shows a well-known example of logarithmic compression of an input signal, using bipolar diodes as converting elements. The input signal is provided by a VRS (variable reluctance sensor) 11 , but the principle is valid for any input signal source. The input voltage is converted into an input current by the voltage-to-current (VI) converter block 13. The output current of VI converter 13 generates a log voltage when connected to diodes Dl and D2 as a result of the logarithmic relationship between the voltage across and the current through the diodes. The comparator 15 measures the zero crossings in the voltage at the diodes. Diodes Dl and D2, comparator 15 and sometimes VI converter 13 can be implemented in an integrated circuit. This is however, not essential to the operation of the circuit. The circuit of FIG. 1 is capable of handling a large dynamic range of the input signal, but no hysteresis is applied to the signal. Hysteresis helps to improve the rejection of undesired noise added to the input signal. The absolute value of these noise disturbances can be proportional to the value of the actual input signal. Therefore, a hysteresis that is proportional to the peak value of the input signal is desired. Furthermore, the known VI converter shown in FIG. 1 is a single-ended circuit, so that one side of VRS 11 needs to be grounded. Thus, the circuit is sensitive to differences between the ground potential of sensor 11 and that of diodes Dl and D2. In addition, an unintentional short circuit of the sensor output to ground will cause a malfunction of the system. Embodiments of the circuit of the present invention overcome these drawbacks. The circuit of FIG. 2 shows an embodiment of the present invention. The VRS 11 is now followed by differential voltage-to-current converters 13 and 17, and a differential current amplifier 19. The output current from differential current amplifier 19 generates the log voltage over the diodes Dl and D2, and the zero crossings in this log voltage signal are measured by comparator 21. In parallel to this path, a comparator 23 senses the log voltage and compares it to a voltage, generated by a peak detector 27, that is proportional to the peak value of the log voltage signal. The two comparators 21 and 23 drive a set-reset (SR) flip-flop 25 to generate the desired digital output waveform V out , shown in FIG. 3. The output voltage V out is inverted relative to the input voltage Vi of VRS 11 , although a non- inverting output is also available. The output voltage V out changes polarity at the negative- swing zero crossings of the input voltage Vi. For the positive-swing zero crossings, a hysteresis equal to a fraction or percentage p of the peak value takes place. In practice, p has a value of 10% to 40%. The principle can be modified to show this hysteresis at either the negative-swing zero crossing, or at both the positive and negative-swing zero crossings. In FIG. 4 shows a detail circuit of VRS 11, the VI converters 13 and 17, and differential current amplifier 19 of FIG. 2. The VI converters 13 and 12 consist of two external resistors R2 and R3, respectively, which are only necessary if the voltages from the VRS sensor greatly exceed the breakdown voltages of the components. The operational amplifiers (opamps) 33 and 35 each have two identical outputs, 39a-37a and 39b-37b, respectively. Thus, the current flowing into or out of outputs 37a and 37b is identical to the current going in or out of outputs 39a and 39b, respectively. Output 39a is connected to the inverting input of opamp 33 and to resistor R2. Output 39b of opamp 35 is connected to the inverting input of opamp 35 and to resistor R3. Output 37a of opamp 33 is connected to the diodes Dl and D2. Output 37a of opamp 35 is connected to output 39a of opamp 33. The non-inverting inputs of opamps 33 and 35 are connected to the same reference (ground) as the diodes Dl and D2. The opamp side of the resistors R2 and R3 is kept at ground potential by the feedback loop around the opamps 33 and 35. With R ; equal to the value of the resistors R2 and R3, the current i- flowing through resistor R3 is: where V- is the voltage on the negative pin of VRS 11. Similarly, the current i+ through resistor R2 is: Because the currents through both outputs of the opamps are identical, the current I d through the diodes Dl, D2 is equal to the difference of i+ and i-: _ V+-V- _ Vi ( 3 ) J d - * *i where V j is the voltage over the VRS 11. With I s equal to the saturation current of the diodes Dl, D2 and VT the thermal voltage (VT=kT/q), the voltage V d over the diodes is: V d =VT*in ( — ^ ) =V *ln ( i— ) ( 4 ) By using logarithmic current to voltage conversion, the compression that is needed to handle the large dynamic voltage range is achieved. Comparator 21 detects the negative-swing zero crossing of input voltage V j by measuring the voltage V d . This sets flip-flop 25 and forces the output voltage V out of the detection circuit to go high. 0 Due to the differential design of the voltage-to-current converter, (unintentionally) grounding either terminal of VRS 11 does not change this result. For the circuit to operate properly, the opamps 33 and 35 need to operate within the large dynamic range of the input signal. Thus, they have to accurately handle both large and small currents and, therefore, the output stages of the opamps 33 and 35 may require a class-AB current control. FIG. 5 shows an implementation of the peak detector 27. The output of an opamp 45 is loaded with a series arrangement of a diode D3 and a hold capacitor Cl. The capacitor Cl is shunted by a resistor Rl. The inverting input of the opamp 45 is connected to the interconnection node of diode D3 and capacitor Cl. The non-inverting. input of opamp 45 receives the log voltage signal. The maximum voltage over the logarithmic diodes Dl and D2 is stored on the capacitor Cl of the peak detector, and it decays at the rate set by the RC-time of the filter consisting of the hold capacitor Cl and resistor Rl . The right-hand portion of FIG. 5 shows a comparator consisting of a differential input pair with scaled input transistors QI and Q2, followed by an amplifier gain stage 47. Due to the scaling of transistors QI and Q2, this comparator has a systematic input offset voltage equal to: V os =V *ln (τ.) (5 ) where n is the scaling factor of the transistors QI and Q2. This offset voltage is represented as a source VPTAT (voltage proportional to absolute temperature), the voltage of which is added or subtracted to one of the inputs of comparator 23 by means of a block 29 in Figs. 2, 6, and 7 and a block 57 in Fig. 8. So, the scaled differential pair Q1/Q2 and gain stage 47 in Fig. 5 correspond functionally to source VPTAT, block 29 and comparator 23 in Fig. 2. The output voltage V comp of gain stage 47 changes when: y .= γ. -v ( 6 ) where V dmax is the maximum voltage on the diodes Dl and D2, as it is stored on capacitor Cl by the peak detector 27. If V ; l is the value of the input voltage for which the output of comparator 23 switches polarity, and V imax is the maximum value of the input voltage, corresponding to V dmax , substituting (4) and (5) into (6) yields: VT*ln ( — - - ) =vτ*ln ( „ ima ) -VT*ln (n) (7 ) "1 or: The second comparator 21, shown in FIG. 2, switches when the VRS input voltage V j 2 has a value of zero. If 1/n is chosen equal to the fraction or percentage p, shown in FIG. 3, the hysteresis voltage can be written as: V =V.l -V-2 = — * V- =Ό* V- ( 9 ) The SR flip-flop 25 is set at the negative swing zero crossing of the VRS voltage, and it is reset when the VRS voltage becomes greater than a fraction or percentage p of its maximum value. FIG. 6 shows a modified variation of the detection circuit as shown in FIG. 2. Resistor Rl is replaced with a discharge block 51 which discharges the capacitor Cl in response to the output voltage V out of flip-flop 25. This has the advantage that a smaller (on- chip) capacitor Cl can be used. For successful operation, the input currents to the blocks that are connected to the capacitor Cl should be small. Thus, this circuit is especially suited for implementation in a BiCMOS process. If CMOS input transistors are used in voltage subtracter block 29, connected to capacitor Cl, the voltage on the capacitor Cl ideally does not change during the comparison cycle and, therefore, more accurate measurements can be obtained. A second variation to the embodiment of FIG. 2 is shown in FIG. 7. Diode Dl of FIG. 2 has been replaced by diodes Dia and Dlb in series, as shown. In this configuration, the voltage signals on the diodes Dia and Dlb and on the peak capacitor Cl are doubled. Thus, if the capacitor Cl is connected to an external ground, having two diodes Dia and Dlb instead of just one, makes the circuit less sensitive to differences between the internal and external ground. To maintain a hysteresis of p= l/n, the PTAT voltage (i.e., the voltage proportional to absolute temperature) of VPTAT also needs to be twice as large. In the implementation shown in FIG. 5, this translates to an area scaling of the comparator input transistors QI and Q2 of n 2 . To decrease the circuit's sensitivity to ground differences even further, three or four diodes could be stacked in series. However, depending on the value of the supply voltage of the circuit, this approach may become impractical. The circuit shown in FIG. 8 overcomes this problem by using a differential amplifier 55 to sense the difference between the voltage on the log voltage diode Dl and that on a reference diode D4 which receives a bias current from reference current source IR4. Only this difference, multiplied by the differential amplifier gain k, is used and its peak value is stored on the capacitor Cl. The resultant signal on the capacitor Cl is comparable to that of k diodes in series. If the scaling of the comparator input transistors is again used to obtain the PTAT voltage, the scaling factor must be n k . For large values of k, this factor may be impractically large, so a different approach to obtain the PTAT voltage difference at the input of comparator 23 is shown in FIG. 9. A PTAT current source IR5 generates a voltage difference over resistor R4. The PTAT voltage is then added to the positive input voltage of comparator 23, rather than subtracted from the negative input voltage, and thus allows the PTAT current to flow into the low impedance output of differential amplifier 61 which senses the difference between the voltage on the diode Dl and the reference diode D4. In FIG. 10 the circuits of FIG. 4 and FIG. 9 are combined to provide an embodiment of the DCPH with a differential amplifier. A voltage follower opamp 67 generates an internal reference voltage VR. This enables the detection circuit to operate from a single sided supply voltage, rather than from a symmetrical supply. The output voltage of differential amplifier 61 is given by: V ( ii f = ( V di ^) - ( V dif -) =k*VT*l ( - ^ ) ( 10) where IR is the reference current through diode D4, and k is the gain of the differential amplifier 61. The PTAT current IPTAT of IR5 can be written as: IPTAT=— *ln (m) ( 11) Rp where Rp and m are parameters of the PTAT current source implementation. Rp is a resistor value and m is a scaling factor of two of the transistors of the PTAT current source. The output voltage of comparator 23 changes when: V dif + IPTAT*RPTAT= V difmaχ ( 12 ) where V diftnax is the voltage stored on capacitor Cl, which is equal to the maximum output voltage of differential amplifier 61, corresponding to the maximum input voltage V imax from VRS 11. If V j l equals the value of the input voltage for which the output of comparator 23 switches polarity, substitution of (10) and (11) into (12) yields: Vjl = Rp * v imΛX ( 13 j m RPTAT*k The input voltage V j 2 for which the second comparator 21 , shown in FIG. 10, again switches polarity has a value of OV. If the first factor of the right-hand side of equation (13) is chosen equal to the fraction or percentage p, the hysteresis can now be written as: V hyε =V i l -V i 2 = — — * V imaχ =p* V imΔX ( 14 ) m RPTAT*k If, for instance, the resistor ratio RPTAT/R is chosen equal to the differential amplifier gain k, which is also set by a resistor ratio, then the hysteresis percentage p is equal to the PTAT scaling factor m. The hysteresis is, therefore, a well-controlled parameter. In practice, for small values of the input voltage V ; , the amplitude of the signal noise disturbances is no longer proportional to V ; , but rather has a constant value. For these small input signals, the hysteresis preferably has a minimum value, rather than being equal to a percentage of the peak value. The circuit of FIG. 10 supplies a solution to this problem. The voltage on capacitor Cl rises only if the current through diode Dl is larger than the reference current IR through diode D4. For currents through diode Dl less than the value IR, the voltage on capacitor Cl is zero and the negative input of comparator 23 remains at the value of VR, the internal reference voltage. For these small input voltages, when the voltage on Cl is zero, the output of comparator 23 switches polarity when: V dif +IPTAT*RPTAT=0 ( 15) and the input voltage is equal to v i 1 = =s *IR*Ri M β » m RPTAT*k Comparator 21 continues switching polarity when the input voltage V ; 2 is zero, and therefore, the minimum value of the hysteresis is equal to: V hys ^=V^-V i 2 = —^— *IR*Ri=p*IR*Ri ( 1? ) m RPTAT*k Further modifications of the circuit that are possible include scaling of the input and reference diodes, connecting the RC-time filter Cl/Rl to an external, instead of an internal ground. While several embodiments of the present invention have been shown and described, it is to be understood that many changes and modifications may be made thereinto without departing from the spirit and scope of the invention as defined in the appended claims.

Claims: CLAIMS: 1. A detection circuit comprising: a voltage-to-current converter (13) for converting an input voltage to be detected to a current signal; diode means (Dl, D2) coupled to receive the current signal from the voltage-to- current converter (13) for generating a log voltage signal across the diode means (Dl , D2); a first comparator (21) for comparing the log voltage signal with a reference voltage and for producing a first comparison signal, characterized in that the detection circuit further comprises: peak detector means (27) for sensing the log voltage signal across said diode means (Dl, D2) and for generating a peak voltage signal proportional to the peak value of the log voltage signal; a second comparator (23) having inputs coupled to receive the peak voltage signal and the log voltage signal for comparing the peak voltage signal with the log voltage signal and for producing a second comparison signal; offset means (29) for providing an offset voltage to one of the inputs of the second comparator (23); and a flip-flop (25) having set and reset inputs for receiving the first comparison signal and the second comparison signal and an output for producing an output signal. 2. The detection circuit according to claim 1 , wherein the offset voltage produced by the offset means comprises a voltage component which is proportional to absolute temperature. 3. The detection circuit according to claim 2, wherein the offset means comprises a bipolar differential transistor (QI, Q2) pair with scaled transistors, the bases of the transistor pair (QI, Q2) forming the inputs of the second comparator (23). 4. The detection circuit according to claim 1, 2 or 3, wherein the peak detector means (27) comprises a capacitor (Cl) for holding the peak voltage signal and means (51) for discharging the holding capacitor (Cl) in response to the output signal of the flip-flop. 5. The detection circuit according to claim 1, 2, 3 or 4, wherein the diode means comprises at least two equally directed diodes (Dia, Dlb) connected in series with each other and a further oppositely directed diode (D2) disposed parallel with respect to said at least two equally directed diodes (Dia, Dlb). 6. The detection circuit according to claim 1, 2, 3, 4 or 5, further comprising: a reference current source (IR4) for supplying a reference current; a reference diode (D4) coupled to receive the reference current from the reference current source (IR4) for generating a reference voltage signal across the reference diode (D4); and means (55, 61) for subtracting the reference voltage signal from the log voltage signal. 7. The detection circuit according to claim 6, further comprising a resistor (R4) and a temperature dependent current source (IR5) for supplying a current proportional to absolute temperature through the resistor (R4), the voltage across the resistor (R4) being coupled to one of the inputs of the second comparator (23). 8. The detection circuit according to claim 7, wherein the resistor (R4) is connected between the temperature dependent current source (IR5) and an output of the means (61) for subtracting. 9. The detection circuit according to claim 1, 2, 3, 4, 5, 6, 7 or 8, wherein the voltage-to-current converter (13) is a differential voltage-to-current converter (13, 17, 19) having a differential input for receiving the input voltage. 10. The detection circuit according to claim 9, wherein the differential voltage-to- current converter (13, 17, 19) comprises: a first conversion resistor (R2) and a second conversion resistor (R3); a first amplifier (33) having an inverting input, a non-inverting input and two outputs (39a, 37a) substantially equally responsive to a voltage difference between the inverting and non-inverting inputs of the first amplifier, one (39a) of the two outputs of the first amplifier (33) being coupled to the inverting input of the first amplifier (33) and to the first conversion resistor (R2), the other (37a) of the two outputs of the first amplifier (33) being coupled to the diode means (Dl, D2); a second amplifier (35) having an inverting input, a non-inverting input and two outputs (39b, 37b) substantially equally responsive to a voltage difference between the inverting and non-inverting inputs of the second amplifier (35), one (39b) of the two outputs of the second amplifier (35) being coupled to the inverting input of the second amplifier (35) and to the second conversion resistor (R3), the other (37b) of the two outputs of the second amplifier (35) being coupled to said one output (39a) of the first amplifier (33) which is coupled to the inverting input of the first amplifier (33).

Inventors: FONDERIE MAARTEN J, HUIJSING JOHAN HENDRIK, TOY EDMOND, FONDERIE, MAARTEN, J., HUIJSING, JOHAN, HENDRIK, TOY, EDMOND
Applicants: PHILIPS ELECTRONICS NV, PHILIPS NORDEN AB, PHILIPS ELECTRONICS N.V.
Application year: 1996
Main classification: H03K5
IPC codes: G01D5, H03K3, H03K5