Saturday 12 March 2022

21 - Crystals - Measuring Crystal Parameters with a NanoVNA

Crystals
 Crystals are made by clamping a piece of crystal between two metal plates, this resonates in at least two ways. As frequency increases there is a peak in response and then as the frequency increases further there is at least one dip in response. We describe these as the series resonant frequency, Fs and the parallel resonant frequency, Fp. There are other, smaller, peaks and troughs above these fundamental modes of operation. Below is my NanoVNA screen showing S21 – the “thru gain” in dB.

  



We can draw an electronic circuit of coils, capacitors and resistors that behaves in the same way. This model only partially relates to the real physical device but it is very useful nonetheless. Usually we use a series LCR circuit and in parallel with this, a much larger capacitance (which relates to the metal plates used in the crystal). Thus we have Lm, Cm and Rm in series - called the motional components and then Co in parallel with them.  


To recap how LC circuits work (and since coils always have resistance this applies to RLC circuits too). A series LC circuit has lots of Ohms at low frequencies due to the capacitor, the capacitive reactance decreases as frequency increases. We also have lots of Ohms at high frequencies due to the coil, the inductive reactance gets bigger as frequency increase. They cancel at resonance when they have the same numeric value because they are 180 degrees out of phase. Hence more signal gets through at resonance and the CH0 -> CH1 LogMag Thru measurement (S21) shows a peak - minimum attenuation. There is some attenuation but it is solely due to Rm being in circuit. Parallel LC are the opposite – they block signals at resonance. The parallel combination of Co (diminished slightly by the much smaller Cm) with Lm is what gives the first trough at Fp. 


Co is several hundred times bigger than Cm - some design software uses a fixed ratio of 220:1 but Co is easy to measure with a capacitance meter in the 3 to 5 pico-Farard region. Grounding the metal case (which you should always do) adds another picofarad to Co - this can be modelled as two capacitances to ground of about 0.5 pF each.


Typical values for Cm are one to two hundredths of a picofarad and this is too small to be measured directly. Lm is a number of mH and Rm is 5 to 20 Ohms or higher. These values are for typical crystals used at HF frequencies (5 to 20MHz). The usual strategy to finding Cm is to find Lm and then use the formula for resonance at Fs. 

 



Finding Lm usually involves finding the Q of the crystal at this first peak, since Q is defined Fs/BW where BW is the bandwidth where the response is 3dB below the peak (also near where the phase shift is +/-45 degrees  - it is close to zero degrees at resonance) Also Q is related to Lm and Rm - it is actually the reactance of Lm divided by Rs so if you know Rs, Fs and the bandwidth you can work out Lm. The formulae are slightly more complicated as you need to take into account the source and load internal impedances (50 Ohms) but the theory is sound. You do not need to remember any formulae as a spreadsheet can do all the calculations for you. 


My first measurements were made on low cost crystals designed for use in digital circuits (Microprocessor clocks) and I found them to have very high Rm values - this corresponds to poor quality (low Q) devices that would make RF crystal filters with high insertion losses. There are Crystals and there are Crystals so be careful - they all look the same!
Uses of crystals
Radio amateur homebrewers make crystal filters and oscillators themselves. To make a filter requires that you know at least some of the parameters. You definitely need to know the series resonant frequency Fs. The design method for modern filters need the crystals to be very near or at the same frequency - if you need 8 crystals in your filter, you need to buy 25 or 20 crystals and go through them to find 8 that are a good match. Unless you are rich enough to order matched sets. A rule of thumb for an SSB filter is to pick frequencies all within 2% of your desired bandwidth. If you can’t then there will be more ripple in your passband - barely audible.  You can "pull" a crystals frequency by adding a series capacitor or a series inductor. This degrades the frequency stability and is a bit of a faff when building filters.


How to measure these parameters Lm, Cm, Rm and Co ?
There are 4 or 5 competing ways and several authors have attempted to compare them to see which is "best" or more accurate. Study the references for more details. Frankly I like the idiom "Perfect is the enemy of good enough" and here I just use the NanoVNA but do note that it can also be done with a couple of test jigs containing a few tens of pence of components and simple test gear such as a DVM and a receiver, an accurate frequency meter helps (£8 on Ebay?) A super stable, accurate signal generator is handy but you can make one using one of your crystals.
But if all you have is a NanoVNA you can measure all you need. It is more accurate to use your VNA with the jig below to transform the 50 Ohm output and input impedances of the VNA to 12.5 Ohms, but again it is not needed for amateur filters, particularly since the VNA can test a completed filter and you can use LTSpice to correct the model (or just fiddle with the results) - you are only building one filter, not a thousand so experimenting (fiddling) is practical.

 

The second arrangement is good enough to make amateur filters with.
At Fs resonance Cm and Lm's reactances cancel and you are left with Rm dominating the flow of current - the NanoVNA can report on on attenuation of a few to 10s of dB in its S21 reading (CH1 LogMag). Good crystals drop 1 to 2 dB poor crystals, 4 or 5 dB,

 

Where S21 is the CH1 LogMax dB reading at Fs (as a positive number), the reading is probably correct within an Ohm.
If you measure the width of the Fs resonance you can measure the Q of the circuit. Defining the width as the -3dB points either side of the peak gives us the Bandwidth BW and Q = Fs/BW. Since Q is also XLm / Rm then we can work out Lm. In practice the formulae take into account the 50 Ohms in the source and destination
devices and hence we have slightly more complicated calculations to do. Since a spreadsheet or software works this out, all you have to do is make 5 measurements to get all the parameters that define the Crystal; Fs, FL and FU as well as the attenuation at Fs and the frequency at Fp.






 









To take readings accurately you would need to adjust the span to be 2 to 4 kHz wide around Fs and then again around Fp – you should calibrate the VNA every time you change settings on the VNA. Alternatively use the PC software NanoVNASaver and use multiple segments, Calibrate the VNA itself for the max and min settings on the PC screen but tell the PC software to do multiple sweeps (known as segments in the NanoVNASaver software) the PC screen below has 8 segments and this gives resolution to 2 Hz approximately. 

 




The markers above show the -3dB points of Fs. From which we get Bandwidth BW and then the formula below gives Cm taking into account the 50 Ohms in the output and input circuitry of the VNA
    

  




Moving to the first trough on the VNA screen, this is due to the parallel circuit of Lm and Co  - actually Co is in series with Cm but Cm is hundreds of times smaller than Co, our formula can correct for this (some texts don't bother, but as we use a spreadsheet to all our calculations we can let it do the heavy lifting.)
To calculate Co we use the formula below and use the difference in frequency between Fs and Fp as well as the absolute value of Fp. Make sure you are seeing the first trough - some crystals have spurious troughs at higher frequencies (not just the harmonics)
And that's it, we have Co, Rm, Lm and Cm. I will place my spreadsheet on my blog ( at http://mi5afl.blogspot.com/p/blog-page_15.html to automate the calculations - below is a screenshot
 


 

Note real circuits have a capacitance to ground as well as Co -particularly if the Crystal metal case is soldered to ground (which is a good idea) so a better equivalent circuit adds two new small capacitors - of about 0.5 to 1 pF each. We use this after designing the filter using filter design software. These usually assume the same (average) parameters for every crystal, we can improve on the design by putting the circuit into LTSpice and editing the parameters and plotting the response and changing capacitor values or crystals until happy with the plot. Using LTSpice is much easier than soldering!







What if you don't have a NanoVNA?
1. Signal Generator Method (also needs DVM or Oscilloscope)
With a good signal generator and a voltmeter with a few diodes and resistors you can measure most of the parameters. Using a diode detector will allow the DVM to give a representation of voltage output through the crystal. You can sweep the signal generator to find Fs. Do this with a 3dB attenuator pad in circuit (3 resistors). Note the reading, remove the pad and sweep both up and down from Fs until you get the same voltage - this gives the -3dB points and hence the bandwidth BW.
To measure Rm, apply Fs and note the reading, remove the crystal and insert a variable resistor - 100 Ohm but not a wire wound!. Adjust the variable resistor until you get the same voltage reading, remove the resistor and measure its value on the Ohm-meter setting of your DVM.
Applying the formulae above for Q will give Lm and the formula for resonance will give Cm. You can use the parallel resonance to estimate Co or just assume it is 220 times bigger than Cm (assumes big HC49 Crystal cases - use a smaller estimate for the low profile HC49 or SMT parts – e.g a factor of 170 ). You may need a frequency meter if you can't trust your signal generator settings. The generator still needs to stay stable in frequency and output throughout all your measurements and you minimise your handling of the crystals (to keep their temperature stable). You can make your own generator using one of your crystals and a circuit where you "pull" the output to either side of Fs. Assuming you have spare crystals. You can buy a frequency meter from Ebay for £8!
2. The G8UUR Method (needs Frequency Counter)
This puts the crystal in a small test jig where it oscillates - this gives Fs. You add a known capacitor in series with the crystal and note how much the frequency moves from Fs. G8UUR worked out formulae to give Lm and Cm. You have to guess Rm and Co unless you use other jigs