Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Crystals

2009-02-19 by David VanHorn

Soapbox on..

The Feb 19th issue of EDN has an article that I found very interesting.
Many of you have heard me speak on crystal oscillators, and how the
loading caps and drive levels need to be checked before committing to
a design.

This article references a train crash in Fremont CA, tracked down to a
bad crystal oscillator on a control board.
"An inappropriate value for the oscillators tank capacitor overdrove
the crystal, causing the part to jump to an overtone frequency.
As a result, the train sped up rather than slowed down as it
approached a station, and the resultant crash caused many injuries."

The article does not elaborate, but I'd guess that we'd be looking at
something like a 22pF crystal with 22pF caps, and I'd bet that almost
100% of the oscillators on the boards they built "worked". ("It works"
is not a viable defence of bad design.)

http://www.eetasia.com/ARTICLES/2000SEP/2000SEP07_AMD_AN.PDF?SOURCES=DOWNLOAD

"Crystal manufacturers specify a load capacitance number.
This number is the load seen by the crystal which is the SERIES
combination of C1 and C2, including all parasitics (PCB and  holder)."


http://www.foxonline.com/pdfs/osctheoryoper.pdf

"For good, reliable circuit operation, it is recommended that the
negative resistance be a minimum of five times the specified maximum
resistance value of the crystal unit."



Repeat after me:  "The crystal determines the cap values, NOT the
processor data sheet."
                          "Check the drive level against the crystal
data sheet."
                          "Check the oscillation margin. 5x is acceptable"
                          "Verify that the CKOPT fuse is set for
rail-to-rail mode."


Soapbox off..


It also occurs to me that a second independent xtal osc, like a 32khz
fork crystal, could have been used as a sanity check, measuring its
period against the processors timer.
You'd get some timer value per cycle, and if that was out of bounds,
you could force a "fail-safe" condition.  It would be extremely
unlikely for both oscillators to fail in the same way, at the same
time.  For bonus points, use a series-mode crystal since your
processor almost certainly uses parallel mode.



-- 

"The very powerful and the very stupid have one thing in common. Instead of
altering their views to fit the facts, they alter the facts to fit their
views... which can be very uncomfortable if you happen to be one of the
facts that needs altering." Doctor Who, Face of Evil

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.