Crystal vs oscillator? - Page 1
Forum section: electronics / beginners

author: ssashton
author_rank: Frequent Contributor
timestamp: August 22, 2024, 04:08:16 pm
content: Hi,I'm doing a PCB with an IC which asks for an external crystal (and a series resistor with a couple of caps). However, when looking for parts I'm a little unsure if what I'm looking at is purely a crystal or an oscillator that perhaps contains extra bits.My confusion is probably made worse by the fact I'm looking for parts in the JLC PCB library which has terrible organisation.If the part mentions pF, does that mean it is purely a crystal? For example this part -https://wmsc.lcsc.com/wmsc/upload/file/pdf/v2/lcsc/1912111437_Yajingxin-TXM12-288M0004322FBCDO00T_C362472.pdfIf the part mentions CMOS can I assume it is a self contained ossilator and not a crystal?Thanks!

author: tggzzz
author_rank: Super Contributor
timestamp: August 22, 2024, 04:16:22 pm
content: Quote from: ssashton on August 22, 2024, 04:08:16 pmYes (for some ICs).Repeat, no (for some ICs)

author: fourfathom
author_rank: Super Contributor
timestamp: August 22, 2024, 04:26:09 pm
content: Yes, you've got it right. A plain crystal will usually have a specified "load capacitance", which is the parallel capacitance needed for the crystal to oscillate at the design frequency. Note that this capacitance is usually provided using two capacitors, one at each end of the crystal, connected to ground. Each capacitor is 2X the specified load capacitance, minus stray and input-pin capacitances.A "CMOS" reference most likely refers to the output signal of an oscillator module. Other designators may be "sine" or "clipped-sine", and one hopes a voltage level specification. Of course an oscillator should specify the supply voltage as well.

author: RoGeorge
author_rank: Super Contributor
timestamp: August 22, 2024, 04:41:33 pm
content: The linked pdf is for a crystal. The symbol in the pinout is for a resonator.Full-oscillator cans need a power supply. Working Vcc has to be specified in the datasheet, and shown in the pinout, too.

author: fourfathom
author_rank: Super Contributor
timestamp: August 22, 2024, 04:47:16 pm
content: Regarding the JLCPCB library, yes, it's just about impossible to navigate. I use the LCSC library, which has a *much* better search function. JLC uses the same designator numbers as LCSC, so just enter the LCSC number on the JLC library screen to check availability and status. I usually look for the LCSC parts with the highest "in stock" amounts, and these tend to be the JLC preferred parts.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: August 23, 2024, 12:08:27 am
content: I don't buy parts if I can't read their datasheets.

author: radiolistener
author_rank: Super Contributor
timestamp: August 23, 2024, 12:06:38 pm
content: oscillator can be different. Some oscillators just use buffer for crystal. But some actually contains crystal + frequency divider/muliplier or even PLL based frequency synthesiser and even some has MCU inside. All this affects jitter performance and spectral purity.

author: perieanuo
author_rank: Frequent Contributor
timestamp: August 23, 2024, 02:02:58 pm
content: well, the app and the ic are imposing what you should use. usually for general apps crystal with caps are the rule, oscillators are more expensive and used only if crystals are not suited for the application.read carefully the ic datasheet and buy the crystal preferably together with his recommended caps and sometimes a serial or parralel resistor, ic datasheet will clarify.for less sensitive applications even resonators or internal ic resonator may do. me, i prefer crystal after some resonator misadventures in some timing sensitive projects. unless you manufacture millions, go with crystal and you're covered for most scenarios

author: radiolistener
author_rank: Super Contributor
timestamp: August 23, 2024, 05:21:32 pm
content: if you use high frequency (5-10 MHz and more) it's better to use VCXO oscillator, they have pretty clean output, works stable and have output buffer, so the load doesn't affect its frequency.if you want very stable frequency, you can use TCXO, but their output is not so clean as VCXO. They sometimes using digital frequency regulation, so don't expect low noise.If you want stable frequency and less noise, it's better to use OCXO, but it consume a lot of current...Be careful with Chinese oscillators, like TCXO. They often using cheap PLL synthesiser inside and have pretty noisy output with many spurs.

author: ssashton
author_rank: Frequent Contributor
timestamp: August 23, 2024, 10:14:13 pm
content: Thanks for all the replies!The tip that best stocked LCSC parts are also the JLC stocked items has been very helpful, too.I've read people saying not to place ground directly under crystals, but some of the packages seem to include a ground pad, so I suppose it's okay in that case? Of course keeping loop areas small with vias to the gnd plane.

author: Benta
author_rank: Super Contributor
timestamp: August 23, 2024, 10:34:18 pm
content: Quote from: ssashton on August 23, 2024, 10:14:13 pmI read "people" saying things all the time. In 90% of the cases it's opinionated or anecdotal. I do my own research and ask for help in specific cases, and ask for references in that case.BTW, this little IC might interest you:https://www.ti.com/product/SN74LVC1GX04

author: MathWizard
author_rank: Super Contributor
timestamp: August 24, 2024, 03:48:45 am
content: Quote from: fourfathom on August 22, 2024, 04:26:09 pmSo in a crystal datasheet, do they usually list the Cp of the crystal aswell ? I think any time I tried to use any C from a crystal datasheet, I thought it was the crystal's equivalent capacitance, at some fosc.

author: fourfathom
author_rank: Super Contributor
timestamp: August 24, 2024, 05:43:58 am
content: Quote from: MathWizard on August 24, 2024, 03:48:45 amGenerally the spec will be for a load capacitance, and the crystal will be operating in a parallel-resonant mode. In a typical IC oscillator circuit the crystal is electrically in series between the amplifier input and output, but with the two load capacitors it is operating as a parallel-resonant circuit and the crystal impedance is slightly inductive.There are plenty of other xtal oscillator circuits, and these can use the xtal series-resonant and overtone modes.There are other xtal parameters, including motional L and C (not always on the basic spec sheet), and of course series resistance.And yes, some inexpensive digitally-compensated TCXOs can have extremely "interesting" frequency vs temperature characteristics as they adjust in order to stay within tolerance. For most digital applications this doesn't much matter, but for measurement or radio communications applications this behavior can be completely unacceptable.

author: ssashton
author_rank: Frequent Contributor
timestamp: August 24, 2024, 09:47:39 am
content: Thanks again for the replies. Can I get a bit more specific and seek your comments?The drive IC for the crystal is theADAU1452DSP chip. Here is the section on the crystal (page 25):The crystal I am currently looking at is thisJiangsu Crystal 24.576MHzHow critical is this "optimal crystal shunt capacitance is 7 pF"? This crystal specs <7pF shunt but another I looked at said 3pF. Also "resonance resistance 40R" I guess is the ESR?Is the series 'damping resistor' purpose simply to buffer the drive circuit from the load reactance? Then, I guess 100R is probably good for most cases and not too critical, or is this a value I should calculate somehow?This part is more about clocks in system design. The DSP will distribute the MCLK to the DAC (ES9017) and ADC.I've chosen 24.576MHz because theADC ES9821datasheet looks to me like it only supports this or 49.152MHz as a slave I2C device. Low frequency seems a better choice for EMI.In this situation would mode 8 be correct? I assume (perhaps wrong) the PLL from BCK would only introduce jitter over directly using the MCLK from the DSP?Any tips on distributing the MCLK from DSP to the DAC and ADC in terms of maybe buffer resistors or layout etc? The DAC and ADC will be on a different PCB linked by FPC cable that has GND on every other line and hopefully no more than 2-3 inches long.Thanks!

author: ssashton
author_rank: Frequent Contributor
timestamp: August 24, 2024, 10:10:14 am
content: Oh that crystal is not available at JLC PCB. This one is, but it unhelpfully says "Load Capacitance: 12pF, 2-pF or specify" So which is it?!So many options seem to be 3pF shunt.

author: RoGeorge
author_rank: Super Contributor
timestamp: August 24, 2024, 03:52:12 pm
content: Thumb rule is, whatever the MCU datasheet says. If not sure, ask the microcontroller company.So, unless your xtal is a really special type, then you go with 2x7pF, as specified in the MCU datasheet. I read the 22pF from the above crystal datasheet link as being rather the maximum tolerated loading capacitance for that type of crystal. Doesn't mean you have to use 2x22pF with your MCU, no way!Apart from that, some MCU might have some oscillator fuses, or oscillator register bits, to set the loading capacitance, or to change the topology of the oscillator provided by the microcontroller. You should consider first the options offered in the MCU datasheet (saying this in general, I didn't read the datasheet of the microcontroller you are using).

author: fourfathom
author_rank: Super Contributor
timestamp: August 24, 2024, 04:51:43 pm
content: Quote from: ssashton on August 24, 2024, 10:10:14 amI'm looking at this crystal from LCSC:https://www.lcsc.com/product-detail/Crystals_JGHC-S3224576222060C3_C5380581.htmlNote that the mfg spec sheet is fairly generic, and mentions a range of load capacitance values. But the LCSC part shows a 22pF load cap, so I assume that's for the specific part. The LCSC spec also has two frequency tolerance values (20ppm and 30ppm) and I can only assume those are for initial accuracy and accuracy over a temperature range.The shunt capacitance is another internal crystal parameter, but it isn't going to be critical in your application. The spec shows a series resistance of <60 Ohms.I wouldn't obsess about these specs too much. Even if you are off on the load capacitance by a few pF that's only going to result in a couple ppm frequency error. The initial accuracy of most xtals isn't even that good.I haven't studied your application or components to check of your xtal frequency is appropriate.If you are curious about xtals and oscillator circuits, here's a decent app note:https://ecsxtal.com/crystal-oscillator-design-application-note/

author: perieanuo
author_rank: Frequent Contributor
timestamp: August 26, 2024, 11:54:51 am
content: hi, regarding the layout, see this stadard approachhttps://www.byte-lab.com/best-practices-for-crystal-oscillator-layout-2-3/

author: ivo
author_rank: Regular Contributor
timestamp: August 30, 2024, 03:29:12 pm
content: The load capacitance on a datasheet is usually the total parallel capacitance the manufacturer expects to see for the crystal to oscillate cleanly, and also have the best shot at hitting exactly its specified frequency. Indeed, one can install trimmer capacitors instead of a fixed one, if one wants to try to manually tweak an output frequency to something exact (although you'll always have variations over temperature as well).The total load capacitance is not simply the value that the parallel capacitors should be, it's Cload = (C1 * C2) / (C1 + C2) + Cstray, where Cstray is extra board/trace capacitance of a couple of puffs. If we assume Cstray is 3pf and C1=C2, then a little algebra will show that C1 and C2 should be = (Cload - 3)*2QuoteUsually a quote like that means the datasheet is in fact just a general sheet for a range of crystals they are producing, not a single specific one. By default, they are producing crystals with an expected total Cload of 12pf to hit their frequency, but if you go ask them for a custom order of 10,000 they can go make some crystals for you with some other expected loading.A "nuclear option" is that many times you can simply drive one of the clock pins of these digital chips/MCUs with a clock signal and they will work just the same. This is why "crystal oscillators" exist. They are the crystal + the oscillator circuit, all in one. You give them a voltage and they give you a clean clock signal without needing to worry about load and shunt capacitances, and they can often drive more than one thing within reason. You can see on the ADAU1452 screenshot, you can either set it up with a 'manual' parallel crystal circuit as shown, or likely just drive the MCLK pin directly with a clean clocking signal.Specialised clocking ICs even exist for this purpose, a very popular one is Si5351.Also surprised no-one yet has linked one of Dave's great videos on this subject