How to transform a signal into a square wave ?

Thread Starter

PauloConstantino

Joined Jun 23, 2016
266
Friends!

I took a crystal oscillator, those little rectangular ones with all the components inside. I took the output and saw it on the scope, and I obtained a wave that seems like a combination of different sine waves. It's not a sine wave, and it's not a square wave.

Why is this? How can I clean it up and get a square wave, which is what I need? I tried passing it through a Schimmit trigger but nothing happened!

Thank you.
 

RichardO

Joined May 4, 2013
2,270
What frequency is the oscillator. Do you have short leads and good high frequency power supply bypassing? Is you scope ground lead short?
 

Thread Starter

PauloConstantino

Joined Jun 23, 2016
266
I tried a 24MHz oscillator and I get a sine wave. Why isn't the 5MHz one working ?

Actually, it's not even a sine wave, it's a triangular wave that I get from the crystal. Is this right ?
 
Last edited:

EM Fields

Joined Jun 8, 2016
583
Friends!

I took a crystal oscillator, those little rectangular ones with all the components inside. I took the output and saw it on the scope, and I obtained a wave that seems like a combination of different sine waves. It's not a sine wave, and it's not a square wave.

Why is this? How can I clean it up and get a square wave, which is what I need? I tried passing it through a Schimmit trigger but nothing happened!

Thank you.
It would be helpful if you could post a copy of the oscilloscope's display, the oscillators's data sheet, and the oscilloscope and probe specifications. Or, at least, links to them.
 

Thread Starter

PauloConstantino

Joined Jun 23, 2016
266
I tested many crystals. All my 5MHz ones give weird signals. My 20MHz ones give a triangle wave. I expected to get square waves out of these oscillators. What is happening please ?
 

JWHassler

Joined Sep 25, 2013
306
I tested many crystals. All my 5MHz ones give weird signals. My 20MHz ones give a triangle wave. I expected to get square waves out of these oscillators. What is happening please ?
That's typical: the oscillator is an analog circuit. You need only input it to a (Schmitt trigger) CMOS buffer to get all the squareness you want
 

Thread Starter

PauloConstantino

Joined Jun 23, 2016
266
Hello,

Show us the schematic of your crystal oscillator with buffer.

Bertus
Hi Bertus thank you.

This is the schematic. I drew it in a hurry for you. It's just a simple rectangular crystal and a schimidt trigger connected directly. I also have two 100nF caps at each IC.

 

Alec_t

Joined Sep 17, 2013
14,263
Simulation in LTspice shows a similar waveform if you assume a stray wiring inductance of ~300nH and a stray capacitance of ~100pF. It is likely that your breadboard and jumper wires are contributing strays of that order.
 

Thread Starter

PauloConstantino

Joined Jun 23, 2016
266
Simulation in LTspice shows a similar waveform if you assume a stray wiring inductance of ~300nH and a stray capacitance of ~100pF. It is likely that your breadboard and jumper wires are contributing strays of that order.

oh wow... That's crazy. Why is it then that only one of the crystals does his? The other one works fine and shows a triangle wave...
 

DickCappels

Joined Aug 21, 2008
10,138
Some crystal oscillators have open emitter outputs and need a termination resistor. If a 470 ohm resistor to ground clears up the waveform, that's what you have.
 
Top