Crystal Oscillator Waveform - Page 1
Forum section: electronics / beginners

author: uliano
author_rank: Regular Contributor
timestamp: September 28, 2022, 07:26:53 am
content: 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 foundthis application reportbut 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.

author: iMo
author_rank: Super Contributor
timestamp: September 28, 2022, 07:36:44 am
content: 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.

author: uliano
author_rank: Regular Contributor
timestamp: September 28, 2022, 07:44:54 am
content: So simple!TY!

author: uliano
author_rank: Regular Contributor
timestamp: September 28, 2022, 08:01:24 am
content: replacing the scope GND alligator with a short spring now I get this, I can probably be happy with that

author: tautech
author_rank: Super Contributor
timestamp: September 28, 2022, 08:13:52 am
content: Quote from: uliano on September 28, 2022, 07:44:54 amYes 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.

author: uliano
author_rank: Regular Contributor
timestamp: September 28, 2022, 11:21:38 am
content: The output of a cmos gate should not have a particularly high impedance, if my intuition doesn't misleads me.

author: Benta
author_rank: Super Contributor
timestamp: September 28, 2022, 07:16:45 pm
content: 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/SN74LVC1GX04Otherwise use 74LVC2GU04:https://www.nexperia.com/products/analog-logic-ics/asynchronous-interface-logic/buffers-inverters-drivers/series/74LVC2GU04.html

author: uliano
author_rank: Regular Contributor
timestamp: September 29, 2022, 06:36:59 am
content: I remember to have dug the question, in a very shallow way, by readinghere, in partcular (par. 3)Quotethen 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 conscienceBottom 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) signalStalled again!

author: Benta
author_rank: Super Contributor
timestamp: September 30, 2022, 12:17:45 am
content: Quote from: uliano on September 29, 2022, 06:36:59 amThere'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.

author: uliano
author_rank: Regular Contributor
timestamp: September 30, 2022, 05:47:23 am
content: 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?