This is the analog circuit cookbook for a non-inverting comparator with hysteresis: Non-Inverting Comparator with Hysteresis Circuit. The cookbook uses a TLV7041 with a pull-up resistor, but you can ...