Author Topic: Measuring Crystal Oscilator, So Confused  (Read 2768 times)

0 Members and 1 Guest are viewing this topic.

Offline meltbox360Topic starter

  • Contributor
  • Posts: 20
Measuring Crystal Oscilator, So Confused
« on: June 14, 2013, 12:19:01 am »
So I just got my DSO oscilloscope yesterday and I've been playing around with a few of my circuits. This is the first thing that has really got me confused out of my mind. When I attempt to measure either pin of the crystal going into the ATMega 328 I have the signal is just nonsense. I get some sort of random discharge type wave and nothing steady. When I measure across the pins I get something that makes more sense but is WAAAAY too low of a frequency. Now here is what stumps me. When I measure ground to the top of the crystal which appears to not be connected to either leg of the crystal I get the correct 14.7..... MHZ that I should. Now maybe I'm missing something but that doesn't seem like it should happen. Are there other oscillators which have a third pin that behaves like this? If the frequency observed at either pin is not the correct frequency then how does the MCU operate at the correct frequency. I know that everything works its just the measurements don't make any sense to me.
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Measuring Crystal Oscilator, So Confused
« Reply #1 on: June 14, 2013, 12:34:15 am »
Switch to a 10X probe. You're loading the circuit down too much. When you probe the top of the crystal you're just picking up RF emissions from the case.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline mikes

  • Regular Contributor
  • *
  • Posts: 127
  • Country: us
Re: Measuring Crystal Oscilator, So Confused
« Reply #2 on: June 14, 2013, 01:22:52 am »
Even a 10x probe will introduce trouble. You're loading the crystal, and adding capacitance which will change the frequency. You need a high impedance (100x  or even better FET) probe to even try to measure the crystal directly with decent results. And that will _still_ pull the frequency a bit.

Focus on the oscillator output, instead.
 

Offline olsenn

  • Frequent Contributor
  • **
  • Posts: 993
Re: Measuring Crystal Oscilator, So Confused
« Reply #3 on: June 14, 2013, 01:27:56 am »
There's a fuse setting for the atmega328 to output the buffered clock frequency on one of its pins. You can give this a try if you need to figure out what frequency it's running on. If you're using a DSO though and not a frequency counter, don't expect much in terms of accuracy/precision.
 

Offline meltbox360Topic starter

  • Contributor
  • Posts: 20
Re: Measuring Crystal Oscilator, So Confused
« Reply #4 on: June 14, 2013, 02:55:46 am »
10x reads it perfectly. In fact if you read the datasheet Atmel recommends adding small caps between each leg of the crystal and ground for noisy environments. I figured it out and immediately smacked myself in the face. Thanks everyone. Interesting bit about the case, didn't think of that.
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Measuring Crystal Oscilator, So Confused
« Reply #5 on: June 14, 2013, 02:59:43 am »
10x reads it perfectly.

It is affecting the frequency, so don't use it for a precise measurement. The frequency of a crystal oscillator always depends on its capacitive loading - in precision applications they are even adjusted with a variable capacitor. Even 1pF will put it out measurably. For minimal effect, try measuring the frequency by picking up emitted RF near the crystal, or using an auxiliary clock output as olsenn suggested.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline meltbox360Topic starter

  • Contributor
  • Posts: 20
Re: Measuring Crystal Oscilator, So Confused
« Reply #6 on: June 14, 2013, 03:04:45 am »
Oh that is probably true. I was going just for some verification that it was functioning. It reads very close to what is written on the crystal.
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Measuring Crystal Oscilator, So Confused
« Reply #7 on: June 14, 2013, 03:09:21 am »
Yep. 1X probes destroy oscillators. In general, just don't use them, unless you know otherwise that you need one.
No longer active here - try the IRC channel if you just can't be without me :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf