As mentioned above, the Schmitt trigger of the 555 timer, the biggest advantage is that it has hysteresis, which can shape the waveform, resist interference to the input signal, and prevent the output from frequently flipping at turning points. The hysteresis voltage is ΔU=1/3Vcc.
In fact, it is more convenient to use an op amp to achieve hysteresis control. The hysteresis voltage can be adjusted, not a fixed value. Here we take the LM358 op amp as an example to talk about how to use it to achieve hysteresis control. (A non-inverting input signal is used here)
As shown in the figure, assuming that the op amp is an ideal op amp and can output from rail to rail, that is, it can output full Vcc. According to this theoretical calculation, the upper limit voltage is 10V and the lower limit voltage is 7V in-phase control. That is, when the input voltage is higher than 10V, the op amp outputs a high level. The input voltage must be reduced to 7V before the op amp outputs a low level. Hysteresis ΔU=3V. The measured output high level is 11V (i.e. Vcc-1V, not full Vcc), the upper limit voltage is 10.1V, and the lower limit voltage is 7.1V.
Analyzing the calculation process, the hysteresis requirements and power supply Vcc are known conditions, then select a Uref and calculate the values ??of R1, R2, R3, R4, and select a reasonable R5 to get required upper and lower voltage limits. Lower limit voltage = upper limit voltage - ΔU. The prerequisite is that the state of the op amp at the moment of voltage flip is virtual short, but not other states. The virtual break is determined by the high input impedance of the op amp and is always satisfied. So when flipping
1.? Ua=Uref
The current at point Ua is 2.? (Ui-Uref)/R4+(Vout-Uref)/R3=Uref/ R5
3. Vout=Vcc or Vout=0
Among them, from 1, we can get the ratio relationship between R1 and R2. Select one R1 to get R2.
From 2 and 3, we can get 2 Ui. By subtracting, we get ΔU=R4/R3*Vcc. It can be seen that the hysteresis is determined by the feedback resistors R3 and R4. Select one R3 and R4 to meet the known hysteresis.
Then there is only one unknown R5 left. Ui+upper limit voltage = (Uref/R5+Uref/R3)*R4+Uref. Select a value of R5 to get Ui+upper limit voltage and lower limit voltage Ui -=Ui+-ΔU. The larger R5 is, the smaller Ui is, and the smaller R5 is, the larger Ui is. But Ui+, Ui- cannot be greater than Vcc.
Now change the settings, such as Vcc=15V, which requires a hysteresis of 5V. , the upper limit is 13V, the lower limit is 13-5=8V, set Uref=3V. Select and calculate R1=10K, R2=40K, R3=30K, R4=10K, R5=3.3K. Calculate Ui+=13.1V, Ui-=8.1V. As shown in Figure 2, the measured Ui+=13.1V and Ui-=8.3V.
If you need an inverse relationship between voltage and output, you can use an op amp to reverse the input signal and connect a feedback resistor. The above formula needs to be deduced again according to the virtual short virtual conclusion, so I won’t go into details here. In fact, the simple method is to connect the op amp output to a current limiting resistor and then an NPN transistor, and sample from the lower end of the resistor of collector C, which is the reverse output. As shown in Figure 3. Note that the red line is the NPN collector output. Another advantage of this is that it can output almost full-scale Vcc, only minus the saturation voltage drop of Uce (generally 0.1-0.3V)
Good Okay, that’s it for the hysteresis comparator circuit of the op amp.
Everyone is welcome to like and forward, *** and improve [Rose]