I have op amp TL 072 https://www.ti.com/lit/ds/symlink/tl074.pdf and I need to use it as voltage comparator for signal from weather station. The logical "0" is PWM signal with width around 1.5ms and logical "1" width is around 500us. Could the TL072 handle those signals without distorting them much? In datasheet it says that 3MHz is top frequency for TL072, but I'm not sure how it would behave as a comparator and with PWM signals.
since TL072 is used as a comparator , i think you need not give priority to frequency of 3MHz.
one , a pulse width of 1.5ms and 0.5 ms , will be handled without any problem.
What is the other i/p that you are comapring it with ?
I thought I could use potentiometer to make voltage divider to get 200mV voltage that I want to compare the signal to.
The other solution that I'm thinking about is to use 1st op amp in TL072 to amplify the signal around 10 times and then use fixed voltage divider with resistors to get reference voltage.
The graph of slew rate in the datasheet shows when a sinewave begins to be distorted by switching speed. The TL072 does very well up to 100kHz. A lousy old 741 opamp curls up and dies above only 9kHz. An LM324 and LM358 are useless above only 2kHz.
That is more than enough. I can see the waveform on my sound card oscilloscope. It's not distorted and the sound card only goes up to 20kHz. So TL072 will be good.