I need a special supply for a project. I will use most of the time the battery and charge it periodically. With the main supply (the one is a buck converter supplied by an acid battery). This is to save the maximum power as possible.
The left part of the circuit is buck out, middle is the microcontroller charge output. And the right part is embedded battery.