I want to use an AC to DC 14.4 V adapter to supply both my circuit and its battery. The circuit works with 12 V and I use a battery during power outages (blackout time).
I have prepared the below circuit for switching between adapter and battery, but I need to recharge the battery when power comes on again. Assume the dip switch is the main power key.
The main problem is that if I use an op-amp as a comparator for the battery voltage level, it will show the adapter output voltage, not the battery level. So how can I solve this?
And another problem is: Suppose we are in blackout time and the battery voltage level has decreased to, for example, 9 V. How can I disconnect the battery? Is it possible to use a MOSFET like the IRF510 between battery and circuit?