a power supply and control equipment for a resistance welding machine including a battery , battery charger , transistor or mechanical switches , pulse width modulation controller , a unit for generating either constant or time varying power , voltage , or current references .