My question is, how can I make Arduino always running? What I want is its main power source is AC supply, and in our country, AC always fluctuates or have some power outages, so I want to solve it by switching the power to DC ( with a battery pack charged with solar ) instantly if the AC is off and switch back again to AC when it is back on.