I need to transform a bipolar sine wave (varies from -5 V to 5 V, 1 kHz) to a square wave for further digital processing (0 to 3.3 V), as in this image:
The important thing is that this sine wave can't be distorted, so there can't be any limiting diodes at the input.
I have got only 3.3 V and 5 V voltage supplies. An obvious way to go is an op-amp working as a Schmitt trigger, but I'm not sure it can handle -5 V at the input with a single positive 3.3 V supply.
Should I reduce the amplitude on the input by using a resistor divider? And perhaps add some offset voltage for the signal to fit the input voltage range of the op-amp?
Best Answer
I would like to suggest that the comparator circuit shown by @hwengmgr could use some small improvements over what was posted.
Improvements include:
This was simulated with LT-Spice. I used a model for a comparator that was built into the package library. You can substitute a comparator of choice as long as it is specified for operation at a Vdd of 3.3V.
The addition of the hysteresis feature necessitated the swapping of the '+' and '-' inputs of the comparator which causes an inversion of the output waveform. If this is a problem it can be easily flipped with a logic element. If you select a dual comparator the other half of the package could be used to invert the signal.