I need your advice: I am very new to electrical engineering, and I would like to design a PCB that allows me to rapidly charge/discharge capacitors. I would like to use a PIC to control MOSFETS that open/close voltage inputs from an external power supply to capacitors.
I thought about using this scheme for the switch:
... but I am not sure if this is a good approach since I would need a high OHM resistor to charge up my capacitor quickly (reduce drainage as much as possible) and to avoid excessive currents, but then on the downside, it would also slow down the discharge rate of the capacitor.
Hence, I was wondering, if someone knows a better approach of how to deal with such switching?
EDIT
Based on the comments and an answer, I tried to implement the two-MOSFET switch, as suggested:
Unfortunately, I must have done something wrong with my setup. Have a look at the transient analysis plot: The capacitor does not seem to be completely discharging.
The TINA simulation file can be downloaded here
EDIT 2
Another switching scheme that seems to work this time:
Here is the result: