Charging a battery with a solar panel circuit