Arduino based battery charger