As you might know when we use an operational amplifier in a circuit by connecting a voltage reference of, for example, 2.5 volts to its inverting input, and a triangle voltage between 0 and 5 volts to its non inverting input, Then the op amp would create a square wave on its output The reason for this behavior can be explained by the first golden rule of op amps Which, you should be familiar with if you watch my basics video about the subject But anyway, the rule states that an op amp will do anything to achieve a zero volt difference between its inputs But since our op amp configuration got no feedback system, the output either swings up to the positive supply voltage If the non-inverting input has a higher voltage potential than the inverting input Or swings down to zero volts if the inverting input voltage is higher than the one on the non-inverting input This way the op amp acts as a comparator Which is an important circuit when it comes to monitoring voltages And, for example, activating an alarm if they fall underneath a certain threshold value But of course, comparators are not perfect. if we observe the output voltage while the monitored voltage crosses the reference voltage Then we can see that there’s not one definite transition, there are tons of pulses So in this video, I will tell you all the basics about so-called schmitt triggers, which would be the solution to our noise related problem Let’s get started! This video is sponsored by JLCPCB One fact about them; the annual production capacity Of JLCPCB is two hundred thousand square meters for different layouts of PCBs Upload your Gerber files to order high quality PCBs for low prices, currently even with free shipping All we need to turn our comparator into a Schmitt trigger is a couple of resistors And depending on how we connect them to the comparator, we can create a non inverting or an inverting schmitt trigger But what is the function of such as schmitt trigger to begin with? Well as i said before, with a comparator we got one threshold value which determines whether the output is high or low A schmitt trigger on the other hand offers two threshold values, a high one and a low one So only if the to-be monitored voltage passes the high threshold value, the output gets pulled high And only if the low threshold value gets undershot the output gets pulled low This way we can avoid noise caused oscillation on the output because in this so-called Hysteresis voltage (between the two thresholds) no switching of the output is possible Now this functional principle of a schmitt trigger would equal that of a non-inverting one While an inverting schmitt trigger would basically work the same, but reverses the output state for its high and low threshold values And of course we can calculate the hysteresis and threshold voltages for both schmitt trigger types with a few different formulas If you’re interested in that then definitely check out the video description Where you can find some useful links But since you rarely build up a Schmitt trigger with an op-amp nowadays Let’s rather focus on the 74 HC 14 hex inverting schmitt trigger IC that I often like to use First off its datasheet tells us the universal symbol of a schmitt trigger And after connecting the IC to a supply voltage of 5 volts We can connect our to-be monitored voltage to one of the six data input pins And observe the schmitt trigger signal on its corresponding data output pin which is obviously, due to the name of this IC, in bursts But don’t worry; if we put two of them in series, then we can get rid of this inversion Now by utilizing a potentiometer on the input I slowly rose and lowered the voltage in order to find out that the two threshold voltages were around 2.1 volts and 3.1 volts Which pretty much correlates with what the datasheet claims At this point you should have a basic understanding of schmitt triggers can do, so the question remains, when to use them? Well, let’s say you got a push-button, which you would love to use as an input for an awesome project If we use a 10K pull-up resistor to connect one side of it to 5 volts and the other side to ground Then we can utilize the oscilloscope to observe that the voltage gets pulled down to ground whenever we push the button But wait a minute, let’s zoom in on the transition from the low to high state, which reveals that there is no fluid transition Instead we got a lot of bounces from the mechanical push-button, which could lead to problems for our project That is why we must bounce it by firstly adding an RC network to the output of the switch to decrease the rise/ full time of the bounces So that we can afterwards add a schmitt trigger in order to recreate the sharp edges, and thus create a fluid switch transition perfect for our project But then again, if you would try to add the push button to an arduino circuit Then we would only need the RC network for the bouncing since the digital inputs of the microcontroller Already offers a high and low threshold voltage, which is just like a schmitt trigger Next we can add a capacitor and resistor to a schmitt trigger like it’s shown here in order to create a simple relaxation oscillator Because of the hysteresis voltage, the capacitor gets charged/discharged continuously, which results in a square wave on the output And by utilizing a potentiometer as a resistor we can easily reach frequencies in the kilo Hertz range Last but not least a schmitt trigger is very useful if you got a noisy or worn out data signal That you want to freshen up a bit. And with that being said, you should now be familiar with the basics of schmitt triggers And understand why they are often very important components I hope you enjoyed watching this video if so, don’t forget to Like, share, and subscribe Stay creative, and I will see you next time!