# circuit help: square and sin wave input = square wave output

Status
Not open for further replies.

#### spyghost

##### Junior Member level 2
hi,

i would like to ask what kind of circuit would produce such a response?

input:
- a sinewave with a varying amplitude directly proportional to the frequency. maximum pk is 3v and max freq is 500hz
- a square wave with a V-hi of 5V and V-low of 0V and a max freq of 500hz
- a square wave witha V-hi of 12V and a V-low of 0V and a max freq of 500Hz

output:
- a square wave that is ttl compatible (V-hi of 5v and V-low of 0V)
- the + side of the sine wave input must produce a high output (5v), while the - side of the sinewave must be low output
- the V-hi's of both square wave inputs must be a high output, while the V-low of the sqare wave inputs must produce a low output (0v)

what kind of circuit would produce such a response?

thanks!

#### flatulent

Re: circuit help: square and sin wave input = square wave ou

Your best bet would be to use an ordinary comparator IC. AC couple the input from your signal and the flip point will be at the middle of the input signal.

#### Humungus

##### Full Member level 6
Re: circuit help: square and sin wave input = square wave ou

You can also do it by using a schmit trigger inverter.

##### Full Member level 3
Re: circuit help: square and sin wave input = square wave ou

Hi Spyghost

Check this post:

If you take an output from N3 the you have a 5V square wave
and sinewave as well. You can change the regulator to 5V.

For 12V squarewave use a comparator as Flatulent suggests.

#### RegUser_2

##### Full Member level 2
Re: circuit help: square and sin wave input = square wave ou

flatulent said:
Your best bet would be to use an ordinary comparator IC. AC couple the input from your signal and the flip point will be at the middle of the input signal.

This is done if the negative comparator input is feed from the same signal, but through a RC LPF to estimate the average value of the signal.

#### artem

Re: circuit help: square and sin wave input = square wave ou

RegUser_2 said:
flatulent said:
Your best bet would be to use an ordinary comparator IC. AC couple the input from your signal and the flip point will be at the middle of the input signal.

This is done if the negative comparator input is feed from the same signal, but through a RC LPF to estimate the average value of the signal.

If signal changes from one type to another , RC LPF oputput establishment will increase transient time . If input freq down to 1 Hz , LPF should give 3 DB
somewhere at 0.1 Hz or may be less (establishment time t ~ 1/10*fmin) , while flatulents suggestion tolerate somewhere on min frequency (t ~ 1/fmin).

#### RegUser_2

##### Full Member level 2
Re: circuit help: square and sin wave input = square wave ou

artem said:
RegUser_2 said:
flatulent said:
Your best bet would be to use an ordinary comparator IC. AC couple the input from your signal and the flip point will be at the middle of the input signal.

This is done if the negative comparator input is feed from the same signal, but through a RC LPF to estimate the average value of the signal.

If signal changes from one type to another , RC LPF oputput establishment will increase transient time . If input freq down to 1 Hz , LPF should give 3 DB
somewhere at 0.1 Hz or may be less (establishment time t ~ 1/10*fmin) , while flatulents suggestion tolerate somewhere on min frequency (t ~ 1/fmin).

The flatulent's design have absolutly the same shortcomming

For transfering 1 Hz signal the HPF still have to have frequency cutt-off at 0.1 Hz, which settles due to a transient in the amplitude/type of the input signal the same way like a LPF into one of the arms

#### alphi

Re: circuit help: square and sin wave input = square wave ou

I think comparator is better,frequency of comparator is enought,and it easy to adjust.

Status
Not open for further replies.