CNC adjustable power supply to measure battery capacity