Measure capacitance with capacitor