CN-0349, gain factor

Hi Guys,

I'm trying to write a C code for a Renesas micro to interface the EVAL-CN0349-PMDZ.

Referring to the Circuit Note document enclosed to the board, page 4, equation 1, I can't understand what "code Nx" parameter stands for.

It seems to be the ADC result related to the calibration impedances Yx, but the AD5934 gives back the real and imaginary datas, so which data I have to use to calculate the gain factor ?

Thank you

Stefano

  • The calibration procedure you are referring to is discussed in terms of the admittance (the inverse of impedance) absolute value Y. To calculate N from the Real and Imaginary data in the chip output registers the described procedure requires user to calculate absolute value of the chip output: N = SQRT (Re^2 + Im^2), which can be used in the formulas.

    If you sweep a wide frequency range and since you seem to have reasonable computational power in your microcontroller it might make sense to simply calibrate gain at every frequency point in your sweep and store it as an array to later calculate the unknown impedance.

    Best of luck!

  • Hi Snoriax,

    thank you for your help.

    So, in the equation GF= (Yh-Yl)/(Nh-Nl), Nh and Nl are the magnitudes calculated with their own calibration resistors. Ok, that's clear.

    I'm using a little micro (R5F21114, just 16k flash and 1k RAM) I'm already using for other purposes, so actually I don't have a great computational power.

    What I'm trying to do now just for test, is measure a resistor. So, what I though I was doing is calibrate the system with the two point calibration method (using 0x12 and 0x22 as register values for ADG715) without the sweep frequency but only using a 2kHz segnal, than measure the unknown resistor with the same signal.

    Do you think it is a wrong method ?

    Thank you,

    regards

    Stefano

     

  • Yes, the "Y"s are inverse resistances and the "N"s are the correspondent magnitudes of the complex-valued AD5934 output.

    You do not have much computing power to spare indeed (thought you had a dedicated microcontroller).

    Personally, I find the the proposed calibration procedure unnecessarily complicated: if you do not connect anything the resistance is infinity, the corresponding Yl is 0 and Nl is also 0. You do not need the second resistor at all - connecting nothing works better as you do not need to worry about the accuracy of Yl and and you know what Nl is supposed to be (you will certainly see a bit of noise in Nl, but that is a useful measure of the accuracy you can expect from your system).

    Yh for calibration is also pretty much determined for you by the system: it has to be about the same value as 1/Rfb selected by the switch U1, which is R9, R8 or R6. So, if you calibrate with R3, R4 and R7 the Rfb of R9, R8 or R6 should be selected respectively (assuming that R6 of 10k is installed on your board).

    To summarize: as an example, select R8 as Rfb and R4 as Rcal, calculate your gain as GF = Yh / Nh, then connect the "unknown" resistor Rx that should be larger than R8, read the output Nx and calculate the "unknown" resistor value 1/Rx = GF * Nx - the result should be close to the resistor nominal value.

    Nothing is wrong measuring at a single frequency. Give the chip a non-zero Number of Settling Cycles (seems to choke otherwise) and wait 7-10 ms between enabling the output voltage from the chip and taking measurements to allow the high-pass filter C1(R1||R5) to settle. 

    Best of luck!

  • Hi,

    It doesn't work.

    I've tried all day long, but it doesn't work.

    I don't know what I'm doing wrong, but I'll continue to study.

    Thank you for you help

    Regards

    Stefano

  • Things should go smoother once you are able to read/write from/to the AD5934 chip. There are some code examples floating on the web, you might consider reviewing those not to reinvent the wheel. Here is one on GitHub, and a few more. Those are for the AD5933, but the commands and functionality are virtually identical, except your AD5934 does not have built-in internal oscillator and temperature gauge.

    Best of luck!