I need to convert a sine wave to a square wave with the following restrictions:
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
- 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