Author Topic: Crystal Oscillator Waveform  (Read 1107 times)

0 Members and 1 Guest are viewing this topic.

Offline ulianoTopic starter

  • Regular Contributor
  • *
  • Posts: 172
  • Country: it
Crystal Oscillator Waveform
« on: September 28, 2022, 07:26:53 am »
I realized a proto with this oscillator circuit (not designed by me, copied somewhere) which is intended to drive an AVR chip at 16-24 MHz (here 16).

Actually -despite a routing error in this first proto- it works, as can be seen in attached pictures the oscillator is switched to external and the flag reports that the frequency is stable.

Nevertheless I'm not really happy with the waveform, my naivety led me think to something more square-y. The source of this behavior is not the wire bridge as the waveform is the same when I disconnect it.
I found this application report but here, in fig 20 the waveform is non-square-y the other way around while in other pictures the non-square-iness is symmetric at difference from mine.

I tried to (randomly, well, quite) replace resistors and capacitors with the following caveats: I don't have capacitors less than 10p so I tried only to increase and I don't have resistors larger than 1M so I only tried to decrease.

all my attempts gave almost negligible modifications in the waveform  (for worst)

I even tried to replace U1A with a 74hc14 to no avail.

I could even be happy with that but, as I'm correcting PCB errors I'd really like to understand what's going on.








 

Online iMo

  • Super Contributor
  • ***
  • Posts: 4672
  • Country: nr
  • It's important to try new things..
Re: Crystal Oscillator Waveform
« Reply #1 on: September 28, 2022, 07:36:44 am »
To see 16MHz square properly your oscilloscope has to be setup for a higher BW than 20MHz, etc.
Also you may go lower with the 470ohm resistor, up to say 180ohm.
 
The following users thanked this post: uliano

Offline ulianoTopic starter

  • Regular Contributor
  • *
  • Posts: 172
  • Country: it
Re: Crystal Oscillator Waveform
« Reply #2 on: September 28, 2022, 07:44:54 am »
So simple!

TY!
 

Offline ulianoTopic starter

  • Regular Contributor
  • *
  • Posts: 172
  • Country: it
Re: Crystal Oscillator Waveform
« Reply #3 on: September 28, 2022, 08:01:24 am »
replacing the scope GND alligator with a short spring now I get this, I can probably be happy with that

 
The following users thanked this post: tautech

Offline tautech

  • Super Contributor
  • ***
  • Posts: 28136
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: Crystal Oscillator Waveform
« Reply #4 on: September 28, 2022, 08:13:52 am »
So simple!

TY!
Yes and also be aware every measurement process has the potential to actually change the measurement and circuit behaviour.
Ideally any probe is perfect and won’t change circuit behaviour but the truth can be somewhat different especially when measuring high impedance circuits.
Active probes that load the circuit with just a pF or 2 are the preferred solution but also can be costly and have limitations of the voltage they can be used for.

Another solution is a 100:1 probe that can just 1/3 the tip capacitance of a 10:1 probe and have the added versatility of providing added protection and safety at elevated low impedance voltages.
Avid Rabid Hobbyist
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 

Offline ulianoTopic starter

  • Regular Contributor
  • *
  • Posts: 172
  • Country: it
Re: Crystal Oscillator Waveform
« Reply #5 on: September 28, 2022, 11:21:38 am »
The output of a cmos gate should not have a particularly high impedance, if my intuition doesn't misleads me.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5839
  • Country: de
Re: Crystal Oscillator Waveform
« Reply #6 on: September 28, 2022, 07:16:45 pm »
A general comment on Pierce crystal/resonator oscillators using CMOS: do not use buffered or Schmitt-trigger types.
You'll get the best results with unbuffered inverters/gates.

This part is perfect for the job:
74LVC1GX04 (TI or Nexperia):
https://www.ti.com/product/SN74LVC1GX04

Otherwise use 74LVC2GU04:
https://www.nexperia.com/products/analog-logic-ics/asynchronous-interface-logic/buffers-inverters-drivers/series/74LVC2GU04.html
« Last Edit: September 29, 2022, 11:57:29 pm by Benta »
 
The following users thanked this post: uliano

Offline ulianoTopic starter

  • Regular Contributor
  • *
  • Posts: 172
  • Country: it
Re: Crystal Oscillator Waveform
« Reply #7 on: September 29, 2022, 06:36:59 am »
I remember to have dug the question, in a very shallow way, by reading here, in partcular (par. 3)

Quote
Because the first stage remains in linear mode during oscillation, a buffered inverter consumes less power than an unbuffered inverter. Both buffered and unbuffered inverters can be used for oscillator applications, with only slight design changes. Because the gain of buffered inverters is very high, they are sensitive to parameter changes in the oscillator circuit and are less stable than unbuffered inverters.

then I soldered a couple proto with either hc04 or hcU04 on multihole board and found no difference at all, then, without a better reason, went for <<less power>> and, maybe, having the clock output buffered "sounds" better in case I want to connect there multiple devices but well aware that if I had dug further (read deeply the above mentioned note) I would have probably chosen the U.

EDIT: also the design from which I copied had buffered parts.

Now I thank you for having "forced" me to deal with my conscience  ;D

Bottom line, this specialized part has the unbuffered gate for the oscillator and a triple (why triple???) buffered output stage seems perfect but for the need of a further test iteration with the PCB or the willingness to take some (admittedly minimal) risk.

On the contrary going with LVC2GU04 doesn't need any PCB modification and leaves me with an unbuffered (I don't even know why I dislike this) signal

Stalled again!  ;D


 
« Last Edit: September 29, 2022, 06:47:27 am by uliano »
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5839
  • Country: de
Re: Crystal Oscillator Waveform
« Reply #8 on: September 30, 2022, 12:17:45 am »
this specialized part has the unbuffered gate for the oscillator and a triple (why triple???) buffered output stage seems perfect but for the need of a further test iteration with the PCB or the willingness to take some (admittedly minimal) risk.

On the contrary going with LVC2GU04 doesn't need any PCB modification and leaves me with an unbuffered (I don't even know why I dislike this) signal
There's nothing "bad" about unbuffered parts. An inverter like any 74xxx04 is just an inverting amplifier. The buffered part has two stages = lots of gain, the unbuffered part has just one stage and has less gain. It operates well in linear mode and is faster, which is what you want for a Pierce oscillator.
Output drive is the same for both types (you seem to think that buffered types have more "power").

The triple output stage on the 74LVC1GX04 is for very low power oscillators (eg, 32 kHz) with crystal drive power of <1 uW that need to be amplified.
A "classic" design would use four inverters of 74HCU04 or CD4069UB/MC14069UB type.
 
The following users thanked this post: uliano

Offline ulianoTopic starter

  • Regular Contributor
  • *
  • Posts: 172
  • Country: it
Re: Crystal Oscillator Waveform
« Reply #9 on: September 30, 2022, 05:47:23 am »
So as I don't really need micropower or 30khz I guess I can keep my pcb layout and go for the cheaper u04.

the reduced gain has implication on the passive components values in the circuit?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf