Grounding of Crystal - Digital or Analog? - Page 1
Forum section: electronics / beginners

author: ssashton
author_rank: Frequent Contributor
timestamp: April 28, 2022, 06:46:13 pm
content: Hi,I'm making a board with a mixed signal DSP chip. Would it be best practice to ground the oscillator crystal to the digital ground plane or the analog?I assume digital, but looking back at a past PCB I did years ago I have it going to analog ground and I have a strong feeling I might have tested it in practice to see what was best and this is counter-intuitive to me given the sharp waveform of the clock signal, but maybe it is especially low current and benefits from the cleaner ground??Thoughts welcomed. Also welcome tips for schematic layout! Like Q1 blocking the MP pins. How would you handle that, use nets?

author: RoGeorge
author_rank: Super Contributor
timestamp: April 28, 2022, 08:02:05 pm
content: I'll tie the oscillator to the analog ground:https://www.analog.com/media/en/training-seminars/tutorials/MT-031.pdf

author: pigrew
author_rank: Frequent Contributor
timestamp: April 28, 2022, 08:32:53 pm
content: I think it's likely using PGND (the pin right next to the crystal pins), though I don't see anything specifying either way. Perhaps you can download the layout of their evaluation board, and check how they do it?You might be able to tell by using a multimeter "diode" function to see if there is a (single) ESD diode from the XTAL pins to the particular GND or VDD pins of the different power domains. The diode voltage should be higher (multiple diodes in series) to the other domains.However, the datasheet notes:A single ground plane should be used in the application layout.Components in an analog signal path should be placed awayfrom digital signals.If I were doing this design, I would use a single ground plane. Perhaps I would add a U-shaped cut-out of the ground plane around the crystal, to direct the GND return current towards the DSP.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: April 28, 2022, 08:57:45 pm
content: As far as I know using separate GND planes for analog and digital is deprecated, and a big GND plane for everything is used these days.You do have to keep track of which signals go where, putting physical distance between high(er) frequencey & digital stuff and sensitive analog stuff is mandatory. With all high frequency stuff, the loop inductance is much more important then the length of the tracks, so carefully analyze the return path of each signal, and how it flows trough the GND plane.Using short tracks for all hishspeed tracks does reduce emintted EMI and the ability to pickup noise. Each wire is both a sending and receiving antenna.Crystals easily pick up noise from neaby tracks.For the cleanest routing around your crystal, put it very close to the pins, and put it on a very small GND plane that is connected to the big GND plane only at the crystal pins of your DSP chip. This ensures that no currents flow thought the GND plane under the crystal (Except the crystal signals themselves) and also te crystal caps connect here to each other.According to some, it's even better to just make a hole in the GND plane around the wires to the crystal. When there is no other copper, then there can also be no capacitive coupling.

author: ssashton
author_rank: Frequent Contributor
timestamp: April 29, 2022, 04:42:39 pm
content: Quote from: RoGeorge on April 28, 2022, 08:02:05 pmThat looks like a good read, thanks!

author: ssashton
author_rank: Frequent Contributor
timestamp: April 29, 2022, 04:49:12 pm
content: Quote from: pigrew on April 28, 2022, 08:32:53 pmReading between the lines you are saying the important thing is not 'what's best practice' but rather where they have tied ground for the oscillator drive inside the chip?The datasheet says a single ground plane can be used, but I don't think it will be optimal. I have a PCB like that from AliExpress and it has some noise. Certainly any input / output buffers and filtering will work best when nowhere near digital ground currents.

author: wraper
author_rank: Unknown
timestamp: April 29, 2022, 04:51:01 pm
content: The best likely would be to not split the ground. As in most cases it does more harm than good.

author: ssashton
author_rank: Frequent Contributor
timestamp: April 29, 2022, 04:51:34 pm
content: Quote from: Doctorandus_P on April 28, 2022, 08:57:45 pmI'm not sure I undertand your description. Could you draw a diagram or something, please?

author: ssashton
author_rank: Frequent Contributor
timestamp: April 29, 2022, 04:54:40 pm
content: Quote from: wraper on April 29, 2022, 04:51:01 pmI'll have to watch that later, but FWIW this is an audio frequency board in the analog domain. Ground impedance is everything, no HF effects to keep current near the signal traces.

author: pigrew
author_rank: Frequent Contributor
timestamp: April 29, 2022, 05:17:10 pm
content: Quote from: ssashton on April 29, 2022, 04:49:12 pmYes, I'm saying the most important thing is that there is a short return current path to the IC's crystal oscillator circuitry (refer to Doctorandus_P's post).The IC has four power domains: IOVDD, VDD, VDDA, and VDDP. Inside the chip, there are likely antiparallel diodes between all of the GND domains, or perhaps they directly tie them together or use a resistor between domains.... Between voltage nets, there will be antiparallel series diodes (to account for the voltage differences between domains).The critical factor is to reduce loop areas. If you tie the capacitors to the wrong GND pin, the return ground current will have to flow far away through the point of connection between the planes (or the capacitance across the IC's internal diodes or the decoupling capacitors you have populated). This would create a large loop, creating EMI/EMC issues.I think your initial question should be rephrased as: Should the VDDP domain be tied to the digital or the analog plane? The modern answer is to use a single GND domain. My guess is you'll get better performance with it tied to the VDD/VDDIO GND plane versus the GNDA plane, but expect the single plane to be best.Also keep in mind that the interconnection between GNDA and GNDD has to be under the DSP IC, and that all tracks going across domains have to cross in proximity to this interconnection.Quote from: ssashton on April 29, 2022, 04:51:34 pmLook at TI application note SLAA322B figure 7. You use an isolated GND plane under the crystal & capacitors.Quote from: ssashton on April 29, 2022, 04:54:40 pmIn this case, it's a sigma-delta/delta-sigma ADC&DAC. They'll operate at many MHz, and are in the analog power domain.

author: pigrew
author_rank: Frequent Contributor
timestamp: April 29, 2022, 06:33:15 pm
content: In order to make the schematic cleaner, I would edit the DSP's symbol so that the pins are logically grouped together (like how it is in the datasheet), instead of being based on the physical positions, or even split it up into multiple "units" (one for power, one for signals). Check the datasheet's schematics for an example of what I'm suggesting.Did you make a mistake with pins 19 and 20? Perhaps they should be grounded? I'm not sure...So... what's your proposed board stackup? 4-layer? 6-layer? In the case of 4-layer, you might want to tie both inner planes to GND, or consider a split Vdd plane on L3 if you can segregate your tracks appropriately. (Signals should only be routed on top of their respective GND or power plane). Though since you are using 3.3V for nearly every signal, signal/GND/3.3V/signal could work. Routing might also work out if you split the VDD plane into analog and digital halves.I found apost with some suggestions about PCB design for the DSPfor reducing noise.

author: ssashton
author_rank: Frequent Contributor
timestamp: April 29, 2022, 11:55:49 pm
content: Oh good find on the layout thread!Pin 20 can trigger an eeprom write to save settings when a falling voltage is detected. Connecting it to a pulled high GPIO (pin 19) seemed like a way to do that, while also letting me trigger any time I like, such as a gain level is changed.

author: ssashton
author_rank: Frequent Contributor
timestamp: May 03, 2022, 05:45:34 pm
content: Changing the topic - I will run my op-amps from a single rail so use a mid-rail bias. Would there likely be a cross-talk benefit to using a dedicated bias supply for each channel on inputs and outputs?Current arrangement looks like this for inputs and same bias supply used on the output channels as well.(Ignore the different ground symbols).

author: LittleRain
author_rank: Contributor
timestamp: May 04, 2022, 10:03:29 am
content: It may be a good idea to just have a shared ground plane (on both sides).Proper grounding is very important and is the main reason 2 layer PCBs have much more EMI than a multi-layer PCB.When splitting ground plane, if not done properly it will cause a lot more problems than if you just combined the 2.Here is an article to read, and if you do decide to separate them, there is good info here on how to avoid causing more EMI issues.https://www.nwengineeringllc.com/article/should-you-split-ground-planes-in-mixed-signal-pcb-design.php

author: ssashton
author_rank: Frequent Contributor
timestamp: May 04, 2022, 11:44:14 am
content: I see a lot of talk about radiated emissions and EMC testing when discussing ground planes. However I am primarily interested in signal integrity. This PCB will be for audio signals so my main concern is minimising the signal noise floor.Is achieving both of these goals actually the same thing, or would there be differences in ground layout for these priorities?EDIT: My 'like' of split grounds comes from experience with high and low current parts on the same PCB, not with digital. I recall a audio frequency power amp design that used a single ground plane and the return currents from the load massively interfered with the low level signals on the PCB. Separating the low and high current ground areas and returning them by traces to the smoothing cap helped massively.Should high and low current (but all low frequency) stuff like this also still be a single ground plane and my error might have been in other layout details?

author: ssashton
author_rank: Frequent Contributor
timestamp: May 04, 2022, 07:10:08 pm
content: Today I started on the layout. Before I get too far, can I get some feedback please? This will be 4 layer with a single ground plane.Forgive the crude drawing:

author: LittleRain
author_rank: Contributor
timestamp: May 06, 2022, 01:56:04 am
content: I'm definitely not a professional PCB designer. Everything I know is from what I've read/watched online, and all the circuits (mostly digital) I've made.All I can say is that I don't see any reasons your layout would cause a problem, I do think having the power connector in the middle of digital and analog is a good idea.Looks good to me, but I could be missing something obvious.

author: pigrew
author_rank: Frequent Contributor
timestamp: May 06, 2022, 04:59:47 am
content: Quote from: ssashton on May 04, 2022, 07:10:08 pmYou layout looks reasonable to me. Segregating the analog and digital is good, as is putting the switching regulator far away from the sensitive analog circuit.Locating mounting holes and such would be the next step. The board is so long and skinny, that it likely would need >=5 mounting holes in order to prevent flex.You may want to add a little bit of capacitance+resistance+TVS diodes near the audio input for ESD protection (and/or go overboard and place common mode chokes/ferrite beads..).Are you using bipolar power supply? If so, I'd lean towards a SIGNAL,GND,GND,POWER layers.If you are using a split rail, I would think about using SIGNAL,split-bias,GND,power (I'm actually not sure if that's a good idea, but maybe?).Assuming all of your digital signals are in the 3.3V domain (I can't remember), I may use power+SIGNAL,GND,3V3,signal for the digital side. SIGNAL/power-GND-GND-signal/power is always an option, too.

author: ssashton
author_rank: Frequent Contributor
timestamp: May 06, 2022, 05:08:17 pm
content: I have a single +15V rail, but all on-board parts have regulators.Does this make sense?I have power input to op-amp U6 (that generates a mid-rail bias for other parts). The power traces goes first to C52 then to U6. U6 gnd pin returns first to C52 then to the gnd plane.The output of U6 (bias voltage) goes first to C53 then to other components. C53 returns first to U6 gnd pin >> then to C53 and gnd plane.Or should C53 return to the gnd plane or C52 first?

author: pigrew
author_rank: Frequent Contributor
timestamp: May 06, 2022, 05:39:10 pm
content: Quote from: ssashton on May 06, 2022, 05:08:17 pmThe literature I've read suggests always going to the decoupling capacitor, and then the power via.The GND should either go straight to the GND plane, or to an immediately adjacent decoupling cap GND pad, and then to the via.Having a via directly to the GND plane (and multiple vias) is lower inductance than having the long track to the decoupling capacitor.One rule I use is to have >=1 GND via next to every GND pad of every component on the PCB (unless there's some contraindication, e.g. an immediately adjacent decoupling capacitor GND pad).Having a star-ground or separate ground lines could be useful for minimizing ground bounce/DC offsets, but I figure it would make things worse in this design.To really know, you'd need to do EM simulations....

author: ssashton
author_rank: Frequent Contributor
timestamp: May 06, 2022, 06:24:35 pm
content: So you're saying do not bother returning the op-amp gnd pin directly to C52 and just use the gnd plane?I did that becasue it is what was recommended for the DSP chip - but that does have adjacent power and gnd pins.

author: pigrew
author_rank: Frequent Contributor
timestamp: May 06, 2022, 09:03:40 pm
content: Quote from: ssashton on May 06, 2022, 06:24:35 pmCorrect, I would use separate ground vias.With the presented layout, any ground current (flowing out of pin 4) will cause a voltage rise on your GND pin there, which will then be coupled through C53 onto your output. Since the GND layer is much lower impedance, the pin8 current will cause less ground bounce on your C53 negative terminal.Looking again, do verify that your op-amp is stable with a capacitive load in unity gain configuration (many are not).Then again... I don't know how much of a real-world effect these layout tweaks would have.

author: ssashton
author_rank: Frequent Contributor
timestamp: May 06, 2022, 09:50:23 pm
content: Thanks for all the help!I'm actually thinking I might make a couple boards with a single ground plane and a couple with my usual method of local ground 'islands' that I trace back manually to the bulk cap. Then we can see what measurable differences I can find.Actually In my older similar board (2 layer) I did not have any cap on the output of the bias op-amp. Although it is connected to many caps and resistors it is providing bias for (but bias will be on both sides of those components so no current).I'll keep it in and try to remeber I might need to remove it when I come tessting.

author: ssashton
author_rank: Frequent Contributor
timestamp: May 14, 2022, 03:10:42 pm
content: I've posted the full design schematic and layout here and would really appreciate feedbackhttps://www.eevblog.com/forum/projects/can-i-get-some-feedback-please/