Solar battery charger with controller