How to charge a battery with an ammeter