Author Topic: Cheap LCR "tracer"  (Read 1490 times)

0 Members and 1 Guest are viewing this topic.

Offline gmac34Topic starter

  • Regular Contributor
  • *
  • Posts: 68
  • Country: no
Cheap LCR "tracer"
« on: May 31, 2023, 09:52:14 am »
The el cheapo LCR tracer
Screenshot-2023-05-31-at-10-34-01" border="0
Screenshot-2023-05-31-at-10-46-04" border="0
Hi, 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-ge

The 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 the

I’m using a Agilent 54624A

I 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.

Screenshot-2023-05-31-at-10-50-42" border="0
The hardware
My 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.

Parts
BNC connectors https://it.aliexpress.com/item/32850462301.html
SMA connectors https://it.aliexpress.com/item/32248312829.html
Precision 1k resistor that doesn’t cost too much TE ConnectivityYR1B1K0CC
I repurposed a SMA cable to make the probes
And you might need a SMA to BNC cable to connect to a signal generation

Script
The code example that I can provide use PyMeasure https://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.


Questions
There 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 this https://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.
« Last Edit: May 31, 2023, 09:53:57 am by gmac34 »
 

Offline gmac34Topic starter

  • Regular Contributor
  • *
  • Posts: 68
  • Country: no
Re: Cheap LCR "tracer"
« Reply #1 on: May 31, 2023, 09:53:17 am »
Measurement Examples (more will come)

A collection of film capacitors
download" border="0
IMG-4798" border="0

Inductors form 1uH to 10mH (second image has log scale for L e R)
Screen-Shot-2023-06-04-at-13-54-35" border="0
download-1" border="0
download-3" border="0

Tree Philips Electrolytics 22uF 25v
One old and dry, one old but still ok and a new one (Vishay)

IMG-4800" border="0
download-4" border="0

Open and Short
c852d178796d7fa3da429fb594ce66421a816a95d82bb62f06dd088bd688e443" border="0 5bdb3e8d1db9ecb90d80f962a2b8f6f113daf803ff92c9c6b0ac2b2777fc9477" border="0
download-5" border="0
« Last Edit: June 04, 2023, 07:18:57 pm by gmac34 »
 

Offline gmac34Topic starter

  • Regular Contributor
  • *
  • Posts: 68
  • Country: no
Re: Cheap LCR "tracer"
« Reply #2 on: June 04, 2023, 12:18:30 pm »
Code is coming, need to clean it up and make it more adaptable to other scopes
 

Offline mawyatt

  • Super Contributor
  • ***
  • Posts: 3192
  • Country: us
Re: Cheap LCR "tracer"
« Reply #3 on: June 04, 2023, 02:43:24 pm »
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,
« Last Edit: June 05, 2023, 01:09:48 pm by mawyatt »
Curiosity killed the cat, also depleted my wallet!
~Wyatt Labs by Mike~
 

Offline gmac34Topic starter

  • Regular Contributor
  • *
  • Posts: 68
  • Country: no
Re: Cheap LCR "tracer"
« Reply #4 on: June 04, 2023, 07:41:43 pm »
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.


« Last Edit: June 04, 2023, 07:47:40 pm by gmac34 »
 

Offline mawyatt

  • Super Contributor
  • ***
  • Posts: 3192
  • Country: us
Re: Cheap LCR "tracer"
« Reply #5 on: June 04, 2023, 11:01:42 pm »
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,
Curiosity killed the cat, also depleted my wallet!
~Wyatt Labs by Mike~
 

Offline mawyatt

  • Super Contributor
  • ***
  • Posts: 3192
  • Country: us
Re: Cheap LCR "tracer"
« Reply #6 on: June 05, 2023, 01:10:39 pm »
Curiosity killed the cat, also depleted my wallet!
~Wyatt Labs by Mike~
 

Offline gmac34Topic starter

  • Regular Contributor
  • *
  • Posts: 68
  • Country: no
Re: Cheap LCR "tracer"
« Reply #7 on: June 06, 2023, 12:07:57 pm »
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.
 

Offline mawyatt

  • Super Contributor
  • ***
  • Posts: 3192
  • Country: us
Re: Cheap LCR "tracer"
« Reply #8 on: June 06, 2023, 03:11:26 pm »
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,
Curiosity killed the cat, also depleted my wallet!
~Wyatt Labs by Mike~
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf