An arbitrary threshold processing circuit with adjustable hysteresis ratio
By introducing dial switch, analog selector and in-phase amplifier circuit in the hysteresis comparator, arbitrary adjustment of the back-difference ratio and threshold comparison point is achieved, and the back-difference ratio cannot be set and the anti-interference ability in the prior art is solved. Problem, high-precision, low-cost and fast-responsive circuit design is achieved.
Patent Information
- Application Number
- CN202010654568.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-09
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2040-07-09
AI Technical Summary
The existing hysteresis comparator cannot set the back-difference ratio in the instrument, resulting in the input signal causing the output voltage to jitter near the threshold value, poor anti-interference ability, and the threshold comparison point cannot be set arbitrarily, and the back-difference starting point is offset, and the software implements The adjustable response time is slow and costly.
A reversal ratio adjustable arbitrary threshold processing circuit including a dial switch, an analog selector, a potentiometer and an in-phase amplifier circuit are designed. The pure hardware reversal ratio adjustable, potentiometer and The in-phase amplifier circuit sets any threshold comparison point, and cleverly configures resistance parameters to form a reciprocal relationship with the starting point of the return difference to ensure that the starting point of the return difference does not shift.
It realizes high-precision, fast response, strong anti-interference ability to adjust the ratio of the difference, low cost, and can set threshold comparison points at will. It is suitable for different occasions, with a wide range of applications and simple setting of the difference ratio.
Smart Images

Figure CN111726109B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of instruments and meters, and in particular to an arbitrary threshold processing circuit with adjustable hysteresis ratio. Background Art
[0002] Comparator is a commonly used circuit module in integrated circuits, which is widely used in signal conversion, detection and waveform generation circuits. For common single-limit comparators, if the input signal is interfered near the threshold value, it will cause corresponding jitter in the output voltage. In order to solve the output jitter problem, the concept of hysteresis comparator is introduced. The application of hysteresis comparators currently used in the instrumentation industry has the following shortcomings:
[0003] 1. The hysteresis ratio cannot be set, resulting in interference of the input signal near the threshold value, causing corresponding jitter of the output voltage, and poor anti-interference ability. It cannot meet the needs of the site and the experience is poor;
[0004] 2. It is not possible to set the threshold comparison point arbitrarily. The threshold comparison is the premise of alarm output. Different comparison points will be selected according to different occasions when using it.
[0005] 3. The starting point of the hysteresis is offset. Under different hysteresis ratios, the starting point is different. Different voltages need to be calculated according to different resistance values. The hysteresis ratio setting is cumbersome.
[0006] 4. Although the software is used to achieve adjustable hysteresis ratio, the human-computer interaction is friendly, and the use is convenient and quick, but the response time is slow, the anti-interference ability is weak, the cost is high, and in some occasions, only a few adjustable hysteresis ratios need to be set to meet the on-site application. Summary of the invention
[0007] The invention provides an arbitrary threshold processing circuit with adjustable hysteresis ratio, which can adjust the hysteresis ratio of a hysteresis comparison circuit, realize arbitrary setting of a threshold comparison point, and the hysteresis starting point of the hysteresis comparison circuit does not shift.
[0008] In order to achieve the purpose of the present invention, the technical solution adopted is: an arbitrary threshold processing circuit with adjustable hysteresis ratio, including a dip switch, an analog selector, a potentiometer, a common-phase amplifier circuit and a hysteresis comparator circuit, the dip switch is used to control the opening of the analog selector channel, the voltage of the potentiometer is amplified by the common-phase amplifier circuit and used as the reference voltage of the hysteresis comparator circuit, the analog selector is respectively connected to the common-phase amplifier circuit and the hysteresis comparator circuit, and the analog selector is respectively used to adjust the hysteresis ratio of the hysteresis comparator circuit and the amplification factor of the common-phase amplifier circuit.
[0009] As an optimization solution of the present invention, the address selection input terminal of the analog selector is connected to the dip switch, the common channel X of the analog selector is connected to the in-phase amplifier circuit, and the common channel Y of the analog selector is connected to the hysteresis comparator circuit.
[0010] As an optimization solution of the present invention, the common-mode amplifier circuit includes a first operational amplifier U1, a seventh resistor R7, an eighth resistor R8, a ninth resistor R9 and a tenth resistor R10, the seventh resistor R7 is connected between the input and output ends of the first operational amplifier U1, and the eighth resistor R8, the ninth resistor R9 and the tenth resistor R10 are respectively connected between independent channels of the analog selector and the ground.
[0011] As an optimization solution of the present invention, the hysteresis comparator circuit includes a second operational amplifier U2, a first resistor R1, a second resistor R2, a third resistor R3 and a fifth resistor R5. The first resistor R1, the second resistor R2 and the third resistor R3 are respectively connected between independent channels of the analog selector and the output end of the second operational amplifier U2, and the fifth resistor R5 is connected to the input end of the second operational amplifier U2.
[0012] As an optimization solution of the present invention, the first resistor R1 and the eighth resistor R8 have the same resistance value, the second resistor R2 and the ninth resistor R9 have the same resistance value, the third resistor R3 and the tenth resistor R10 have the same resistance value, and the fifth resistor R5 and the seventh resistor R7 have the same resistance value.
[0013] The present invention has positive effects: 1) The present invention realizes the adjustable hysteresis ratio of pure hardware through analog devices such as a dial switch and an analog selector, with high precision, fast response, strong anti-interference ability and low cost;
[0014] 2) The present invention can set any threshold comparison point through the potentiometer and the in-phase amplifier circuit, and different comparison points can be selected according to different occasions when used, so it has strong versatility and a wide range of applications;
[0015] 3) The present invention cleverly configures the resistance parameters so that the amplification factor and the hysteresis starting point form an inverse relationship, the hysteresis starting point does not shift, and under different hysteresis ratios, there is no need to calculate different voltages according to different resistance values, and the hysteresis ratio is simple to set. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0017] Figure 1 It is a circuit principle block diagram of the present invention;
[0018] Figure 2 It is a circuit schematic diagram of the present invention.
[0019] Among them: 1. DIP switch, 2. Analog selector, 3. Potentiometer, 4. Common-mode amplifier circuit, 5. Hysteresis comparator circuit. DETAILED DESCRIPTION
[0020] like Figure 1 As shown, the present invention discloses an arbitrary threshold processing circuit with adjustable hysteresis ratio, including a dip switch 1, an analog selector 2, a potentiometer 3, a common-phase amplifier circuit 4 and a hysteresis comparator circuit 5, wherein the dip switch 1 is used to control the opening of the channel of the analog selector 2, the voltage of the potentiometer 3 is amplified by the common-phase amplifier circuit 4 and used as the reference voltage of the hysteresis comparator circuit 5, the analog selector 2 is respectively connected to the common-phase amplifier circuit 4 and the hysteresis comparator circuit 5, and the analog selector 2 is respectively used to adjust the hysteresis ratio of the hysteresis comparator circuit 5 and the amplification factor of the common-phase amplifier circuit 4. Among them, the hysteresis ratio and the amplification factor are inversely proportional to each other, thereby ensuring that the starting point of the hysteresis voltage does not shift.
[0021] like Figure 2 As shown, the address selection input of analog selector 2 is connected to the dip switch 1, the common channel X of analog selector 2 is connected to the in-phase amplifier circuit 4, and the common channel Y of analog selector 2 is connected to the hysteresis comparator circuit 5. The 2-position dip switch used in the dip switch 1 can switch out four combination switch states. When used with the analog selector 2, four types of adjustable hysteresis ratios can be achieved. By toggling the different gears of the dip switch to control the analog selector 2, different types of adjustable hysteresis ratios can be achieved. Analog selector 2 is Figure 2 The analog selector U3 is a dual four-channel analog switch, which controls the four channel states through the ninth and tenth pins, i.e., the address input terminals. The "dual" in the dual four-channel analog switch refers to two analog switches, the X switch and the Y switch, whose controlled states are consistent, i.e., the X n and Y n The on and off states are consistent (n=0, 1, 2, 3), the X switch adjusts the gain of the in-phase amplifier circuit 4, the Y switch adjusts the feedback resistance of the hysteresis comparator circuit 5, and the two switches jointly determine the size of the hysteresis ratio and the starting point of the hysteresis voltage.
[0022] The in-phase amplifier circuit 4 includes a first operational amplifier U1, a seventh resistor R7, an eighth resistor R8, a ninth resistor R9 and a tenth resistor R10, wherein the seventh resistor R7 is connected between the input terminal and the output terminal of the first operational amplifier U1, and the eighth resistor R8, the ninth resistor R9 and the tenth resistor R10 are respectively connected between the independent channel of the analog selector 2 and the ground. The potentiometer 3 is a high-precision potentiometer RP1, which obtains a voltage by means of a resistor voltage divider and then amplifies the voltage through the in-phase amplifier circuit 4 as a reference voltage of the hysteresis comparator circuit 5. The in-phase amplifier circuit 4 can be matched with a suitable resistor value to set any threshold comparison point.
[0023] The hysteresis comparator circuit 5 includes a second operational amplifier U2, a first resistor R1, a second resistor R2, a third resistor R3 and a fifth resistor R5. The first resistor R1, the second resistor R2 and the third resistor R3 are respectively connected between the independent channels of the analog selector 2 and the output end of the second operational amplifier U2, and the fifth resistor R5 is connected to the input end of the second operational amplifier U2.
[0024] Assume that the voltage after the high-precision potentiometer RP1 is divided is U a , the voltage amplified by the common-mode amplifier circuit 4 is U b , where the amplification factor is controlled by the X switch of the analog selector U3, and is divided into four cases:
[0025] When the independent channel X0 of the analog selector U3 is turned on, it is equivalent to a voltage follower. b =U a ;
[0026] When the analog selector U3 independent channel X n When (n=1, 2, 3) is turned on, the difference is that the resistance Rf1 to ground is different, and the voltage is amplified times, Wherein, Rf1 is the eighth resistor R8, the ninth resistor R9 or the tenth resistor R10.
[0027] from Figure 2 It can be seen that the left end of the fifth resistor R5 is the voltage U after being amplified by the first operational amplifier U1. b , assuming that the voltage at the right end of the fifth resistor R5 is U c , the output of the second op amp U2 is U o , where the feedback resistor of the second op amp U2 is controlled by the Y switch of the analog selector U3, which can be divided into four cases:
[0028] When Y0 is turned on, there is no positive feedback loop and the inverting input hysteresis comparator cannot be formed, that is, it is a general single-limit comparator with zero hysteresis.
[0029] When the independent channel Y of analog selector U3 n When (n=1, 2, 3) is turned on, the difference is that the positive feedback resistor Rf2 is different, and the current in the positive feedback loop is: From the limiting circuit at the output of the second op amp U2, it can be seen that U o = ±U Z , then the threshold voltage is The hysteresis of the hysteresis comparator circuit 5 is The starting point of the hysteresis is Wherein: the positive feedback resistor Rf2 is the first resistor R1, the second resistor R2 or the third resistor R3.
[0030] From the calculation formula analyzed above, it can be known that the hysteresis of the inverting input hysteresis comparator circuit 5 is only related to the output swing and the resistance, and the starting point of the hysteresis is related to the reference voltage set by the potentiometer. The hysteresis can be controlled by adjusting the two parameters of resistance and output range. The output swing is the range of the output voltage. In the present invention, let R5 = R7, R1 = R8, R2 = R9, R3 = R10, and cleverly configure the resistance parameters to form an inverse relationship between the amplification factor of the in-phase amplifier circuit 4 and the coefficient of the hysteresis starting point, then the hysteresis starting point is: That is, the starting point of the hysteresis is the voltage set by the high-precision potentiometer RP1, which is a fixed value, that is, the starting point will not shift.
[0031] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An arbitrary threshold processing circuit with adjustable hysteresis ratio, characterized in that: The invention comprises a dip switch (1), an analog selector (2), a potentiometer (3), a common-phase amplifier circuit (4) and a hysteresis comparator circuit (5), wherein the dip switch (1) is used to control the opening of the channel of the analog selector (2), the voltage of the potentiometer (3) is amplified by the common-phase amplifier circuit (4) and used as the reference voltage of the hysteresis comparator circuit (5), the analog selector (2) is respectively connected to the common-phase amplifier circuit (4) and the hysteresis comparator circuit (5), and the analog selector (2) is respectively used to adjust the hysteresis ratio of the hysteresis comparator circuit (5) and the amplification factor of the common-phase amplifier circuit (4); The analog selector (2) comprises an address selection input terminal, a common channel and an independent channel; The address selection input terminal of the analog selector (2) includes: a first selection input terminal A and a second selection input terminal B; the common channel of the analog selector (2) includes a first common channel X and a second common channel Y; the independent channels of the analog selector (2) include a first independent channel X0, a second independent channel X1, a third independent channel X2, a fourth independent channel X3, a fifth independent channel Y0, a sixth independent channel Y1, a seventh independent channel Y2 and an eighth independent channel Y3; The analog selector (2) is a dual four-channel analog switch, and four channel states are controlled by a first selection input terminal A and a second selection input terminal B; the first common channel X and the second common channel Y of the analog selector (2) are controlled in the same state, the first common channel X is used to adjust the amplification factor of the common-phase amplifier circuit (4), the second common channel Y is used to adjust the feedback resistance of the hysteresis comparator circuit (5), and the first common channel X and the second common channel Y are used together to determine the size of the hysteresis ratio and the starting point of the hysteresis voltage; The dip switch (1) comprises a first output terminal A0 and a second output terminal A1; The first selection input terminal A in the analog selector (2) is connected to the first output terminal A0 of the dip switch (1); the second selection input terminal B in the analog selector (2) is connected to the second output terminal A1 of the dip switch (1); The in-phase amplifier circuit (4) comprises a first operational amplifier U1, a seventh resistor R7, an eighth resistor R8, a ninth resistor R9 and a tenth resistor R10, wherein the seventh resistor R7 is connected between the inverting input terminal and the output terminal of the first operational amplifier U1, the eighth resistor R8 is connected between the second independent channel X1 of the analog selector (2) and the ground, the ninth resistor R9 is connected between the third independent channel X2 of the analog selector (2) and the ground, and the tenth resistor R10 is connected between the fourth independent channel X3 of the analog selector (2) and the ground; The hysteresis comparator circuit (5) comprises a second operational amplifier U2, a first resistor R1, a second resistor R2, a third resistor R3 and a fifth resistor R5, wherein the first resistor R1 is connected between the sixth independent channel Y1 and the output end of the second operational amplifier U2, the second resistor R2 is connected between the seventh independent channel Y2 and the output end of the second operational amplifier U2, and the third resistor R3 is connected between the seventh independent channel Y3 and the output end of the second operational amplifier U2, and the fifth resistor R5 is connected between the output end of the first operational amplifier U1 and the non-inverting input end of the second operational amplifier U2; the inverting input end of the second operational amplifier U2 is connected to the input signal; The first common channel X of the analog selector (2) is connected to the inverting input terminal of the first operational amplifier U1 in the in-phase amplifier circuit (4); the second common channel Y of the analog selector (2) is connected to the in-phase input terminal of the second operational amplifier U2 in the hysteresis comparator circuit (5); The output end of the potentiometer (3) is connected to the non-inverting input end of the first operational amplifier U1 in the non-inverting amplifier circuit (4), and the first common channel X of the analog selector (2) is connected to the inverting input end of the first operational amplifier U1 in the non-inverting amplifier circuit (4); The second common channel Y of the analog selector (2) is connected to the non-inverting input terminal of the second operational amplifier U2 in the hysteresis comparator circuit (5); The output end of the first operational amplifier U1 in the in-phase amplifier circuit (4) is connected to the in-phase input end of the second operational amplifier U2 in the hysteresis comparator circuit (5).
2. The arbitrary threshold processing circuit with adjustable hysteresis ratio according to claim 1, characterized in that: The first resistor R1 and the eighth resistor R8 have the same resistance value, the second resistor R2 and the ninth resistor R9 have the same resistance value, the third resistor R3 and the tenth resistor R10 have the same resistance value, and the fifth resistor R5 and the seventh resistor R7 have the same resistance value.
Citation Information
Patent Citations
Any level hysteresis voltage comparator with adjustable return difference voltage
CN101882925A
Adjustable hysteresis comparator
CN202034957U
