Convert sine to square

Thread Starter

elec_eng

Joined Mar 22, 2007
2
Hi.

What type of circuit could i use to convert a sine wave to a square wave. The resulting square wave would need to have the same frequency and amplitude of the sine wave. The sine wave would be working in the range of 0-10kHz and 0-2 V p-p. Could this be done using a 741 op-amp?


Any advice would be helpful.

Thanks.
 

Dave

Joined Nov 17, 2003
6,970
Hi.

What type of circuit could i use to convert a sine wave to a square wave. The resulting square wave would need to have the same frequency and amplitude of the sine wave. The sine wave would be working in the range of 0-10kHz and 0-2 V p-p. Could this be done using a 741 op-amp?


Any advice would be helpful.

Thanks.
You may find Volume 3 - Chapter 8.3 of help.

Dave
 

Ron H

Joined Apr 14, 2005
7,014
It's going to take something much more complex than a comparator to perform the "same amplitude" function, especially at zero Hz (impossible). Can you give a more acceptable low-frequency limit, like maybe 20Hz?
 

thingmaker3

Joined May 16, 2005
5,084
I missed the "same amplitude" clause of the sentence. Ron is correct - an attenuator stage of some kind, or maybee a VCA, will need to follow the comparator. Not sure off the top of my head how to make such a thing work.

Another method might be to take the comparator's rails from a slightly amplified, rectified, & filtered version of the i/p. Won't be much good at lower frequencies, though.
 

Ron H

Joined Apr 14, 2005
7,014
I missed the "same amplitude" clause of the sentence. Ron is correct - an attenuator stage of some kind, or maybee a VCA, will need to follow the comparator. Not sure off the top of my head how to make such a thing work.

Another method might be to take the comparator's rails from a slightly amplified, rectified, & filtered version of the i/p. Won't be much good at lower frequencies, though.
Assuming some reasonable minimum frequency, I would make positive and negative peak detectors (rectifiers), and a comparator which controls analog switches from those voltages to the output.

Something like this. If you wanted it to respond rapidly to amplitude changes, the peak detectors would have to be sexier, maybe with some sample-and-holds.
 

Attachments

Top