Two crystals close to each other, best layout practices? - Page 1
Forum section: electronics / projects

author: JPortici
author_rank: Super Contributor
timestamp: November 02, 2022, 08:26:25 am
content: Myprevious threadremains unanswered, replies from manufacturers extinguished hope so i'm left with placing two crystals next to each other.I looked around for notes on best approaches when you have multiple oscillators or crystals on board, but research yielded very poor results (closest one was from someone using two crystal at identical frequencies)What i fear is the oscillators affecting each other resulting in spurious clocks, frequency shift or downright failure of starting (though i'm not sure if they are even a possibility)Starting with the placement from the previous revision of the board and adding minimal changes, this is the best i could come up with (see attached image)The radio will use a 13.56MHz crystal, active only during transmission.The microcontroller will use a 8MHz crystal, active all the time, doing CANBUS communicationThe crystals are 2.8mm apart, and have added a cut in both layers GND copper pours in a further effort to separate return paths.The board is currently two layers.The board can't be made wider.I can't place the crystal/radio on the other side of the boardSince the microcontroller doesn't receive clock from the radio (as it used in the previous rev) nor feeds it to the radio (as i planned to do on this one) i can probably rotate it 180° and keep the clocks further apart

author: Kleinstein
author_rank: Super Contributor
timestamp: November 02, 2022, 10:53:05 am
content: With frequencies that are not much related the coupling is generally relatively weak. The physical spacing and coupling via sound (mainly though the PCB, not air) should not make much of a difference. So placing the crystal on the other side would not make a difference. The point that can be a problem are ground loops. This would especially be the circuit around the 13.5 MHz crystal - the µC should not care about ns jitter / frequency modulation. The interference would be not just from the crystal, but also other parts of the µC and supply. Chances are the RF signal is not super narrow BW and some extra jitter would not be that bad.Ideally the ground to the caps for the crystalls should be also separate from the µC decoupling, with just 1 connection to 1 µC ground pin.Similar the capacitors for the 13.5 MHz crystal don't look very good and there may be some ground loop.It may help to ground the case of the crystal if this applies.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 02, 2022, 11:08:59 am
content: People are way too paranoid about what to do with crystals. The sheer volume of appnotes on just layout is at best harmful -- given the general quality of appnotes, they're as often erroneous as beneficial.This is 13.56MHz for an NFC? The precision is within a few kHz, and noise floor almost irrelevant. Don't worry about it. You can talk to those with a function generator, I'm pretty sure (read: not a DDS based one). If it runs at all, it's fine. Be more concerned about getting the right type (Co, CL, ESR, rated power) for the oscillator (transconductance, drive strength). And most are fine, with a lot of ST MCUs being an odd exception (low gm --> higher ESR).Tim

author: JPortici
author_rank: Super Contributor
timestamp: November 02, 2022, 11:24:59 am
content: Nah, it's a dumb OOK radio transmitter. (13.56MHz * 32 -> 433.92MHz)I'm more worried of the effect it could make on the MCU instead, MCUs are getting more and more sensitive in the oscillator circuit, it seems nobody can do a crystal amplifier anymore, or at least one that doesn't require slaughtering a goat before testing. These days if i can get a MEMS oscillator i will use one, in this case i can't.I am probably too paranoid about thisEdit: Yes, capacitor placement for the radio oscillator is far from ideal, but that's how much board space i have (previous radio used internal capacitors)

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 02, 2022, 12:36:39 pm
content: Ah... that'll be a bit more restrictive then (I guess, a few kHzafter multiplication, give or take how tight the modulation, receiver BW / channel spacing, etc. is?). Possibly the PLL (I'd assume it uses a PLL for mult. anyway--?) can do some filtering, but a clean reference always helps. I would be less worried about the periodic 8MHz crystal nearby (or vice versa), and more concerned about the intermittent current flows of the MCU (from switching noise i.e. high harmonics of Fclk, to data-dependent low-frequency noise), and likewise of the radio. (Then, is that... basically just keyed by UART or whatever, say? Or does it have an internal protocol layer? Not that it really matters I suppose; you're not going to be able to compensate for it anyway, at least in any obvious way, if there is some kind of interference.)In any case, that sounds like something that needs to run through an EMC lab, so, you'll quickly / eventually figure out what signal quality is like... maybe making a few scale model prototypes would be warranted.If it's a module (seems bizarre to me that a module would require an external crystal..?!) with this testing already done, then don't worry about it and just do what the docs say to do.Tim

author: bson
author_rank: Unknown
timestamp: November 02, 2022, 05:37:16 pm
content: Assuming crystals and not clock chips.The XOUT is driven and not particularly susceptible to crosstalk. It's also low current so doesn't generate much or represents a stray modulated impedance. The XIN is far weaker and more susceptible. If you want to place the crystals side by side I'd place them with their driven (XOUT, input to crystal) sides facing each other. This is also where you'd place a resistor in case they're overdriven (which manifests in the oscillator input, XIN, being clipped and hence having tons of spurs that reduce stability).

author: free_electron
author_rank: Super Contributor
timestamp: November 02, 2022, 07:55:03 pm
content: Quote from: bson on November 02, 2022, 05:37:16 pmthisand forget that ground slot. flood it and shoot vias in it

author: JPortici
author_rank: Super Contributor
timestamp: November 03, 2022, 06:11:29 am
content: Thanks all of you, will flood with vias!