Capacitor charging and discharging experiment improvement