AD5940 ELCZ - using SINC2 data for the DFT not working

Hi, 

I am using the EVAL-AD5940ELCZU. I running the AD5940 impedance example. I have changed some of the parameters from the function void AD5940ImpedanceStructInit(void) in the file AD5940Main.c and others from AppIMPCfg_Type in Impedance.c file.

It measures reasonably well for high impedance values at low frequencies as I guess the calibration resistor is of the same order, but when I tried to measure low impedances (e.g 100 to 2kOhm) I am getting really bad values.

I can see changing ADCSINC3OSR to 4 helps a little bit . Then I read on another Q&A to use the SINC2 and oversampling so I can get more cycles of the signal. The problem comes when I tried to select DFTSRC as SINC2NOTCH. It stops printing data and it seems to not enter in the "if(AD5940_GetMCUIntFlag())" shwon below. When I use SINC3 or AVG as a source data for the DFT works fine, but when I try SINC2NOTCH or ADCRAW doesnt work. 

I do also have the EVAL-ADuCM355 which are using similar logic and it works fine in this instance. 

Is there any code missing in the AD5940 that stops doing a DFT of the data coming our from the filtering SINC2? How can I solve this issue for the EVAL AD5940-ELCZ? 

Best regards,

Albert

  • 0
    •  Analog Employees 
    on Mar 26, 2020 10:12 AM

    Hi Albert,

    What is likely happening here is the current flowing into the HSTIA is too large for the selected gain resistor and the voltage at the output of the HSTIA exceeds the maximum input range of the ADC. To calculate the best gain resistor value refer to page 36 of the datasheet.

    Also, to achieve optimum accuracy the value of the RCAL should be close to the magnitude of the impedance being measured. On the ADuCM355 evaluation board RCAL is 200 Ohm as opposed to 10 kOhm on the AD5940 board. Hence why the ADuCM355 can achieve better accuracy on the lower impedance range.

  • Hi

    It works, my problem now is that when I set up the ADC and DFT, it only works for a certain frequencies as once it changes frequencies those values are not optimal. I have seen that the example for the ADuCM355 there is a function where it calculates those parameters (SINC3OSR, SIINC2OSER, DFTNUM, DFTSRC and others) and updates the register. I got a slightly idea how to do it but where exactly should I place the code in order to do this funcionality, where it calculates the optimal parameters and updates them. Should it be in the function int32_t AppIMPRegModify(int32_t * const pData, uint32_t *pDataCount) in the impedance.c file?

    How would you suggest doing it? 

    Best regards,

    Albert

  • 0
    •  Analog Employees 
    on Mar 30, 2020 7:50 AM in reply to Alru

    Hi Albert,

    Yes, AppIMPRegModify() function is a good place to put it. 

    Regards,

    Micheál

  • When you say "bad values" - bad how?  I'm doing impedance measurements with this chip and getting consistent but confusing results - the raw output for measuring a resistance has 80 degrees of unexpected phase rotation.