7
\$\begingroup\$

This question already has an answer here:

I have a sine wave of 100 mV and 50 Hz. I want to design a circuit that converts this sine wave into a square wave as shown in a figure.

Enter image description here

\$\endgroup\$

marked as duplicate by Eugene Sh., Sunnyskyguy EE75, Finbarr, RoyC, Bimpelrekkie Apr 15 at 11:08

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • \$\begingroup\$ You would almost certainly want to add hysteresis to your solution for a low level low frequency application \$\endgroup\$ – sstobbe Apr 12 at 15:04
  • \$\begingroup\$ Does the OP want a 50% duty cycle? in which case, some zero-crossing is needed. \$\endgroup\$ – analogsystemsrf Apr 12 at 21:23
17
\$\begingroup\$

The easiest way to do this would be to use a comparator.

enter image description here

Picture taken from linked site

All you have to do is set your Vref level to where you want your square wave to trigger. When the sine wave crosses the Vref level, the comparator output will go high. As it approaches it again and goes below the Vref level, the comparator output goes low.

You will then get yourself a square wave.

Be aware the example shown in the graphic is of a non-inverting comparator. An inverting comparator works with the same principle, but the output is inverted

\$\endgroup\$
  • \$\begingroup\$ The OP seems to want to cut off the negative half of the sine wave, so a diode may be needed at the input. \$\endgroup\$ – JimmyB Apr 12 at 15:01
  • 3
    \$\begingroup\$ @JimmyB Not if you pick a comparator that can handle a negative input voltage. \$\endgroup\$ – Hearth Apr 12 at 15:03
  • \$\begingroup\$ A diode for 100mV will be hard to find... \$\endgroup\$ – Eugene Sh. Apr 12 at 15:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.