This application is based on Japanese Patent Applications No. 2006-70147 filed on Mar. 15, 2006, and No. 2006-342794 filed on Dec. 20, 2006, the disclosures of which are incorporated herein by reference.
The present invention relates to a binarization circuit.
A binarization circuit outputs a binarization signal Vo. For example, as shown in
Here, the analog signal Vi is inputted in one input terminal of a comparator, and the threshold voltage Vref is inputted in the other input terminal of the comparator. The output voltage from the comparator flips when the analog signal Vi becomes larger than the threshold voltage Vref, and flips again when the analog signal becomes smaller than the threshold voltage Vref. Thus, the comparator outputs the binarization signal Vo. By using the binarization signal Vo, the number of flips can be counted, so that a frequency or the like in the analog signal Vi is measured.
In some cases, a high frequency component may be overlapped on the analog signal Vi.
When the analog signal Vi with the high frequency component is inputted in the comparator, the output voltage of the comparator repeats to flip and flip again attributed to the high frequency component, as shown in
Thus, a comparator circuit having a hysteresis characteristic is proposed.
This circuit is disclosed in, for example, “Sensors for Automotive Technology” in Sensors Applications Vol. 4, Wiley-Ach GmbH & Co., Pages 423-424.
The comparator circuit temporally switches between a high side offset threshold voltage Vref1 and a low side offset threshold voltage Vref2, as shown in FIG, 2A. The high side offset threshold voltage Vref1 is set to be higher than the threshold Vref, and the low side offset threshold voltage Vref2 is set to be lower than the threshold Vref. In general, the threshold voltage Vref is set to be the average voltage Vav of the analog signal Vi.
The comparator circuit switches a comparison reference voltage from the high side offset threshold voltage Vref1 to the low side offset threshold voltage Vref2 when the analog signal Vi becomes larger than the high side offset threshold voltage Vref1 at the time t1, t3. The comparator circuit switches the comparison reference voltage from the low side offset threshold voltage Vref2 to the high side offset threshold voltage Vref1 when the analog signal Vi becomes smaller than the low side offset threshold voltage Vref2 at the time t2, t4.
By using the comparator circuit, the output voltage of the comparator circuit is prevented from chattering even when the high frequency corn ponent is overlapped on the analog signal Vi, as shown in
Thus, the output voltage of the comparator circuit is prevented from chattering. However, as shown in
Thus, it is required for a binarization circuit to output a binarization signal without chattering even when a high frequency component is overlapped on an analog signal. Further, it is required for the binarization circuit to switch the binarization signal at a timing when the analog signal changes across a threshold voltage.
In view of the above-described problem, it is an object of the present disclosure to provide a binarization circuit.
According to an aspect of the present disclosure, a binarization circuit for binarizing a pulsative analog signal includes: a first comparator circuit for reversing an output signal thereof when the analog signal becomes smaller than a predetermined threshold voltage and when the analog signal becomes larger than a high side threshold voltage, wherein the high side threshold voltage is higher than the threshold voltage; a second comparator circuit for reversing an output signal thereof when the analog signal becomes larger than the threshold voltage and when the analog signal becomes smaller than a low side threshold voltage, wherein the low side threshold voltage is lower than the threshold voltage; and a selector circuit for inputting the output signals from the first and second comparator circuits and for reversing an output signal of the selector circuit. The output signal of the selector circuit is reversed when the first comparator circuit reverses the output signal of the first comparator circuit in a case where the analog signal becomes smaller than the threshold voltage and when the second comparator circuit reverses the output signal of the second comparator circuit in a case where the analog signal becomes larger than the threshold voltage.
In the above circuit, since each of the first and second comparator circuits has a hysteresis characteristic, the output of the circuit does not chatter when the analog signal becomes smaller than the threshold voltage and when the analog signal becomes larger than the threshold voltage. Further, the binarization signal is reversed when the analog signal becomes smaller than the threshold voltage and when the analog signal becomes larger than the threshold voltage.
The above and other objects, features and advantages of the present invention will become more apparent from the following detailed description made with reference to the accompanying drawings. In the drawings:
The first comparator circuit 10 is a comparator having a predetermined hysteresis characteristic. As shown in
The second comparator circuit 20 is a comparator having a predetermined hysteresis characteristic. As shown in
The selector circuit 30 inputs both of output voltages from the first and second comparator circuits 10, 20. When the analog signal Vi becomes larger than the high side offset threshold voltage Vref1 at the time t2, t6, the first comparator circuit 10 provides an output flip function. When the analog signal Vi becomes smaller than the threshold voltage Vref at the time t3, t7, the first comparator circuit 10 provides another output flip function. When the analog signal Vi becomes larger than the threshold voltage Vref at the time t1, t5, the second comparator circuit 20 provides an output flip function. When the analog signal Vi becomes smaller than the low side offset threshold voltage Vref2 at the time t4, t8, the second comparator circuit 20 provides another output flip function. Thus, the selector circuit 30 inputs the output flip functions of the first and second comparator circuits 10, 20 at the time t1-t8. The selector circuit 30 includes a flip-flop circuit having a set-reset function. The selector circuit 30 selects the output flip function of the first comparator circuit 10 at the time t3, t7 when the analog signal Vi becomes smaller than the threshold voltage Vref and the output flip function of the second comparator circuit 20 at the time t1, t5 when the analog signal Vi becomes larger than the threshold voltage Vref, so that the selector circuit 30 flips the output voltage Vo.
When the first comparator circuit 10 functions, the comparison reference voltage is switched to the threshold voltage Vref when the analog signal Vi becomes larger than the high side offset threshold voltage Vref1 at the time t2, t6. Further, the comparison reference voltage is switched to the high side offset threshold voltage Vref1 when the analog signal Vi becomes smaller than the threshold voltage Vref at the time t3, t7. These are shown as a voltage level 42 in
When the second comparator circuit 20 functions, the comparison reference voltage is switched to the low side offset threshold voltage Vref2 when the analog signal Vi becomes larger than the threshold voltage Vref at the time t1, t5. Further, the comparison reference voltage is switched to the threshold voltage Vref when the analog signal Vi becomes smaller than the low side offset threshold voltage Vref2 at the time t4, t8. These are shown as a voltage level 44 in
Here, the output voltage (IVB) of the first comparator circuit 10 is reversed and inputted in the set terminal S. Thus, when the output voltage of the first comparator circuit 10 switches from the positive voltage to the negative voltage at the time t3, t7 in
Alternatively, the output voltage of the first comparator circuit 10 may be directly inputted in the set terminal S, and the output voltage of the second comparator circuit 20 may be reversed and inputted in the reset terminal R. In this case, the flip-flop circuit 32 switches the output voltage Vo from the negative voltage to the positive voltage when the output voltage of the second comparator circuit 20 switches from the negative voltage to the positive voltage at the time t1, t5. Further, the flip-flop circuit 32 switches the output voltage Vo from the positive voltage to the negative voltage when the output voltage of the first comparator circuit 10 switches from the positive voltage to the negative voltage at the time t3, t7. Thus, the output voltage Vo of the binarization circuit provides the binarization signal Vo, which is opposite to the signal shown in
When the first comparator circuit 10 functions, the output voltage of the first comparator circuit 10 switches from the positive voltage to the negative voltage when the analog signal Vi becomes larger than the high side offset threshold voltage Vref1 at the time t2, t6, as shown in
When the second comparator circuit 20 functions, the output voltage of the second comparator circuit 20 switches from the positive voltage to the negative voltage when the analog signal Vi becomes larger than the threshold voltage Vref at the time t1, t5, as shown in
When the first comparator circuit 10 functions, the output voltage of the first comparator circuit 10 switches from the negative voltage to the positive voltage when the analog signal Vi becomes larger than the high side offset threshold voltage Vref1 at the time t2, t6, as shown in
When the second comparator circuit 20 functions, the output voltage of the second comparator circuit 20 switches from the positive voltage to the negative voltage when the analog signal Vi becomes larger than the threshold voltage Vref at the time t1, t5, as shown in
When the first comparator circuit 10 functions, the output voltage of the first comparator circuit 10 switches from the positive voltage to the negative voltage when the analog signal Vi becomes larger than the high side of set threshold voltage Vref1 at the time t2, t6, as shown in
When the second comparator circuit 20 functions, the output voltage of the second comparator circuit 20 switches from the negative voltage to the positive voltage when the analog signal Vi becomes larger than the threshold voltage Vref at the time t1, t5, as shown in
Although the first and second comparator circuits in
In general, the output voltage from the magneto resistance elements 100, 102 includes a bias voltage having a direct current component and an alternating current component. The alternating current component is overlapped on the bias voltage, and varies in a sine wave manner. The direct current component varies with temperature. The voltage at the point P defines the bias voltage of the analog signal Vi (i.e., the average voltage of the analog signal).
The voltage at the point P provides the threshold voltage Vref so that the binarization signal is obtained by using the average voltage of the analog signal Vi. In this case, the binarization signal has the time interval of the negative voltage equal to the time interval of the positive voltage. The time interval of the negative voltage is disposed between the time at which the output voltage Vo switches from the positive voltage to the negative voltage and the time at which the output voltage switches from the negative voltage to the positive voltage. The time interval of the positive voltage is disposed between the time at which the output voltage Vo switches from the negative voltage to the positive voltage and the time at which the output voltage switches from the positive voltage to the negative voltage.
The analog signal Vi is inputted from a circuit 120 in each input terminal of the peak hold circuit 70 and the bottom hold circuit 80. Four resistors R10-R40 are connected in series between the output terminals of the peak hold circuit 70 and the bottom hold circuit 80. A first connection terminal 72 is formed between the resistors R10, R20, a second connection terminal 74 is formed between the resistors R20, R30, and a third connection terminal 76 is formed between the resistors R30, R40.
The resistances of the resistors R10-R40 are the same. Accordingly, the voltage at each connection terminal 72, 74, 76 is adjusted as follows.
Vref=(Vtop−Vbottom)×(½)+Vbottom (F1)
Vref1=(Vtop−Vbottom)×(¾)+Vbottom (F2)
Vref2=(Vtop−Vbottom)×(¼)+Vbottom (F3)
Here, the voltage at the connection terminal 72 is defined as Vref1, the voltage at the connection terminal 74 is defined as Vref, and the voltage at the connection terminal 76 is defined as Vref2.
The voltage Vref at the second connection terminal 74 is adjusted between the peak voltage Vtop and the bottom voltage Vbottom so that the voltage Vref provides the threshold voltage Vref. The voltage Vref1 at the first connection terminal 72 is adjusted between the threshold voltage Vref and the peak voltage Vtop so that the voltage Vref1 provides the high side offset threshold voltage Vref1. The voltage Vref2 at the third connection terminal 76 is adjusted between the threshold voltage Vref and the bottom voltage Vbottom so that the voltage Vref2 provides the low side offset threshold voltage Vref2.
As shown in
The second comparator circuit 20 includes a second comparator 22 and a second switching circuit 60. The analog signal Vi is inputted in the non-inversion input terminal of the second comparator 22. The second switching circuit 60 switches a connection between the inversion input terminal of the second comparator 22 and the second connection terminal 74 and a connection between the inversion input terminal and the third connection terminal 76 in accordance with the output voltage of the second comparator 22. Thus, the second switching circuit 60 switches an input voltage to the inversion input terminal of the second comparator 22 between the threshold voltage Vref and the low side offset threshold voltage Vref2 in accordance with the output voltage of the second comparator 22.
The binarization circuit further includes a flip-flop circuit 32 having a set-reset function. The output voltage of the first comparator 12 is reversed and inputted in the reset terminal R of the flip-flop circuit 32. The output voltage of the second comparator 12 is not reversed and inputted in the set terminal S of the flip-flop circuit 32.
The first switching circuit 50 includes first and second transistors 52, 54. The first transistor 52 is formed between the inversion input terminal of the first comparator 12 and the first connection terminal 72. The output voltage of the first comparator 12 is reversed by an inverter, and then, the reversed output voltage is inputted in the gate of the first transistor 52. The second transistor 54 is formed between the inversion input terminal of the first comparator 12 and the second connection terminal 74. The output voltage of the first comparator 12 is not reversed by an inverter, so that the output voltage is directly inputted in the gate of the second transistor 54.
The second switching circuit 60 includes third and fourth transistors 62, 64.
The third transistor 62 is formed between the inversion input terminal of the second comparator 22 and the second connection terminal 74. The output voltage of the second comparator 22 is reversed by an inverter, and then, the reversed output voltage is inputted in the gate of the third transistor 62. The fourth transistor 64 is formed between the inversion input terminal of the second comparator 22 and the third connection terminal 76. The output voltage of the second comparator 22 is not reversed by an inverter, so that the output voltage is directly inputted in the gate of the fourth transistor 64.
When the first comparator circuit 10 functions, the comparison reference voltage is switched to the threshold voltage Vref when the analog signal Vi becomes larger than the high side offset threshold voltage Vref1 at the time t2, t6. Further, the comparison reference voltage is switched to the high side offset threshold voltage Vref1 when the analog signal Vi becomes smaller than the threshold voltage Vref at the time t3, t7. These are shown as a voltage level 42 in
When the second comparator circuit 20 functions, the comparison reference voltage is switched to the low side offset threshold voltage Vref2 when the analog signal Vi becomes larger than the threshold voltage Vref at the time t1, t5. Further, the comparison reference voltage is switched to the threshold voltage Vref when the analog signal Vi becomes smaller than the low side offset threshold voltage Vref2 at the time t4, t8. These are shown as a voltage level 44 in
Here, the output voltage of the first comparator circuit 10 is reversed and inputted in the reset terminal R of the flip-flop circuit 32. Thus, when the output voltage of the first comparator circuit 10 switches from the negative voltage to the positive voltage at the time t3, t7 in
The binarization circuit generates the high side offset threshold voltage Vref1 and the low side offset threshold voltage vref2 by using the peak voltage Vtop and the bottom voltage Vbottom. The high side offset threshold Vref1 and the low side offset threshold Vref2 are variable according to an amplitude of the pulsative analog signal Vi.
For example, when the analog signal Vi is obtained from a magneto resistance element for measuring magnetic flux as a measurement object, the amplitude of the analog signal Vi is reduced in accordance with temperature change. For example, the amplitude of the analog signal from the magneto resistance element is reduced to one-fourth when an environmental temperature is changed from −40° C. to +180° C. Thus, if the high side offset threshold voltage Vref1 and the low side offset threshold voltage Vref2 are fixed to predetermined voltages, the reduced analog signal Vi may not become higher than the high and low side offset threshold voltages Vref1, Vref2 since the amplitude of the analog voltage Vi is too small. In this case, the analog signal is not binarized accurately. However, the binarization circuit shown in
The above disclosure has the following aspects.
According to an aspect of the present disclosure, a binarization circuit for binarizing a pulsative analog signal includes: a first comparator circuit for reversing an output signal thereof when the analog signal becomes smaller than a predetermined threshold voltage and when the analog signal becomes larger than a high side threshold voltage, wherein the high side threshold voltage is higher than the threshold voltage; a second comparator circuit for reversing an output signal thereof when the analog signal becomes larger than the threshold voltage and when the analog signal becomes smaller than a low side threshold voltage, wherein the low side threshold voltage is lower than the threshold voltage; and a selector circuit for inputting the output signals from the first and second comparator circuits and for reversing an output signal of the selector circuit. The output signal of the selector circuit is reversed when the first comparator circuit reverses the output signal of the first comparator circuit in a case where the analog signal becomes smaller than the threshold voltage and when the second comparator circuit reverses the output signal of the second comparator circuit in a case where the analog signal becomes larger than the threshold voltage.
In the above circuit, since each of the first and second comparator circuits has a hysteresis characteristic, the output of the circuit does not chatter when the analog signal becomes smaller than the threshold voltage and when the analog signal becomes larger than the threshold voltage. Further, the binarization signal is reversed when the analog signal becomes smaller than the threshold voltage and when the analog signal becomes larger than the threshold voltage.
Alternatively, the first comparator circuit may include a first input terminal for inputting the threshold voltage and a circuit for generating the high side threshold voltage based on the threshold voltage, and the second comparator circuit may include a first input terminal for inputting the threshold voltage and a circuit for generating the low side threshold voltage based on the threshold voltage. In this case, there in no need to input the high side threshold voltage and the low side threshold voltage in the first and second comparator circuits, respectively.
Further, the first comparator circuit may further include a second input terminal for inputting the analog signal, and the circuit of the first comparator circuit may include a comparator, a N type MOS transistor, an inverter and a first resistor. The first input terminal of the first comparator circuit is coupled with an inversion input terminal of the comparator. The second input terminal of the first comparator circuit is coupled with a non-inversion input terminal of the comparator through a second resistor. The inverter and the N type MOS transistor of the first comparator are coupled in series between an output terminal of the comparator and the non-inversion input terminal of the comparator. The first resistor of the first comparator is coupled between the output terminal of the comparator and the N type MOS transistor. The second comparator circuit may further include a second input terminal for inputting the analog signal, and the circuit of the second comparator circuit may include a comparator, a N type MOS transistor and a first resistor. The first input terminal of the second comparator circuit is coupled with an inversion input terminal of the comparator. The second input terminal of the second comparator circuit is coupled with a non-inversion input terminal of the comparator through a second resistor. The N type MOS transistor of the second comparator is coupled between an output terminal of the comparator and the non-inversion input terminal of the comparator. The first resistor of the second comparator is coupled between the output terminal of the comparator and the N type MOS transistor.
Furthermore, the selector circuit may include a flip-flop circuit having a set terminal and a reset terminal. The first comparator circuit is coupled with the set terminal of the selector circuit through an inversion input element, and the second comparator circuit is coupled with the reset terminal of the selector circuit.
Alternatively, the circuit may further include a circuit for outputting the analog signal. The first comparator circuit includes a first input terminal for inputting the threshold voltage and a second input terminal. The second comparator circuit includes a first input terminal for inputting the threshold voltage and a second input terminal. The circuit for outputting the analog signal has a terminal, at which an average voltage of the analog signal is provided. The second input terminal of each of the first and second comparator circuits is coupled with the terminal of the circuit for outputting the analog signal.
Further, the circuit of the first comparator circuit may include a comparator, a N type MOS transistor, an inverter and a first resistor. The first input terminal of the first comparator circuit is coupled with a non-inversion input terminal of the comparator. The second input terminal of the first comparator circuit is coupled with an inversion input terminal of the comparator. The inverter and the N type MOS transistor of the first comparator are coupled in series between an output terminal of the comparator and the inversion input terminal of the comparator. The first resistor of the first comparator is coupled between the output terminal of the comparator and the N type MOS transistor. The circuit of the second comparator circuit may include a comparator, a N type MOS transistor, an inverter and a first resistor. The first input terminal of the second comparator circuit is coupled with a non-inversion input terminal of the comparator. The second input terminal of the second comparator circuit is coupled with an inversion input terminal of the comparator. The inverter and the N type MOS transistor of the second comparator is coupled between an output terminal of the comparator and the inversion input terminal of the comparator. The first resistor of the second comparator is coupled between the output terminal of the comparator and the N type MOS transistor.
Furthermore, the selector circuit may include a flip-flop circuit having a set terminal and a reset terminal. The first comparator circuit is coupled with the set terminal of the selector circuit through an inversion input element, and the second comparator circuit is coupled with the reset terminal of the selector circuit.
Alternatively, the circuit may further include: a circuit for outputting the analog signal; a peak hold circuit for maintaining a peak voltage of the analog signal; and a bottom hold circuit for maintaining a bottom voltage of the analog signal. The peak hold circuit is coupled with the circuit for outputting the analog signal. The bottom hold circuit is coupled with the circuit for outputting the analog signal. The threshold is disposed between the peak voltage and the bottom voltage. In this case, even when the analog signal is increasing as a whole or even when the analog signal is decreasing as a whole, the analog signal is binarized accurately.
While the invention has been described with reference to preferred embodiments thereof, it is to be understood that the invention is not limited to the preferred embodiments and constructions. The invention is intended to cover various modification and equivalent arrangements. In addition, while the various combinations and configurations, which are preferred, other combinations and configurations, including more, less or only a single element, are also within the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2006-70147 | Mar 2006 | JP | national |
2006-342794 | Dec 2006 | JP | national |