Author Topic: Sine to square wave with same frequency  (Read 6634 times)

0 Members and 1 Guest are viewing this topic.

Offline conducteurTopic starter

  • Regular Contributor
  • *
  • Posts: 122
  • Country: be
Sine to square wave with same frequency
« on: November 06, 2015, 02:42:05 pm »
I need to convert a sine wave, from a crystal oscillator (14,31818Mhz) to a square wave, with the same frequency, to drive TTL Logic (74HCT*).
Tried to drive a bc547 into saturation, to get a clipped sinewave at the collector, which is connected to +5v with a pull up resistor. Doesn't work, grabbed a second one to get a darlington pair made of 2 bc547. Doesn't work either. I checked the datasheet, and according to me, it should be able to switch 100Mhz? Or am i wrong? BD 679 doesn't work either.

The sine wave is between 0 and about +5v (depends on the "load")....
 
« Last Edit: November 06, 2015, 02:51:43 pm by conducteur »
 

Offline grumpydoc

  • Super Contributor
  • ***
  • Posts: 2931
  • Country: gb
Re: Sine to square wave with same frequency
« Reply #1 on: November 06, 2015, 03:15:25 pm »
Just feed it into a 74HCT14 or any other buffer/inverter with a Schmitt trigger input.
 

Offline ocw

  • Regular Contributor
  • *
  • Posts: 248
  • Country: us
Re: Sine to square wave with same frequency
« Reply #2 on: November 06, 2015, 03:23:20 pm »
To see a translated version of Samuel Lawrence's sine to square wave converter go to:
https://translate.google.com/translate?hl=en&sl=pt&u=http://www.bloguetronica.com/2015/09/modulo-condicionador-de-sinal-sincronos.html&prev=search
It uses a TLV3501 as a comparator.  He found that his circuit worked up to 80 MHz.  I've built something similar which has worked up to 20 MHz.  I haven't tested my circuit above that frequency yet.
 
The following users thanked this post: bloguetronica

Offline dom0

  • Super Contributor
  • ***
  • Posts: 1483
  • Country: 00
Re: Sine to square wave with same frequency
« Reply #3 on: November 06, 2015, 04:01:57 pm »
(If the 0-5 V signal swing comes directly from the crystal you are probably driving too much power into it.)

If you just need a clock signal for something like a microcontroller or sequential logic, just use a 74HC14/HCT.

If you don't have 74'14, but 74'04, or want better characteristics use a circuit like this: http://www.taitien.com.tw/db/pictures/modules/CMS/CMS060207001/AP20100105-Utilize%20Clipped%20Sine%20Waveform%20in%20Circuit%20Design.pdf
,
 

Offline conducteurTopic starter

  • Regular Contributor
  • *
  • Posts: 122
  • Country: be
Re: Sine to square wave with same frequency
« Reply #4 on: November 06, 2015, 04:37:20 pm »
If you search KCO 010T 14,31818 with google, then you'll find the part that generates the sinewave that we got from school for our project.
The 74HCT14 is a good idea, so we will give it a try!
 

Offline mark03

  • Frequent Contributor
  • **
  • Posts: 749
  • Country: us
Re: Sine to square wave with same frequency
« Reply #5 on: November 06, 2015, 05:51:05 pm »
Some oscillator mfgs suggest a circuit like this:
http://www.pletronics.com/ple/articles/view/401
using a feedback resistor around a logic gate.  Is that equivalent to a Schmitt trigger input?

 

Online moffy

  • Super Contributor
  • ***
  • Posts: 2216
  • Country: au
Re: Sine to square wave with same frequency
« Reply #6 on: November 06, 2015, 10:28:31 pm »
Some oscillator mfgs suggest a circuit like this:
http://www.pletronics.com/ple/articles/view/401
using a feedback resistor around a logic gate.  Is that equivalent to a Schmitt trigger input?



No it biases the logic gate into a semi linear region and it then becomes a fairly high gain amplifier. You need to watch out though as it can pull quite a bit of current at idle because both transistors in the output stage are partially on.
 

Offline awallin

  • Frequent Contributor
  • **
  • Posts: 694
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2322
  • Country: au
Re: Sine to square wave with same frequency
« Reply #8 on: November 07, 2015, 08:20:13 am »
Some oscillator mfgs suggest a circuit like this:
http://www.pletronics.com/ple/articles/view/401
using a feedback resistor around a logic gate.  Is that equivalent to a Schmitt trigger input?

No, that's a negative feedback resistor. Schmitt trigger makes use of positive feedback.
 

Offline dom0

  • Super Contributor
  • ***
  • Posts: 1483
  • Country: 00
Re: Sine to square wave with same frequency
« Reply #9 on: November 07, 2015, 10:45:06 am »
Some oscillator mfgs suggest a circuit like this:
http://www.pletronics.com/ple/articles/view/401
using a feedback resistor around a logic gate.  Is that equivalent to a Schmitt trigger input?

No, that's a negative feedback resistor. Schmitt trigger makes use of positive feedback.

It's no feedback at all at the working frequency. The 1 M? bias the gate.
,
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2322
  • Country: au
Re: Sine to square wave with same frequency
« Reply #10 on: November 07, 2015, 11:08:23 am »
Some oscillator mfgs suggest a circuit like this:
http://www.pletronics.com/ple/articles/view/401
using a feedback resistor around a logic gate.  Is that equivalent to a Schmitt trigger input?

No, that's a negative feedback resistor. Schmitt trigger makes use of positive feedback.

It's no feedback at all at the working frequency. The 1 M? bias the gate.

...via negative feedback at DC  ;D
 

Offline bloguetronica

  • Frequent Contributor
  • **
  • !
  • Posts: 354
  • Country: pt
Re: Sine to square wave with same frequency
« Reply #11 on: June 04, 2019, 03:30:56 am »
To see a translated version of Samuel Lawrence's sine to square wave converter go to:
https://translate.google.com/translate?hl=en&sl=pt&u=http://www.bloguetronica.com/2015/09/modulo-condicionador-de-sinal-sincronos.html&prev=search
It uses a TLV3501 as a comparator.  He found that his circuit worked up to 80 MHz.  I've built something similar which has worked up to 20 MHz.  I haven't tested my circuit above that frequency yet.
Appreciated. Thanks!

Kind regards, Samuel Lourenço
« Last Edit: June 04, 2019, 03:32:32 am by bloguetronica »
 

Offline TheUnnamedNewbie

  • Super Contributor
  • ***
  • Posts: 1211
  • Country: 00
  • mmwave RFIC/antenna designer
Re: Sine to square wave with same frequency
« Reply #12 on: June 06, 2019, 01:00:16 pm »
Other way it can be done (I have seen this done at high frequencies) is simply have very, very fast amplifiers, and put many of them in series. As the signal get bigger and bigger you will hit the rails and approach clipping.

But in this case: Schmitt trigger is probably the best approach.
The best part about magic is when it stops being magic and becomes science instead

"There was no road, but the people walked on it, and the road came to be, and the people followed it, for the road took the path of least resistance"
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf