Arduino UNO crystal frequency

I am playing with oscilloscope and would like to measure frequency of crystal that Arduino Uno uses.
Must I have the ground connector of oscilloscope probe connected to ground when measuring frequency or not?
I think I should measure 16MHz that is stable, not changing in time.
Can anyone confirm that?
Thanks

Jane1:
I am playing with oscilloscope and would like to measure frequency of crystal that Arduino Uno uses.
Must I have the ground connector of oscilloscope probe connected to ground when measuring frequency or not?
I think I should measure 16MHz that is stable, not changing in time.
Can anyone confirm that?
Thanks

In theory you can do that, and yes you must attach the scope probe ground lead to an arduino ground pin. However, in reality you may not be able to see the true wave shape and in fact may even cause the AVR chip's oscillator circuitry to stop oscillating because of the effect of the added scope probe input impedance and probe capacitance when you probe the clock pins. There are special and expensive active FET scope probes made with very high input impedance and very low capacitance, available for just such sensitive measurements.

So you may or may not see a continuous and constant clock pulse stream, if you do the amplitude may not reflect reality, and the precise frequency may not be exactly the same (may shift the clock speed a few khz for example) as when you are not probing with the scope, all based on what influence your scope probe has on the AVR oscillator pins.

Lefty

With my rather long-toothed OS-9020A analogue scope I can generally only see the oscillations of a crystal when the probe is set to "10X" mode - where the input impedance is 10 times normal. That also means the signal is 10X smaller, so you need to switch to a more sensitive range and do the maths in your head (0.2V/div instead of 2V/div)

There is one other point. An Oscillator has an amplifier with an input and an output, usually it's a gate or a series of gates (typically 3) connected in series and an internal feed back resistor to 'bias' the gate's into the "Active Area" where the devices will oscillate. The Uno and all the rest that I've looked at use a 1Mohm resistor (Uno R2, Mega R1). The point is that it is really advised to use the output pin, it is the lowest impedance and least likely to seriously affect the crystal oscillators frequency... Minimum loading at that point. One pin will have a higher voltage on it, that should be the output pin.

Doc

retrolefty:
In theory you can do that, and yes you must attach the scope probe ground lead to an Arduino ground pin. However, in reality you may not be able to see the true wave shape and in fact may even cause the AVR chip's oscillator circuitry to stop oscillating because of the effect of the added scope probe input impedance and probe capacitance when you probe the clock pins.

One trick that may work in this instance is something called a "Gimmick" -- essentially a couple of lengths of insulated solid wire twisted together, but not electrically connected. One of the wires acts as the probe, and the other wire, which is capacitively coupled to the "probe wire", is gripped by the scope probe. If this works, with your setup [doesn't always, as it may still impart too much capacitance to the crystal pin], the resulting waveform provides frequency information, but not a reliable amplitude, or even waveform shape, as upper harmonics [from distortion, etc] may be attenuated. You can use this, mainly, to check if the oscillator is oscillating, and to measure the frequency.

Two insulated, solid wires -- I got these from a CAT5 cable.


Twist them together - staggered slightly

Perhaps, also, encase them in epoxy or UV Cured Resin for durability and stiffness.

Probe clips on one of the wires, and the other wire touches the point being probed. In this case, the 12MHz crystal that provides BAUDrate.


Probing the MCU 16MHz crystal.

Jane1:
I am playing with oscilloscope and would like to measure frequency of crystal that Arduino Uno uses.
Must I have the ground connector of oscilloscope probe connected to ground when measuring frequency or not?
I think I should measure 16MHz that is stable, not changing in time.
Can anyone confirm that?
Thanks

The Uno doesn't have a crystal any more, just a ceramic resonator, so expect +/- 0.5% variation
depending on the board, and much less stable frequency than a crystal.

You always need ground connected, that's a given for any measurement using a 'scope, but
the scope is grounded and the circuit may be too, so that connection already exists in many cases.

If you want a more accurate waveform always connect ground at the probe though, to short out any
ground-loop noise.

Must I have the ground connector of oscilloscope probe connected to ground when measuring frequency or not?

Yes, you always need a common ground.

I've never had trouble looking at a microprocessor/microcontroller clock with an oscilloscope.*

On "my" Tektronix 'scope (at work) I see an approximate sine wave, approximately 1V peak-to-peak, on both sides of the Arduino crystal. (My version of the Uno does have a crystal.)

I think I should measure 16MHz that is stable, not changing in time.

Correct. On my 'scope the waveform display is rock solid, but the frequency measurement jumps-around a bit (less than 1MHz). I'm pretty sure that's just a characteristic of the 'scope and the actual frequency is probably more stable. Frequency display on a 'scope is an "added feature" and it's not as accurate as a frequency counter.

  • My 'scope is rated for 100MHz so it's not fast-enough to display/measure the clock in a "real computer" but it's fast enough for all of the boards I've worked on.

I read all the replies. The original post suggests that it is a frequency measurement. This you can not do with a scope probe or any practical probe, if you expect to measure with any reasonable accuracy. At most, you can verify the amplitude and observe whether there are any anomolies. The best way to measure the frequency is in software, because in that case, there is no capacitive load such as a probe introduces, on the crystal. That will inevitably change the frequency.

Jane1:
I am playing with oscilloscope and would like to measure frequency of crystal that Arduino Uno uses.

Why.
Accurate clock frequency of a processor is usually not important, unless you want to use it for timekeeping.
In that case you need a crystal, not the inaccurate temp-drifting resonator of an Uno.

If you want to know what it exactly is, then don't measure on the crystal/resonator (that will de-tune it),
but let the processor output a division of that clock on a different pin. Say 8Mhz, 4MHz or 1Mhz.
Leo..

A oscilloscope is useful for many, many things.
Measuring frequency is not one of them!
Herb

Digital oscilloscopes can do many things, here is a sampling from the manual for mine for thing it can measure automatically. I'm sure the Rigol's etc. can do the same.
And even if not, one can always line up points across the horizontal grid and get a pretty close reading of the period, then do the 1/period math for the frequency.

I think unlike dedicated frequency counters, most scopes lack a precision timebase that can be calibrated. The fairly accurate frequency measurements that it can make are more of a convenience feature.

Even the dedicated frequency counters are only as accurate as the last time they were themselves calibrated.

The problem for a scope is they are estimating frequency from a limited sample memory, and often in a crude manner (reciprocal of waveform period), whilest simultaneously displaying waveforms and acquiring new waveforms. Better 'scopes have dedicated hardware to frequency counting that runs independent of sample memory.

All modern 'scopes are quartz accurate, you can't really have something that's not these days as the high speed
chips used require low jitter clock sources to work properly.

herbschwarz:
A oscilloscope is useful for many, many things.
Measuring frequency is not one of them!
Herb

My scope has a frequency counter -- so, yes "A[sic] oscilloscope" probably not, but this ani't just "A[sic] oscilloscope". Besides, no one said anything about accuracy. Also, this is in line with the OPs original request. And, I arrived here because of a search, so I added this for future surfers :wink: Now, go back to sleep, Herb.

BTW: Don't any of you pay attention to posting dates -- gosh!?

MarkT:
All modern 'scopes are quartz accurate, you can't really have something that's not these days as the high speed
chips used require low jitter clock sources to work properly.

That isn't sufficient by itself. For frequency precision measurements you need a calibrated TCXO. Not all devices have that.

A practical and effective way to measure Arduino clock speed is to capture and measure a known good PPS like a GPS PPS, over a long time period like 10 minutes. I've done that and measured the processor clock frequency to IIRC, 0.1PPM.