Below is the complete circuit for a PWM control output:
(please left-click to enlarge)
"Out" in the schematics will be directly connected to PWM input of a 3-wire or 4-wire DC fan.
Since I don't know the input impedance of the fan, I decided to use a PNP transistor at the output of the LM393 comparator.
Here is the output waveform of the comparator:
And here is the final output after the PNP (there is like 0.9V offset):
(please left-click to enlarge)
As you see using a PNP is introducing offset to the output signal. Is there a technique or another coupling way to fix this issue without using another opAmp?