Author Topic: Impedance Analyzer Build and Experiments  (Read 109170 times)

0 Members and 1 Guest are viewing this topic.

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Impedance Analyzer Build and Experiments
« on: June 18, 2014, 11:08:55 am »
I've been playing around with designing and building an impedance analyzer based on the AD5933.

It's a nice little chip. Capable of generating a sinewave from low Hz (some clock scaling needed) up to about 500kHz output sweep. And on the input, using a 12 bit ADC with up to 1 MSPS, it will do a 1024 point DFT and provide the complex imaginary and real values for each step in a sweep.

It is a bit complicated to get the best performance out of it.

And I'm mostly interested in low range impedance (below 100 Ohm). The chip is not really designed for that. But adding a buffer on the output making it capable of sourcing some more current should help.

My current setup is something like this:




And the current prototype:




(Not ideal to breadboard, but it works, only sacrificing some resolution really)

I will need to have some kind of reference measurement to compensate for phase and impedance changes caused by the buffer, I think the best approach will be a few calibration resistors that can be invoked on the input.

Impedance can be calculated as:

Z = SQRT(I * I + R * R)

And phase:

Phase = ATAN(I/R)

Should be possible to calculate capacitance and inductance as well once the resonance frequency is found.

Not sure if I can calculate ESR and any other interesting parameters, suggestions much welcome :)

Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Impedance Analyzer Build and Experiments
« Reply #1 on: June 18, 2014, 11:18:17 am »
The chip is limited for both lower end and high end Z measurements.

Using buffer is one way. Another is to use an outboard amplifier.

the typical approach to counter phase shift is to use a calibration resistor for each measurement.

Yes, it can be used to measure ESR, just not at very low-end (<10mohm would be hard).

There is a new chip introduced by Analog a couple months back that has a CM3 chip built in, with higher resolution as well.
================================
https://dannyelectronics.wordpress.com/
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Impedance Analyzer Build and Experiments
« Reply #2 on: June 18, 2014, 11:56:35 am »
The chip is limited for both lower end and high end Z measurements.

Using buffer is one way. Another is to use an outboard amplifier.

the typical approach to counter phase shift is to use a calibration resistor for each measurement.

Yes, it can be used to measure ESR, just not at very low-end (<10mohm would be hard).

There is a new chip introduced by Analog a couple months back that has a CM3 chip built in, with higher resolution as well.

Yeah, it's not really designed to do below 10kHz using the internal oscillator, but with a configurable external clock I get good results down to as low as 10Hz. (takes some time for it to sample and calculate)

I will try adding a few relays with resistors to run a calibration sweep before each measurement, that should allow compensation of both phase and buffer bandwidth limitations. Probably some resistors with minimal inductance for best results.

I'm not sure how to calculate the ESR with just the frequency and real + imaginary values from the DFT available.

It does generate a decent 500kHz+ sine wave, but clearly at the edge, not sure the measurements will be very accurate though with only 1 MSPS:




Any idea if AD's new design is available at this time? I wouldn't mind including it in my experiments :)

Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Impedance Analyzer Build and Experiments
« Reply #3 on: June 18, 2014, 12:46:39 pm »
Quote
I'm not sure how to calculate the ESR with just the frequency and real + imaginary values from the DFT available.

Depending on the set-up, but generally by performing a delta. Measure the dut, obtain real + imaginary values; Short the dut, obtain real + imaginary values.

The delta of the two is your dut.

Quote
It does generate a decent 500kHz+ sine wave, but clearly at the edge,

A better approach, from a signal + drive point of view, is to use a DDS + CFB opamp. But you have to perform the DFFT after that.

There are quite a few "extensions", some on Analog's own website, to push the performance envelope for 5933/32.
================================
https://dannyelectronics.wordpress.com/
 

Offline Conrad Hoffman

  • Super Contributor
  • ***
  • Posts: 1928
  • Country: us
    • The Messy Basement
Re: Impedance Analyzer Build and Experiments
« Reply #4 on: June 19, 2014, 05:31:41 pm »
Grab the first item here for checking your conversions- http://www.conradhoffman.com/chsw.htm
From here use the handy formulas and capacitor loss info to do it yourself- http://www.conradhoffman.com/electronics01.htm

Given any two parameters of value and loss, you can convert to everything else.

 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Impedance Analyzer Build and Experiments
« Reply #5 on: June 19, 2014, 07:30:19 pm »
A better approach, from a signal + drive point of view, is to use a DDS + CFB opamp. But you have to perform the DFFT after that.

Maybe some day .. I like that the AD5933/34 does all that for me, but, of course with limitations. Some can be worked around but it will never go above ~500kHz. I think I can live with that limitation for now.

Grab the first item here for checking your conversions- http://www.conradhoffman.com/chsw.htm
From here use the handy formulas and capacitor loss info to do it yourself- http://www.conradhoffman.com/electronics01.htm

Given any two parameters of value and loss, you can convert to everything else.

Very nice collection, thanks  :-+ I'll have to study it in more detail.

Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Impedance Analyzer Build and Experiments
« Reply #6 on: June 19, 2014, 07:42:20 pm »
Spent a bit more time on this project writing something to actually plot the output, it's cleaner than what I expected.

Here measuring a 10R resistor, so primarily showing phase and impedance error from the device plus added buffer, although the resistor probably got some inductance as well:




It appears to work well all the way up to 500kHz, so 10Hz-500kHz bandwidth should be possible.

The tricky part will be to keep it within usable range. The output swings around VCC/2 and can be scaled from 200mV to 2000mVpp in 4 steps. Input got a PGA before the ADC, but unfortunately only two levels of gain x1 or x5.

« Last Edit: June 19, 2014, 08:10:23 pm by jaxbird »
Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline Zad

  • Super Contributor
  • ***
  • Posts: 1013
  • Country: gb
    • Digital Wizardry, Analogue Alchemy, Software Sorcery
Re: Impedance Analyzer Build and Experiments
« Reply #7 on: June 20, 2014, 12:23:05 am »
I did some work on using the AD5933 a few years ago. At first, I couldn't understand why the chip wasn't more commonly used in impedance measurement, but the more you look into it, the more annoying the drawbacks become. I wrote up some of my findings in my blog

(See here http://electronicsdesigner.blogspot.co.uk/2011/04/design-for-precision-lcr-meter-part-2.html )

In order to get an acceptable frequency range, you really need an external oscillator with some method of selecting different clock frequencies. I went with a low-end DDS chip. Cheap to buy and easy to program with the same embedded micro you are using to talk to the 5933. I wouldn't run the drive oscillator faster than the design limit of 100kHz. As you have seen, at that point, you start to get components from other frequencies showing up, so you really need to filter the output, which of course adds its own phase+magnitude curve to be calibrated out.

Impedance range limitations: In order to measure the sort of inductors and capacitors a typical hobbyist may use, the 5933 is going to be outside it's normal measurement limits. Fine if you want to measure a 10K resistor, less so if you are measuring a 10pF capacitor. As you would expect, Analog Devices has some excellent application notes, and it is well worth digging around in them to see how they suggest increasing drive current, and improving sensitivity dynamic range etc. I ended up using an analogue multiplexer to select drive and receive gains via feedback resistors in the op-amps. I also included a small TrimDAC both to zero the offset, and induce a DC drive offset to investigate how capacitance changes with respect to voltage (3 years before Dave's video!)

As you can imagine, this changed a neat little solution into a bit of a Frankenstein's monster - although I must admit I thoroughly enjoyed doing it. After some thought, I realised I could probably just replace the AD5933 with an ADC and DAC driven straight from nice cheap fast ARM DMA ports. I wouldn't need the DDS then, and I would have much more control about how the measurement is made, and the processing done on it. Of course, you could just drive it directly from the DDS, way up into the RF regions, and simultaneously measure the current and voltage with much higher precision than the 5933 does.

I really should write up how it progressed, and the tests I did with it, but for the limited audience it doesn't really seem worth it, and it has mostly been cannibalised for other projects now. If I prototype a "new improved" direct measurement version, then I will definitely publish it with photos etc. I just need the enthusiasm! Like Dave and his uPower power supply design, you get to a point where you have done all the interesting stuff and it becomes hard work for little return.


Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Impedance Analyzer Build and Experiments
« Reply #8 on: June 20, 2014, 02:03:56 pm »
Zad, Very good info :-+ thanks for sharing.

I wanted to have a go at the AD5933 it because it initially seemed like a very simple "all-in-one" solution, but based on experiments and supported by your experience a lot of tweaks are indeed needed.

It is lacking features to keep it within usable range / level. The data sheets and app notes are good, I've been studying most of them in detail.

Personally I would certainly be interested in how far you have taken your design, but I fully understand that it probably is a very narrow audience and the lack of interest and motivation once you have the problems solved :) .. many of my projects end up like that as well.

I don't have a specific goal for this project, but it would be a nice tool to have in the collection if it ends up in a usable state.

« Last Edit: June 20, 2014, 02:17:34 pm by jaxbird »
Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Impedance Analyzer Build and Experiments
« Reply #9 on: June 20, 2014, 02:10:20 pm »
Here a couple of plots with calibrated phase and impedance, first a capacitor:




And a small inductor:




Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Impedance Analyzer Build and Experiments
« Reply #10 on: June 20, 2014, 02:24:45 pm »
Quote
I could probably just replace the AD5933 with an ADC and DAC driven straight from nice cheap fast ARM DMA ports.

You will find that to be fairly involved, due in large to

1) limited current capabilities from the dac - you will likely need additional drivers for <1kohm dut;
2) low speed of the adc / adcs - this can be addressed by fancier external adc (Analog makes quite a few parallel adc, with identical specs as AD5933/34), mcus with super fast adc (LPC has a 70msps part for example), or by layering the samples: you would take 1 sample at one point in a cycle, and take another sample at a later point in the next cycle, .... and reconstitute the data afterwards.

Not to mention that math becomes a little bit difficult for duts with mostly reactance (phase angle approaching 90 degrees).

However, I agree with your basic notion that the part is quite limiting. They made the assumption that the output signal = signal on the dut. Had they implemented another adc (to measure the voltage on the dut), this could have been such a fantastic part.

================================
https://dannyelectronics.wordpress.com/
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Impedance Analyzer Build and Experiments
« Reply #11 on: June 20, 2014, 02:25:32 pm »
Quote
first a capacitor

You can clearly see the inductance in that thing.

ESR would be the trough on the plot.
================================
https://dannyelectronics.wordpress.com/
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Impedance Analyzer Build and Experiments
« Reply #12 on: June 20, 2014, 03:20:38 pm »
You can clearly see the inductance in that thing.

ESR would be the trough on the plot.

I can't guarantee that it's correct as it's just a quick calibration and a measurement with everything still on breadboard.

but at least it resembles what it's supposed to look like :)



And my plot is using a linear scale for Ohm.

« Last Edit: June 20, 2014, 03:23:54 pm by jaxbird »
Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Impedance Analyzer Build and Experiments
« Reply #13 on: June 20, 2014, 03:46:19 pm »
Your chart looks spot on.
================================
https://dannyelectronics.wordpress.com/
 

Offline The Electrician

  • Frequent Contributor
  • **
  • Posts: 743
  • Country: us
Re: Impedance Analyzer Build and Experiments
« Reply #14 on: June 20, 2014, 05:44:43 pm »
Your plot of a capacitor doesn't look quite right.  The phase angle at frequencies below the SRF should be negative, but you show it as positive.  Maybe you've plotted the phase upside down.  The phase of the inductor plot also has the wrong sign.

Also, your plot shows the capacitor phase tending toward zero degrees at the very lowest frequency; it should tend toward -90 degrees at the lowest frequency, and toward +90 degrees at the highest frequency.

Furthermore, the shape of the impedance curve doesn't look right for a linear impedance scale.

Here's a measurement of a motor run capacitor over the same frequency range as your plots, but with impedance shown on a logarithmic scale:



Here's the same plot, but with a linear scale for impedance:

 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Impedance Analyzer Build and Experiments
« Reply #15 on: June 21, 2014, 08:19:03 am »
Maybe you've plotted the phase upside down.  The phase of the inductor plot also has the wrong sign.

Thanks, very much appreciate you posted a comparable curve  :-+

Always a problem when trying to build something without having a reference to compare against. (A bit of a chicken and egg problem I guess)

It is highly likely I have messed something up in the phase calculations causing it to be inverted. The calculation is fairly simple:

Phase(radians) = tan-1(I/R)

Then convert to degrees and correct for each of the 4 quadrants.

Subtract system phase.

And plot it with screen Y address coordinates being flipped. (likely where I messed up)

Furthermore, the shape of the impedance curve doesn't look right for a linear impedance scale.
...

Yeah, I believe there is a much bigger problem than just the inverted phase, clearly still some work needed. But at least now I have a pretty good idea of what it is supposed to look like  :-+

« Last Edit: June 21, 2014, 08:37:08 am by jaxbird »
Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Impedance Analyzer Build and Experiments
« Reply #16 on: June 21, 2014, 11:19:33 am »
This is what the impedance curve looks like, in linear scales.

================================
https://dannyelectronics.wordpress.com/
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Impedance Analyzer Build and Experiments
« Reply #17 on: June 26, 2014, 06:07:36 am »
This is what the impedance curve looks like, in linear scales.

Thanks, that is a nice simulation  :-+

I think I better switch to a log scale on both axis.

Actually the chart I posted earlier was neither linear nor logarithmic, I didn't take into account that the amplifier configuration I was using wouldn't provide a linear output.  :o

Anyway, these are some of the configurations I'm experimenting with:

This one does not work well.



This is better:



It will not give a linear output, but that's fine, I can compensate.

I'm currently using AD8532 for the opamps and a 3.3V supply.

Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Impedance Analyzer Build and Experiments
« Reply #18 on: June 26, 2014, 12:55:34 pm »
Quote
This one does not work well.

How so? To me, they look the same.
================================
https://dannyelectronics.wordpress.com/
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Impedance Analyzer Build and Experiments
« Reply #19 on: June 26, 2014, 02:13:20 pm »
Quote
This one does not work well.

How so? To me, they look the same.

I think it's the opamp's output impedance that causes poor results with the first configuration.

I will try look for something other than the AD8532 I use now.

« Last Edit: June 26, 2014, 02:17:32 pm by jaxbird »
Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Impedance Analyzer Build and Experiments
« Reply #20 on: June 26, 2014, 03:52:34 pm »
Since the DC performance doesn't matter here, have you tried those CFB opamps? AD815, tpa6120 (and its ths equivalent)? Pretty much any xDSL drivers will do here.
================================
https://dannyelectronics.wordpress.com/
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Impedance Analyzer Build and Experiments
« Reply #21 on: June 26, 2014, 04:08:55 pm »
I found a few BUF634, I will have a go with them and see how well they perform.

http://www.ti.com/lit/ds/symlink/buf634.pdf

Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Impedance Analyzer Build and Experiments
« Reply #22 on: June 26, 2014, 06:19:37 pm »
Haven't rebuilt it yet, but been playing around with LTSpice:



Green is OPA2134 + BUF634
Red is AD8532

If the simulation is correct there should be a significant gain in performance using BUF634.

But with OPA2134, BUF634 and AD5933 it's a bit like using a BMW opamp with a Ferrari buffer to boost a Toyota chip  ;D

Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Impedance Analyzer Build and Experiments
« Reply #23 on: June 26, 2014, 06:33:00 pm »
BUF634, in a composite amp, should be good. But I thought they are fairly difficult to find and expensive.
================================
https://dannyelectronics.wordpress.com/
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Impedance Analyzer Build and Experiments
« Reply #24 on: June 26, 2014, 06:55:31 pm »
BUF634, in a composite amp, should be good. But I thought they are fairly difficult to find and expensive.

Don't know about general availability, but I believe they are in production. I found a bag of 4 in my box of slightly exotic components, don't remember if I bought them for a project or just found them nice to have .. They are quite expensive though, something like $5-10/each.

I can probably get away with using just 1 of them as I will need a dual supply anyway, so shifting the signal to swing around ground and then back to around 1.65V on the output should be doable.

Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf