Ok, I tried to verify that what you said but I couldn't get the expected effect...
At the Output, I still have negative voltages... What is wrong here? I also stepped the wiper value to watch the Duty Cycle modulation!
View attachment 94969
Hello again,
You NEED the 10k resistor from the cathode to ground.
This 10k acts like both a pullup and a pulldown resistor. It pulls DOWN the input of the next stage, and pulls UP the diode cathode.
The diode reverse leakage is very small, as the diode looks almost like a 500megohm resistor in reverse, but compared to an infinite impedance that is still enough to cause conduction. With the 10k resistor to ground, it can pull the cathode up to ground level and thus provide the required near zero output level.
Sometimes the next stage will take care of this, but if there is no next stage then it is an open circuit which is an infinite impedance and thus you could see some negative voltage.
So add the 10k and see if that clears up the negative output voltage issue (from the comparator that is).