Clarifying Crystal Design Guidelines

Status
Not open for further replies.

vince.cimo

Well-known member
Hi Paul and rest of awesome smart people on this forum. This thread (https://forum.pjrc.com/threads/27397-Teensy-gt-Production?p=60903&viewfull=1#post60903), which outlines some of the design considerations for crystal placement on a custom Teensy board got a bit off topic so I figured I'd start a new thread and try to get a bit more clarity on the topic.

As far as I understand, the 16mhz crystal requires the following considerations:

1. On a 2 layer PCB, there should be a ground plane directly under the crystal.
2. The crystal ground plane should NOT be connected to rest of the circuit's electrical ground.
3. The crystal ground plane should only be connected to the ground pins on the crystal (2 & 4 if using this one https://datasheet.octopart.com/NX3225SA-16.000000MHZ-B3-NDK-datasheet-118964.pdf) and capacitors, if using a crystal with over 10pf capacitance.
4. Route high-speed digital signals as far away from the crystal as possible.
5. Don't run high speed signals in parallel to the crystal.

A few questions come up:

1. What is the logic behind keeping the crystal ground separated from the rest of the circuit ground? Is my interpretation of the design consideration correct?
2. Are there any 'hard' figures regarding distance between crystal traces and other digital signal traces?
3. Any good strategies for breaking up 'parallel' traces? Will a simple 45 degree turn solve the problem?
4. I'm attaching a screenshot of my PCB layout (zoomed in on the crystal), in which I've tried to take these factors into consideration as best as I could. Does this look correct? I'm sending the circuit off to a PCBA house and would love to avoid having to pay the high manufacturing costs twice if I can detect a stupid mistake now.

Screen Shot 2018-12-27 at 10.50.27 PM.jpg
 
Most of this looks good, except 2 things.

1: This is not good: "crystal ground plane should NOT be connected to rest of the circuit's electrical ground". It should indeed connect to GND, usually by a single trace directly to the GND pin next to the one of those crystal signals. Usually only 1 connection to the rest of GND is used for 2 layer boards, so the digital GND currents can't flow underneath the crystal.

2: Unless your board is being fabricated with a special (expensive) filled vias process, placing vias inside surface mount pads is usually a bad idea. Solder needed for the SMT part tends to flow down the hole, leaving you with little or no connection to the part.

Maybe this reference board design can help as an example?

https://oshpark.com/shared_projects/XbimUyLX
 
would love to avoid having to pay the high manufacturing costs twice if I can detect a stupid mistake now.

I highly recommend getting a prototype PCB from a site like OSH Park and hand solder all the parts. Almost everyone makes mistakes on the first rev of a PCB. Soldering it yourself can also give you an excellent feel for small details, like whether you've made any through-hole pads the wrong size or placed any parts too close together.

The key to hand soldering is the right lead solder with extra liquid flux, and use of a good magnifier and bright light. Many people mistakenly focus on buying an expensive soldering iron. You do need a good temperature regulated one with a fine point tip, but even the budget ones will work. If you're on a tight budget, the magnifier is the place to invest your money! A ~20X microscope with 2 optical (not a laggy webcam) paths makes this work fairly easy.

The type of solder and flux also makes a huge difference. We use Kester 331 0.015" thick and Kester 2331-ZX liquid flux. You want to get the PCB wet with the flux, then do the soldering. It's amazing how much the extra liquid flux helps. The one caveat to organic acid flux is you *must* thoroughly wash the entire PCB in hot water, and then bake it at low temperature (150F to 175F) for 10-20 minutes to get the water out from all the little nooks & crannies.

For example, this board was hand soldered that way:

ic_mkl04_refboard2.jpg
 
I highly recommend getting a prototype PCB from a site like OSH Park and hand solder all the parts. Almost everyone makes mistakes on the first rev of a PCB. Soldering it yourself can also give you an excellent feel for small details, like whether you've made any through-hole pads the wrong size or placed any parts too close together.

The key to hand soldering is the right lead solder with extra liquid flux, and use of a good magnifier and bright light. Many people mistakenly focus on buying an expensive soldering iron. You do need a good temperature regulated one with a fine point tip, but even the budget ones will work. If you're on a tight budget, the magnifier is the place to invest your money! A ~20X microscope with 2 optical (not a laggy webcam) paths makes this work fairly easy.

The type of solder and flux also makes a huge difference. We use Kester 331 0.015" thick and Kester 2331-ZX liquid flux. You want to get the PCB wet with the flux, then do the soldering. It's amazing how much the extra liquid flux helps. The one caveat to organic acid flux is you *must* thoroughly wash the entire PCB in hot water, and then bake it at low temperature (150F to 175F) for 10-20 minutes to get the water out from all the little nooks & crannies.

For example, this board was hand soldered that way:

ic_mkl04_refboard2.jpg

Wow I didn't even know that was possible. I'm definitely a beginner here, but I've always thought that SMD with any real component count just needed to be done by a machine. I'm unfortunately in too deep with my first batch of prototypes being manufactured (i'm doing 5), but will definitely keep this in mind for the next go round. My hope is that I can fall into the small percentage of people who get it right on the first try, but I am aware that this may not be the case. I've altered the board layout, considering your feedback. You'll note that pins 2 & 4 are connected via a trace (and also via the crystal case per the datasheet). Pin #2 connects to the 'crystal ground island' via a via (pun intended), and pin #4 has a single trace that connects to the main board ground plane. I've also pulled all of the vias out of the smd pads. Speaking of stupid errors, I almost didn't realize that I had the wrong footprint for the MKL02 chip! It was a completely wrong 32 pin QFN package....geez. How does this look to you?

Screen Shot 2018-12-28 at 10.50.08 AM.jpg
 
Status
Not open for further replies.
Back
Top