Capacitor capacitance detection method