I have a staircase generator circuit with a MOSFET connected to capacitor 2. The input of the capacitor is connected to a comparator and I wish for the MOSFET to cut off when the output of the comparator is high.
The comparator is connected to a sine wave generator.
The waveform I want to achieve is shown below:
I am having problems achieving this, when the MOSFET is disconnected as above, the wave form I get is this:
So the blue staircase wave is working as intended albeit not resetting. However, the moment I connect the MOSFET the staircase waveform is affected with some weird fluttering at the beginning and it is not resetting the staircase:
I have confirmed that with a manual switch the staircase resets as needed, however, I cannot get the transistor to work as intended.