question about crystal oscillator output waveforms

Thread Starter

Jidis

Joined Nov 26, 2013
13
Sorry for the dumb question and thread resurrection, but I had a quick question about crystal oscillator output waveforms. I played with a whole pile of different web circuits and chips over the past day, and for some reason was never able to get anything resembling a decent square, unless the input signal was square to begin with. I even checked different input voltages with the CD4011, which gave a perfect on or off at its threshold point, with nothing in-between, but with input from a crystal circuit, I get about what you see (those are actually some of the nicer looking ones).

When you guys talk about "square" with some of these oscillator circuits, are you talking real square, like a function generator, or is my output what I should expect? The picture you see is from the OP's circuit in post#8, but like I say, I tried a bunch (oscillators and buffers which were supposed to clean them up). I *think* I had an MC14093B in there at one point (Schmitt trigger NAND gate), but I'm not positive. Frequency was mostly in the 1-20 MHz range. Can't remember if I got any kHz crystals to start.

Oddly, I don't actually need this circuit right now. I was just bothered that I didn't get what I expected.

Much Thanks! So-Called Squares.jpg
 

Thread Starter

Jidis

Joined Nov 26, 2013
13
Thanks Alfacliff!

But won't a better quality crystal just get me a cleaner sine wave for the circuit, or are you referring to those all-in-one (4-pin) things? I'm mainly just looking to sharpen and square up what I've got.
 

MrChips

Joined Oct 2, 2009
30,707
Many oscillator circuits are simply linear feedback circuits and hence you get a not-so-square output signal.
Simply feed the signal into another logic gate, e.g. inverting or non-inverting buffer.
 

Alec_t

Joined Sep 17, 2013
14,280
Are you sure those non-square waveforms aren't artifacts due to loading effects and bandwidth limitations of whatever you are using to monitor them?
 

Thread Starter

Jidis

Joined Nov 26, 2013
13
Thanks for the move Bertus.

@MrChips- Yeah, I tried an assortment of buffer/gate junk chained on the output, but I'm figuring maybe I just haven't used the right IC yet. Like I say, I can get a nice square output through those same gates if I feed them sharp square pulses from a microcontroller or something.

@Alec_t- I thought about tinkering around with the passive part values to see if it helps any. I think in the circuit I got those waves from (in dumindu89's thread), passing through that 2nd gate is supposed to keep the load on the crystal under control. FWIW- I'm watching it on a 50MHz scope (which for some reason can see things quite a bit higher), and none of the filtering is enabled.

Thanks!
 

alfacliff

Joined Dec 13, 2013
2,458
if you want square waves, stay away from the cd4000 series cmos, those ehips go analog with a little biasing, and the capacitive loading from a scope probe can make them distort.
 

Thread Starter

Jidis

Joined Nov 26, 2013
13
if you want square waves, stay away from the cd4000 series cmos
That's why I was wondering if maybe there was a preferred chip to use for buffering. The stuff I tried was just what I had on hand, but I could throw something on my next parts order if there's one more suitable.

Thanks
 

Thread Starter

Jidis

Joined Nov 26, 2013
13
Well like I say, I think the MC14093B was in there at one point. I do believe I've seen a 74HC14 here though. I'll try to dig that up tonight and see what it does.

Thanks Again!
 

Thread Starter

Jidis

Joined Nov 26, 2013
13
Unfortunately, I'm getting similar output now with a 74HC14N on the output of that crystal/7404N circuit. Feeding it a nice square pulse from a PIC microcontroller has nice sharp slopes (pictured). I'm actually using two of the 74HC14 gates in series.

Any idea what I'm missing here?

Thanks74HC14N.jpg
 

MrChips

Joined Oct 2, 2009
30,707
Yikes!!!

What is the frequency of your crystal?
What is the brand and model of your oscilloscope?
What are you using for a scope probe?
What is the probe grounding clip connected to?
 

Thread Starter

Jidis

Joined Nov 26, 2013
13
Could it be the speed, and I'm just not going to be able to clean up something way up in the MHz range with this setup? I'm realizing now (doh!) that I haven't actually looked at anything all that fast, aside from the oscillator circuits. The PIC's clock output pin also runs at 4MHz and it's similarly lumpy and rounded, even through the buffer chip. That app I was using to spit out the pulse was way way slower. I'll see if I can get a lower frequency sine or something into that 74HC14 chip later and see how square it gets. If that looks good, I'll call it quits.

<EDIT> MrChips - Looks like you were wondering about that speed thing at the same time I was. ;)
 

Thread Starter

Jidis

Joined Nov 26, 2013
13
Oh, and FWIW--

(right now) It's a 4MHz crystal in the 7404 oscillator circuit. Scope is a Rigol DS1052E (50MHz) using a 10x probe from a Tenma scope. Everything is tied to the breadboard's ground bus, and is in close proximity, but I realize breadboard in and of itself is pretty sloppy and unpredictable.
 
Top