Post Go back to editing

SE voltage follows Vzero, but RE voltage does not respond to Vbias on AD5941, AD5940 EVAL

Category: Software
Product Number: ad5940

Hi,

I am currently working with an nRF52 board connected to the AD5941 EVAL-AD5941ELCZ through SPI.

  • SPI communication is verified (Chip ID can be read correctly).

  • I am using the Amperometry application mode.

What I observe:

  • When I set Vzero = 800 mV, the SE node reads ~800 mV.

  • When I set Vzero = 1100 mV, the SE node reads ~1100 mV.

So the SE pin clearly follows the Vzero setting as expected.

However, the RE pin does not behave as expected:

  • With Vzero = 800 mV and Vbias = 0 mV, I expect RE ≈ 800 mV.

  • With Vzero = 800 mV and Vbias = 200 mV, I expect RE ≈ 1000 mV.
    But in both cases, RE does not show these expected values at all. 

In summary:

  • SE output is correct (tracks Vzero).

  • RE output is incorrect (does not track Vbias).

This makes me suspect that either there is an issue with the switch matrix configuration, or I may have overlooked some minor but crucial detail.

I will share my code configuration as well in case something is missing there.
Please advise on what I might be missing and how I can properly drive/observe RE output voltage.

Attached is the code for reference.

Thank you very much for your help.

void AD5940Sensor::start(int16_t Vbias, uint32_t pulseLenforCHRONO, uint8_t sensorIndex)
{
    configurationInit(Vbias, pulseLenforCHRONO);
    sensorIDX = sensorIndex;

    switch (_SensorMethod)
    {
    case Amperometry:
        AppAMPCtrl(AMPCTRL_START, 0);
        break;
    case ChronoAmperometry:
        AppCHRONOAMPCtrl(CHRONOAMPCTRL_PULSETEST, 0);
        break;
    case Impedance:
        AppIMPCtrl(IMPCTRL_START, 0);
        break;
    default:
        break;
    }
}

      
void AD5940Sensor::configurationInit(int16_t Vbias, uint32_t PulseLen)
{
    /*
  Application configuration structure. Specified by user from template.
  The variables are usable in this whole application.
  It includes basic configuration for sequencer generator and application related parameters
*/
    // switch (cfg)
    switch (_SensorMethod)
    {
    case Amperometry:
        AppAMPCfg.bParaChanged = bFALSE;
        // AppAMPCfg.SeqStartAddr = 0;
        // AppAMPCfg.MaxSeqLen = 0;

        AppAMPCfg.SeqStartAddrCal = 0;
        AppAMPCfg.MaxSeqLenCal = 0;
        // AppAMPCfg.FifoThresh = 5;

        AppAMPCfg.SysClkFreq = 16000000.0;
        // AppAMPCfg.WuptClkFreq = 32000.0;
        AppAMPCfg.AdcClkFreq = 16000000.0;
        AppAMPCfg.NumOfData = -1;
        AppAMPCfg.RcalVal = 10000.0; /* RCAL = 10kOhm */
        AppAMPCfg.PwrMod = AFEPWR_LP;
        AppAMPCfg.AMPInited = bFALSE;
        AppAMPCfg.StopRequired = bFALSE;

        /* LPTIA Configure */
        AppAMPCfg.ExtRtia = bFALSE; /* Set to true if using external RTIA */
        // AppAMPCfg.LptiaRtiaSel = LPTIARTIA_4K;
        AppAMPCfg.LpTiaRf = LPTIARF_1M; /* Configure LPF resistor */
        // AppAMPCfg.LpTiaRl = LPTIARLOAD_100R;
        AppAMPCfg.ReDoRtiaCal = bTRUE;
        AppAMPCfg.RtiaCalValue = {0, 0};
        AppAMPCfg.ExtRtiaVal = 0;

        /* ADC Configure*/
        AppAMPCfg.ADCSinc3Osr = ADCSINC3OSR_4;
        AppAMPCfg.ADCSinc2Osr = ADCSINC2OSR_22;
        AppAMPCfg.DataFifoSrc = FIFOSRC_SINC2NOTCH;
        AppAMPCfg.ADCRefVolt = 1.8162; /* Measure voltage on ADCRefVolt pin and enter here*/

        LOG_INF("LFOSC = %.2f Hz", (double)LFOSCFreq);
        AppAMPCfg.WuptClkFreq = LFOSCFreq;
        AppAMPCfg.SeqStartAddr = 0;
        AppAMPCfg.MaxSeqLen = 512;
        AppAMPCfg.NumOfData = -1; /* Never stop until you stop it manually by AppAMPCtrl() function */
        AppAMPCfg.LpTiaRl = LPTIARLOAD_10R;
        AppAMPCfg.LptiaRtiaSel = LPTIARTIA_3K; /* COnfigure RTIA */

        /* user define parameters */
        AppAMPCfg.AmpODR = 0.5f;     /* Sample time in seconds. I.e. every 5 seconds make a measurement */
        AppAMPCfg.FifoThresh = 4; /* Number of points for FIFO */

        /* Sensor related parameters */
        AppAMPCfg.ADCPgaGain = ADCPGA_1P5;
        AppAMPCfg.SensorBias = Vbias; /*  Vbias Sets voltage between RE0 and SE0 */
        AppAMPCfg.Vzero = 800;         /* Sets voltage on SE0 and LPTIA */

        // AppAMPInit((uint32_t *)pBuffer, bufferSize);
        AppAMPInit(AppBuff[0], APPBUFF_SIZE);
        break;