Electronic – Triangular waveform to square waveform circuit

waveform

I am working on a frequency counter project and I am in the midst of thinking about how to go about doing a triangular wave to square wave converter. I have done some research but couldn't find any circuit diagram that could help. It was mostly just triangular wave to sine wave. I would appreciate if anyone could help. Thanks.

Best Answer

A comparator is used to produce square waves:

schematic

simulate this circuit – Schematic created using CircuitLab

At high frequencies (\$ > \frac{1}{2\pi R C}\$), the R-C filter passes only the DC offset of the input signal, and the output switches at the zero-crossings relative to this level.

At low frequencies, the R-C filter simply produces a time lag and the output switches based on the slope of the input signal.