Crystal and 2 caps, or external oscillator?

Go To Last Post
14 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What are the pros and cons of using/choosing these two options:
- standard 16.000Mhz crystal and 2 off 22pf capacitors
- a 16.000 Mhz '8-pin DIL' (which always puzzles me as only the four corner pins come out the package :? ) 5V oscillator - like the 'half size' ones at http://dkc3.digikey.com/PDF/T062...

...with appropriate fuse settings of course.

EDIT: From the Digikey page it says that the 'input current' is 25mA - is that the normal current draw? That seems quite a lot...

Automotive environment (cabin) and low'ish volume, so saving a fraction of a $ is not particularly important.

Thoughts please...
TIA Martin

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK, some thoughts...

Lowest component count - oscillator wins
Lowest power consumption - crystal wins
Smallest PCB real estate - about the same
Ease of PCB design - oscillator wins
Minimum number of solder connections on PCB - oscillator wins
Cost - crystal wins
Physical robustness - perhaps oscillator?
Stability with temperature - ?
Startup time - oscillator 10mS, crystal ? - probably not important anyway

So oscillator shading it at the moment?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don’t see this as an issue. You have a built in crystal driver in your AVR. Use the crystal. The external oscillator is only needed when you don’t have any crystal driver or built in oscillator available. External oscillator = high cost, high current consumption and large enclosure.

Mats

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would guess that the oscillator module and the AVR oscillator need a similar startup time.
My choice would be to use a crystal. The AVR contains the oscillator circuitry to work with the crystal, why duplicate it?
Also, the oscillator module probably works at a fixed voltage (guessing here...) which could limit your options.
Using the built-in oscillator will allow the AVR to enter reduced power modes by disabling the oscillator, can you disable the module? If so, how would you re-enable it?

In brief, I really can't think of any good reason for using an external oscillator module, unless you happen to have a big box of them, know what Vcc you'll end up using and don't care about low power modes.

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Good calls chaps - crystal and 2 caps it is then...

Thanks for your time - the forum comes up good again!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Crystals and oscillators tend to be expensive, but I would put a crystal if around 0.1% accuracy is needed, but if you can tolerate say 1% accuracy, I'd put in a ceramic resonator, which some of them come with suitable capacitors built in (3-pin models). However I have never used one with AVR devices, so I do not know how to set the fuses, but I mainly used the ceramic resonators with PIC microcontrollers. Resonators were cheaper to get, and were also smaller than crystals. If 10% accuracy is sufficient, just use the internal or external RC oscillator, which is very cheap and has 0-2 parts and smallest PCB area.

The oscillators have tremendous current consumption, but at least one can be sure that the output pin oscillates, one never has to worry about starting or cap tolerance or anything, but also expensive.

- Jani

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oscillators are way too expensive and fragile IMHO. Alot of times you can get "series" crystals that don't require any external caps. I've used them alot and they seem to work perfectly fine.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

An oscillator needs to have a bypass cap on Vcc. Since it generates square waves, it may be an emissions problem on a 2-layer hobby design unless you have careful layout.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Unless you need the tight frequency tolerance of a crystal, I also recommend a ceramic resonator with built-in caps. One part, starts faster than a crystal, good for 0.5% or so tolerance over temperature and cheap (about $0.50 each). Use the same fuse setting as for a crystal of the same frequency.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ScottKroeger wrote:
Unless you need the tight frequency tolerance of a crystal, I also recommend a ceramic resonator with built-in caps. One part, starts faster than a crystal, good for 0.5% or so tolerance over temperature and cheap (about $0.50 each). Use the same fuse setting as for a crystal of the same frequency.

I havent seen many ceramic resonators with frequencies other then say, 1, 2, 4, 8, & 16MHz. I would use them if I could get them in the "Magic Numbers" used for the USART.

Maybe I haven't looked specifically for them in the Digi-Key catalog. I'll have to check that out tonight when I get home from work.

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Aren't ceramic resonators really bad at temperature stability? That would explain why they're not usually in 'magic number' values, they're not commonly use for baud generators, an external oscillator would be good if you needed to use the clock on other devices but some AVR's can 'export' it's clock to a pin.

-Curiosity may have killed the cat
-But that's why they have nine lives

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have a couple of standard footprint setups that I use. Usually it's either one that will handle both a ceramic resonator or a crystal with a pair of caps. That's what you see in the image below.

The other just moves the caps apart a little, so the OUT and GND pins of an oscillator will fit into the cap pins as well. It takes a little more room, but then you have the capacity to fit whatever you want, ceramic resonator, oscillator or crystal/caps.

Works pretty well when you want flexibility. When you don't, just use whatever as tight as you can get it :)

Attachment(s): 

Dean 94TT
"Life is just one damn thing after another" Elbert Hubbard (1856 - 1915)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There is a very good article from Colin O'Flynn in the academy section of avrfreaks.net: "Why you need a Clock Source"
https://www.avrfreaks.net/index.php?module=dpDocs&func=index&cid=9
It's worth to take a look at it!

Regards
Sebastian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sceadwian wrote:
Aren't ceramic resonators really bad at temperature stability? That would explain why they're not usually in 'magic number' values, they're not commonly use for baud generators, an external oscillator would be good if you needed to use the clock on other devices but some AVR's can 'export' it's clock to a pin.

+/- 0.5% initial accuracy (5000 ppm)
+/- 0.3% temperature stability (3000 ppm)
+/- 0.3% aging stability (10 years) (3000 ppm)

Therefore the resonators are not expressed in magic numbers like 3.686400 MHz, but just with two decimals 3.68 or 3.69 MHz. The exact frequencies like 4 MHz might be given with just one decimal, so 4.0 or 4.00 . But if cost or PCB area is of concern, the maximum error of 1.6% works fine with occasional serial communications, but it is a proven fact that internal RC oscillators are not up to it, at least before being calibrated according to supply voltage (5 or 3 volts) and even then it is temperature sensitive. Maybe calibrating the RC oscillator agains known clock source like a 32768 Hz watch clock will do the trick if really small space is needed.

Other manufacturers make resonators too, but here is one that makes all kinds of clock devices. http://www.ecsxtal.com/cerares.htm but I mainly looked at http://www.ecsxtal.com/pdf3/ZTT.pdf which have internal caps. Smaller SMD resonators do not seem to have internal caps.

- Jani