You can use this circuit to detect a certain voltage value. Either below 3v or above 4 2v. The 4.2v source is the signal to monitor. By modifying the 4.2v source in this simulator you will understand its operation. In this case, its operation was configured from 3v to 4.2v. In addition, you can place a polarity inverter at the output since it delivers a mega signal and goes. You can do it with a PNP transistor.
Este circuitos lo puedes usar para detectar determinado valor de voltaje. Bien sea por debajo a 3v o superior a 4 2v. La fuente de 4.2v es la señal a supervisar. Modificando la fuente de 4.2v en este simulador entenderás su funcionamiento, En este caso se configuró su funcionamiento de 3v a 4.2v. adicional le puedes colocar un inversor de polaridad en la salida ya que este entrega una señal mega yo va. La puedes hacer con un transistor PNP.