Post Go back to editing

AD5940 Impedance Measurement

Category: Hardware
Product Number: AD5940

 

We have been testing the AD5940 using the EVAL-AD5940BIOZ board paired with EVAL-ADICUP3029. Our goal is to simulate one of our experimental conditions where electrode contact impedances are high, while the sensing impedance is as low as 10 Ω.

Using SensorPal, we selected the 4-Wire Impedance application, which successfully reported approximately 13 Ω, as expected. We also verified the excitation and sensing behavior by monitoring the CE0–AIN1 electrodes with an Analog Discovery oscilloscope. However, SensorPal does not allow frequency sweeps below 100 Hz, which is critical for our application. Below are the key parameters used in SensorPal:

 

 

 

Firmware Testing

To explore lower frequencies, I downloaded Keil µVision and the example codes from the official GitHub repository.

 

Impedance Example

  • I noticed that the Impedance.c example is configured for the EVAL-AD5940ELECZ board (which includes a 5 kΩ on-board resistor). The default switch matrix and RTIA values reflect that configuration:


/* Set switch matrix to onboard(EVAL-AD5940ELECZ) dummy sensor. */

                pImpedanceCfg->DswitchSel = SWD_CE0;

                pImpedanceCfg->PswitchSel = SWP_RE0;

                pImpedanceCfg->NswitchSel = SWN_SE0;

                pImpedanceCfg->TswitchSel = SWT_SE0LOAD;

                /* The dummy sensor is as low as 5kOhm. We need to make sure RTIA is small enough that HSTIA won't be saturated. */

                pImpedanceCfg->HstiaRtiaSel = HSTIARTIA_5K;

               

  • To match the conditions of our setup (and align with SensorPal’s parameters), I modified the configuration as follows:


pImpedanceCfg->DswitchSel = SWD_CE0;

                pImpedanceCfg->PswitchSel = SWP_CE0;

                pImpedanceCfg->NswitchSel = SWN_AIN1;

                pImpedanceCfg->TswitchSel = SWT_AIN1;

                /* The dummy sensor is as low as 5kOhm. We need to make sure RTIA is small enough that HSTIA won't be saturated. */

                pImpedanceCfg->HstiaRtiaSel = HSTIARTIA_200;        

                /* Configure the sweep function. */

                pImpedanceCfg->SweepCfg.SweepEn = bTRUE;

                pImpedanceCfg->SweepCfg.SweepStart = 100.0f;                       /* Start from 100Hz */

                pImpedanceCfg->SweepCfg.SweepStop = 1000.0f;                     /* Stop at 1kHz */

                pImpedanceCfg->SweepCfg.SweepPoints = 100;                          /* Points is 100 */

                pImpedanceCfg->SweepCfg.SweepLog = bTRUE;

                /* Configure Power Mode. Use HP mode if frequency is higher than 80kHz. */

                pImpedanceCfg->PwrMod = AFEPWR_LP;

                /* Configure filters if necessary */

                pImpedanceCfg->ADCSinc3Osr = ADCSINC3OSR_2;                 /* Sample rate is 800kSPS/2 = 400kSPS */

                pImpedanceCfg->DftNum = DFTNUM_16384;

 pImpedanceCfg->DftSrc = DFTSRC_SINC3;

 

  • Also Impedance.c file:
       .DswitchSel = SWD_CE0,

  .PswitchSel = SWP_CE0,

  .NswitchSel = SWN_AIN1,

  .TswitchSel = SWT_AIN1,

  .PwrMod = AFEPWR_LP,

  .HstiaRtiaSel = HSTIARTIA_200,

  .ExcitBufGain = EXCITBUFGAIN_2,

  .HsDacGain = HSDACGAIN_1,

  .HsDacUpdateRate = 7,

  .DacVoltPP = 600.0,

  .BiasVolt = -0.0f,

  .SinFreq = 100.0, /* 100Hz */

  .DftNum = DFTNUM_16384,

  .DftSrc = DFTSRC_SINC3,

  .HanWinEn = bTRUE,

  .AdcPgaGain = ADCPGA_9,

  .ADCSinc3Osr = ADCSINC3OSR_4,

  .ADCSinc2Osr = ADCSINC2OSR_22,

  .ADCAvgNum = ADCAVGNUM_16,

  .SweepCfg.SweepEn = bTRUE,

  .SweepCfg.SweepStart = 100,

  .SweepCfg.SweepStop = 1000.0,

  .SweepCfg.SweepPoints = 100,

  .SweepCfg.SweepLog = bFALSE,

  .SweepCfg.SweepIndex = 0,

 

  • Despite these adjustments, my impedance readings are significantly different from expected values.

 

BIA Example

 

  • Next, I tested the BIA example with similar parameters:

 

  .PwrMod = AFEPWR_LP,

  .HstiaRtiaSel = HSTIARTIA_200,

  .CtiaSel = 16,

  .ExcitBufGain = EXCITBUFGAIN_2,

  .HsDacGain = HSDACGAIN_1,

  .HsDacUpdateRate = 7,

  .DacVoltPP = 600.0,

  .SinFreq = 100.0, /* 100Hz */

  .ADCPgaGain = ADCPGA_9,

  .ADCSinc3Osr = ADCSINC3OSR_4,

  .ADCSinc2Osr = ADCSINC2OSR_22,

  .DftNum = DFTNUM_16384,

  .DftSrc = DFTSRC_SINC3,

  .HanWinEn = bTRUE,

  .SweepCfg.SweepEn = bTRUE,

  .SweepCfg.SweepStart = 100,

  .SweepCfg.SweepStop = 1000.0,

  .SweepCfg.SweepPoints = 100,

  .SweepCfg.SweepLog = bTRUE,

  .SweepCfg.SweepIndex = 0,

 

  • The BIA application produced closer results to SensorPal, though still not as accurate

 

 

At this point, I would appreciate your guidance on the following:

  1. Which additional parameters or internal configurations does SensorPal apply that might not be reflected in the open-source examples?
  2. Are there any recommended adjustments for accurate impedance measurements below 1 kHz with lower impedances (< 20 Ω)?