question about crystal oscillator output waveforms

Discussion in 'General Electronics Chat' started by Jidis, Nov 11, 2014.

  1. Jidis

    Thread Starter New Member

    Nov 26, 2013
    13
    0
    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
     
  2. alfacliff

    Well-Known Member

    Dec 13, 2013
    2,449
    428
    go to International Crystal, they make crystal oscilators with crystals in them.
     
  3. Jidis

    Thread Starter New Member

    Nov 26, 2013
    13
    0
    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.
     
  4. MrChips

    Moderator

    Oct 2, 2009
    12,420
    3,355
    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.
     
  5. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,773
    1,103
    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?
     
  6. bertus

    Administrator

    Apr 5, 2008
    15,645
    2,344
  7. Jidis

    Thread Starter New Member

    Nov 26, 2013
    13
    0
    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!
     
  8. alfacliff

    Well-Known Member

    Dec 13, 2013
    2,449
    428
    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.
     
  9. Jidis

    Thread Starter New Member

    Nov 26, 2013
    13
    0
    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
     
  10. MrChips

    Moderator

    Oct 2, 2009
    12,420
    3,355
    You need a Schmitt trigger such as MC14584 or 74HC14.
     
  11. BobTPH

    Active Member

    Jun 5, 2013
    782
    114
    Use a Schmidt trigger.

    Bob
     
  12. BobTPH

    Active Member

    Jun 5, 2013
    782
    114
    MrChips, beat me by microsends.

    Bob
     
  13. MrChips

    Moderator

    Oct 2, 2009
    12,420
    3,355
    I'm fast on the Schmitt trigger.:)
     
  14. BobTPH

    Active Member

    Jun 5, 2013
    782
    114
    Not only that, but you know how to spell it correctly.

    Bob
     
  15. Jidis

    Thread Starter New Member

    Nov 26, 2013
    13
    0
    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!
     
  16. Jidis

    Thread Starter New Member

    Nov 26, 2013
    13
    0
    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?

    Thanks 74HC14N.jpg
     
  17. MrChips

    Moderator

    Oct 2, 2009
    12,420
    3,355
    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?
     
  18. Jidis

    Thread Starter New Member

    Nov 26, 2013
    13
    0
    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. ;)
     
  19. Jidis

    Thread Starter New Member

    Nov 26, 2013
    13
    0
    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.
     
  20. MrChips

    Moderator

    Oct 2, 2009
    12,420
    3,355
    The scope probe has a GROUND clip. What did you do with it?
     
Loading...