Add a PNP transistor with the emitter connect to +5V, the base connected to the top of the 12kΩ resistor (disconnect the resistor from +5V), and the collector connected to a resistor (e.g. 1kΩ) to ground.I would like to know if there's a way to make it switch between 0-5v.
I don't quite understand the way you are telling me to do the connection can you post a schematic.Add a PNP transistor with the emitter connect to +5V, the base connected to the top of the 12kΩ resistor (disconnect the resistor from +5V), and the collector connected to a resistor (e.g. 1kΩ) to ground.
You should get a voltage swing of 0 to 5V (minus the collector-emitter saturation voltage) at the transistor collector.
Replace the right-hand-side transistor with a PNP type, emitter to the positive supply.I have build a differential amplifier comparator and it works fine except that instead of switching voltage between zero and 5v, it toggles it between 3.5v and 5v.
So, I would like to know if there's a way to make it switch between 0-5v.
The schematic is as followsView attachment 253580