element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Open Source Hardware
  • Technologies
  • More
Open Source Hardware
Blog Building an LCR Meter
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Open Source Hardware requires membership for participation - click to join
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: shabaz
  • Date Created: 23 Jul 2019 2:23 PM Date Created
  • Views 26304 views
  • Likes 12 likes
  • Comments 34 comments
  • lcr
  • visual analyser
  • lcr meter
  • capacitance
  • impedance measurements
  • capacitance_measurement
Related
Recommended

Building an LCR Meter

shabaz
shabaz
23 Jul 2019

Introduction

Recently there's been lots of interest in capacitor equivalent series resistance (ESR) and many other capacitor topics (e.g. see Deep Dive into ESR, Introduction  and Capacitor Leakage Experiments and Experimenting with Polymer Capacitors ). This blog post briefly discusses how to build a tool that can attach to a PC, in order to measure the impedance of components. For a brief overview of impedance, and why it can be important, see Measuring Capacitor Characteristics

 

A normal multi-meter can measure resistance, which is related to the applied voltage, and the DC current through the component under test, using the formula R=V/I.

image

 

An impedance meter, also known as an LCR meter, does a similar thing but using AC current instead. This is useful because most components have reactance too, which results in a phase difference between the applied AC voltage sine wave, and the resultant AC current sine wave through the component. By measuring the phase difference, you can work out the capacitance (or inductance) of the component at that frequency, as well as any equivalent series resistance (ESR) of capacitors.

 

Although some multi-meters can measure capacitance or inductance, they will usually only do it at one frequency. An LCR meter will allow you to vary the frequency.

 

This project came about because I was building an audio amplifier, and wanted to connect it to the PC using a sound card. While looking for software, I found an application called Visual Analyser (it is Windows only, and closed-source, but free to download). Upon running it, I noticed it had LCR capability, and upon further investigation I noticed an author had published details (PDF) about a two op-amp circuit that can be attached to the sound card, to convert it into an LCR meter! So, I decided to take two of my (mono) audio amplifier circuit boards, and build the circuit to try it out. The results seem very good.

image

 

How does it work?

Shown further below is a high-level diagram of the system. Under command of the PC software, the sound card generates a sine wave. This is applied to a series circuit consisting of a known resistance and the unknown impedance. These two components in series act like a potential divider. As described at Measuring Capacitor Characteristics, by measuring the voltage (and phase) at the top and the middle of the potential divider, the PC software can determine the unknown impedance.

image

There’s more complication in the software (it needs to run a calibration routine for instance) but at a high level that’s all there is to it.

image

 

For the practical implementation, the known resistance is actually a bank of accurate resistors, switched in using a rotary switch. This allows the circuit to be usable for a wide span of unknown impedance.

 

Circuit Details

The circuit diagram further below shows a possible implementation. It is the circuit I built, but it could be improved. The circuit contains lots of ‘do not fit’ component locations, so that the design can be modified in future.

 

The circuit uses a rotary switch in order to select the known resistance in the range of 10 ohm to 100k. It would be nice to have a lower resistance too, but that would need a buffer since otherwise the sound card output would be loaded too heavily.

image

 

The rotary switch has two poles, and the second pole could be used to light up LEDs to indicate the range. Perhaps that’s unnecessary though since the rotary dial can just be labelled.

 

For the audio connectors, normal sound cards have 3.5mm stereo jack connections or mono phono (RCA) sockets (two of them, for left and right), but ‘home music’ type of sound cards use 6.35mm mono jacks. Personally I feel the larger 6.35mm is a good option, because it allows for easy cable construction (the cables need a good braided shield, so tend to be fat) and separation of the two channels.

 

For the rotary switch, to simplify connections, one option could be to have a separate PCB (or an area of the PCB that is cut off), that solders to the pins of the rotary switch, and has the known resistances soldered on that board too. That way, only two wires need to be used, to connect between that separate PCB and the main PCB. Some holes on the PCB for mounting an L-shaped bracket for the rotary switch could be an option too.

 

Another idea could be to have the audio in/out brought out to a header connector too, in case in future an add-on board is used to (say) connect via I2S to a Pi or BBB for future custom software. That would have the advantage of eliminating variability between USB sound cards and any manipulation that Windows drivers or sound system may do (incidentally if you’re buying a sound card, an ‘ASIO input’ and ‘ASIO output’ capable card will eliminate such manipulations as I understand (I don’t know much about sound cards).

image

 

Building it

As mentioned I was working on a microphone amplifier, so I had lots of spare PCBs that accommodated a single op-amp on each. So, for the prototype, I used two of the boards (one was cut in half). The cables for the sound card were directly wired without sockets. The battery holders (two AA cells are used for +1.5V and -1.5V rails) were glued onto the PCB. The whole design should hopefully slide into a case intended for 160mm wide PCBs (I don’t have the case yet).

For the device-under-test (DUT) connection, I used a home-made cable set: Building Kelvin (4-Wire) Test Leads

image

The Gerber files are attached to this blog post, but they are not very useful for this project - better to build a dedicated PCB. Here's a close-up the op-amp area:

image

 

Using it

To operate it, download the Visual Analyser software, and install it. I used VA64, and it seems to work fine.

 

Connect up the LCR meter circuit to the sound card. I used the line in and line outputs. My sound card (Scarlett 2i2 2nd Gen) has gain control for the left and right inputs, so I cranked them up to max. If your sound card distorts at max, then you may not want to do that. I don’t know the implications, since I don’t know precisely what algorithm is used by the software. It presumably auto-adjusts the output channel amplitude, in order for the input channels to not significantly distort.

 

Next, run VA64 and there’s a checkbox near the lower-right side of the display, labelled ZRLC meter. Click on that to launch the LCR functionality!

image

 

The next step is to perform a calibration. This is really easy. First, ensure no DUT is attached. Then, select a desired range with the rotary switch, based on approximately the expected impedance at a desired frequency.

 

Next, select the desired frequency in the software (I selected 120Hz in the screenshot below) and use the drop-down to select the correct range. Click on the Measure button, and a calibration will occur at that frequency.

image

 

You can now attach the unknown impedance to the DUT (don’t forget to short any charged capacitance first!) and the results should be displayed! The screenshot below shows an ESR value of 1.297 ohm for a capacitor.

 

If you want to change frequency or range, you’ll need to press the Stop button to do that, and then disconnect the DUT and re-do the calibration.

image

 

From my initial minimal tests, the results appear good. I confirmed with an LCR meter that should be in-cal. I’ve not tested much so far though. I tested a resistor (it measured 8.8 ohm on both instruments), and a 22uF capacitor which measured 1.28 ohm ESR on both instruments too.

image

 

Summary

This project uses an off-the-shelf PC and sound card, in conjunction with the Visual Analyser software, to implement a low-cost LCR meter. The initial results seem good, although further tests need to be done.

Thanks for reading!

Attachments:
export-amplifier-board-rev1.zip
  • Sign in to reply

Top Comments

  • three-phase
    three-phase over 5 years ago +6
    This looks quite interesting to me. I have been measuring the coils I have been winding with a Picoscope and an impedance viewer written by one of the members of eevblog. eevblog LCR Impedance viewer Would…
  • ralphjy
    ralphjy over 5 years ago +5
    The Visual Analyser app is a very clever use of a sound card. Wish I could have had something like that when I was learning electronics. Of course, PCs didn’t exist back then . Very nice project. Ralp…
  • genebren
    genebren over 5 years ago +4
    shabaz, Nice project! I like how you were able to re-use PCBs from a prior project to do this test. Very encouraging results. Thanks for sharing, Gene
  • shabaz
    shabaz over 5 years ago in reply to pexeso

    Hi Juraj,

     

    During the calibration phase, the software generates a tone and expects to see it on an audio input. Maybe the left and right channels are mixed up (I don't know if the sofware is smart enough to detect that) on either the output or the input.

    If the calibration is occurring, I think you should see a sinewave on the background oscilloscope style view during the calibration phase (and you'll see that the software tries to make a sinewave that fills the oscilloscope view without clipping). If this still isn't working, there's a chance there is some fault with the amplifier circuit or some connection, so that the software is not receiving the signal during the calibration phase.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • pexeso
    pexeso over 5 years ago

    Dear Shabaz,

    I made a simple piece of equipment with LM358 according to the internet schematic and I tried the visual analyzer but it's always stuck in calibration.I tried with disconnected and connected measuring cables,

    I changed the frequency, normal resistances etc.but it didn't helped mi.I send you a picture of the whole thing and ask for your advice on what I can do.image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 5 years ago in reply to reyntjensm

    Hi Michael,

     

    That's great news.

    R7 is to keep the op amp input from floating when connections are not made. It won't make any difference to accuracy, that location has a low impedance connection to the source signal when connected. You can remove it though if you prefer, I don't think there is any issue with that.

    One of the main sources of inaccuracies is (I think) that the software does not compensate for amplitude differences between the two soundcard inputs. The software assumes the gain is identical for left and right channels, and that is an incorrect (but I guess mostly good enough) assumption. personally I'm not happy with that though.

    Since the author does not respond, it may be better to write custom software to correct that, to eliminate needing to do any fine-trimming in hardware. But that's a longer-term thing, since the workaround today is to fine-trim.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • reyntjensm
    reyntjensm over 5 years ago

    Dear Shabaz,

     

    I got i somewhat working..

    I was wondering what is the function of the 10K pull down resistor R7 at the input?

    I guess this will only add to the measurement and hence be incorrect?

    Or is there any other function for this resistor?

    I hope to hear from you soon again.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • reyntjensm
    reyntjensm over 5 years ago in reply to shabaz

    Dear Shabaz,

     

    Both input and output device are set to the external soundcard.

    Would there be any other software capable to do this?

    Thank you for the support and if you would be able to send me over your settings that would be great!

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube