discharge capacitor with resistor