This circuit can be used as rechargeable battery based power supply with automatic recharging functionality. Low and High threshold voltages are set by zener diode and positive feedback of opamp. Red LED while on, indicates charging state. Green LED emulates load. In the heart of the circuit is operational amplifier based comparator with positive feedback.
Before emulation starts the Switch shall remain closed and then opened to initiate transitional proccesses. This enables the capacitor emulating a rechargeable battery to be fully charged before opamp starts monitoring battery's voltage level and provide charging as and if needed.