Post Go back to editing

AD5933 - Switching the clock and low frequency calculation

Hello everybody

Thank you in advance for your help

I am designing a board with AD5933. I am planning the have a binary counter running through a multiplexer and connect to MCLK of AD5933. My first question is what happens if i change the MCLK on the fly? Do i need to toggle the power of AD5933 or only do software reset?

My second question is how exactly is lowest measuring frequency determined. I know in UG-364 there is a table showing some ranges. If i have different clock from those mentioned in UG-364, on MCLK how can i estimate my most lowest measuring frequency?

Thank you very much

  • Cannot help with the first question – never tried it, hopefully someone from ADI can comment.


    Second question: it is typically determined empirically based on accuracy requirements for a given application.


    On the excitation side it is the lowest frequency is MCLK / 2^29, which can be programmed into the chip by writing 1 into frequency register.
    On the receiving side measuring the voltage waveform there is a systematic error introduced by the version of the “DFT” implemented. Roughly speaking the lower the measured waveform frequency, the higher this error tends to be, but in oscillating manner crossing zero at frequencies where the number of waveform cycles within 1024-long sampled sequence is exact integer (the so-called “coherent sampling”). One can easily observe this “DFT” artifacts by connecting RFB, disconnecting everything else from VIN, programming the sweep from frequency code of 0x1 to, say, 0x8300 and plotting Real and Imaginary data as a function of frequency code. In theory, without the input signal, both Real and Imaginary values should be zero at all frequency codes, the observed deviation is the systematic error.


    At MCLK of 16MHz these “DFT” artifacts become quite noticeable below 10KHz, the mainstream solution is to reduce MCLK to achieve lower operation frequencies, which requires additional hardware you indicated you are designing. In this approach you are kind of stuck lowering MCLK proportionally: to operate down to 1KHz MCLK needs to be 1.6MHz, 100Hz – MCLK of 160KHz, etc. with the risk of eventually affecting the operation of I2C interface. The no-hardware, more academic alternative is to calculate the “DFT” errors out of the output data, but it requires doing some math over the chip output data. This could get you down to 100Hz keeping 16MHz MCLK.

  • Thank you for a fast and very detailed reply.

    I will try Q1 on my own and i will post the results.

    I have here EVAL-AD5933EBZ Rev C. If i would to reduce the MCLK=100k is I2C going to still work on eval board.

    My second questions is more on a measurement side. I did two measurements. I first connected Rfb = 51k, Rcal = 51k sweep from 25k-75k.I measure the Zunknown = 26k. I though of doing same measurement with Rfb = 27k, Rcal = 27k and i got the results Zunknown = 12.5k. It seams by halving the Rfb and Rcal my measured Zunknow also got halved. Can you please explain why that is. Should i be doing something different? Zunknow should be independent of Rfb and Rcal.

    In both cases Range = 2Vpp, settling time 15, MCLK=16MHz, Gain=1X.

    Thank you

  • I did not try reducing MCLK on the evaluation board, hopefully somebody from ADI can chime in. There is no documentation on how the on-board controller CY7C68013 is setup/programmed for I2C communication.

    Yes, once calibration is done, Zunknwn should be independent of Rfb and Rcal. From your description I can only guess that you might be keeping Rcal connected when you attach Zunknown? For measurements Rcal must always be removed and replaced with Zunknown.

    In general, it is useful to think that all this circuit is doing is measuring is the AC voltage across the Rfb resistor. It might be convenient to look at raw Real and Imaginary data by clicking Download Impedance Data button and saving the CSV. Both Real and Imaginary data are proportional to voltage across Rfb and, as such, to current flowing from Rcal or Zunknown into U1-B pin 6 / Rfb node, so the output data is proportional to the admittance and impedance is calculated from it by the software.

  • Hi 

    again thank you for you fast and detailed answer.

    I am very sure that Rcal is not connected when i do the measurement of Zunknown. That is because i have to physically remove the Rcal from the pins on the eval board and then connect the Zunknown. Here is my measuring procedure.

    1.) Connect Rfb in the slot marked Rfb on the eval board

    2.) Connect Rcal in the slot marked Z on eval board (in my case both resistors are Rfb = Rcal = 51k)

    3.) Start the eval software.

    4.) Input the value for  Rcal

    5.) Press program the device registers

    6.) Press calculate the Gain for multiple points

    7.) Press sweep ... this is just to confirm that i get the value of Rcal = 51k

    8.) Download this measurement

    9.) Remove the Rcal and connect Zunknown

    10.) Press the sweep 

    11.) Download the measurement data

    If my procedure is wrong please let me know. 

    I made have the files for both measurements Rfb=Rcal=27k  and Rfb=Rcal=51k. I dont know how i can upload them here. In the files the columns "Real" "Imaginary" and "Magnitude" are all very similar and close to each other (they are with in of 2% of each other), for 27k and 51k. I dont know why then Impedance is different. Can you shed some light on this. 

    When i change the Rfb and Rcal i always recalculate gain ... is this correct?

    From the downloaded data can i use Magnitude to evaluate R and C (or L) from the measurements. I am asking because i see there is also information on Phase. Is this the phase of Zunknown or the whole system.

    thank you

        

  • All steps in your procedure are correct, so if you connect the Zuknown resistor of the same resistance as Rcal you should be getting correct impedance value. For some reason it comes out about two times lower. Maybe it is worth looking at the resistor R6 and jumpers LK1 and LK2 on the eval. board, Figure 31. EVAL-AD5933EBZ USB Schematic: either R6 should not be installed on the board or at least one of the jumpers should be removed.

    If you have access to an oscilloscope, it would be great to check the voltage waveform on pin 4 “RFB” of the AD5933 when running calibration and measurements – it should always be a well-formed sine wave without any distortion or clipping at the voltage rails, with your settings it should be about 2V peak-to-peak.

    At step #6, can you try to both “Mid-Point Frequency calibration” and “Multi-Point Frequency calibration” and see if the gain factor calculated by the software is about the same in both cases?

    Everything should work fine with Rfb=Rcal=27k and Rfb=Rcal=51k. When you "Reply", at the bottom of the editor window there is a menu, you may try “Insert”->”Insert image/video/file”.

    The phase in the raw data is the total phase: the sum of phase introduced by Zunknown and internal system phase. When you calibrate with resistor, which does not introduce any phase shift, all phase is the internal system phase. Just in case, this is discussed in the datasheet, p.19 “MEASURING THE PHASE ACROSS AN IMPEDANCE.”

  • Hi

    as for R6 i never used it and i never connected it. In the datasheet where you mentioned it is suggested to connect a resistor between Vout and Vin directly to measure the phase correctly. Is that what R6 is intended for?

    If i use R6 should i leave Rfb and Z unconnected?

    Is there a way to find out without the scope if there is any clipping of the signals during measurements?

    Is there a way to control the eval board directly from matlab. For instance if i want to run somethings on the loop, where measurement is done and automatically saved.

    As for the scope measurement you suggested ... I looked at the Pin 4 (just after R5 on evalboard) there is no clipping. How ever the waveform has a DC level of about 1.6V and Vpp = 0.3-0.4V. Do these values make any sense?

  • R6 and the two jumpers are probably there in case the user wants to run the AD5933 without the external AFE (the OPAMPs U1A and U1B and the circuits around).
    I do not know of any way of finding out whether there is clipping or distortion of the signals during measurements. May be somebody form ADI can comment?
    I have never tried using Matalb, but it would make sense to search this forum, there seem to be some comments on this subject.
    With your settings Vpp = 0.3-0.4V you measured is too low, the DC level is OK. It would make sense to look at the voltage on AD5933 pin 6 (test point T8) and on pin 1 of U1: it should be close to 2Vpp. Then, with Rcal=Rfb, same 2Vpp should be found on pin 7 of U1 and on AD5933 pin 4 (RFB).

  • Hi

    so that clipping of the waveform is very important. I have spent now two days chasing that and i see that having a possibility to see if waveform is clipped or not on VIN is very important feature. Maybe in the next version of the IC that should be integrated so that i can be read from some register/flag. If that register/flag is signaling that VIN is clipped i will know to disregard the measurement, make appropriate changes and redo everything.

    In regards with the phase. The downloaded data has a column that states "Phase". I tried from Imag and Real part to get save value and i never did. If i do atan(I/R) with support of Table 7 p21 of datasheet i never get Phase column in downloaded sheet.

    Can anybody explain me a little how Phase column in downloaded sheet is calculated.

    Thank you

  • Yes, apparently there is no way for the "DFT" to determine whether it is fed the sine wave or some distorted wave form: the classic "garbage in - garbage out" situation. Moreover, when you program gain 5x into the chip, the PGA may be clipping and there is no access to its output. There seem to be some internal flags in the chip, but those are not documented for external use and it is unclear if any of those could help. Nevertheless, when the user knows the range of impedance his application/product is measuring in practice it is usually possible to keep the circuits from clipping.
    Hopefully somebody from ADI will be able to help you regarding the evaluation software phase calculations.