SparkFun Forums 

Where electronics enthusiasts find answers.

Questions relating to designing PCBs
By winston
#37707
A post in another thread has brought up a question in my mind (and bear with me - pretty much all my circuits to date are low speed, 6MHz or less).

I do have a circuit with a 25Mhz crystal on it this time.

In the thread for konguk's USB/microcontroller PCB, user bigglez put a cut-out in the ground plane around the crystal, its load capacitors and the tracks going back to the uC. Presumably this is to reduce parasitic capacitance around the crystal and its tracks to get a better wave form.

Looking at various factory-made PCBs that I have to hand, I see that some designers have cut out the ground plane around crystals and some haven't. For example, for the 25MHz crystal oscillator (i.e. a 4 pin through-hole can, rather than a crystal/resistor/load capacitor arrangement) on a 3com ethernet card I have here, there's a ground plane cut out under the oscillator, but not on the track that leads from the oscillator to the IC. On the same card, there's another crystal oscillator, 20MHz, which has a ground plane cutout that *includes* the track to the IC.

Looking at Wiznet's W5100 breakout board, they have a ground plane extending all the way underneath the crystal/load capacitors/resistor/tracks to IC. However, the tracks are very short, I think their PCB is probably 6 layer and they've been able to put the xtal and its associated parts within a couple of millimetres of the IC, so each track is only about half the length of an SMD 25MHz crystal.

So, if you were designing a PCB including a crystal oscillator, what would make you decide whether or not to cut out the ground plane underneath the oscillator and its tracks to the IC? I'm presuming the answer will be on the lines on whether a clean signal is most critical, or reducing emissions is the most critical design consideration... or whether it's a case of "you should ALWAYS cut out the ground plane around the oscillator, anything else is potentially bad design".
User avatar
By leon_heller
#37709
I always return the ground to the nearest ground pin on the MCU by its own track, it reduces emissions.

Leon
By amerdsp
#38156
On a similar note, I am trying to design a part for SMD crystal that has the usual XTAL connections and 2 other ground pads. I am using Eagle.

How would you design the symbol for this? I would like the symbol to have only 2 connections but also have the other two pads of the device connect to ground automatically. Can this be done, or is there a better way of doing this?

Thank you,

A
User avatar
By bigglez
#38165
amerdsp wrote:On a similar note, I am trying to design a part for SMD crystal that has the usual XTAL connections and 2 other ground pads. I am using Eagle.

How would you design the symbol for this? I would like the symbol to have only 2 connections but also have the other two pads of the device connect to ground automatically. Can this be done, or is there a better way of doing this?
Greetings A,

You have three choices:

(1) Use an existing symbol found in an EAGLE library
(2) Modify an existing symbol for your needs
(3) Create a brand new symbol from scratch (or by cut n' paste)

All require that you use the library tools provided with EAGLE.
You should also have a pdf tutorial that will help you
understand how EAGLE works (most of us found it to be
far from intuitive!).

Get a copy of the tutorial here.

Here's an example SMT crystal with a four pin outline, and
two schematic symbols (one with two grounds the other without any):

Image
Image
Image

Comments Welcome!
User avatar
By bigglez
#38170
winston wrote:So, if you were designing a PCB including a crystal oscillator, what would make you decide whether or not to cut out the ground plane underneath the oscillator and its tracks to the IC? I'm presuming the answer will be on the lines on whether a clean signal is most critical, or reducing emissions is the most critical design consideration... or whether it's a case of "you should ALWAYS cut out the ground plane around the oscillator, anything else is potentially bad design".
Greetings Winston,

There are two popular oscillator arrangements using crystals.
One is a packaged oscillator with the crystal element inside
with support electronics. This type requires power and ground,
and usually puts out a digital (squarewave) signal. The second
type uses a crystal resonator in combination with an active
circuit in another part of the project, typically two pins on a uC,
ASIC, or ASSP device.

When the crystal *oscillator* is used the ground plane can
continue under the part as shielding is already provided
internally. When the crystal *resonator* is used care must be
taken to reduce the capacitance to ground and also prevent
other signals from coupling into the circuit.

Resonators operate at very low levels (microwatts) and have
high impedance susceptable to voltage coupling from adjacent
signals or broadcast through the air.

Crystal resonators are factory tuned to operate with a stated
load capacitance. This is a practical matter as no application
circuit can be free of capacitance, and the factory has a jig or
fixture with known capacitance.

A bad PCB design with too much capacitance may never
oscillate, or it will pull the crystal off resonacne and lower the
Q (allowing frequency drift). So alway design the PCB for
minimum capacitance. For calibrated oscillator applications
a shunt capacitor is added and may be variable for adjustment.

Some ICs that require an external resonator crystal have
internal capacitors to match the correct loading while other
designs require two external capacitors (typically 20 - 30pF
each).

An excellent tutorial on crystals can be found here, and in the
RTC data sheet from Dallas Semiconductor/MAXIM.

Comments Welcome!
By amerdsp
#38199
bigglez wrote:
Here's an example SMT crystal with a four pin outline, and
two schematic symbols (one with two grounds the other without any):
So if you use the symbol without the grounds, how do the ground pads get connected?

In the tutorial, they give the example of the 7404 HEX inverter. It has invisible VCC and GND pins. Does this mean that I need to have a net name VCC and another GND in my schematic? What if I will be connecting it to something else, they I will use the INVOKE command to make them visible. Did I get that right?

Thank you
Last edited by amerdsp on Fri Nov 16, 2007 5:02 pm, edited 1 time in total.
By amerdsp
#38200
bigglez wrote:
Some ICs that require an external resonator crystal have
internal capacitors to match the correct loading while other
designs require two external capacitors (typically 20 - 30pF
each).
The datasheet of the oscillator that I mention is
http://www.abracon.com/Resonators/abm8.pdf

It mentions that it has a load capacitance of 18pF.

Thank you for the tutorial links. I am new to board layouts and I will always be learning new things.
By winston
#38286
bigglez wrote:[
A bad PCB design with too much capacitance may never
oscillate, or it will pull the crystal off resonacne and lower the
Q (allowing frequency drift). So alway design the PCB for
minimum capacitance.
So - in general, it seems like cut out the ground plane from around the resonator. I've done a bit of googling around about this since posting the original message, and I'm still finding about half the layout advice shows a ground plane under the resonator, and half of it shows it cut out. For example, Atmel's layout guide for the AVR shows a ground plane under the resonator/load capacitors. But another thread on this forum specifically mentions "note the cut-out in the ground plane around the crystal"... and some commercially made PCBs like the 3com network card I have here have the ground plane removed around both the resonator and the metal-can style 4 pin oscillators, and other commercially made products don't!

For my W5100 breakout board, I ended up going with having no ground plane around the resonator and its tracks, I decided that I could probably tolerate the small amount of noise this 1.8v circuit might put out more than the stray capacitance.
User avatar
By bigglez
#38294
amerdsp wrote:So if you use the symbol without the grounds, how do the ground pads get connected?
Greetings amerdsp,

Firstly, if the pads are present in the board symbol there
will be copper on the PCB. Secondly, if there is no pin in
the schematic symbol the pads will not attach to any other
copper.

The SMT package with four pads and only two electrical
connections uses the other two for mechanical stability.

If you need to ground the crystal/oscillator then both the
schematic and the board symbol need ground pins (even
if you give these a different name in the library editor).
amerdsp wrote:In the tutorial, they give the example of the 7404 HEX inverter. It has invisible VCC and GND pins. Does this mean that I need to have a net name VCC and another GND in my schematic? What if I will be connecting it to something else, they I will use the INVOKE command to make them visible. Did I get that right?
No, you can call your supply and ground nets anything
(Bill and Ben for example). If you did change the name
of your supply and ground nets to match the names of
the device (VCC and GND in your example) they will
connect automatically.

The parts with implied supply and ground connections
require the invoke command to make these connections
visible in the schematic editor. A large logic schematic
with many ICs will become cluttered if every supply
and ground net were made visible. Once they are visible
you can connect them to existing nets. This is very
handy in mixed technology designs (TTL and CMOS)
where the same supply is used but the library symbols
have different names (VCC and VDD in this example).

Just to be on the safe side always run ERC before starting
the board layout and run DRC before the "back-end" jobs
(Drill extraction, Silk fix, and CADCAM to get Gerbers)
when the board design is complete.

PCBs fabbed in error without traces are not
unusual - the PCBs make great drinks coasters, if you
like green!

Comments Welcome!