7
Sep/Oct 2005 41 9957 N River Rd Mequon, WI 53092 [email protected] An LMS Impedance Bridge By Dr George R. Steber, WB9LVI Come learn about LMS impedance measurement and build a unique PC sound card impedance bridge. Q uite some years ago, I built an impedance bridge using a rela- tively new (at that time) DSP microprocessor, the TMS32010. It was based on a technical paper 1 that used the LMS (least mean square) algo- rithm. Results of that project were mixed. It was helpful because it veri- fied that the LMS algorithm could be used for real-time impedance mea- surements. But it was disheartening because it was not very accurate and could only operate at a maximum bridge frequency of 50 Hz. So I filed it away for future reference. Over the years I’ve maintained an interest in impedance measurement, digital signal processing (DSP) and programming. Recently I did a novel project 2 using a PC with a sound card and some DSP techniques to imple- ment a low-cost curve tracer (I versus V) for devices like Zeners, LEDs and transistors. During that task I some- times thought of the old LMS bridge. Could it be implemented on a PC? Af- ter a lot of study and some serious modifications, the answer is a re- sounding “yes.” In fact, it turned out to be much more than I had hoped for, yielding a wide range, low-cost imped- ance measuring system. An abbrevi- ated article describing construction and operation of the LMS bridge has been written for QST. 3 Presented here are the technical details behind this unusual system, its operation and some additional practical applications. In case you don’t have the QST article handy, I will also present some mate- rial on installation and operation of the bridge. Nearly any PC can be used in this project, as there is no need to modify in any way. You can use one of the newer 3 GHz PCs or dust off that old 200 MHz PC that’s sitting on the shelf. No need to open the cabinet either since access to the sound card stereo line jacks is all that is required, and that can usually be accomplished from a panel on the rear of the computer. Of course I am not giving out guaran- tees that this project will work with your system, but I will say that I have tested it with a 200 MHz Pentium Pro, a 500 MHz Pentium III and a 1.1 GHz AMD Athlon processor running Windows 98 or XP with a Sound Blaster (SB) Live! sound card. So, if you have a Pentium or AMD PC with a Windows compatible full- duplex sound card, you may have the basis for a very good Windows based impedance measuring system. All you need to do is build the simple circuit described, connect it to your computer sound card and run the program. This impedance bridge allows you to auto- matically measure inductors, capaci- 1 Notes appear on page 47.

An LMS Impedance Bridge - WB6DHWwb6dhw.com/RLC_Meter/N LMS Impedance Bridge.pdf · An LMS Impedance Bridge ... Q uite some years ago, I built an impedance bridge using a rela-tively

  • Upload
    vananh

  • View
    244

  • Download
    8

Embed Size (px)

Citation preview

Page 1: An LMS Impedance Bridge - WB6DHWwb6dhw.com/RLC_Meter/N LMS Impedance Bridge.pdf · An LMS Impedance Bridge ... Q uite some years ago, I built an impedance bridge using a rela-tively

Sep/Oct 2005 41

9957 N River RdMequon, WI [email protected]

An LMS Impedance Bridge

By Dr George R. Steber, WB9LVI

Come learn about LMS impedance measurement andbuild a unique PC sound card impedance bridge.

Quite some years ago, I built animpedance bridge using a rela-tively new (at that time) DSP

microprocessor, the TMS32010. It wasbased on a technical paper1 that usedthe LMS (least mean square) algo-rithm. Results of that project weremixed. It was helpful because it veri-fied that the LMS algorithm could beused for real-time impedance mea-surements. But it was dishearteningbecause it was not very accurate andcould only operate at a maximumbridge frequency of 50 Hz. So I filed itaway for future reference.

Over the years I’ve maintained aninterest in impedance measurement,digital signal processing (DSP) and

programming. Recently I did a novelproject2 using a PC with a sound cardand some DSP techniques to imple-ment a low-cost curve tracer (I versusV) for devices like Zeners, LEDs andtransistors. During that task I some-times thought of the old LMS bridge.Could it be implemented on a PC? Af-ter a lot of study and some seriousmodifications, the answer is a re-sounding “yes.” In fact, it turned outto be much more than I had hoped for,yielding a wide range, low-cost imped-ance measuring system. An abbrevi-ated article describing constructionand operation of the LMS bridge hasbeen written for QST.3 Presented hereare the technical details behind thisunusual system, its operation andsome additional practical applications.In case you don’t have the QST articlehandy, I will also present some mate-rial on installation and operation ofthe bridge.

Nearly any PC can be used in thisproject, as there is no need to modify

in any way. You can use one of thenewer 3 GHz PCs or dust off that old200 MHz PC that’s sitting on the shelf.No need to open the cabinet eithersince access to the sound card stereoline jacks is all that is required, andthat can usually be accomplished froma panel on the rear of the computer.Of course I am not giving out guaran-tees that this project will work withyour system, but I will say that I havetested it with a 200 MHz Pentium Pro,a 500 MHz Pentium III and a 1.1 GHzAMD Athlon processor runningWindows 98 or XP with a SoundBlaster (SB) Live! sound card.

So, if you have a Pentium or AMDPC with a Windows compatible full-duplex sound card, you may have thebasis for a very good Windows basedimpedance measuring system. All youneed to do is build the simple circuitdescribed, connect it to your computersound card and run the program. Thisimpedance bridge allows you to auto-matically measure inductors, capaci-

1Notes appear on page 47.

Steber.pmd 8/4/2005, 2:38 PM41

Page 2: An LMS Impedance Bridge - WB6DHWwb6dhw.com/RLC_Meter/N LMS Impedance Bridge.pdf · An LMS Impedance Bridge ... Q uite some years ago, I built an impedance bridge using a rela-tively

42 Sep/Oct 2005

tors, resistors, input impedances,audio transformers, negative resis-tances and more at a wide range ofaudio frequencies. It has outstandingcapabilities and accuracy.

The cost of the project is less than$1 (yes, one dollar!) not counting thePC and power supplies. The circuituses only two resistors and a dual opamp. It can be built on a solderlessbreadboard like I did or you can de-sign a printed circuit board for it. Inany case you will need a digital volt-meter (DVM) for calibration purposes,although even this is not absolutelyrequired.

As usual, I am getting ahead of thestory. As a professor, now retired, I amobliged to present more backgroundand theory on this subject. I think youwill find it interesting, so please tryto resist the urge to skip to the end ofthe article.

ImpedanceImpedance is basically the opposi-

tion to current flow. It is a moregeneral form than resistance alone.Impedance can have a resistive partand a reactive part. For resistors, thereactive part is very small, unlessthey’re wire wound. Inductors and ca-pacitors have both resistive and reac-tive parts. The resistive part is oftenmodeled in series with the reactance.Although the series model is usedhere, other models are sometimes usedwith parallel resistors. At a given fre-quency, impedance can be written ineither polar (vector) or rectangularform as in (Eq 1).

jXRZZ +=∠= θ (Eq 1)

where Z is impedance in ohms, |Z| isthe magnitude of Z, θ is the angle ofZ, R is the real (or resistive) part of Z,

and jX is the imaginary (or reactive)part of Z. The two forms in Eq 1 arerelated by:

22 XRZ += and

= −

RX

tan 1θ

(Eq 2)As noted above, impedance can also

be written in other forms but in thisarticle we will always model the un-known impedance as a series combina-tion of resistance R and reactance X.

There are numerous instrumentsavailable to measure impedance in-cluding the ubiquitous ohmmeter forresistors, resistance bridges, acbridges for capacitors and inductors,automatic LCR bridges and vector im-pedance meters.

Learning From The Old LMSBridge

Since many of the ideas for the cur-rent project were derived after look-ing at the problems of the originalLMS bridge project, we will look at itfirst. It is shown in Fig 1. The signalsare all sampled signals, but we willnot denote that at this time for sakeof clarity. In this bridge, Vr and Vx aretwo sinusoidal voltage sources withthe same radian frequency ω0, but withdifferent amplitudes and phase shifts.Reference voltage source Vr is of con-

stant amplitude A and zero phaseshift. However, Vx has a variable am-plitude and phase shift. They can bewritten as follows:

Vr = Asin(ω0t)Vx = Bsin(ω0t + φ) (Eq 3)

The parameters B and φ are con-trolled to balance the bridge. Vr andVx are generated via D/A (digital toanalog) converters from the micropro-cessor. Voltage e(t) is read into themicroprocessor with an A/D (analog todigital) converter. Other elements ofthe bridge are the unknown imped-ance ZX and the reference resistanceRm. When the bridge is balanced (volt-age e = 0) the unknown impedance isgiven by

φ∠=AB

RmZx at the frequency ω0

(Eq 4)

Expressing VX in terms of in-phaseand quadrature components yields:

VX = B cos ϕ sin (ω0t) + B sin ϕ cos(ω0t) = W1 A sin(ω0t) + W2 A cos(ω0t)

Fig 2—Impedance measuring circuit and interface to sound card. See text for moreinformation.

Fig 1—Old LMS bridge. Zx is the unknownand Rm is reference resistor.

(Eq 5)

where W1 = (B/A) cos ϕ and W2 = (B/A)sin ϕ are the weights of the in-phaseand quadrature components, respec-tively. With B and φ expressed in terms

Steber.pmd 8/4/2005, 2:38 PM42

Page 3: An LMS Impedance Bridge - WB6DHWwb6dhw.com/RLC_Meter/N LMS Impedance Bridge.pdf · An LMS Impedance Bridge ... Q uite some years ago, I built an impedance bridge using a rela-tively

Sep/Oct 2005 43

of W1 and W2, Eq 4 can be written as:

balance atjRmWRmWZx 21 +=(Eq 6)

The terms RmW1 and RmW2 are thereal and imaginary parts of ZX. To bal-ance the bridge, one starts with ini-tial values of W1 and W2 and itera-tively modifies these to force e(t) tozero. One method of doing this, theLMS algorithm, requires that the er-ror be found at each new sample andupdated values of W1 and W2 be calcu-lated that hopefully force e(t) to zeroover time. The LMS algorithm doesthat well but we won’t go into how itdoes it right now.

First we observe a few things aboutthis bridge. On the plus side we seefrom Equation 6 that ‘at balance,’ thereal and imaginary parts of ZX dependonly on the weights and Rm (referenceresistor) and there is no requirementto know the amplitude A. That is a niceresult. On the minus side, since theLMS algorithm requires that calcula-tions occur at each new sample of e(t),we have only one sample period tofind new values of W1 and W2. Inaddition, the sampling of e(t) and theoutputs Vr and Vx must be synchro-nized. Note too that since the sourcesVr and Vx are generated digitally theymust be calculated for each new pointon the sine waves. Finally, we see thatthe unknown, ZX is floating aboveground, which is not desirable.

Consider now a typical sound cardin a PC. It has very good 16 bit A/Dand D/A converters. We can easily gen-erate the signals Vr and Vx and out-put them to the bridge via the soundcard line outputs. Similarly, the errorsignal e(t) can be read with a line in-put. But how do we keep the inputsand outputs synchronized within onesample period? If you are familiar withWindows you probably know that allsound card I/O is done via buffers. AndWindows decides when to empty andfill them. Because the input and out-put buffers may be long and not syn-chronized this argues against usingthe LMS algorithm, which needs tomake sample to sample decisions. Iwrestled with this problem, but couldmake no headway until I started look-ing at different circuit topologies.

Impedance Measuring CircuitConsider the circuit in Fig 2. In-

stead of using two sound card outputsand one input, as in the old LMSbridge, it uses one output and two in-puts. By intentional design, the twoinputs are synchronized with eachother but not necessarily to the out-put from the sound card. Resistor R1

is there to provide a ground referencefor the sound card output. Rm is thereference resistor and Zx is the un-known, as in Equation 1. We see thatthe unknown impedance is nowgrounded. Two op-amps U1A and U1Bprovide isolation and buffering of thebridge voltages. They are connected asunity gain, high input-impedance, lowoutput-impedance drivers. Vr is the si-nusoidal voltage applied to the circuitvia a line output of the sound card. Itis fed back to the sound card inputright channel via U1A. The voltageacross the unknown Zx is buffered byU1B and fed back to the sound cardinput left channel via U1B. Shieldedaudio cables are suggested for connect-ing to the sound card.

U1 is a cheap LM358 dual op-ampor equivalent which can be poweredfrom bipolar power supplies of 3 voltsto 15 V. It is best to keep the powersupply voltages low to protect thesound card line inputs in case of prob-lems. My circuit runs at about plusand minus 3 V. A bipolar battery sup-ply could also be made using four AAAbatteries with a center tap connectedto ground.

Since all measurements depend onRm, it is critical that we know its re-sistance precisely. To effectuate differ-ent ranges of the instrument, we mayalso wish to suitably change the valueof Rm. We will discuss more about thislater on.

There are many ways to measureimpedance with the circuit of Fig 2.All of them require that a sinusoidalsignal Vr be applied to the circuit anda number of sequential samples of Vrand Vx be captured in buffers. Dis-cussed below are several methods ofdoing this.

Three Measurement MethodAn old method of calculating im-

pedance, sometimes called the three-voltmeter method, can be used. Hereis how it works. Measure and recordthe three voltages Vr, Vx and Vrm asshown on Fig 2. We see that

θ∠== ZRmVV

Zrm

x (Eq 7)

To find the magnitude of Z, simplytake the magnitude of Vx divided bymagnitude of Vrm and multiply by Rmas shown below.

plying the law of cosines results in theequation for the phase angle θ asshown below.

RmV

VZ

rm

x= (Eq 8)

where T stands for transpose. So Xk isactually a column vector and the sub-script k is used as a time index. Simi-larly, we define a weight vector

−−−= −

πθ 180

2180

2221

x

x

VVrmVVrmVr

cos

It is a little more complicated toshow, but considering the three volt-ages as vectors in a triangle and ap-

in degreesThere are other ways to calculate θ

that involve multiplying the voltagesand filtering, but they don’t providemore benefits. A drawback to this wayof finding θ is that it cannot distin-guish between positive and negativeangles of reactance. However, the cor-rect θ can be found by looking at thezero crossings of Vrm = A sin(ωt) andVx = B sin (ωt + θ) since at t= 0 (andmultiples of the period), Vx = B sin θwhich is > 0 for inductances and < 0for capacitances.

This method was implemented ona PC with good results over much ofthe measuring range. If you lookedno further, this would be a an accept-able method of finding impedance.When either Vx or Vrm is small,however, there is a substantial er-ror in θ. This was attributed to noiseand other errors from the measure-ment of these voltages. More sophis-ticated methods can reduce theseerrors.

Least Squares MethodThe literature is full of different

error-minimization criteria but themost widely used one is the leastsquare approximation originated byGauss. Simply stated, the leastsquares principle involves selectingthe function that minimizes the sumof the squared errors. A more com-plete discussion can be found inReference 4. It is applicable to bothcontinuous and discrete systems.Since we will be dealing with discretevariables for the rest of this discus-sion, it is appropriate to introducethem now. Fig 3 shows a adaptive lin-ear combiner we will use to illustratethe least squares method. It consistsof unit-time delays, weights and sum-mation blocks. There are two inputs:the data samples xk and the desiredresponse dk. Sample delays are rep-resented by z–1 with the samples takenat points k, k–1,…, k–L, going backin time through the data samples.

The L-input samples, xk, xk–1, …xk–-L may be represented as a vector.

Xk = [xk xk–1 . . . xk–L ]T (Eq 10)

(Eq 9)

Steber.pmd 8/10/2005, 2:55 PM43

Page 4: An LMS Impedance Bridge - WB6DHWwb6dhw.com/RLC_Meter/N LMS Impedance Bridge.pdf · An LMS Impedance Bridge ... Q uite some years ago, I built an impedance bridge using a rela-tively

44 Sep/Oct 2005

Wk = [w0k w1k . . . wLk ]T (Eq 11)

From Fig 3, we see that the output,yk, is a linear combination of the in-put samples and the weights. Theerror signal with time index k is thedifference between the desired re-sponse dk and the output yk and isgiven by:

ek = dk –yk = dk – WT Xk (dropping thesubscript of W for clarity) (Eq 12)

and

e2k =d2

k + WT Xk XTk W –2dk XT

k W(Eq 13)

This is the instantaneous squarederror and is the function we wish tominimize by adjustment of theweights, W. This rather imposing taskcan be attacked via two main meth-ods, the non-recursive approach calledthe Wiener-Hopf method or the recur-sive approach of the Widrow-Hopf(LMS) method. Solutions presented inNote 4 will be used.

A closed-form solution for theWiener-Hopf method can be writ-ten as:

PR*W 1−= (Eq 14)

where R = E[Xk XTk ], P = E[dk Xk ], E

denotes taking the expected value, andW* is the optimal weight vector. Theprocedure is straightforward. We cap-ture L samples, calculate the expectedvalues for R and P and simply calcu-late W*. Surprisingly, in practice, itworks quite well.

The LMS method proceeds by firstcalculating the error as in Eq 12 andthen applying a steepest-descentalgorithm to find Wk+1 as:

Wk+1=Wk+2µεkXk (Eq 15)

where µ is a constant that controls thespeed and stability of adaptation. Thisdeceivingly simple recursive equationobtains the same solution as Weiner-Hopf, when converged.

Adaptive Impedance BridgeRefer again to Fig 2 and notice that

ear combiner for this case where Vrmis the input, Vx is the desired signaland ek is the error. The unknown im-pedance is given as:

21 jRmWRmWZ += (Eq 18)

Both the Weiner-Hopf and LMSmethods were implemented and simu-lated for comparison of accuracy andconvergence using real data capturedfrom a sound card. Many differentcases of unknown impedances, whosevalues were precisely measured on acommercial LCR bridge, were tested.A sound card sampling frequency of44,100 samples per second and a si-nusoidal frequency of 1225 Hz wasused for the test signal. Each channelwas set to a capture length of 11,025samples, which provided 0.25 secondsof data. As expected, both methodstended toward the same, and correct,solution for Z.

The Weiner-Hopf method providedthe best (lowest) error for this num-ber of samples in most cases. The LMSmethod varied in error depending onthe amplitude of the signals and thevalue of µ. If nothing further were con-

sidered, Weiner-Hopf would be themethod of choice. However, furtherexperimentation showed that if thesampled data in the capture bufferwas re-iterated several times, the LMSmethod improved dramatically. This,in effect, increases the number ofsamples. Since the LMS algorithm isso efficient, only a few milliseconds isadded to the calculation. A similar re-iteration for the Weiner-Hopf methoddoes not provide additional improve-ment and would require a larger cap-ture buffer. Finally, the LMS algorithmwas normalized to improve the speedof convergence over a wide range ofsignal levels.

Both methods are very good andgreatly surpass the three-measure-ment method described earlier.Since I wanted to keep the cap-ture length small (in order to haveabout 4 measurements per second)I chose to implement the LMSmethod.

Fig 3—An adaptive linear combiner.

Fig 4—An adaptive combiner for the LMS bridge.

ZRmVrm

ZRm

VxVrVx =

= (Eq 16)

Sound Card ConsiderationsA low-distortion, low-noise full-du-

plex sound card is desirable. TheSound Blaster Live fills the bill nicely

where Vrm = Vr–Vx. Now, let Vrm =A sin(ω0t) and Vx = B sin(ω0t + θ). Fol-lowing the same procedure as for theold LMS bridge, Vx can be written as:

( ) ( )tcosAWtsinAWVx 0201 ωω +=(Eq 17)

To find the weights, we apply themethods described in the previous sec-tion. Fig 4 illustrates the adaptive lin-

Steber.pmd 8/5/2005, 3:07 PM44

Page 5: An LMS Impedance Bridge - WB6DHWwb6dhw.com/RLC_Meter/N LMS Impedance Bridge.pdf · An LMS Impedance Bridge ... Q uite some years ago, I built an impedance bridge using a rela-tively

Sep/Oct 2005 45

and probably many others will too.Since I cannot test them all, I will re-strict my attention to this one. Refer-ring to Fig 2, we see that A1 is the lineoutput amplifier, and A2 and A3 arethe right-and left-channel line inputsof the sound card. These amplifiers canbe a source of distortion if the properlevels are not maintained.

There are two culprits here: One isexcessive drive and the other is satu-ration. If A1 sources too much current,it will distort. I viewed Vr on myTektronix TDS 360 (Digital Real TimeOscilloscope with FFT) and saw a lotof second- and third-harmonic distor-tion when Vr exceeded 820 mV withRm =10 Ω and Z= 0 (a short circuit).Since the full output level is 1.62 V, itneeds to be attenuated. This can bedone either with the sound card mixeror with the signal generator level con-trol in my program. I chose to set thePlay level to maximum in the mixerand set the level to 0.5 in the program,as it is easier to remember. One of thenice things about the LMS bridge isthat you don’t need to know the am-plitude of Vr.

The other consideration is that theline input amps A1 and A2 will satu-rate if the input voltage is too high.This is so regardless of the Record set-ting in the mixer. On the SB this oc-curs at 820 mV. Since we are usinggains of “one” in the circuit, we canprevent this by adjusting Vr as notedabove. So, for my SB Live, I just setthe output level to 0.82 V and bothconditions are satisfied. Just in case,I have provided a real-time oscillo-scope function in the bridge display,so the sine waves can be monitored forpossible flat topping. If a digital volt-meter is handy, Vx can be measuredand used to calibrate the scope. Thisis provided in the program, but it isnot required and does not affect op-eration of the bridge.

One other consideration is the bal-ance of the two input channels. Sincewe need to calculate Vr–Vx precisely,the two channels must be balanced.This function is also provided in thecalibration section of the program.

A note is in order about earlierSound Blaster sound cards such asthe SB16 and AWE 32, since thereare so many of these still in ser-vice. Unfortunately, they do notprovide true, full-duplex opera-tion. The same may be said of SBcompatible cards, so be wary. Forexample, (with the latest drivers)the SB AWE32 can simultaneouslyplay only unsigned 8 bits andrecord signed16 bits. It also has abuilt-in amplifier that may over-

drive the LMS circuit. After someextensive tweaking, I managed toget one working with this program,but the results were not as good. Iadvise you not to use any of thesecards.

Impedance Bridge Installationand Operation

The LMS bridge software is avail-able on the ARRLWeb site and iszipped for fast downloading. Unzip itto a new folder and you are ready togo. Just run the EXE program. It wastested with Win98 and XP. Fig 5 showsa screen shot of the bridge; there is alot of information on the screen. Themonitoring scope with its controls ison the left side. The most importantpart is in the lower-right corner la-beled UNKNOWN, where all of therelevant data about the measuredimpedance is displayed.

The bridge is easy to use but someconsiderations are in order. The valueof Rm must be known exactly, as allresults depend on it. Strive for 1% ac-curacy here (or better) and do not usean inductive resistor; carbon or film

types are fine. Although the bridge hasa wide range, it is best to keep the lev-els of Vx and Vrm reasonable. The soft-ware scope helps monitor these levels.To reap the maximum benefit of thebridge, Rm should be selected for theapproximate range of impedance. Forexample, if Rm is10 Ω, that is the ap-proximate impedance to measure. Thisvalue can be chosen by trial and erroror by making educated guesses, justas with most bridges.

In general, you should be able tomeasure over a 0.01 to 100 rangebased on Rm. The chart in Table 1illustrates the range you can expectfor a given Rm at 1225 Hz. ( The bridgefrequency will affect this range.) Fromthe chart, if Rm =10 Ω, you can mea-sure L between 12 µH and 129 mH,and C between 1299 µF and 0.129 µFat 1225 Hz. The software has provi-sions to store several values of Rm.Just make sure that is the value actu-ally in the circuit.

At the high and low ends of thebridge’s range, stray capacitance andinductance start to play a role. Thesevalues can be compensated out by us-

Table 1—Range of Bridge for various Rm with a Bridge Frequency of1225 Hz. (See text)

Rm (Ω) L C10 12.99 µH to 12.99 mH 0.1299 µF to 1299 µF

100 129.9 µH to 129.9 mH 0.01299 µF to 129.9 µF1 k 1.299 mH to 1299 mH 1.29 nF to 12.9 µF

10 k 12.99 mH to 12.99 H 1299 pF to 1.29 µF100 k 129.9 mH to 129.9 H 12.99 pF to 0.129 µF

Fig 5—Main window of the LMS impedance bridge program.

Steber.pmd 8/4/2005, 2:39 PM45

Page 6: An LMS Impedance Bridge - WB6DHWwb6dhw.com/RLC_Meter/N LMS Impedance Bridge.pdf · An LMS Impedance Bridge ... Q uite some years ago, I built an impedance bridge using a rela-tively

46 Sep/Oct 2005

ing the bridge, itself, to measure themwith the unknown impedance beingan open circuit and short circuit, re-spectively. These values, called “tare,”are then automatically used to com-pensate the result. For example, in mycircuit there is about 14.1 pF of straycapacitance with Z open and Rm =100 kΩ. So, that value is what I enterfor “C tare” in the program. Obviously,this only makes a difference whenmeasuring small capacitors. Similarcompensation may be made for theinductive wiring, when Z is near zero.

Once you have balanced the stereochannels and (optionally) calibratedthe scope, you are ready to start mea-suring. By the way, all calibrations aresaved so that you only need to do itonce. Next, the mixer that came withyour software or the one that camewith Windows needs to be checked, asyou may have changed its settings.When you start the program, a littlenotice comes on the screen to remindyou about this.

Basically, you want to set the out-put level, input gain and stereo bal-ance. The details of how to do this varyfrom system to system. Here is howit’s done with the SB: In the mixer Playsection, enable “Wave” and “Spkr,” setthe sliders to their maximums andmute all others (including “Line” toavoid audio feedback). In the Recordsection, enable “Line,” set it to maxi-mum and mute all others. Set the ste-reo balance to center for all controls.

Using The Impedance BridgeMeasuring impedances is very easy

with this bridge, but it’s helpful tothink about what you are doing, so youdon’t misinterpret results. Don’t try tomeasure a 100 pF capacitor with anRm of 10 Ω. Assuming that you have a“ballpark” Rm, connect the unknownto the Z points of the circuit shown onFig 2 and click the “Start” button onthe screen. The bridge will automati-cally determine whether the reactanceis capacitive or inductive at the mea-suring frequency. Several items arecalculated and displayed, includingthe real and reactive parts of Z, themagnitude and angle of Z, the L or Cvalue of the component and its Q or Dfactor. The scope is handy for lookingat the relative magnitude and phaseof Vx and Vrm and to see if you havereasonable levels.

If you aren’t familiar with measur-ing impedance (and even if you are)you may run into some situations thatare unusual or seem to give inconsis-tent values. As a guide, remember thatthe value of an impedance is usuallydefined only for a given frequency and

may be different at other frequenciesor signal levels. If you are measuringa resistor, you will find it has some re-actance and it will show up in the boxon the screen as either a capacitor orinductor. Since you know it’s a resis-tor, just look at the magnitude of Z orreal part of Z.

You are not limited to just L and Ccomponents; the bridge can measureall kinds of impedances including in-put impedance, audio transformerimpedance, speaker impedance, sole-noid impedance and even negativeresistance. Some of these topics arecovered in the following sections.

Measuring Input ImpedanceThe input impedance of an ampli-

fier or other circuit may be found byconnecting it to the unknown Z termi-nals as shown in Fig 6. Take care notto overdrive the amplifier input beingmeasured. This can be controlled byadjusting the output level in the mixerand choosing a suitable value for Rm.Note, too, that impedance may varygreatly with frequency, so try severalbridge frequencies.

Here’s an interesting special case:If you want to measure the input im-pedance of the left channel of yoursound card line input, do the follow-ing. Bypass U1B and connect the lowerend of Rm directly to that channel in-put. This makes the input impedancethe unknown Z. On my SB, the inputimpedance Zin measured 28.2 k∠–6.41° at 1225 Hz (with Rm = 1 kΩ).

Measuring Transformer orSpeaker Impedance

The impedances of audio trans-formers or speakers can be found bysimply connecting them to the bridgeas shown in Fig 7. For speakers, useRm = 10 Ω to get started.

As an example, I measured the

reflected impedance of a small audiotransformer (Mouser 42MC003, 1.2 k:8 Ω). I connected the primary to theunknown Z terminals with an 8.2 Ωresistor connected to the secondary,as shown in Fig 7. The bridge read1.24 k ∠13.78 at 1225 Hz (with Rm =1 kΩ). The reflected impedance de-pends on the load connected to thesecondary, so you can experiment withdifferent loads to see the effect.

Measuring Large ElectrolyticCapacitors

While I was working on this project,the power supply capacitor in my oldoscilloscope went out. The replace-ment, a 1000 µF unit, was too greatfor my C meter. So, I put Rm=10 inthe bridge and measured it easily. Becareful with these kinds of capacitorsand make sure they are dischargedbefore measuring them.

Large capacitors can often haveleakage and internal resistance. It’sinteresting to see how the capacitanceof an electrolytic capacitor changeswith frequency. A junk box capacitormeasured 15.62 µF at 120 Hz, and itread 14.35 µF at 1225 Hz. By the way,it was marked 22 µF and thus outsideits minus 20% tolerance.

Measuring Iron-Core InductorsIron-core inductors can give some

strange results. First measure a smallair core inductor (150 µH, or so) andvary the output level of the lineby varying the volume out in theWindows mixer. Note that the read-ing for inductance barely changes;only due to noise and harmonic dis-tortion errors. Now measure a smalliron-core inductor and do the samething. You will notice that the induc-tance decreases with signal level. Thisunexpected result (at least for me) re-quired some research. It turns out that

Fig 6—Setup for measuring circuit inputimpedance.

Fig 7— Setup for measuring transformeror speaker impedance.

Steber.pmd 8/4/2005, 2:39 PM46

Page 7: An LMS Impedance Bridge - WB6DHWwb6dhw.com/RLC_Meter/N LMS Impedance Bridge.pdf · An LMS Impedance Bridge ... Q uite some years ago, I built an impedance bridge using a rela-tively

Sep/Oct 2005 47

the permeability of the iron starts outlow for small currents and becomeshigher and more constant (linearrange) with increasing current. SinceL is proportional to the permeability,there is a reduction in L at low cur-rents. If you continue to increase thecurrent beyond the linear range, theiron will saturate (I knew that!) andL will decrease. This last part is of con-cern to those who design switchingregulators. Reaching such large cur-rents is not within the capabilities ofthe bridge as it stands.

Another interesting thing aboutinductors is that they can have a re-sistive component that may vary withfrequency. Using the transformer pri-mary as shown above, with the sec-ondary open, illustrates this. As thebridge frequency was varied from525 Hz to 2205 Hz, the resistive partvaried from 1.14 kΩ to 3.93 kΩ. Prop-erly terminated with 8.2 Ω, it only var-ied from 1.06 kΩ to 1.26 kΩ over thesame frequency range. Solenoids ex-hibit similar behavior and their im-pedance varies with plunger position.

Measuring Negative ImpedanceIt’s possible to build a negative-

resistance circuit. An article in EDNMagazine (Reference 5) about usingnegative resistance prompted me to dothis experiment. Connect the negativeimpedance converter shown in Fig 8as the unknown impedance Z. The opamp can be an LM358. Make sure Ris less than Rm or else you will cancelit and cause oscillations. I used Rm =1000 Ω and R = 470 Ω. The bridge in-dicated minus 470 Ω. Be cautious withcircuits of this type as they are likelyto oscillate.

Final ThoughtsThis program runs fine on Win98

and Win XP. It was written in VisualBasic 6.0. When you run the softwareyou may get a message like “RequiredDLL file MSVBVM60.DLL was notfound.” This is a Visual Basic run timefile and is already on many systems.If it is not found, you will need to ob-tain it and install it on your system.It is freely available from Microsoftand other sites on the Web. It is usu-ally available as Visual Basic 6.0 SP5:Run-Time Redistribution Pack(VBRun60sp5.exe) and is a self-extracting file. The download takesabout six minutes at 28.8 kbps.

If you just want to experiment withthe program, don’t worry as it does notmodify the registry or install any othermaterial on your computer. You canremove it by just deleting the entire

George R. Steber PhD, is emeritus Pro-fessor of Electrical Engineering andComputer Science at the Universityof Wisconsin-Milwaukee. George,WB9LVI, is a life member of ARRL andwas awarded the QST cover plaque inMay 1975 for a ground breaking ar-ticle on digital slow scan TV. Dr Steberhas considerable industrial experienceas a corporate officer, consultant andproduct designer, with 18 patents is-sued. In his spare time he enjoys rac-quetball, reading, playing his Bachtrumpet, editing video and astronomy.He recently restored a previously lost,badly damaged NBC Tonight Showprogram for the Kate Smith Com-memorative Society. You may reachhim at [email protected] with“LMS” in subject line.

Notes1M. Dutta, et al, “An Application Of The LMS

Adaptive Algorithm For A Digital ACBridge,” IEEE Transactions on Instru-ments and Measurements,” Vol IM-36,pp 894-897, (Dec 1987).

2G. Steber, “Tracing Current and Voltage,”Circuit Cellar Magazine, Vol #162, pp 56-61, Jan 2004.

3G. Steber, “Low Cost Automatic ImpedanceBridge,” QST (Oct 2005).

4B. Widrow et al, Adaptive Signal Process-

Fig 8—A negative resistance converter.Choose R < Rm to avoid oscillations.

folder where it is located.Numerous components were mea-

sured on a commercial LCR bridge andcompared to the LMS bridge. SaidLCR bridge was rated between 1% and5% depending on range, componenttype and frequency. Good agreementwas achieved between the two, betterthan 1% in many cases, a notable ex-ception being small iron-core induc-tors (see comments above), which var-ied more. With any luck you will findsimilar results. In any case, don’t beimpeded in your quest for a fine LMSbridge. Perhaps this is one you can’tresist.

ing (Prentice-Hall ISBN 0-13-004029-0,1985).

5E. Simons, “Negative Resistance LoadCanceller Helps Drive Heavy Loads,”Electronic Design Magazine, March 19,2001.

New Theories with Interpretations. Read about “The Death of ModernGravity Theory”, “Electricity, Flow of Electrons or Magnetism?”,“Electromagnetic Pulses or Waves?”, “Will an Object Launched intoSpace Ever Stop?”, “Distance and Time – Are They the Same?”,“Electromagnetic Pulse Speeds”, and much more.

New

Science Book

Hard cover

Physics - Astronomy - Sciences

To order: Fax 972.874-0687 or send order to:Walter H. Volkman W5OMJP.O. Box 271797Flower Mound, TX 75027-1797

$16.00 Postpaid USA$24.00 Postpaid Foreign Airmail

30 Day Money Back Guarantee

You must be satisfied with book or return postpaid for full refund ofpurchase price. No questions asked.

Steber.pmd 8/4/2005, 2:39 PM47