Electronic – How to discharge a capacitor being charge by an op-amp

capacitordischargeoperational-amplifieroscillator

enter image description here

I've only shown a very small part of the circuit (if the rest of the circuit matters I can show the rest – diodes are used to maintain the charge acorss the capacitor).

Background:

The capacitor is constantly getting charged by the op-amp, i.e. the capacitor is initially at 0v, and keeps getting charged (without losing its charge) up to a peak value and it stays at the peak voltage. The peak value is determined by the power supply of the op-amp (In my case this is 15v).

Problem:

What I've been trying to do (without much success) is find a way to discharge the capacitor to 0v (ground it, or just really close to ground) really quickly, and allow it to get charged up again, similar to a relaxation oscillator.

What I've Tried:

I've tried using a UJT, PUT, SCR, and interesting transistor combinations. I can always seem to ground the capacitor really quickly once it reaches a certain voltage, but I as do, it doesn't charge up again (I think it's because I also end up grounding the op-amp, but I'm not too sure). I can show them if need be.

Please help:

It would be great if there was a way to discharge the capacitor once it reaches a certain voltage, and once it has been fully discharged, allow the op-amp to continue to charge it up again. Is this actually possible to achieve with this setup? Or is it inherently not possible? I'm hoping to try and find solutions using purely analogue components (transistors, capacitors etc)

Thank you!

Edit:

Full Circuit (Simplified a bit)

enter image description here

It uses a diode pump to charge up the capacitor in steps.

Best Answer

This is problem that generally occurs whenever you implement an analog integrator.

Analog switch across the capacitor, or a relay (with a small resistance in series). Ideally stop the current into the amplifier so the switch resistance does not compromise the reset.

For example, here is an analog switch suitable for +/-5V supplies that is less than 6\$\Omega\$ when on, and incorporates level shifting.

enter image description here

There are various analog switches available, some with logic level shifting, some without, some will tolerate 5V or less, some +/-15V. Charge injection (typically in the pC range) may be important if your capacitor is relatively small because the charge injection will affect the capacitor voltage when you open the switch. Generally speaking, the lower voltage your supply rails, the lower switch resistance is possible.

Another possibility is to close the loop around the integrator and drive the output voltage to zero, but you're probably looking at analog switches again. This is done in some meter chips.

Edit:

This is what an analog switch looks like internally, two MOSFETs with inverse drive:

enter image description here

Note that the body connections are not to the source as usual for discrete MOSFETs.