I have a condition where I need to power MCU with the second source when first is not working. MCU I am using is ATMEGA328p
. The circuit is solar charge controller. I am using a battery to turn on the MCU. Battery voltage is going into LM7805
and its output (5v) is going into the VCC of MCU.
Now I also want to use the solar voltage (whenever available) to give power to MCU, so that if battery is faulty or is not working, then solar voltage will be used to power the MCU, thus at least load will on during day time.
I have the below schematic in my mind.
Now I want to know if battery is healthy and is giving voltage ~12v and during sunlight solar panel is also giving ~20v, then what will happen in this case.? Is the above design safe to use. If yes, then what type of diodes should I use.
During day time both (solar + battery) voltage will be going to the regulator, will it create any trouble.? Please help. Thanks.