Making battery charger with power supply