Post Go back to editing

AD5940: SWV ADC saturation?

Category: Hardware
Product Number: AD5940

Hi, 

I'm having issues with SWV current output saturating (not outputting values > 9.999).

For example, if i > 9.99 the value's decimal point shifts (i.e. 10.23 becomes 1.023). Why could this be happening? The waveform looks something like this :

 \

Here is my code:

pRampCfg->SeqStartAddr = 0x10; /* leave 16 commands for LFOSC calibration. */
pRampCfg->MaxSeqLen = 1024 - 0x10; /* 4kB/4 = 1024 * OMEED CHANGED BACK*/
pRampCfg->RcalVal = 10000.0; /* 10kOhm RCAL*/
pRampCfg->ADCRefVolt = 1820.0f; /* The real ADC reference voltage. Measure it from capacitor C12 with DMM. */
pRampCfg->FifoThresh = 1; /* Maximum value is 2kB/4-1 = 512-1. Set it to higher value to save power. original 480 */
pRampCfg->SysClkFreq = 16000000.0f; /* System clock is 16MHz by default */
pRampCfg->LFOSCClkFreq = LFOSCFreq; /* LFOSC frequency */
pRampCfg->AdcPgaGain = ADCPGA_1P5;
pRampCfg->ADCSinc3Osr = ADCSINC3OSR_4; //OMEED ADDED BACK

/* Step 2:Configure square wave signal parameters */
pRampCfg->RampStartVolt = 0.0f; /* -1.4V */
pRampCfg->RampPeakVolt = 600.0f; /* -0.1V */
pRampCfg->VzeroStart = 1300.0f; /* 1.3V */
pRampCfg->VzeroPeak = 1300.0f; /* 1.3V */
pRampCfg->Frequency = 25; /* Frequency of square wave in Hz */
pRampCfg->SqrWvAmplitude = 50; /* Amplitude of square wave in mV */
pRampCfg->SqrWvRampIncrement = 4; /* Increment in mV*/
pRampCfg->SampleDelay = 2.0f; /* 10ms. Time between update DAC and ADC sample. Unit is ms. */
pRampCfg->LPTIARtiaSel = LPTIARTIA_1K; /* Maximum current decides RTIA value */
pRampCfg->bRampOneDir = bTRUE;//bTRUE; /* Only Measure Ramp in One Direction leave as true - omeed */
pRampCfg->floor = 0;



Added the product number to the subject field
[edited by: JEstayo at 1:38 AM (GMT -5) on 4 Mar 2024]
  • Hi  ,

    We'll contact the product owner and get back to you.

    Regards,
    Jo

  • Hi,

    ADC differential input = input current * RTIA

     Allowed input voltage range of ADC = -0.9V to 0.9V (for PGA gain =1)

     If input exceeds above range, measurement starts to deviate from correct value and saturates.

  • Hi Akila,

    Maybe you can help me understand how to optimize the SWV parameters. Optimizing the firmware to execute SWV at various settings has been tricky. 

    This is the output I am getting currently more or less with the settings I have attached below. The sensitivity (as adjusted by the gain) seemingly should be in accordance with this SWV waveform shown from PSTrace (PalmSens) and the rest of the settings are the same. What is going wrong here? Any advice? Thanks.

    void AD5940RampStructInit(void) {

    AppSWVCfg_Type *pRampCfg;

    AppSWVGetCfg(&pRampCfg);

    /* Step1: configure general parameters */

    pRampCfg->SeqStartAddr = 0x10; /* leave 16 commands for LFOSC calibration. */

    pRampCfg->MaxSeqLen = 1024 - 0x10; /* 4kB/4 = 1024 * OMEED CHANGED BACK*/

    pRampCfg->RcalVal = 10000.0; /* 10kOhm RCAL*/

    pRampCfg->ADCRefVolt = 1820.0f; /* The real ADC reference voltage. Measure it from capacitor C12 with DMM. */

    pRampCfg->FifoThresh = 1; /* Maximum value is 2kB/4-1 = 512-1. Set it to higher value to save power. original 480 */

    pRampCfg->SysClkFreq = 16000000.0f; /* System clock is 16MHz by default */

    pRampCfg->LFOSCClkFreq = LFOSCFreq; /* LFOSC frequency */

    pRampCfg->AdcPgaGain = ADCPGA_1P5;

    pRampCfg->ADCSinc3Osr = ADCSINC3OSR_4; //OMEED ADDED BACK

    /* Step 2:Configure square wave signal parameters */

    pRampCfg->RampStartVolt = 0.0f; /* -1.4V */

    pRampCfg->RampPeakVolt = 500.0f; /* -0.1V */

    pRampCfg->VzeroStart = 1300.0f; /* 1.3V */

    pRampCfg->VzeroPeak = 1300.0f; /* 1.3V */

    pRampCfg->Frequency = 25; /* Frequency of square wave in Hz */

    pRampCfg->SqrWvAmplitude = 25; /* Amplitude of square wave in mV */

    pRampCfg->SqrWvRampIncrement = 4; /* Increment in mV*/

    pRampCfg->SampleDelay = 2.0f; /* 10ms. Time between update DAC and ADC sample. Unit is ms. */

    pRampCfg->LPTIARtiaSel = LPTIARTIA_64K; /* Maximum current decides RTIA value */

    pRampCfg->bRampOneDir = bTRUE;//bTRUE; /* Only Measure Ramp in One Direction leave as true - omeed */

    pRampCfg->floor = 0;

    }

  • Hi,

    Limiting of maximum input current is done by tuning pRampCfg->LPTIARtiaSel.

     By default, it is LPTIARTIA_1K,

    You may change this parameter and check if saturation occurs.

  • Hi,

    As you can see in my code, I am using an TIA gain of 64k  and still getting no response. 

  • Hi, 

    As mentioned above, have you changed LPTIARtiaSel to different values and checked?