Convert variable amplitude & frequency sine wave w/ DC offset to square wave

Thread Starter

Christopher DeMars

Joined Jun 3, 2018
I need to convert a sine wave to a square wave with the following restrictions:

  • Frequency can range from around 50hz to 1khz
  • Waveform can be either of the attached scope readings. The first is easy: around 15v peak to peak, all above 0vdc, almost square already. The second is the harder one as it is under 5v peak to peak with a wandering offset.
  • Square wave output should be 50% duty cycle, 0-3.3vdc suitable for input to a microprocessor.

Should I do something like a variable gain amplifier feeding into an opamp / comparator circuit? Zeiner diodes? A fancy IC?

View attachment 153614 View attachment 153615


Joined Mar 10, 2018
Seems like AC couple into a comparator would handle both offset and wandering
offset. Reference for comparator 0V.

Additional info of course is needed -

1) Jitter requirement
2) Wander characteristics, like frequency, amplitude
3) Latency to a step change in wander

Regards, Dana.