Hi! This is my first time posting here at PF, so forgive me if i am going against any rules. The problem statement, all variables and given/known data I haven been given a problem to design a circuit that takes an input ranging from 0 to 5V, and outputs: 20V (DC) if the input is between 1 and 4V and nothing for 0 or 5V. The attempt at a solution From what i have learned from class/research, a Shmidt trigger would be a good approach. i designed one that "kind of" works, but doesnt do what i had intended. it does output a 20V DC signal if the input is between 1 and 4V, but if i go above 4V, i still get a moderately large output (~12V). below is my circuit and an explanation for my resistor values. from what i understand, with a Shmidt trigger, Voutput = +V until V1 > +V*R2/(R1+R2) once greater, Voutput would drop to -V. i have set the positive and negative supply voltages on my comparator to be 20V and 1mV respectively. thus, i was expecting Voutput to go to ~1mV when Vin > 4V. any insight/hints would be greatly appreciated.