Announcement

Collapse
No announcement yet.

Emulating a fancy LCR meter

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Emulating a fancy LCR meter

    I think the cheapest way to emulate the fancy LCR meter is with a computer and a good sound card. I've been thinking about this since the last time it came up, and a sound card (or pair of cards) that can simultaneously generate and listen could work.

    Basically, one uses the left and right input channels to sense pickup input and output signals, and computes the relative phase and amplitude. As the drive frequency varies, phase and amplitude will also vary, and from this one can compute the inductance and AC resistance as a function of frequency.

    The details would need to be worked out, and I would imagine that not all sound cards are equally suitable. There is also the matter of writing the code that drives the soundcard or cards and does the necessary computations.

    The first question is if anyone has already done this.

  • #2
    I've got several extra good computers and would put this to the test if someone wants to give me detailed instructions. I dont have very high end sound cards, but I do have Audigy 2 XFi's.

    Comment


    • #3
      not sure if this is germane (but thought it might be) :

      build a unique PC sound card impedance bridge

      http://www.arrl.org/qex/2005/Steber.pdf

      another one but it's not on the net anymore apparently as well the program if memory serves:

      http://web.archive.org/web/200208100....publi.ro/ady/

      just some links I remembered seeing before when googling about LCR meters and such

      Comment


      • #4
        Originally posted by dai h. View Post
        not sure if this is germane (but thought it might be) :

        build a unique PC sound card impedance bridge

        http://www.arrl.org/qex/2005/Steber.pdf
        This seems right on point. I'll have to read the article. I built a simple I-V interface to do much the same, but for signal generator and oscilloscope, not computer. It looks like Steber has an I-V interface there too.


        For the audience, an explanation of "I-V Interface" is in order:

        This is usually implemented as three opamps.

        The first opamp buffers the test signal, driving one end of the component under test.

        The second opamp is wired as a high-impedance voltage follower, takes its input from the same end of the component under test as the first opamp drives, providing a buffered voltage signal to the scope (or soundcard) input.

        The third opamp is wired as a transimpedance amplifier, which converts current into voltage. The other end of the component feeds the input of the transimpedance amplifier, providing to the scope (or soundcard) input a voltage proportional to the current through the component.

        Opamps two and three therefore respectively yield signals proportional to the voltage across and to the current through the component. Impedance is the voltage divided by the current.

        The twist is that with reactive components like inductors and capacitors, current and voltage are not in phase. It is this phase deviation versus frequency that allows us to compute inductance and capacitance values.

        another one but it's not on the net anymore apparently as well the program if memory serves:

        http://web.archive.org/web/200208100....publi.ro/ady/
        The link didn't work for me.

        just some links I remembered seeing before when googling about LCR meters and such
        If you find some other references, please post them.

        Comment


        • #5
          Originally posted by Joe Gwinn View Post
          it's from the web archive ("wayback machine"). Can you see this page (some unknown language--Romanian?? seems to sound similar to Italian) : ?

          For Enhancer section please click here Pagina este intr-o constructzie eterna
          Mai dar ce bine c-ai aterizat in pagina mea...
          Gaseshti pe aici trei programele shi... inca ceva...

          Shi uite ca m-am gandit sa ma dau shi eu pe internet... Nu de alta dar nu aveam ce face mai bun... . Ce gaseshti pe aici ? Trei programe pe care le-am facut pt. ca m-a pasionat domeniul audio... Calitatea lor va spune cat de mult am fost pasionat...)) Pt. cine este curios despre ce poate intampla in "cutiutza" mea, expun aici unele din gandurile mele... shi sa nu uit, mai este o poezie care-mi place in mod deosebit...

          Ce altceva mai fac eu ?
          Dupa ce am facut o versiune "publicabila" a programului MultiMeter, revin la o pasiune mai veche... care s-a trezit de putzina vreme. AI. Pana imi gasesc ceva mai pamantesc cu care sa-mi omor neuronii, o sa ma ocup de intelighentzia artificiala... Ureaza-mi spor la treaba shi scrie-mi ce parere ai de pagina mea... O ultima chestie : in masura in care mai fac cate un programel sau o sa am (shi alt-) ceva de spus, o sa upgradez shi aceasta pagina...

          Numarul de vizitatori
          incepand cu 27 Aprilie 2000


          up on top where it says "Multimeter", it leads to a page that says this:

          MultiMeter...

          After a 2-week hard work, (with large breaks in between , this program has started to work... quite well. What does it do? It measures pieces… like any other multimeter… Why have I done it? Well, I believe this is a much cheaper version of a multimeter, which measures capacities, inductances and resistances. It should become useful to any amateur electrician (or to a poor one), who has a computer (486 DX4, 16Mb minimum requirements) and Windows 9x.

          Click to Download In order to make the program work, you will need Windows 9x, a Full duplex sound card with already installed drivers, 2 jack stereo couplings with 1-2 meters wires and a resistance. Download this program (100Ko).
          Conections diagram This is the way you must make the connections. Sticking some wires and a resistance shouldn’t be too difficult. You will choose one channel from the speaker exit of the sound card (or you will join both channels using resistances of minimum 8 Ohm and further on the channels will be connected between the resistances), you will make all the other marked connections (to LineIn) and... GO!
          The program should have very accurate information about the value of the resistance. The measurement scale is depends on the level of the noise. If you measure values that are comparable to the noise (which you will find at the open calibration, that means without the measurement piece), then the program won’t display the value. The noise and the continuous current, typical of any sound card, are successfully reduced using some recursive filters. Probably in a future version (if anyone should be interested in this program) I will also insert a virtual sample that will help me to reduce even more the disturbing influences. It will consume more resources of the CPU, but "precision before everything " At this time, the program works at an amateur level.
          Let’s get down to the facts. How do you use it? Supposing that the wires are already sticked (I hope that you’ve already understood how to do that)... After you start the program, you will make the Short calibration (the wires where the piece should be found short-circuit among themselves). You will wait a while, until the Err indicator reaches a minimum value (and possibly a stable one, depending on the sound card). With the wires still short-circuited, you will switch the program to the Open calibration, then you will unbind the wires. You will also wait for a value that is minimum and as stable as possible. Now switch the program to its measurement phase and you can measure different pieces.
          The volumes are highly important! The quality of the measurement depends very much on the distortions of the signal. A simple version that regulates the volumes is the following: The exit volume is regulated at approximately one half (no more than 3 quarters even if you have a very good sound card). With your program already going, independent of the work mode, you will regulate the LineIn entrance volume until the indicator at he recording control (of the system) is yellow at most (this also means approximately at a half)... This way you should get minimum errors in most cases.
          Does anyone understand what I’m talking about?

          About how this program works (although I doubt that anyone should be interested)... How does the program measure the pieces?
          Resistances : the difference between the intensity of the signal between the channels.
          Inductances/capacitors : the difference between the intensity of the signal between the channels and, as a plus, the phase difference between them.
          What is the difference between the 2 types of measurements? The first uses only one frequency (the one in the left) and is based only on the phase difference. The second one uses both frequencies and the result is provided by a system of 2 equations with 2 unknowns ... gotcha, ha? LOL The 2 frequencies shouldn’t be too close (under 10%) or too different (over 200%). If they are identical (I haven’t even tried it, believe me?), the second method can’t work. The second method has one more advantage: it can make the difference between inductances and capacities, and this is why it’s appropriate in these cases. As for the resistances, it doesn’t work too well.

          As I’ve also written in the program, if you like and use it, please send me an email, so that I can see what you think of it (is it too expensive? . Enjoy using it! Oh! I’ve almost forgotten! Don’t try the program on the speakers! You may not like the sounds it produces!

          How does it work on my computer ? Well, on my sound card (YMF 724) I measure in a continuous scale, from 0.22 uF to over 1000 uF, with the frequencies set at 100/1000 and 20 Ohm serial resistance. If you want to measure small condensers (like 0.01 uF), try on bigger serial resistance (but not bigger than 1000 Ohm) and larger frequencies (but not larger than 1000 Hz). The resistances in a scale from 1 Ohm to some 10kOhm, again with the serial resistance of 20 Ohm. About the coils... not quite good news... the program works only on paper. What does that mean? I don’t have any standard inductances in order to check if it works accurately. However, by the way I designed the program, it should work. Maybe one of the users will let me know how the program works with the inductances.

          Well, I’ve been quite in a mood for talking, ha?

          I will take no responsability for any damage or loss of data resulting from the use or misuse of this program.
          You are using it at your own risk.


          (I've attached the image from the article also)
          Attached Files

          Comment


          • #6
            Originally posted by dai h. View Post
            it's from the web archive ("wayback machine"). Can you see this page (some unknown language--Romanian?? seems to sound similar to Italian)

            [snip]

            (I've attached the image from the article also)
            It does seem to be Romanian, from the URL.

            The link now works for me.



            The series resistor converts current through the component into voltage applied to the Right input channel. The Left channel gets the voltage across the component (and resistor).

            This is a primitive I-V interface. The problem is that to get enough signal the series resistor must be large, but this interferes with seeing the voltage across the component uncontaminated by voltage across the series resistor.

            The opamp approach solves this problem by using a transimpedance amplifier in place of the series resistor.

            Comment


            • #7
              Originally posted by Joe Gwinn View Post


              For the audience, an explanation of "I-V Interface" is in order:

              This is usually implemented as three opamps.
              A couple of comments:

              1. Why so many op amps? The voltage at the output of the first op amp is what you want to measure. Even if the input to the sound card were to load it a bit (unlikely), it is still "the voltage", and V/I is the impedance. The same thing applies to the first op amp. The sound card only needs to be buffered if the load of the Z would make it non-linear.

              2. Maybe I-V is not the best way to go. The region of greatest interest for a pickup is near the resonant peak, second greatest, below the peak down to maybe 80 Hz. The peak is the frequency where the output voltage of the TIA is smallest (lowest current through Z), and so most subject to relative error. The relative error is important because we would be dividing by this small number. The other approach, driving the Z with a current source derived from the soundcard, and buffering the voltage across the Z with a follower gives the highest voltage at the peak, and the division by the current is pretty much just scaling by a complex constant. This method would have more trouble at the high and low ends, but the low end is just resistive, easily checked with a meter, and the top end is generally irrelevant. You have to make sure the current source does not saturate near the peak, but it is not hard to monitor the level, or to put an overload sensor on it.

              Comment


              • #8
                Not my area of expertise for sure, but we used to have some software from JBL, and I am sure others make similar products, that analyze sound providing a three dimensional graphic. Freq, amplitude, phase - or something like that. The result is one of those plots that looks like a terrain map of a rolling countryside. I want to say it had a name like SOund Master, but it could have been anything. This was several years ago, but I am sure audio analysis software is still around. It was intended for setting up PA systems in large spaces. Due to the three dimensional display, you could see relationships between variables that might not be so evident when considering them individually.

                Would something like that help here. Is my description remotely clear?
                Education is what you're left with after you have forgotten what you have learned.

                Comment


                • #9
                  Originally posted by Mike Sulzer View Post
                  A couple of comments:

                  1. Why so many op amps? The voltage at the output of the first op amp is what you want to measure. Even if the input to the sound card were to load it a bit (unlikely), it is still "the voltage", and V/I is the impedance. The same thing applies to the first op amp. The sound card only needs to be buffered if the load of the Z would make it non-linear.
                  The first opamp can be replaced with the soundcard, if it's up to it. But opamps are cheap, and will render the details of the soundcard output irrelevant, as well as buffering the transmission line from soundcard to component. One usually drives the component through a current-limiting resistor to protect both driver and transimpedance amplifier. (Not to mention sprinkling some ESD protection diodes around the component terminals.)

                  2. Maybe I-V is not the best way to go. The region of greatest interest for a pickup is near the resonant peak, second greatest, below the peak down to maybe 80 Hz. The peak is the frequency where the output voltage of the TIA is smallest (lowest current through Z), and so most subject to relative error. The relative error is important because we would be dividing by this small number. The other approach, driving the Z with a current source derived from the soundcard, and buffering the voltage across the Z with a follower gives the highest voltage at the peak, and the division by the current is pretty much just scaling by a complex constant. This method would have more trouble at the high and low ends, but the low end is just resistive, easily checked with a meter, and the top end is generally irrelevant. You have to make sure the current source does not saturate near the peak, but it is not hard to monitor the level, or to put an overload sensor on it.
                  I-V is how the $15K instruments work. I read lots of patents researching this.

                  I imagine that it's a lot harder to implement a current source than a voltage source at high frequencies. Stray capacitance is going to be a real problem with current sources, which are by definition high impedance.

                  The Q of a pickup at resonance isn't that high, so while you are correct that the current is minimum at resonance, it isn't all that small either.

                  Comment


                  • #10
                    Originally posted by Joe Gwinn View Post

                    I-V is how the $15K instruments work. I read lots of patents researching this.
                    Yes, a general purpose instrument would use I-V because it is best for most impedances.

                    What do we really want to know about a pickup? I think it is the frequency and width of the resonance when loaded by the C of the cable and the R of the input of the amplifier. I think that this is most likely to be an indicator of the pickup's tone. One should know the inductance as well, measured at some intermediate (not too high) frequency, low enough to not be affected by the C of the pickup. A pickup measuring machine should measure the device in the proper environment, and the parameters of this environment should be selectable.

                    By the way, I did some modeling of the results of the coil that I measured with/without slugs (results on the other discussion). For the case with the slugs, the high frequencies and low frequencies are best fit with inductances about 7% different. The case with no slugs does not require using two different inductors. This is a pretty small effect, but it does look real.

                    Comment


                    • #11
                      Here is something to remember about computer-based measurements: You have available both tremendous computing capability and very flexible methods for adapting it to the situation at hand. Thus, rather than have a complicated analog system which the computer samples, one can use a simple analog system, but one that can be well-characterized. For example, instead of a current source (complicated), one can use a large-value resistor, and then correct for its finite value in the computer code. The resistor should not be much smaller than the largest value expected for the unknown impedance, or accuracy can be lost. Also, the TIA could be replaced with a small resistor (as in the diagram above), and the computer code could correct for its effect. The resistor should not be much less than the resistance of a pickup in the case of interest here.

                      For example, in the modeling that I mentioned in my previous post, the 900K resistor in series with the output of the generator is an essential part of the model. It would affect the accuracy of the measurement near the peak somewhat, but its effect can be taken out in the calculations.

                      Comment


                      • #12
                        Originally posted by Mike Sulzer View Post
                        Yes, a general purpose instrument would use I-V because it is best for most impedances.
                        Yes. Even twenty years ago it was a big deal to homebrew such an interface, but now all it requires is some jellybean parts.

                        What do we really want to know about a pickup? I think it is the frequency and width of the resonance when loaded by the C of the cable and the R of the input of the amplifier. I think that this is most likely to be an indicator of the pickup's tone. One should know the inductance as well, measured at some intermediate (not too high) frequency, low enough to not be affected by the C of the pickup. A pickup measuring machine should measure the device in the proper environment, and the parameters of this environment should be selectable.
                        Well, we should design an instrument that can characterize a pickup without coloring the answer with instrument limitations.

                        By the way, I did some modeling of the results of the coil that I measured with/without slugs (results on the other discussion). For the case with the slugs, the high frequencies and low frequencies are best fit with inductances about 7% different. The case with no slugs does not require using two different inductors. This is a pretty small effect, but it does look real.
                        Modeling? Why not hack together a simple physical experiment, and make actual measurements? This is how one validates a model.

                        Comment


                        • #13
                          Originally posted by Joe Gwinn View Post
                          Modeling? Why not hack together a simple physical experiment, and make actual measurements? This is how one validates a model.
                          I did make the measurements; they are available in the other thread. The modeling consisted of finding networks with computed curves that match the measured ones.

                          Comment


                          • #14
                            Originally posted by Mike Sulzer View Post
                            I did make the measurements; they are available in the other thread. The modeling consisted of finding networks with computed curves that match the measured ones.
                            Oh. From the original quote, it sounded like all theory no data. Data is good.

                            Comment


                            • #15
                              Here is an update on my efforts to use to use a computer with soundcard for measuring pickups:

                              I tried an I-V circuit. This circuit, as discussed above, gives a low voltage at the higher frequencies. There is too much nose pickup, erratic noise probably from the computer hardware, from about 4KHz and above. (I am using a mac book with its internal soundcard.) There are ways around this, no doubt, but a different circuit topology (V-I) puts the higher voltage output at the higher frequencies. This circuit and some comparisons of measurements and modeling are here:
                              http://www.naic.edu/~sulzer/coreNoCoreComp.png

                              The basic circuit uses a resistor in the input path of the op amp, and the pickup is the feedback impedance. The noise source is connected to the input through a low pass filter, and the input R is made smaller to keep the high frequency gain high enough. This increases the accuracy of the measurement at very low frequencies. Sine wave testing shows a noisy waveform at the very low frequencies if you do not do this, and it takes a longer time to get a good measurement.

                              I use SignalScope to collect the data. The measurement averages 1000 1024 point FFTs. The resulting 513 point spectrum is saved in a disk file. The file is read into a program for computations and graphics. (It would be better to have a single application that would be a "pickupMeter".) The zero frequency point is discarded, and then the spectrum from the output of the op amp (V1) is divided by the one from the input(V2), and multiplied by the input R (9.74K in my case). Also measurement must be corrected for a 2.2% difference in gain between the two channels. The resulting measurement is much less noisy than one might expect. 1000 samples gives about 3% fluctuation (noise), but of course the division takes out most of it because the fluctuation is mostly the result of randomly different signal levels at different frequencies, affecting both V1 and V2 in the same way.

                              The measurement used a single coil of the type used in a humbucker. The resistance is about 3.88K, so this is a bit under wound by some standards. The cores can be removed and replaced, of course, and the purpose of this measurement is to compare the coil parameters in the two cases. The software also allows modeling the magnitude of the impedance, that is, making curves that attempt to match the measurements. The plot shows both measured and modeled impedances with and without the cores. These cores are standard humbucker slugs, bought from Allparts a few years ago.

                              550 pf is connected across the coil so that the resonant frequency with cores is near the top end of the response of a guitar speaker.

                              For the case with cores, two models are shown, one that matches at the peak, one that matches at about 700 Hz. With no cores, one model pretty well matches the whole frequency range up to the peak. There might be some additional effects above the peak not in the model.

                              Modeling parameters with no cores:
                              Cp = 620 pf (assumed 70 pf coil cap, added 550pf across coil)
                              Lp = .635H
                              Rp = 3.88K (resistance of the coil)
                              Rq = 100 M (across pickup, very large, not really needed in model without cores)

                              Modeling parameters with cores:
                              Cp = 620 pf
                              Lp = 1.02H (high frequency model), 1.22H (low frequency model)
                              Rp = 3.88K
                              Rq = 295K (used to model the losses from eddy currents in the cores)

                              As the plot shows, the high frequency model works at the peak, while the lower frequency model agrees at about 700 Hz. Some additional modeling (not shown on plot) indicates that the inductance increases roughly another 20% near 100 Hz. So from the bottom up to the resonance, the inductance changes about a factor of 1.4 or 1.5.

                              So these measurements indicated (as expected) that there are are two important effects on the pickup impedance from using cores:
                              1. The inductance is increased over the same coil with no cores by more than a factor of two at the lowest frequencies, significantly less at the higher frequencies.
                              2. The losses from the cores are significant, equivalent to about a 300K resistor across the pickup in this case.

                              It would be interesting to see what the effect of alnico magnets is in a single coil Fender-type pickup.

                              Comment

                              Working...
                              X