Hello,
First, this question should be very easy for most members here. Sorry for asking this question that is maybe way too stupid or easy. I am a 3rd year high school student and it's my first time posting using my brother's account. I really need some assistance with this problem !!
This is my small project. I am trying to discharge the capacitor at a given voltage, let's say, 3.2V. V3 will keep charging the capacitor, and the diode will prevent the capacitor from discharging.

Before the cap reaches 3.2V, it will keep charging and never discharge (the diode blocks it from discharging).
Once the cap reaches 3.2V, it will turn the MOSFET on. The capacitor is also connected to the drain. So supposedly, it should discharge at a rate of 50n * 10 sec. I wanted it to discharge in a separate circuit that is built by MOSFET.
I ran the simulation and it didn't look too good. V(n002) is the input pulse. V(n001) is the capacitor voltage, and I (R1) is the current through the drain.

How can I make it to discharge like this ( ignore the green line after the white line):

Thank you for your help. Any comment will be appreciated. I am very into electronics and I believe you can help me more on this problem!!
- Liam
First, this question should be very easy for most members here. Sorry for asking this question that is maybe way too stupid or easy. I am a 3rd year high school student and it's my first time posting using my brother's account. I really need some assistance with this problem !!
This is my small project. I am trying to discharge the capacitor at a given voltage, let's say, 3.2V. V3 will keep charging the capacitor, and the diode will prevent the capacitor from discharging.

Before the cap reaches 3.2V, it will keep charging and never discharge (the diode blocks it from discharging).
Once the cap reaches 3.2V, it will turn the MOSFET on. The capacitor is also connected to the drain. So supposedly, it should discharge at a rate of 50n * 10 sec. I wanted it to discharge in a separate circuit that is built by MOSFET.
I ran the simulation and it didn't look too good. V(n002) is the input pulse. V(n001) is the capacitor voltage, and I (R1) is the current through the drain.

How can I make it to discharge like this ( ignore the green line after the white line):

Thank you for your help. Any comment will be appreciated. I am very into electronics and I believe you can help me more on this problem!!
- Liam





