Convert sine to square

Discussion in 'General Electronics Chat' started by elec_eng, Mar 22, 2007.

  1. elec_eng

    Thread Starter New Member

    Mar 22, 2007
    2
    0
    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.
     
  2. thingmaker3

    Retired Moderator

    May 16, 2005
    5,072
    6
    You can configure the 741 as a comparator, with one of the inputs about halfway between the peaks of the sine wave.
     
  3. Dave

    Retired Moderator

    Nov 17, 2003
    6,960
    145
    You may find Volume 3 - Chapter 8.3 of help.

    Dave
     
  4. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    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?
     
  5. thingmaker3

    Retired Moderator

    May 16, 2005
    5,072
    6
    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.
     
  6. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    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.
     
  7. elec_eng

    Thread Starter New Member

    Mar 22, 2007
    2
    0
    I'll take your advice on board.

    Thanks guys. :cool:
     
Loading...