# Impedance Measurement - Phase Comparison

Discussion in 'The Projects Forum' started by mcdaza, Jun 16, 2011.

1. ### mcdaza Thread Starter New Member

Jun 16, 2011
10
0
Hi All,

I'm in the process of designing a custom made instrument for the lab. Unfortunately it's been a while since I've done any electronic work and I'm having some difficulty with developing the measurement electronics I need.

The instrument consists of two probes (labelled A and B) separated by a small distance (5 mm). An AC current is applied to A (~5 V, ~5 mA, 100 kHz) and some of this makes it to B (μA). The aim is to measure the impedance of the material between A and B, to do this I need to measure the current/voltage and phase difference between the input at A and output from B and export it to a PC (via a DAQ).

The current/voltage part I think I have sorted - my plan is to pass the current from B through an op amp, the output of this should be able to go right into the DAQ.

Where I run in to difficulty is working out a method of measuring the difference in phase between the two signals. I have found a suitable IC
(the AD8302 - http://www.analog.com/en/specialty-amplifiers/log-ampsdetectors/ad8302/products/product.html). However, I'd prefer not to use it for two reasons - it's pretty pricey (~\$50) especially since I'll need a few of them and I'm not totally comfortable with soldering the TSSOP package.

As an alternative I was considering using a PLL chip. The HEF4046BP (http://www.datasheetcatalog.com/datasheets_pdf/H/E/F/4/HEF4046BP.shtml) is available in a DIP package for ~\$2 and has an output from the phase comparator. My question is will this work, or is it a dumb idea?

Or TL-DR - How do I measure the phase difference between two, 200 kHz sine waves and output this as a voltage?

Thanks in advance for the help

2. ### ifixit AAC Fanatic!

Nov 20, 2008
650
118
Hi

The 4046 is your best bet, but you really only need the phase detector.

A simple way would be to sum the two identical signals (except phase) through two resistors. At the junction of the two resistors will be sum voltage, which can be peak detected to get a DC voltage that is proportional to the ±180° phase difference.

Or...

If you can detect the two sine waves reliably then you could convert them to square waves with a zero-crossing detector. Then, use a fast enough micro-controller to do the phase measurement.

Alternately, you could design a digital counter based phase detector to generate a number output that represents the phase difference.

Alternately, you could exclusive-or the two squared signals, after dividing them by 4, and then use a low pass filter on the output to get a DC voltage which is proportional to the phase shift.

Alternately, you could use a ±360° range phase detector, and then use a low pass filter on the output to get a DC voltage which is proportional to the phase shift.

Alot depends on your accuracy and phase range requirements, your skill level, your budget and your time available.

Regards,
Ifixit

3. ### t_n_k AAC Fanatic!

Mar 6, 2009
5,448
790
The description is vague - although you may not want to divulge too much here.

You say you inject a current at A - with respect to what? Where does the return current from A go that doesn't go to B? Clearly the current isn't injected at A and extracted (returned) at B otherwise the values at A & B would be the same.

You may need to scale up (amplify) one or even both of the signals if you want to have output signals of reasonable magnitude for subsequent processing.

Do you have any idea of the anticipated phase shift between the currents (signals) at A and B? What precision do you require?

4. ### t06afre AAC Fanatic!

May 11, 2009
5,939
1,227
Can you post some more information. Like some schematics or digarams. Also do you have some idea of the resistance between point A and B. What you need is perhaps using the same principal as in lock-in amplifier. But in your case the PPL part of the lock-in is not needed.

5. ### mcdaza Thread Starter New Member

Jun 16, 2011
10
0
Thanks for the replies guys, I've tried to clarify some of the issues raised below. Apologies for any vagueness, I'm going off previous work by others which hasn't included all the details.

The general idea is to measure the impedance of the material between points A and B as this is characteristic of the material. A crude outline of the circuit would be:

Function generator/DDS --> A --sample -- B ---> Op-amp ---> Amplitude + phase detection --> DAQ ---> PC

Well, the AD8302 has resolution down to 0.5 °, so to match that would be good, but ± 1-2° should do the job. If there's a relatively easy way to better that then it'd be good, but it's certainly not a priority.

The phase shift between signals is not likely to be massive, probably ~10° or less. However if it helps I can always modify the signal/generate a new one that's 90° out of phase to make measuring the difference easier.

Skill wise I'm ok with the basics, but I didn't do EE so a lot of more complex things are over my head. I'm more than happy to grab a textbook and learn, but I can't devote 100% of my time to this.

My main priority is to have something reliable and simple enough for me to understand. If it costs a bit, then that's alright.

Totally correct. Should have said apply a voltage. Vagueness was due to me estimating the parameters - those numbers can change, minimum frequency is 20 kHz, ideally 100 kHz.

Agreed.
10 Ω - 1 x 10^14 Ω

Once more thanks for all the help

6. ### jt6245 Member

Feb 18, 2011
21
4
AD5933 may be your choice.

7. ### mcdaza Thread Starter New Member

Jun 16, 2011
10
0
I have looked at the various IC's made by Analogue Devices - there's a bunch that'll do the job nicely but at the moment I'm going for easier/simpler solutions.

I've come up with the attached diagram, using an XR2206 to create the signal and a 7046 chip to measure the phase along with an AD844 Op-amp.

I might need to add in another amp after the XR2206, but aside from that will this work?

File size:
21.9 KB
Views:
85
8. ### ifixit AAC Fanatic!

Nov 20, 2008
650
118
Hi mcdaza,

Your basic approach looks good, but youll have to pay close attention to the details to ensure good measurement repeatability and accuracy.

With a clock of 100 KHz, the period is 10uS, and 1° of phase shift is 28nS. Therefore you need to use components that do not have propagation delays, or phase changes with temperature that would affect the accuracy you are trying to achieve.

Include a zero-phase error calibration signal from PROBEOUT that can be temporarily switched into PROBEIN. This will allow you to null-out any test equipment phase errors and signal path delays before beginning the test with the sample in the path.

As a quality check, you can raise and lower the temperature of your circuits in calibrate mode to see if temperature causes a phase reading change. It should not be more than you can tolerate. If the sample measurement time is only a second or two, then temperature will have less time to affect the measurement, however, longer tests, running into the minutes or hours, would be more of a concern.

The Phase comparator 1 of the 7046 will require input signals to have a 90° offset at the middle of its operating range since it is just an XOR gate. You could invert the reference clock to get this. The input signals need to be digital, not a sine wave.

The device where the AD844 is should be something to convert a small sine wave to a digital square wave. You could use the AD844 to amplify the test signal and then, with a high speed comparator, square it up to a digital signal.

What is the expected amplitude of the sample signal?
Is there a lot of noise with the sample signal?
What is a DAQ?
Are you measuring the phase as an analog signal, or a digital signal at the PC?

Regards,
Ifixit

9. ### Jaguarjoe Active Member

Apr 7, 2010
770
91
If you feed 5 volts from the XR into a 10^14 ohm impedance, the current going into the op amp will be 5x10^-14 amps. To get any meaningful level out of the op amp will require a huge value for R7 the FB resistor, or a huge drive voltage going into the DUT, or both.
The ADx op amp is not a low current high input Z device and will need to be significantly upgraded to deal with high Z devices. National Semi makes an op amp that comes close but I can't recall its part #. Back in the day, we made discrete MOsFET op amps for quartz signal conditioning because there was no IC even close in input specs. All insulators were Teflon or silicon oil impregnated ceramic.
Dealing with high Z low I signals at a somewhat high frequency is very hard to do. Stray capacitance and leakage resistance will be a bear to deal with. Meaning phase measurements will be almost impossible to verify.
Can you do this with DC?
It might be easier to make a voltage divider circuit with the DUT then use the voltage developed across the lower value resistor as your input to the ADx. By manipulating the driver voltage and/or the voltage divider resistor, you could cover a huge range of impedances.

10. ### mcdaza Thread Starter New Member

Jun 16, 2011
10
0
Good idea.

Measurements are a few seconds (max) - shouldn't be too much of a problem - stuff will be in an air conditioned room.

What'd be the best way to do this?

If I want to measure the amplitude I should be ok just putting the resultant into the DAQ (Data aquisition unit). It'll convert the sine wave to a digital form for the computer to read. (it also has digital I/O)

Practically nil to a few volts. As Jaguarjoe has highlighted, something with high impedance will give me practically nothing out. For the purpose of this project I just want to tell the difference between two things, not measure the exact value of impedance.

I might save myself some hassle and just do this with DC.

11. ### Jaguarjoe Active Member

Apr 7, 2010
770
91
I don't see how you'll ever get a few volts out of this thing. Microvolts, maybe.
With a 10^14 ohm feedback resistor, Vout = Vin, unity gain. This theoretically could be 5 volts but there is no op amp that will practically work with 10^14 ohm resistances. 10^10 ohm FB is reasonable. That puts Vo at 500 uV. As your specimen goes down in value, Vo drops proportionately.

At 10^14 ohms and 100kHz, stray capacitance will blow this thing out of the water. DC will not just save you a hassle, it's the only way it might work.

12. ### mcdaza Thread Starter New Member

Jun 16, 2011
10
0
Once again, thanks for all the help.

I've come up with something much simpler - which'll probably make my life easier, schematic is enclosed.

At this stage I want to tell the difference between high and low conductivity. The resistor labelled sample is the resistance between probes. Low resistance means the output of the op-amp will saturate at max, high resistance means it'll be equal to the input (0.25 V).

Is this circuit ok?

Also is the power supply part on the left fine, assuming I use a 12 V AC wall wart to power it?

File size:
21.7 KB
Views:
41
13. ### ifixit AAC Fanatic!

Nov 20, 2008
650
118
Hi,

+5V is shorted to GNDA at the sample. Bias the sample from GNDA so the opamp output is positive.

Regards,
Ifixit

14. ### Jaguarjoe Active Member

Apr 7, 2010
770
91
At samples less than or equal to 50k, the output will be saturated at +5v if the op amp can go that far. At samples above 10-20 megs, you'll be real close to 0.25v. Besides not having a great range, its nonlinear too. I would add a small trimpot into the 0.25v divider ckt to allow you to tweak it for exactly 0.25v.
If you incorporated a constant current source and shuffled things around a bit, you could get a much wider range and be linear too.
As long as you don't demand much current from the 78/7905's they should be fine being fed from a half wave source.