I have a circuit that takes an input voltage of 0.5-1.5 volts and uses it to charge a supercapacitor up to around 4 volts. However, I only need the capacitor to be charged up to 3 volts. What is the simplest way with commonly available discrete components (including resistors, capacitors, NPN and PNP transistors, power transistors/power MOSFETs, 2N6027 PUTs, and various diodes) to turn off power to the charging circuit when the capacitor's voltage goes over 3 volts and turn it on when the voltage drops below around 2.8 volts?
simulate this circuit – Schematic created using CircuitLab