Author Topic: Scope and Probes - Measuring Crystal  (Read 10787 times)

0 Members and 1 Guest are viewing this topic.

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5317
  • Country: gb
Re: Scope and Probes - Measuring Crystal
« Reply #50 on: August 19, 2019, 06:09:01 pm »

They exist.

https://www.tek.com/datasheet/differential-probes-2

I've been stalking them on eBay, but they still go for big bucks unless you buy them as-is, which means someone probably burned it out--they're quite sensitive.

Although of little practical use for this thread, I did just pick up a P6330 for $200 on eBay (3.5GHz differential) on a punt... and it works! It did mean I needed to pick up a Tekprobe to TekVPI adapter, which cost more than the probe. Item was 123822379720, on a BiN price of $225.

Condition was the standard "item may have some signs of cosmetic wear, but is fully operational and functions as intended" but then stated "untested" in the body text. I suspect they had no means of testing it judging by their inventory.
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Scope and Probes - Measuring Crystal
« Reply #51 on: August 19, 2019, 07:17:49 pm »
What exactly is method of measuring drive strength with differential probe? Please describe steps in enough details.

You could use the differential probe to measure the supply current into the drive amplifier and calculate the crystal current it from there.  Trying to measure it directly with a current shunt would be an interesting exercise.

Unfortunately there is no current measurement tap for oscillator of the MCU. Thou we may get some clue measuring MCU consumption in stop mode. If it consumes 1mW, then crystal drive can't he higher than that. According to @bdunham7 statements, FET probe does not do the job but differential probe allows to 1) accurately measure the crystal drive voltage 2) analysis of drive levels w/o bodging in additional resistors, so I am looking forward to see his comment.

Although of little practical use for this thread, I did just pick up a P6330 for $200 on eBay (3.5GHz differential) on a punt... and it works! It did mean I needed to pick up a Tekprobe to TekVPI adapter, which cost more than the probe. Item was 123822379720, on a BiN price of $225.

Wow, fine deal indeed. Congrats! BTW if possible, could you stick your diff.probe across 8...20MHz crystal and see how oscillator behaves in result? I say it will stop for <= 1MHz LF oscillators, but not sure about >= 8MHz HF.
 

Offline WanaGoTopic starter

  • Regular Contributor
  • *
  • Posts: 152
  • Country: nz
Re: Scope and Probes - Measuring Crystal
« Reply #52 on: August 19, 2019, 09:09:54 pm »
Are we all talking about the same thing, or are some of you in some sort of pissing contest with each other to show who thinks they know more about something we are not even discussing here?

Please take your contest somewhere else.

Digesting what has been said, ill come back with another post if required.
Thanks for all the helpful responses.
 

Offline WanaGoTopic starter

  • Regular Contributor
  • *
  • Posts: 152
  • Country: nz
Re: Scope and Probes - Measuring Crystal
« Reply #53 on: August 19, 2019, 11:23:48 pm »
So for an example of setting up a MCU with a 12Mhz Crystal, if I was to buy 2 different crystals, how would 'YOU' go about selecting the correct caps for this.

I acknowledge some of you have said to read the DS and use the values they state. From what I have seen in the last 5 datasheets I have read, they don't give you a cap value, they give you some specs of the crystal only.
As I have mentioned 2 or 3 times already, there are some formulas I have come across in order to select the cap value based on the crystal CL value, and whatever stray capacitance your circuit etc might have.
I dont believe anyone has commented on this. Does anyone have any input on this?
Here is one post on Adafruit blog, take what you will from it, but here is the source I found: https://blog.adafruit.com/2012/01/24/choosing-the-right-crystal-and-caps-for-your-design/

So if we take 1 crystal for example. Abracon ABM8-12.000MHZ-20-D1-T3
This has a CL of 20pF
https://abracon.com/Resonators/abm8.pdf

What capacitors would you aim for on this?

Based on the formulas I have found, it would be somewhere between 35pF and 38pF.
Does this seem correct?

Another one, a chinese branded Yangxing Tech X322512MMB4SI
Found a DS here: https://datasheet.lcsc.com/szlcsc/Yangxing-Tech-X322512MMB4SI_C50430.pdf
This particular one has a CL of 10pF

What capacitors would you aim for on this one?
15-18pF?

Do these seem reasonable?
If they are not reasonable, can you please make a suggestion as to what you think is reasonable, as a place to start.

Trying to learn here.

Thanks
 

Offline bdunham7

  • Super Contributor
  • ***
  • Posts: 7825
  • Country: us
Re: Scope and Probes - Measuring Crystal
« Reply #54 on: August 19, 2019, 11:29:57 pm »
Can you specify the MCU?
A 3.5 digit 4.5 digit 5 digit 5.5 digit 6.5 digit 7.5 digit DMM is good enough for most people.
 

Offline WanaGoTopic starter

  • Regular Contributor
  • *
  • Posts: 152
  • Country: nz
Re: Scope and Probes - Measuring Crystal
« Reply #55 on: August 19, 2019, 11:39:18 pm »
For one of the products, its a PIC24EP128GP204
 

Offline bdunham7

  • Super Contributor
  • ***
  • Posts: 7825
  • Country: us
Re: Scope and Probes - Measuring Crystal
« Reply #56 on: August 20, 2019, 12:01:27 am »
So there's an application note for that and it basically doesn't give Cin values and tells you to use the same formulas you already have.  Some MCUs specify a Cin (extal) and Cin (xtal) and you subtract that from your C1 and C2 values.  In this case it is all rolled into Cstray, I guess. So you are on the right track.

That MCU has a very complex set of oscillator modules and all sorts of configurations one might not see on other models.  Apparently there is even a register for setting the OSC GAIN value of the inverter.  That's good from one standpoint because you can more readily configure a robust product.  OTOH, it's much more complex...

Here's the application note, your info starts on page 21, although the whole thing is worth a read.

http://ww1.microchip.com/downloads/en/devicedoc/70005131a.pdf
A 3.5 digit 4.5 digit 5 digit 5.5 digit 6.5 digit 7.5 digit DMM is good enough for most people.
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Scope and Probes - Measuring Crystal
« Reply #57 on: August 20, 2019, 12:25:13 am »
That MCU has a very complex set of oscillator modules and all sorts of configurations one might not see on other models. Apparently there is even a register for setting the OSC GAIN value of the inverter.

Right. Oscillator module have very complex config of exactly one bit (mentioned OSC GAIN) which shall be set to HS mode for 12MHz crystal.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16607
  • Country: us
  • DavidH
Re: Scope and Probes - Measuring Crystal
« Reply #58 on: August 20, 2019, 03:03:34 am »
You could use the differential probe to measure the supply current into the drive amplifier and calculate the crystal current it from there.  Trying to measure it directly with a current shunt would be an interesting exercise.

Unfortunately there is no current measurement tap for oscillator of the MCU. Thou we may get some clue measuring MCU consumption in stop mode. If it consumes 1mW, then crystal drive can't he higher than that.

I have done it before but cheated by implementing the MCU's gate oscillator externally using comparable CMOS logic so I could measure the supply current to the driver.  My conclusion was what I stated earlier; discrete transistor crystal oscillators are more reliable than CMOS gate crystal oscillators.

Quote
According to @bdunham7 statements, FET probe does not do the job but differential probe allows to 1) accurately measure the crystal drive voltage 2) analysis of drive levels w/o bodging in additional resistors, so I am looking forward to see his comment.

The only way I have seen it done directly is with an AC current transformer.  Jim Williams wrote an application note about this method for the extreme case of a 32kHz crystal oscillator.

I think I could manage it with a custom low voltage differential probe and current shunt resistor in the straightforward way but with a not so straightforward low voltage differential probe.
 
The following users thanked this post: ogden

Offline WanaGoTopic starter

  • Regular Contributor
  • *
  • Posts: 152
  • Country: nz
Re: Scope and Probes - Measuring Crystal
« Reply #59 on: August 20, 2019, 03:33:06 am »
So there's an application note for that and it basically doesn't give Cin values and tells you to use the same formulas you already have.  Some MCUs specify a Cin (extal) and Cin (xtal) and you subtract that from your C1 and C2 values.  In this case it is all rolled into Cstray, I guess. So you are on the right track.

That MCU has a very complex set of oscillator modules and all sorts of configurations one might not see on other models.  Apparently there is even a register for setting the OSC GAIN value of the inverter.  That's good from one standpoint because you can more readily configure a robust product.  OTOH, it's much more complex...

Here's the application note, your info starts on page 21, although the whole thing is worth a read.

http://ww1.microchip.com/downloads/en/devicedoc/70005131a.pdf

I think we are fine with the MCU configuration side of things, the processor itself is set up correctly and working fine. It's more case now of ensuring the external stuff is optimal so if it is to fail in the field at least its not related to the crystal.
I will however look more into the DS of this particular processor and see if there are any things which need modifying. Thank you.

Another part of the equation on one of our other products is the xtal output drives an NXP 74LVC1G08 gate used as a buffer, which is used to drive the clock input of another part of the system.
This product was designed about 2008 and we have made large numbers of them, so the overall concept works fine, however I just had a look at the DS of the 74LVC1G08 and it looks to have an input capacitance of 5pF.
The question I have is, would this 5pF them be biasing the output side of the xtal, while the input side is still the base 22pF? So effectively like having a 22pF on the input side, and 27pF on the output side? Or is that not how it works.
https://assets.nexperia.com/documents/data-sheet/74LVC1G08.pdf
Should the circuit take the 5pF into account, to have say 5pF less on the output side of the xtal so its balanced?

Again - just learning here, would love to know.
 

Offline bdunham7

  • Super Contributor
  • ***
  • Posts: 7825
  • Country: us
Re: Scope and Probes - Measuring Crystal
« Reply #60 on: August 20, 2019, 04:48:34 am »

This product was designed about 2008 and we have made large numbers of them, so the overall concept works fine, however I just had a look at the DS of the 74LVC1G08 and it looks to have an input capacitance of 5pF.
The question I have is, would this 5pF them be biasing the output side of the xtal, while the input side is still the base 22pF? So effectively like having a 22pF on the input side, and 27pF on the output side? Or is that not how it works.
https://assets.nexperia.com/documents/data-sheet/74LVC1G08.pdf
Should the circuit take the 5pF into account, to have say 5pF less on the output side of the xtal so its balanced?

Again - just learning here, would love to know.

If the 74LVC1G08 is very near the crystal and the trace is short and neat and not subject to interference, then yes, the capacitance would be figured in on that side of the circuit just like Cin and Cout would be if specificed.  If any of the conditions I mentioned aren't met, then I don't know the answer.  B/t/w, I think I've seen warnings not to drive other circuits off of MCU XO circuits in that way, but if it has been working for you then don't worry.

A 3.5 digit 4.5 digit 5 digit 5.5 digit 6.5 digit 7.5 digit DMM is good enough for most people.
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Scope and Probes - Measuring Crystal
« Reply #61 on: August 20, 2019, 07:57:45 am »
I have done it before but cheated by implementing the MCU's gate oscillator externally using comparable CMOS logic so I could measure the supply current to the driver.  My conclusion was what I stated earlier; discrete transistor crystal oscillators are more reliable than CMOS gate crystal oscillators.
Most MCU oscillators and especially watch crystal oscillators, are more than simple inverting CMOS gate - due to same reason you mention. In this regard TI msp430 clocks and their documentation are excellent. Check for example oscillator specs/documentation of msp430f5 and you will see.
 

Offline WanaGoTopic starter

  • Regular Contributor
  • *
  • Posts: 152
  • Country: nz
Re: Scope and Probes - Measuring Crystal
« Reply #62 on: August 20, 2019, 09:07:53 am »
If the 74LVC1G08 is very near the crystal and the trace is short and neat and not subject to interference, then yes, the capacitance would be figured in on that side of the circuit just like Cin and Cout would be if specificed.  If any of the conditions I mentioned aren't met, then I don't know the answer.  B/t/w, I think I've seen warnings not to drive other circuits off of MCU XO circuits in that way, but if it has been working for you then don't worry.

Yeah it is a curious one, but it has been used actually on a number of products in all sorts of environments over the years, and it seems to be fine.
The distance between MCU and buffer is short and direct, typically within about 5-10mm of the MCU, then typically the next chip using the output is 10-20mm from the output, but it does depend somewhat.
So you would suggest trying say 5pF less for the capacitor on the XO side, so they are then a closer match? Up till now, this has never been done. But in the name of optimising things, if you or anyone else think it is worth doing, then I will note it down to get that tested out.

Thanks
 

Offline WanaGoTopic starter

  • Regular Contributor
  • *
  • Posts: 152
  • Country: nz
Re: Scope and Probes - Measuring Crystal
« Reply #63 on: August 20, 2019, 09:18:30 am »
While looking at the buffer, I stumbled on this...
Seems to be more specific to buffering crystals.
It would be applied to the crystal quite differently, but I wonder if this would be 'better'...

http://www.ti.com/lit/ds/symlink/sn74lvc1gx04.pdf
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5317
  • Country: gb
Re: Scope and Probes - Measuring Crystal
« Reply #64 on: August 20, 2019, 09:29:44 am »
While looking at the buffer, I stumbled on this...
Seems to be more specific to buffering crystals.
It would be applied to the crystal quite differently, but I wonder if this would be 'better'...

http://www.ti.com/lit/ds/symlink/sn74lvc1gx04.pdf

I'm not clear, are you suggesting that you're in a position to be able to re-spin the board? If you are that opens up many other possibilities.
 

Offline bdunham7

  • Super Contributor
  • ***
  • Posts: 7825
  • Country: us
Re: Scope and Probes - Measuring Crystal
« Reply #65 on: August 20, 2019, 10:26:19 pm »
While looking at the buffer, I stumbled on this...
Seems to be more specific to buffering crystals.
It would be applied to the crystal quite differently, but I wonder if this would be 'better'...

http://www.ti.com/lit/ds/symlink/sn74lvc1gx04.pdf

Yes, IMO, better designs that need a separate clock signal will expressly design in a buffered output rather than tap into the existing XO and subject it to additional component variability and potential interference.  This is still a CMOS gate oscillator, however, and I have no experience with it and can't tell you if it is more or less reliable than your MCU. FWIW, I think the most reliable variant are the high quality external self contained XOs.

However, I would hope that you aren't going to redesign your product based on these conversations!  I would caution you that you need to go over a lot more material before you can start down that road.  I fix things more than design them, so I wouldn't do it lightly either.  Although I'm sure I can put together a reliable XO from scratch, I would not want to unnecessarily redesign a proven reliable product even if I thought I was improving it because there is always a possibility of introducing new issues--you can't anticipate everything.  I wouldn't hesitate to redesign an UNreliable product, though.   ;)
« Last Edit: August 20, 2019, 10:30:52 pm by bdunham7 »
A 3.5 digit 4.5 digit 5 digit 5.5 digit 6.5 digit 7.5 digit DMM is good enough for most people.
 

Offline WanaGoTopic starter

  • Regular Contributor
  • *
  • Posts: 152
  • Country: nz
Re: Scope and Probes - Measuring Crystal
« Reply #66 on: August 20, 2019, 11:39:42 pm »
Yep I appreciate that.
We have designed many products over the years, and yes we can make new revisions as we see fit, prototype them, have them running for weeks/months in various situations to try and see if they fail etc. Its just time, but yes we can change the design if there is a problem.

But as I have said, there is not a specific problem. The boards are not unreliable. There is nothing specifically wrong.

I am just exercising the process of determining if things are as good as they can be, rather than just in a 'working state'. If some of the fringe cases where we have reliability issues, such as if our product is used where there are TIG welders or other things like that, we have had the odd situation where the product will self restart etc. We normally come up with a solution, but if we can avoid that happening at all then it would be great.

It may not be related to the crystal setup at all.

I was just initially trying to find out a way to view/measure the current situation, to see if what we have is OK or if its on the edge of being OK.
I then went down this buffer path to see if that might also be a contributor to some of these edge cases.

I say again, we dont have faulty product, I was just trying to determine if we can figure out if what we have is optimal or if there is room for improvement which may provide benefit.

Thanks
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16607
  • Country: us
  • DavidH
Re: Scope and Probes - Measuring Crystal
« Reply #67 on: August 21, 2019, 02:21:37 am »
I have done it before but cheated by implementing the MCU's gate oscillator externally using comparable CMOS logic so I could measure the supply current to the driver.  My conclusion was what I stated earlier; discrete transistor crystal oscillators are more reliable than CMOS gate crystal oscillators.

Most MCU oscillators and especially watch crystal oscillators, are more than simple inverting CMOS gate - due to same reason you mention. In this regard TI msp430 clocks and their documentation are excellent. Check for example oscillator specs/documentation of msp430f5 and you will see.

Oh, for sure.  But the characteristics of the gate oscillator can be measured without the crystal in place to make an accurate external reproduction.

The common problem I mentioned is low transconductance, which is not well controlled, at low temperatures which cause the oscillator not to start with some crystals.  I do not know if this situation has improved but it used to be a big problem in applications which exercised the microcontroller over the lower end of its temperature range.

Discrete bipolar oscillators can completely avoid this problem making them more reliable over wide temperature ranges but they generally perform better anyway.

 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Scope and Probes - Measuring Crystal
« Reply #68 on: August 21, 2019, 12:42:27 pm »
The common problem I mentioned is low transconductance, which is not well controlled, at low temperatures which cause the oscillator not to start with some crystals.

Please check your notes. As far as I know, CMOS gain *increase* at low temperatures and decrease at high. At low temperatures there's risk of crystal overdrive if you aim for huge safety margin. Yes, I agree that Colpitts oscillator is better from temperature point of view. It is advised to use crystal oscillators in demanding applications - you have no concerns of temperature, layout, load capacitors, noise immunity. Win win win
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16607
  • Country: us
  • DavidH
Re: Scope and Probes - Measuring Crystal
« Reply #69 on: August 21, 2019, 02:52:17 pm »
The common problem I mentioned is low transconductance, which is not well controlled, at low temperatures which cause the oscillator not to start with some crystals.

Please check your notes. As far as I know, CMOS gain *increase* at low temperatures and decrease at high. At low temperatures there's risk of crystal overdrive if you aim for huge safety margin. Yes, I agree that Colpitts oscillator is better from temperature point of view. It is advised to use crystal oscillators in demanding applications - you have no concerns of temperature, layout, load capacitors, noise immunity. Win win win

Well, they were failing at low temperatures but within their specified operating temperature range.  Most microcontroller manufacturers had problems at one point or another.

Some crystal oscillator modules did as well so that was no solution.
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Scope and Probes - Measuring Crystal
« Reply #70 on: August 21, 2019, 03:18:44 pm »
Well, they were failing at low temperatures but within their specified operating temperature range.  Most microcontroller manufacturers had problems at one point or another.
Some crystal oscillator modules did as well so that was no solution.

Well, I do not doubt they failed, yet reason most likely was not like you say. What temperatures are you talking about?
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16607
  • Country: us
  • DavidH
Re: Scope and Probes - Measuring Crystal
« Reply #71 on: August 21, 2019, 03:44:43 pm »
Well, I do not doubt they failed, yet reason most likely was not like you say. What temperatures are you talking about?

They failed to start at low temperatures within their specified operating temperature range.  The common solution when there was no better option was to qualify specific crystals but this was not always a cure.

I have occasionally had the same problem with CMOS gate oscillators but not TTL or properly designed discrete transistor oscillators.
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Scope and Probes - Measuring Crystal
« Reply #72 on: August 26, 2019, 09:22:29 pm »
Well, I do not doubt they failed, yet reason most likely was not like you say. What temperatures are you talking about?
They failed to start at low temperatures within their specified operating temperature range.  The common solution when there was no better option was to qualify specific crystals but this was not always a cure.
For those unaware - he is talking about 20+ years old events & tech which is long gone. Oscillators and crystals are way different today.
 

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 3345
  • Country: ua
Re: Scope and Probes - Measuring Crystal
« Reply #73 on: August 27, 2019, 01:36:20 am »
I think oscilloscope is a bad choice to test crystals. It's better to use VNA. With VNA you can see parallel and serial resonance frequency, Q factor of crystal and it's equivalent circuit values and all parasitic resonances. With oscilloscope it will be almost impossible.
« Last Edit: August 27, 2019, 01:40:01 am by radiolistener »
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Scope and Probes - Measuring Crystal
« Reply #74 on: August 27, 2019, 07:38:16 am »
I think oscilloscope is a bad choice to test crystals. It's better to use VNA. With VNA you can see parallel and serial resonance frequency, Q factor of crystal and it's equivalent circuit values and all parasitic resonances. With oscilloscope it will be almost impossible.

I am afraid that you have to read more than just (quite misleading) subject of the thread. Measuring oscillators is actual topic here and VNA is wrong tool for that.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf