Post Go back to editing

AD5933 with AFE and MUXs (Capacitor not read correctly)

Category: Hardware
Product Number: AD5933

THE PROBLEM:

I am having trouble getting some decent measurements when I use capacitors as DUT. In terms of measuring resistors, there is not much of a problem but when it comes to capacitors and especially when using a series RC network as DUT, I could not get it to match to a theoretical nyquist plot. If i measure only resistors the error fall below 1% from the reference value obtained from FLUKE 115 Multimeter. However when I use measure a (11nF) capacitor, i only get 1.0 or around that range of values of impedance measurement from 5kHz to 100kHz. 

MY INTENTION:

To investigate different Nyquist plot of different circuit models sequentially with MUXs. (Intended impedance range around 1kOhms to 10kOhms. (10KHz to 100KHz)

MY SETUP:

The VIN and VOUT of the AD5933 are subjected to an AFE with the AFE subjected to multiple MUXs. The Attiny84 is just there for digital control extension in controlling the feedback and calibration MUXs. (The feedback MUX is an overkill for the gain adjustment).

IMPORTANT CODE SNIPPETS:

(Calibration)

gain[i] = (double)(ref/1.0)/sqrt(pow(real[i], 2) + pow(imag[i], 2)); 

phaseRef[i] = atan2(imag[i],real[i]);

(Frequency Sweep - Unknown) 

magnitude = sqrt(pow(real, 2) + pow(imag, 2));

impedance[nr][i] = magnitude * (gain[i]); // with AFE

phaseAngleRad = atan(imag / real) - phaseRef[i]

realSample[nr][i] = (impedance[nr][i] * cos(phaseAngleRad));

imagSample[nr][i] = (impedance[nr][i] * sin(phaseAngleRad));

WHAT I TRIED SO FAR: 

I looked upon the simulation for reference


If I measure a DUT of a series RC network of 1KOhms and 1uF Capacitor this is the resulting waveform

With resulting waveform around 0V

If I measure a DUT of a series RC network of 1KOhms and 11nF Capacitor this is the resulting waveform

Resulting waveform is not around 0V

WHAT CAN I DO TO CORRECT THIS?
Or is it that I cannot measure below 1uF? How do i calculate the limits of my capacitor calculations?

Datasheet Links:

TMUX1511:https://www.ti.com/lit/ds/symlink/tmux1511.pdf?ts=1721143051646&ref_url=http%253A%252F%252Fti.com%252Fproduct%252FTMUX1511

TMUX136: https://www.ti.com/lit/ds/symlink/tmux136.pdf?ts=1721119743860&ref_url=https%253A%252F%252Fwww.mouser.tw%252F

OP-AMP (OPA4189 instead of OPA4387): https://www.ti.com/lit/ds/symlink/opa4189.pdf?ts=1721200169927&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FOPA4189%253Fbm-verify%253DAAQAAAAJ_____06XCokf58FLb0GnZDdiq2cMdFVg9W5V-dhr4ObdiwH2ThWAzH8OcVj-CYDmJWl08ra-acM-7j3EpMGz6ukxN77yYktYHN2ZWtn1V0JCObz0Rov9bcet-8OvxhXfN9dcC65QR9kXMOv4uPRSIL4VTArfysR3x25mTlYoLMOPijpGRvOR6x_8biWKl158bnvsgrsYT-CmXm9Cjma5q7ePmg8tlQbDzAnneGpaHlX6odx79vvQRgKic29cZv3nW-4h6K_IG-DeK35TZw33hlqmzGBaxe4wvWzE_Uj3zKhULFJDrbm8

THANK YOU FOR YOUR HELP!

 

  • From the information posted it is not that easy to figure out what could be wrong, the AD5933 is not even shown on the schematic. Regardless of what the AFE and MUXs are doing, when you run the measurements, set the PG gain on the AD5933 to 1, hook up the oscilloscope to the RFB pin of the chip and observe the voltage waveform: it should be well-formed sine wave free of any distortion or clipping at the power supply rails and the baseline should be at Vdd / 2. Unless these conditions are met, there is no point attempting any calibration or measurements. If the RFB pin voltage is not as described - it is possible to troubleshoot the commutation and the AFE upstream from there.
    Whether or not it is possible to measure 1uF depends on the excitation voltage settings and the overall gain along the signal path to the AD5933. Notice that at your upper frequency range of 100KHz the impedance of such capacitor is about 1.6Ω. At 2V excitation the current across it should be 1.25A and the question is whether it would be reasonable to expect for your cricut to handle such current. 

  • The AD5933 we are using is this www.ebay. ph/itm/224775766579 (I cannot post a link)

    We modified the circuit to let us connect to the RFB pin of the ad5933

    We were not able to test with the oscilloscope yet but we have our doubts with the AFE with the simulation.

    If simulated with series 1KOhms and 1uF the VIN is around VDD/2

    But with series 1KOhms and 1nF the VIN is below VDD/2

    The overall circuit though can measure resistors so well. But if you add the capacitor it just dont measurr correctly.

    Thank you for your input. We will update you with the oscilloscope results

  • Unfortunately, the URL you posted did not help much - there is no schematic of the board you are using in your project. Did the seller provide the schematic, or just the board?

    You should be able to post URLs in the text like this: https://www.ebay.ph/itm/224775766579 or as in the above paragraph by highlighting some text and going to the Menu: Insert-> Link and typing in the link into the Url field.

    But with series 1KOhms and 1nF the VIN is below VDD/2

    Under normal circumstances the VIN pin of the AD5933 (if that is the VIN you mentioned) should never be at the voltage other than Vdd / 2 DC - the pin is the so-called "virtual ground". When  the AD5933 is receiving AC signal from the impedance, it is the current, not the voltage, that is coming at the VIN pin and flowing across the Rfb resistor to the RFB pin, where the voltage caused by this current across the Rfb resistor can be observed using the oscilloscope. So, even when there is an AC signal present, the VIN pin should still sitting at the DC voltage of Vdd / 2 and practically no AC voltage should be present there. So calling this pin VIN is a bit misleading, but that is what the documentation calls it and so we are stuck with it.

    The overall circuit though can measure resistors so well. But if you add the capacitor it just dont measurr correctly.

    Sometimes the voltage at the RFB pin is distorted and both calibration and when measurements are performed with the same or close resistor values the results appear to be correct, but more significant deviations in the impedance under measurement from the calibration resistor values tend to show non-linearity in measurement results. The capacitors and RC networks you are trying to measure probably have impedance that differs much from the value of the calibration resistor. We can certainly discuss it further once you have made sure that the calibration resistors and the capacitors you are using do not produce any distortions in the RFB pin sine wave voltage and the sine wave swings over the DC level of Vdd / 2. After that we could dig through the data you are collecting from the AD5933 chip and make sure it all works as expected.

  • Good day Snorlax!

    Before anything else, thank you for taking time to help us in our project.

    We managed to borrow our school's oscilloscope and this is the result from the RFB pin. Using the 1KOhm 0.1% Calibration Resistor



    You are definitely right that there is something wrong with the RFB pin that is why we cannot reliably measure other impedances especially the capacitor.

    At first we thought that the AC signal wave was just too small but its just noise. (You can confirm if our suspicion is correct).
    Below is the reading without the frequency sweep started


    We tried bypassing the AFE setup and we get the expected AC sine wave with VDD/2 as the virtual ground.

    What can be wrong with the AFE Setup?

    Thank you in advance!

  • Great you managed to get access to the scope - hard to troubleshoot the AFE without it. Indeed, the trace on the first picture could be either the noise or an extremely small signal. Either way something is wrong with the circuits in the signal chain between the AD5933's pins VOUT and VIN. The good news is that the RF on this picture is sitting at Vdd / 2 DC voltage - the AFE does not interfere with the DC working pont. On the second picture the RFB voltage is near 0V because the when the AD5933 is not sweeping - it is in the standby mode, where most of the chip's active circuits are pulled to ground.
    The third picture does show normal operation achieved by bypassing the AFE , so, as you concluded, something is not quite right with the AFE or the commutation, which you bypassed.
    Since you are already on the path, the sensible approach would be to start adding sections of your AFE, while bypassing the commutation. So, to begin with it would make sense to just connect the left pin of the R2 to the test resistor and the other end of your test resistor to the input alligator clip of the AD5933 board and see if the RFB pin has the same well-formed sine wave. As far as can be understood from the incomplete schematic diagram, the second step would be to add the INAMP section to the signal chain by shorting the Probe1 and Probe4 and then Probe2 and Probe3 and connecting a 50k resistor between the two nodes thus created, and again to check whether the RFB pin voltage is a well-formed sine wave. Providing more specific recommendations would require a full schematic that would include the circuit of the AD5933 board.
     

  • Good day snorlax!

    We express our gratitude to your guidance.


    We will trace the PCB tracks of the AD5933 Board and will update you as soon as possible.

    You were right about this one, we did confirm that earlier that aside from noise, there seems to be a superimposed sine wave.

    extremely small signal.

    In our case a R2 with a value of 50K and with 1K resistor as a DUT, the sine wave shown in the feedback pin is soo small that it can be mistaken as one of the noise.

    By changing R2 near to the DUT value, the sine wave is much more distinct and clear from the noise, ranging near to 1Vpk if identical to R2.

    We later confirmed that R2 serves as the maximum impedance that can be measured, anything above that value clips the sine wave to the Feedback Pin. We are still trying to figure out the equation of this but to no avail.

    But we found another problem and we implore from you to help us in understanding what might have caused this.

    From the start of the frequency Sweep at (5KHz) this was the result of the waveform from the Feedback Pin.

    This video screenshot is around 15KHz, so it is a good looking sine wave at least for us.

    Around 40KHz, this is the resulting waveform

    and furthermore at much more higher frequency more than 50KHz, this is the resulting waveform


    By the looks of it, definitely not a sine wave.

    Another question though...

    We tried referring back to our simulation again, and that we found out that even if we measure a resistor, the AFE seems to induce some phase shift, but the phase shift can be mitigated with calibration right?

    However, we are not sure if the phase shift induced by the AFE constitutes to the formation of the seemingly triangle wave at higher frequencies during the frequency sweep.

    The screenshot below is taken with a 500 ohm resistor DUT simulated at 10KHz



    The screenshot below is taken with the same 500 ohm resistor DUT simulated at 100KHz




    Thank you again snorlax for guiding us!

  • We will trace the PCB tracks of the AD5933 Board and will update you as soon as possible.

    It is quite an effort, would it be possible to contact the seller and ask for the schematic diagram of the board you purchased? If you had purchased it here, you could request the schematic: "PDF schematic*1+STM32F103RCT6*1:Please contact customer service after purchase, we will send the module information to your mailbox." - this could be the same seller as yours only via different platform.
    Anyways, it would be useful to understand what it is on the board - from the looks of it, it has the AD820 installed, so it is likely already has the same circuit you implemented with U9A, so no need to duplicate it on your board. Also, it is likely that the second OPAMP in the AD820 is used for impedance conversion instead of the internal AD5933 OPAMP, which makes picking the correct value value of your R3 resistor critical for the circuit proper functioning. Do you know the function of the jumpers P5 and P6?

    15KHz, so it is a good looking sine wave at least for us.

    Yes it is.

    40KHz, this is the resulting waveform

    Too much distortion, the results in RE and IM registers are not going to be correct. 

    more higher frequency more than 50KHz

    Not a sine wave indeed. It is necessary to figure out what distorts it so much.
    Can you hook up the scope to the AD5933 board:
    1. To the VOUT pin of the AD5933
    2. To the OUT pad of the board, where black wire alligator clip is soldered to the board
    3. On your board, to the right lead of your R2 resistor
    4. To the pin 7 of your U9, when 50k resistor is connected between the shorted Probe1 and Probe4 node and Probe2 and Probe3 node
    5. To the pin 4 of DA1
    If the observed sine wave is well-formed at steps 1 through 3 and not at steps 4 and 5, the MUX chips U4 through U8 could be a problem. Is there a way to remove those from the circuit temporarily?

    We are still trying to figure out the equation of this but to no avail.

    R2 is a current -setting resistor to the DUT. The current it sets is equal Vexc / R2. It has to flow only across the DUT as the "-" input of the U9B OPAMP has extremely high internal impedance. This current flowing across the DUT generates voltage of (Vexc / R2) * ZDUT , which is received differentially by the unity-gain INAMP, so this same voltage appear on its output, which then eventually reaches the input of the AD5933. What is unknown is the gain the AD5933 board introduces into this signal chain. If this gain equals 1 then the (Vexc / R2) * ZDUT is the voltage that is going to be processed by the AD5933 and shown in the RE and IM registers as a complex number.

    but the phase shift can be mitigated with calibration right?

    Yes, any AFE is going to introduce phase shift. Also the AD5933 itself is going to add its internal phase shift (likely larger than the AFE), so the calibration will take care of the entire phase shift throughout the signal chain.

    Also, noticed that your schematic diagram designates Vdd = 3.3V. This could be a problem as the AD5933 board requires 5V to operate as it uses the AD820, which min supply voltage is 5V - could easily be the source of the observed sine wave distortion, which would show throughout all signal chain (at points 2 through 5 mentioned above). To keep everything powered from 3.3V would require either bypassing the AD820 or lifting it from the board and replacing with a drop-in low-voltage OPAMP if whatever it is doing on the board is useful. One more reason why having the schematic would be handy. 

  • One more reason why having the schematic would be handy. 

    Sadly the seller could not provide any schematic.



    This is the connection of the AD820 to the board.

    Do you know the function of the jumpers P5 and P6?

    We left it disconnected to bypass AD820



    Also we forgot to remove and bypass LT1763, because we won't need the LDO since we are just supplying 3.3V to the supposedly 5V input of the board.

    (Vexc / R2) * ZDUT

    This explains a lot, at least we know what Vpk to expect at the Feedback pin

    Can you hook up the scope to the AD5933 board:

    We will update you as soon as possible, we currently do not have access to the oscilloscope right now, but as far as I remember, steps 1 to 3 have no problem although I remember that there was a slight distortion at step 3 at higher frequencies, but I need to verify this further or I was just mistaken. But I am sure that the slew rate of the OPA189 is sufficient enough for our applications.

    Thank you again and we will get you the results soon!

  • Sadly the seller could not provide any schematic.

    Since you are bypassing the AD820 and removing the unnecessary LDO - this should no longer be an issue.

    the slew rate of the OPA189 is sufficient enough for our applications.

    The OPA189 could be a problem as the minimum supply voltage it requires is 4.5V and you are feeding it from 3.3V. Can you find find a drop-in package replacement such as OPA1662 or similar?

  • Oh no, we forgot about that! 

    We will just consider lifting the Vsupply leg of the OPA189 and feeding with 5V!

    During the earlier stages of our schematic we considered using 5V as VDD for the whole AD5933 and AFE, then we switched to 3.3V, so we have this in our schematic OPAx387 but we ordered the OPA189!

    with OPAx387 slew rate, with 2.8 V/uS and 1.7 V to 5.5 V power supply voltage.