I'm trying to build a Schmitt trigger like the one described here: http://pcbheaven.com/drcalculus/index.php?calc=st_nonsym_sp
However, it isn't working as expected, and I'm thinking it may be due to a number of reasons, only a few of which I have a suspicion of. It would be a great help if someone could advise me on how to properly build a Schmitt Trigger because I'm quite new to this and don't have much experience.
I used a LM358 op-amp from TI, which I'm thinking might not work because I'm not sure if it's a two-rail op-amp. I don't know exactly why a two-rail op-amp is necessary, but a couple of videos I have watched mentioned that it was necessary.
The resistors I used have relatively small values. In the PCBHeaven link I posted above, R1 = 1kOhm, R2=10kOhms, and the feedback resistor was 10kOhms as well. I don't know why this matters, but might it have something to do with saturation of the op-amp? I really don't know.
I'm more frustrated because I see certain videos floating around online such as this one: https://www.youtube.com/watch?v=-JW1fv2O73A and the circuit set up seems pretty much exactly the same as mine, save for the larger resistor values and the different op-amp.
I know that the Schmitt Trigger is supposed to output either a high or low logic level when the thresholds are passed, however I'm not observing this. For example, if I supply the op-amp with 5V and also make V+ 5 volts, I observe the following results:
When input voltage = 5V, output voltage = 2.85V When input voltage = 0V, output voltage = 3.91V When input voltage = 3.3V, output voltage = 3.91V
Which are extremely confusing results, especially since none of those values are near 0V as I would expect to represent a logic low. I become more confused when I directly test the functionality of the op-amp by comparing the negative and positive terminals, and the op-amp correctly produces a logic high when the positive terminal > negative terminal, and produces a logic low when negative terminal > positive terminal.
If anyone has any idea or suggestions for where I went wrong, or have general advice for building a Schmitt Trigger, please let me know!