Cheap LCR "tracer" - Page 1
Forum section: electronics / projects

author: gmac34
author_rank: Regular Contributor
timestamp: May 31, 2023, 09:52:14 am
content: The el cheapo LCR tracerHi, I wanted to share this little project of mine.I have made a board and written some code to use an oscilloscope and a signal generator as an LCR meter, this is nothing new, I know there are multiple tutorials to make so, but they often require manual work writing down values in an Excel sheet and making the calculation, I have not time for that! What I have instead is a bunch of GPIB instruments, so I can offload the work to them.The start is this app note from Tektronix, again nothing new, but it is the example I have used as it seemed the easier one to automatise, it uses the I-V method to measure impedance.https://www.tek.com/en/documents/application-note/capacitance-and-inductance-measurements-using-oscilloscope-and-function-geThe requirement, if you wish to make your own, are:a signal generator of decent quality that you can control, so either with GPIB or serial. Flatness is not a requirement as the voltage is measured anyway, low DC offset and low AC leakage are preferable.And an oscilloscope, again controllable from a pc, should have built-in phase measurements between channels,If you decide to use my pcb design be aware that the BNC spacing on my scope is 30mm, your scope might be different. You can either change the design or replace the female connectors with male ones and run cables between theI’m using a Agilent 54624AI have tried a few such as HP 8904A and Philips PM5193, the main difference is going to be the maximum frequency they can provide, for my use 1 MHz maximum frequency is more than enough, and as I don’t understand how to do impedance control in this context it probably better to stop (well) below 10 MHz.The hardwareMy board has a few changes from what you will read in the Tek app note:- I’m using 4 precision 1k resistors rather than 1 to experiment with ranging (1000 , 500 and 250ohm), you might not need to populate all of them. 1000 and 500 ohm are the more useful ranges, I fear 250 is getting too close to the 50ohm output impedance of the signal generator and might be an issue.- The reason for ranging is that with 1k you often get a very small voltage on channel 2 and it might be a struggle to measure it.- A 50ohm resistor is added to the input to terminate the connection to the signal generator.- A dc booking capacitor is added as an option to either clean up a misbehaving signal generator or have a separate DC source.- Finally, the Tek note describes using 10x probes, I cannot do that with my scope, the signal on channel 2 is often too small to be measured this way. Other scopes might give you more freedom in this regard and then a 10x probe would load the circuit less.PartsBNC connectorshttps://it.aliexpress.com/item/32850462301.htmlSMA connectorshttps://it.aliexpress.com/item/32248312829.htmlPrecision 1k resistor that doesn’t cost too much TE ConnectivityYR1B1K0CCI repurposed a SMA cable to make the probesAnd you might need a SMA to BNC cable to connect to a signal generationScriptThe code example that I can provide use PyMeasurehttps://pymeasure.readthedocs.io/en/latest/and an AR488 Arduino-based GPIB adapter. Other adapters and serial interfaces are also supported by PyMeasure.It should be easy to adapt the code to different instruments, the more problematic area is the auto-ranging. Auto-ranging is needed to keep the signal at a good scale and use as much vertical resolution as possible, different scopes will handle clipping in different ways, so you will have to figure out how to adapt the procedure.At the moment I have two main modes to capture data, swipes, to make nice plots over time of ESR inductance and capacitance or single measurements (more similar to other LCR meters). A single measurement does L C and R measurements at fixed frequencies, 100hz or 1khz for C and 100khz for ESR are some common standards, useful to compare with data sheets, but you should choose what you need accordingly to the context.QuestionsThere are a few things to improve and I would like to ask for some support.At ht moment there is no provision for calibrating the systems apart from calibrating the separate instruments.I would like to add a open-short calibration procedure,As I understand a short calibration would create a baseline for ESR, I’m not sure how to make a baseline or correction for capacitance.Even further I would imagine adding a frontend such as something like thishttps://www.ti.com/lit/ug/tidueu6b/tidueu6b.pdf?ts=1685491422213&ref_url=https%253A%252F%252Fwww.google.com%252F,but it would be a different beast, with a dedicated power supply and a questionable price.

author: gmac34
author_rank: Regular Contributor
timestamp: May 31, 2023, 09:53:17 am
content: Measurement Examples(more will come)A collection of film capacitorsInductors form 1uH to 10mH (second image has log scale for L e R)Tree Philips Electrolytics 22uF 25vOne old and dry, one old but still ok and a new one (Vishay)Open and Short

author: gmac34
author_rank: Regular Contributor
timestamp: June 04, 2023, 12:18:30 pm
content: Code is coming, need to clean it up and make it more adaptable to other scopes

author: mawyatt
author_rank: Super Contributor
timestamp: June 04, 2023, 02:43:24 pm
content: Here's something that may be of interest regarding impedance/admittance measurements with a DSO and AWG.https://www.eevblog.com/forum/testgear/admittance-measurements-with-dso-awg-with-bode-function/Best,

author: gmac34
author_rank: Regular Contributor
timestamp: June 04, 2023, 07:41:43 pm
content: Interesting read, thanks. The approach is quite similar, I did not think about using a kelvin setup.I don't think I can replicate it just now because I don't have one, also my scope is missing the 50ohm input, the bode plot, and has probably a much noisier front end as well....Did you get around making any attempts at calibration and or reducing the noise?I just try to use the maximum averaging I can on the scope. That is 128x (should give more that 11bits of dynamic range) at most frequency above 1kHz and 8-32x below that. Still not sure why I have to lower the averaging at low frequencies, there seems to be some quirk in firmware.

author: mawyatt
author_rank: Super Contributor
timestamp: June 04, 2023, 11:01:42 pm
content: We have a couple lab bench type LCR meters (TH2830 and IM3536), so this was more of an exercise if can this be done with a DSO and AWG and utilize the built-in Bode features of the DSO!Best,

author: mawyatt
author_rank: Super Contributor
timestamp: June 05, 2023, 01:10:39 pm
content: Here's another thread related to using a DSO and AWG.Best,https://www.eevblog.com/forum/testgear/capacitive-impedance-plots-with-sds2104x-plus-bode-function/

author: gmac34
author_rank: Regular Contributor
timestamp: June 06, 2023, 12:07:57 pm
content: When you use the bode functions, is the voltage on the signal generator kept constant (before the sense resistor) or the voltage at the dut?I have rewritten my auto-range code to try the second, and vary the generator voltage in order to provide a target voltage across the dut, seems to work well, within limits as the Burden voltage even with 250ohm is quite high and the generator cannot do more than 10 peak.Perhaps a sense resistor in the 50-100 range would be better.

author: mawyatt
author_rank: Super Contributor
timestamp: June 06, 2023, 03:11:26 pm
content: The voltage is constant at the generator as standard, however the Siglent Bode function allows dynamic voltage levels they call Vary-Level, which allows the user to preset the voltage levels across the frequency sweeps, which includes a built-in editor and has a large range and number of points.Also the input channel voltage scaling is adjusted as the sweep progresses on the Siglent, which allows sensing of highly attenuated signals at the output port, which produces very large dynamic ranges as has been shown in the related Siglent threads. The Vari-Level can be handy when dealing with DUT that have limited input voltage ranges over various frequency ranges like amplifiers in closed loop measurements and such.The Bode function as implemented by Siglent is quite nice and very useful for those that understand it's inherent benefits and flexibility.Best,