How do onboard battery chargers work