# how to make a TTL Square wave from a sine wave source

#### whywhy68

Joined Jun 11, 2008
13
i was told that comparator was able to do the job.

is there any ciruit using comparator to generate a 50hz square wave from a 50hz sine wave source?

#### dileepchacko

Joined May 13, 2008
102
Hi

You can go for Schmitt trigger, it will help you to derive square wave from sin wave with the same frequency. Schmitt trigger nothing but a comparator, which will compare zero voltage. If you are using op-amp for Schmitt trigger "note that" give only +5VDC for powering the op-amp, because you required TTL logic. Here is a useful link for more information.

http://en.wikipedia.org/wiki/Schmitt_trigger

#### Attachments

• 93 KB Views: 94

#### Wendy

Joined Mar 24, 2008
22,155
What is the application? If you have a local transformer it will provide the basic AC signal to convert, otherwise you're going to have to tap into the AC line somewhere, not a good option, it can be dangerous, but doable.

#### alvarocanivell

Joined Dec 12, 2008
2
Watch out as well for:

- the resistance adaptation to the source, as the switching output may influence the input levels

- the slew rate of your OA, which will determine the maximum frequency of your generated square wave

- if your OA does not work on 0VDC to 5VDC but on -5VDC to +5VDC, place some diodes for TTL adaption

Álvaro

Hi

You can go for Schmitt trigger, it will help you to derive square wave from sin wave with the same frequency. Schmitt trigger nothing but a comparator, which will compare zero voltage. If you are using op-amp for Schmitt trigger "note that" give only +5VDC for powering the op-amp, because you required TTL logic. Here is a useful link for more information.

http://en.wikipedia.org/wiki/Schmitt_trigger