How to demagnetize and charge the battery current