Tuesday 28 February 2023

35 - How good are your inductors- Measuring Q

As homebrewers we need to wind coils, easy to do if you use https://toroids.info/  and simple ferrite or powdered iron toroids. You usually want a specific inductance and as good a Q as you can and power handling matters too. Q is a misnamed term really, people say it is the "quality" of the coil but the phrase quality can be interpreted in many ways, gold plated quality coils are not high Q. Q refers to the goodness of selectivity in making coils for tuning circuits - e.g in old medium wave radio receivers. A high Q coil has sharper selectivity than a low Q one. It has lower losses and does not waste energy. The letter Q was first used in 1920 by a Mr Johnston who said it did not stand for Quality but he had to use 'Q' because the other letters were all in use!  It matters in the design of filters and matching networks. It affects the insertion loss, a particular interest of mine.

I noticed that one of Ashhar Farhan's designs favoured air cored coils rather than powdered iron or ferrite cores and decided to have a closer look at winding coils in air. Ashhar uses 3D printed toroids using PLA plastic in his Daylight radio (link below) and had used plumber's teflon washers and plastic drinking straws as cores many years ago in early BitX designs. Toroids are difficult to get in India. 

Also, because powdered Iron and Ferrites toroids saturate at a given flux or heat up due to losses it is sometimes better to use air cores which cannot saturate. Large inductors for ATUs or traps are best cored with air as they may have to carry high RF currents. The only drawback is that you need to keep the coils away from each other, or from shielded boxes, or from conducting metal or copper or from ferrite. At least one coil diameter and some texts say up to 2.5 coil diameters is better although custom and practice is to make the shield two diameters wide - i.e 50% of the coil diameter from the outside of the coil to the shield. I wonder which is right? I wanted a test method to verify this.

Ashhar's Daylight again radio is at https://www.vu2ese.com/index.php/2022/08/04/daylight-an-all-analog-radio/ and is a remarkable design - few chips were harmed in its construction, made entirely with easy to get components.

For air cored inductors there are many design tools both online and downloadable as executable programs. None are perfect, but they are all good enough.

https://coil32.net/ has downloadable programs (They have a coil64.exe that runs well on my PC)

https://hamwaves.com/inductance/en/index.html#input has an excellent online calculator. There are many others, they might all give different results so treat their answers as "approximate"

Like most technical things, revealing the truth is like peeling an onion. There is a simple formula for giving the inductance of an air cored coil. Basically "correct" but you get more accurate values with a more complicated formula, or a much more complicated formula... Truth is rarely an absolute in engineering, or at least not in the pragmatic truths of practical engineers.

Approximate formulae are normally ok as you can spread or compress the turns and fiddle about until you get the right value. You only make your coils one at a time whereas professionals may need to make dozens or thousands at a time. The simple formula was created in 1928, the more complex one in 1982, quite recent and further work is still being done. The latest is a hundred times more accurate than the original Wheeler equation, but hams tend to use the Wheeler version.

These days we try to avoid maths; there will be an online calculator or spreadsheet program somewhere to do the sums for us. If you want to do it the hard way then the original Wheeler formula works in inches and is usually given as


Where N is the number of turns
R is the Radius of the coil in Inches
H is the length of the coil in Inches.
L is the inductance in microhenries

You can also look at the RSGB Handbook or ARRL handbook for metric versions and convenient  nomographs.

The 1983 equation is quite a nightmare, over 21 terms long including the natural log of 8 divided by Pi and terms of 3 times "pi" squared. If I ever master how to type equations this complex into my word processor, I will put it in my blog. 

If your coil is made of simple copper wire hanging in air then that is ok, the conductivity of wire is well  known and you would think the calculation is simple. But, skin effect rears its head as well as the effect of one wire being near another - interwinding capacitance and a magnetic field interaction - both contribute to what is called the "proximity effect".  At HF these effects create loss that is much more than simple DC wire resistance, you can't measure loss (or Q) with a multimeter. It all starts to get complicated. If your wires are coated in enamel. or insulated with plastic then there is a dielectric between adjacent turns and the formulae struggle to give an exact answer. Perfect is the enemy of good enough...

The point is that the simple formula is good enough - you can always squeeze or stretch the coil.

So the two calculators above gave different results. As an experiment I entered data for 10 turns of 1mm diameter copper wire. coil on a 10mm diameter coil (enter 11 into the Hamwaves web form). The hamwaves site said 0.65uH and a Q of 100 - I had to tell it 10 turns and a coil length of 11mm (i.e tightly wound). Coil64 suggested 0.8uH and as Q of 160. Who was right? (spoiler, hamwaves!)

I made some coils and set about measuring them. I have several ways of measuring inductance  but how to measure Q and what affects it, how to make good Q coils? I came across some advice on the Q of homemade coils.  

The ratio of the length of the coil to the diameter of the coil. The best ratio is between 1 to 1 and 1 to 2 to get a high unloaded Q-factor. Providing some spacing between the turns will improve this Q-factor, and the recommenced spacing is equal to the wire diameter.

Higher Q's will be obtained if the turns are spaced at two wire diameters (i.e as a space between windings. Some texts have graphs showing 0.6 or 0.7 spacing is the optimum but the graphs decline slowly above this. I wound mine close wound as it was easier to do. Whilst simple bare wire or enamelled coated wire is most convenient, thick hollow copper pipe or flat tape are usually better than wire since they increase the surface area and hence reduce the loss due to skin effects, as does silver plating, provided the plating is thick enough. (it rarely is in "cheap" plated coils). Funnily enough light corrosion does not matter too much, the current just goes a bit deeper. Physical size needs considered as well. Make the wire thicker and you need more copper. The higher the diameter the higher the Q but the knock-on effect of that is you need more space and more copper. Design is always about compromise, competing factors that each work against each other. You have to find the balance, that is the skill. Most hams work with what they've got, when all you have is a hammer then any problems looks like a nail. I have lots of enamelled wire 1 to 2 mm thick/ 

My V2 nanoVNA can display Q and Inductance directly - there is menu item under the display format. You can also see inductance on the smith chart screen.  However, you are measuring real losses of under an Ohm, typically 200 to 500 milliOhms. Very hard to measure accurately, very hard to measure consistently. Internally the nanoVNA may be measuring phase angles and calculating the real and reactive parts but it is also hard to measure fractions of a degree of phase angle as well. DO NOT USE A NANOVNA TO MEASURE Q. (Or at least develop a healthy scepticism of its answers.)

There are several ways to wire up an inductor to a nanoVNA, I got best readings by only using the first port and having the inductor connected to it and ground. This suits lowish impedances of under 500 Ohms so measure at frequencies where this is true, in my case I was designing inductors for HF, 3.5MHz to 30MHz and since they were going into circuits with 50 Ohm input and output impedances they were usually not more than a kilohm. If you work with very high impedances take a different approach (between the ports and use S21 with the component as either a series or shunt)

When you drive an inductor with a voltage source that has an internal resistance of 50 Ohms and receive (reflected) voltages and currents into a detector with an internal impedance of 50 Ohms you are looking at the loaded Q but in this instance it will be close to the loaded Q as you have 50 or 100 Ohms of internal resistance in series with a loss resistance of about a quarter of one Ohm (260 milli-Ohms).

Just because an instrument gives you a number, you shouldn't take it as gospel truth - you need to know what the error limits are , the plus or minus probabilities. I haven't seen an authoritative error analysis of the innards of the VNA and the way it does things. 

You can see massive noise if you plot Q (in the PC NanoVNASaver software or on the NanoVNA screen if you have this option - not all firmwares do), You need to take its suggested Q with a pinch of salt.

A better (more accurate) method when using a NanoVNA is to add a high Q capacitor to the inductor to make a tank circuit, I placed the components in parallel and wired them between port 1 and port 2, displaying S21 showed a resonance trough and I measured the -3dB bandwidth (BW) and calculated Q as given by Fo / BW. 

Remember! R in the formula is NOT the DC resistance but a more complicated quantity called Loss Resistance which at HF is hard to measure.

Then I found a third way to measure Q; this would let me check the other values.

A recent post in groups.io in the Home Built Test Equipment (HBTE) Group mentioned a link to a most excellent way of measuring Q I had not seen before. The ring-down method.

https://www.giangrandi.ch/electronics/ringdownq/ringdownq.shtml

Basically you hit a tank circuit with a sharp edged pulse and watch it decay on an oscilloscope. 

A tank circuit is a combination of an inductor and a capacitor. When excited it wants to circulate current at a particular rate  - its resonant frequency, you can see that in the diagram below. It needs a small top up of energy each cycle if the oscillations are to be sustained otherwise it slowly decays.

With a single sharp pulse of excitation the mathematics can show that when the decay is down to 50% you can multiply the number of elapsed cycles by 4.53 (use 5 if doing it in your head) and this gives the Q of the coil, assuming the capacitor you attached to the coil to make a resonant Tank circuit is itself very high Q (use silver mica if you can) and the stimulus and measuring devices do not load the resonant circuit. Sometimes you can't count the cycles because they are too close together in which case note the time on the oscilloscope and calculate the period of the tank circuit and divide the time by the period to get the number of cycles. Not too onerous. (the maths is, it's in the link above if you like playing with second order differential equations, I don't! I'm a ham now not a university lecturer)

Here is a screenshot from the article; the Q is 6*4.53 or 27


To measure this you need to ensure your scope probes do NOT load the tank circuit and connecting the signal generator to the tank does NOT load the tank, a simple loop of wire to loosely inductively couple  the signal to the tank will suffice and use your scope with a x10 probe, or a high value series resistor. Also the rise and fall times of your square wave generator need to be fast. You can't use a 555 timer chip although a simple circuit using high speed 74 series logic chips would work.  You can use a lowish frequency square wave as you want the energy in the tank circuit to drop to zero before hitting it again. The article gives examples of measuring coil Q and even the Q of a magnetic loop. You can even use it in mechanical systems and there is an example of a tuning fork with a Q of nearly 5000.

I set out to give it a try.

Here are my test coils, all wound around a 10mm former. The tape is used to wire up doll's houses or kill slugs, it is very thin but not as thin as the skin effect depth.   At 3MHz a lot of the current(37%)  is within 1/25th of a mm of the surface.  The  tape is equivalent to a 5 mm diameter hollow wire with less interwiring loss (I think).


Given my eyesight and my inability to count, some of these have 10 turns and some have 9!

Method 1: connect the coil to ground on the first port of the NanoVNA and use the smith chart. I am no expert on the smith chart but you can read off the inductance and resistive losses directly. Q will be XL divided by Rs, although I have reservations on how accurate Rs is measured. Alternatively use  the PC program NanoVNA SAVER and look at the cursor data - they list Q and Series L. Some NanoVNAs can also display L and Q on their topline - my Version 2 can. The advantage of the NanoVNASaver software is that you can tell it to do 30 sweeps and see smoother graphs.

Here is the setup and a zoom in on the screen - note you have to muck about with the scale and reference of the Q trace, to get it to scale correctly.



The top left shows a Q of 138.789! but the trace is so noisy that moving the frequency marker makes the Q jump from any value 250 to less than 100. Note the top right hand numbers show a smith chart inductance and "resistive" component of 628nH and 246mOhm (i.e a quarter of an Ohm) this is why the Q trace is so noisy, it is too hard to accurately measure such small resistances (or phase angles)

so method 1 is ok to measure inductance but not really ok for Q - you can experiment with the coil bringing it near other coils and shields, inserting cores and so forth and see an effect - useful in a qualitative way (sic - nearly a pun!) but not a quantitative manner. Let us try another way...

Method 2: Connect a known accurate value of capacitor in parallel with the coil, connect the LC tank circuit between port 1 and port 2 on the NanoVNA and look at S21 for a resonant dip.

I picked the red enamel coil for further tests, with an inductance of 628nH I could parallel this with a silver mica 470pF 1% capacitor that I had and should get resonance at 9.264 MHz 


( https://www.allaboutcircuits.com/tools/tank-circuit-resonance-calculator/)

In fact my NanoVNA showed resonance at 9.3MHz indicating an inductance of 624 nH, within 1% of method 1. I think Method 2 should be more accurate than Method 1 as long as the 1% capacitor is accurate.

Picking the frequencies that were 3dB below and above the resonant trough gave;

9.24442 & 9.3368 MHz gives a bandwidth of 92.4KHz and a Q = 9.3 / 92.4 or a Q of 101. Close to method 1, 


Method 3

I had a lot of difficulty driving a pulse into the tank circuit, a loop of 1 or 2 turns is recommended but this is too much of a load for my signal generators (I have two audio generators that can generate square waves). Adding a 100 Ohm series resistor let me take a reading but the test col output was under 10mV and hard to stabilise on my scope with x10 probes. I did get a reading but it had a Q value that was too low. 50 to 60. Hence I am suspicious of my set-up. I am postponing judgement until I can devote more time to making a better generator or try alternative coupling (capacitive of a few picofarads?) so .... more later...

In the meantime I recommend Method 2. 

Here is a screendump of my scope using method 3.

And zoomed in;

So, maybe 13 cycles before dropping to 50% of the initial value. Multiplying by 4.53 give a Q of 59. Even stretching the count to include near misses

Maybe 17 cycles if we assume a bit of noise has reduced a few cycles... 17 cycles times 4.53 is still a Q of 77/ Too low methinks so best to spend more time on method 3.... sometime....


I would like to experiment and compare;

1.  Air cored coil in free space, 

2.  Same coil in a big shielded box (6 coil diameters wide, i.e sides 2.5 diameters from coil) 

3,  also a small shielded box. (three diameters wide - sides 1 coil diameter from coil)

4. The Q of several ferrite, and powdered iron cores; built with the same number of turns and also fewer turns to get the inductance to similar to the Air coil. 

As a further test I could wind another "air" core around an inert toroid made of plastic - Ashar Farhan used teflon plumbing washers in a very early radio he designed and one of his recent designs used simple 3D printed toroids, I think he used PLA plastic. 

good to test these in my two shielded boxes as well.

References:

The Q of Single-Layer, Air-Core Coils: A Mathematical analysis (Sep/Oct 2001 QEX)


https://coil32.net/  has also a 64 bit version of its program