Post Go back to editing

Clarification Needed on Overcurrent Protection Threshold and Implementation Discrepancies

Category: Hardware
Product Number: AD5941

We found that when the input current exceeds the expected maximum in our measurements, the following measurements become inaccurate due to a discharging phase. The specifications indicate an overcurrent protection threshold of 20mA. However, with our use of an internal 512k RTIA, the maximum current is calculated as 0.9V/512k = 1.7uA. Which guideline should we follow?

Below are our testing result:

Our application has a peak current that exceed 2uA in first few seconds(think of RC circuit).


And after this measurement, we used a fixed 510k resistor under 0.3V to test the collected current for accuracy:

Expected value 0.3V/510k = 588nA

You can see there is a weird discharging phase 

when there is no overcurrent in previous measurements/After AFE reboot as the baseline of how accurate we could get on our device:

Is there any way to solve this besides rebooting AFE? or there is a way to not collect the first few seconds Data which exceed the current threshold but still output the voltage so that AFE wont be messed up due to the high current in first few second?

Parents
  • Hi,

     The 20mA overcurrent limit via clamp is to avoid damaging the device.

    0.9V/RTIA current limit is to avoid saturation of ADC to avoid getting wrong measurement results.

    If you are using Amperometric example for current measurement, you may add delay as shown is red below in AppAMPInit() function in Amperometric.c:

    AD5940Err AppAMPInit(uint32_t *pBuffer, uint32_t BufferSize)
    {

    ..............

    ...............

    /* Initialization sequencer */
    AppAMPCfg.InitSeqInfo.WriteSRAM = bFALSE;
    AD5940_SEQInfoCfg(&AppAMPCfg.InitSeqInfo);
    seq_cfg.SeqEnable = bTRUE;
    AD5940_SEQCfg(&seq_cfg); /* Enable sequencer */
    AD5940_SEQMmrTrig(AppAMPCfg.InitSeqInfo.SeqId);
    while(AD5940_INTCTestFlag(AFEINTC_1, AFEINTSRC_ENDSEQ) == bFALSE);

     AD5940_Delay10us(200); /* Delay some time */

    ...............

    ...............

    AppAMPCfg.AMPInited = bTRUE; /* AMP application has been initialized. */
    return AD5940ERR_OK;
    }

    This way, initial current inputs are not measured.

  • Hi Akila,

    Thanks for the clarification!

    We are using Chronoamperometry, and I tried to implement some delays as you recommended in AppCHRONOAMPInit() as below:

    /**
    * @brief Initialize the amperometric test. Call this function every time before starting amperometric test.
    * @param pBuffer: the buffer for sequencer generator. Only need to provide it for the first time.
    * @param BufferSize: The buffer size start from pBuffer.
    * @return return error code.
    */
    AD5940Err AppCHRONOAMPInit(uint32_t *pBuffer, uint32_t BufferSize)
    {
      AD5940Err error = AD5940ERR_OK;
      SEQCfg_Type seq_cfg;
      FIFOCfg_Type fifo_cfg;
      
      AD5940_ReadReg(REG_AFE_ADCDAT); /* Any SPI Operation can wakeup AFE */
      /* Configure sequencer and stop it */
      seq_cfg.SeqMemSize = SEQMEMSIZE_2KB;  /* 2kB SRAM is used for sequencer, others for data FIFO */
      seq_cfg.SeqBreakEn = bFALSE;
      seq_cfg.SeqIgnoreEn = bFALSE;
      seq_cfg.SeqCntCRCClr = bTRUE;
      seq_cfg.SeqEnable = bFALSE;
      seq_cfg.SeqWrTimer = 0;
      AD5940_SEQCfg(&seq_cfg);
      
    //	//AD5940 leave  hibernate mode 
    //	AppCHRONOAMPCtrl(CHRONOAMPCTRL_STOPSYNC, 0); 
    
    //	AppCHRONOAMPCtrl(CHRONOAMPCTRL_SHUTDOWN, 0);
    	
    	/* Do RTIA calibration */
      if(((AppCHRONOAMPCfg.ReDoRtiaCal == bTRUE) || \
          AppCHRONOAMPCfg.CHRONOAMPInited == bFALSE) && AppCHRONOAMPCfg.ExtRtia == bFALSE)
      {
       // AppCHRONOAMPRtiaCal();
        AppCHRONOAMPCfg.ReDoRtiaCal = bFALSE;//dont need,we have our own calibration in MP-004
      } 
          
    		
      
      /* Reconfigure FIFO */
      AD5940_FIFOCtrlS(FIFOSRC_SINC3, bFALSE);		/* Disable FIFO firstly */
      fifo_cfg.FIFOEn = bTRUE;
      fifo_cfg.FIFOMode = FIFOMODE_FIFO;
      fifo_cfg.FIFOSize = FIFOSIZE_4KB;                       /* 4kB for FIFO, The reset 2kB for sequencer */
      fifo_cfg.FIFOSrc = FIFOSRC_SINC2NOTCH;
      fifo_cfg.FIFOThresh = AppCHRONOAMPCfg.FifoThresh;              /* DFT result. One pair for RCAL, another for Rz. One DFT result have real part and imaginary part */
      AD5940_FIFOCfg(&fifo_cfg);
      
      AD5940_INTCClrFlag(AFEINTSRC_ALLINT);
      
      /* Start sequence generator */
      /* Initialize sequencer generator */
      if((AppCHRONOAMPCfg.CHRONOAMPInited == bFALSE)||\
        (AppCHRONOAMPCfg.bParaChanged == bTRUE))
      {
        if(pBuffer == 0)  return AD5940ERR_PARA;
        if(BufferSize == 0) return AD5940ERR_PARA;   
        AD5940_SEQGenInit(pBuffer, BufferSize);
        
        /* Generate initialize sequence */
        error = AppCHRONOAMPSeqCfgGen(); /* Application initialization sequence using either MCU or sequencer */
        if(error != AD5940ERR_OK) return error;
        
        /* Generate measurement sequence */
        error = AppCHRONOAMPSeqMeasureGen();
        if(error != AD5940ERR_OK) return error;
        
        /* Generate transient sequence */
        error = AppCHRONOAMPTransientMeasureGen();
        if(error != AD5940ERR_OK) return error;
        
        AppCHRONOAMPCfg.bParaChanged = bFALSE; /* Clear this flag as we already implemented the new configuration */
      }
      
      /* Initialization sequencer  */
      AppCHRONOAMPCfg.InitSeqInfo.WriteSRAM = bFALSE;
      AD5940_SEQInfoCfg(&AppCHRONOAMPCfg.InitSeqInfo);
      seq_cfg.SeqEnable = bTRUE;
      AD5940_SEQCfg(&seq_cfg);  /* Enable sequencer */
      AD5940_SEQMmrTrig(AppCHRONOAMPCfg.InitSeqInfo.SeqId);
      while(AD5940_INTCTestFlag(AFEINTC_1, AFEINTSRC_ENDSEQ) == bFALSE);
      AD5940_INTCClrFlag(AFEINTSRC_ENDSEQ);
    
      AD5940_Delay10us(300000); /* Delay some time */ //Added K.C @5/23/24: Analog Device enginner so we can skip the first few seconds measurement
       
      /* Transient sequence */
      AppCHRONOAMPCfg.TransientSeqInfo.WriteSRAM = bFALSE;
      AD5940_SEQInfoCfg(&AppCHRONOAMPCfg.TransientSeqInfo);
    	seq_cfg.SeqEnable = bTRUE;
    AD5940_SEQCfg(&seq_cfg); /* Enable sequencer */
    AD5940_SEQMmrTrig(AppCHRONOAMPCfg.TransientSeqInfo.SeqId);
    //while(AD5940_INTCTestFlag(AFEINTC_1, AFEINTSRC_ENDSEQ) == bFALSE); //remove as Analog device enginner require since we have ENDSEQ int flag cleared in main.c
    //AD5940_INTCClrFlag(AFEINTSRC_ENDSEQ);
    
      AD5940_Delay10us(300000); /* Delay some time */ //Added K.C @5/23/24: Analog Device enginner so we can skip the first few seconds measurement
      
      /* Measurement sequence  */
      AppCHRONOAMPCfg.MeasureSeqInfo.WriteSRAM = bFALSE;
      AD5940_SEQInfoCfg(&AppCHRONOAMPCfg.MeasureSeqInfo);
      
      seq_cfg.SeqEnable = bTRUE;
      AD5940_SEQCfg(&seq_cfg);  /* Enable sequencer, and wait for trigger */
      AD5940_ClrMCUIntFlag();   /* Clear interrupt flag generated before */
    
      AD5940_AFEPwrBW(AppCHRONOAMPCfg.PwrMod, AFEBW_250KHZ);
      AppCHRONOAMPCfg.CHRONOAMPInited = bTRUE;  /* CHRONOAMP application has been initialized. */
      AppCHRONOAMPCfg.bMeasureTransient = bFALSE;
    	
    	
    		
      return AD5940ERR_OK;
    }
    

    But I didn't observe any difference as it is still measuring the whole 30 seconds measurement. What else I should change?

    I am not sure how to make it outputting voltage while not measuring by using sequencer as it seems to be bounded together

  • Hi,

    Purpose of adding delay is,

    if delay is added after init sequence is executed in the beginning (marked by ENDSEQ), AFE blocks will be turned on, but measurement will not be done till delay duration is completed. First measurement will take place only after "delay" duration after turning on the blocks.

  • Hi Akila,

    I understand the part that measurement will take place after delay duration after turning on the blocks. However, the feature I wanted to implement here is to Start the measurement and then next few steps happen:

    1. 7 seconds voltage output across SE & CE in 0.3V, but NOT collecting Data from AFE 

    2. 23 seconds voltage output across SE & CE in 0.3V, and collecting Data from AFE at the same time

    The whole point of doing this is to investigate if this is a way to solve the discharging phase after overcurrent from 0.9V/RTIA current limit as the attached plots in the post.

    Please let me know if there is any code that I have to modify, or there is other way to solve the discharging phase. I think we are not the only ones having this issue.

Reply
  • Hi Akila,

    I understand the part that measurement will take place after delay duration after turning on the blocks. However, the feature I wanted to implement here is to Start the measurement and then next few steps happen:

    1. 7 seconds voltage output across SE & CE in 0.3V, but NOT collecting Data from AFE 

    2. 23 seconds voltage output across SE & CE in 0.3V, and collecting Data from AFE at the same time

    The whole point of doing this is to investigate if this is a way to solve the discharging phase after overcurrent from 0.9V/RTIA current limit as the attached plots in the post.

    Please let me know if there is any code that I have to modify, or there is other way to solve the discharging phase. I think we are not the only ones having this issue.

Children