Schmitt Trigger for logic level conversion voltages up to +-20V
This requires you understand how a comparator needs to work.

Your Spec: Single Vcc 5V, +/-x to 20V input, Vih=1V Vil=-1V Voh=5V, Vol=0V or CMOS worst case logic level specs.


Thus Vth the center switch Vref must = 0V not 1V ( you have 20% of 5V.)
20% hysteresis is correct but at wrong Vref.
Vin below Vss causes loss of gain which is necessary for positive feedback.


this is defined by Negative Common-Mode Input Voltage Limit 

choose the non-inverting inputs then Vcm will be more positive.








simulate this circuit &ndash; Schematic created using CircuitLab