Post Go back to editing

ADUCM355 CV and SWV behave differently when external Rtia is selected

Hello,

I have been testing both the Cyclic Voltammetry and Square Wave Voltammetry codes lately. I have noticed that for both codes, the desired ramps are generated and can be seen in the oscilloscope (voltage between shorted CE-RE and WE).

However, when I modify the code to:

pRampCfg->LPTIARtiaSel = LPTIARTIA_OPEN; 

to use an external resistor, the CV code is producing the desired ramps, but in the case of SWV it is either generating a constant -1 V voltage, a constant 0 V voltage or the desired ramp (between -0.5 V and 0.5 V). The initial voltage just after pushing the reset button on the board is around -1.25 V in all cases and lasts around 1 second before the oscilloscope displays one of the aforementioned voltages. Please see the figures below.

-1 V constant value

0 V constant value

Desired ramp

Do you know why it is behaving like this?

Thank you,

Jimar.

  • Hi Akila,

    Thank you for your response. 

    Yes, the external RTIA is connected across RC0_0 and RC0_1. It is working well for the CV example.

    Then I check LPTIACON0 bits before selecting the switches. The value is 17408 which equals to 100010000000000. Hence bits[9:5] are cleared.

    To end with the right switches are selected, same as seen in the example:

    if(AppSWVCfg.LPTIARtiaSel == LPTIARTIA_OPEN) /* User want to use external RTIA */
    lploop_cfg.LpAmpCfg.LpTiaSW = /*LPTIASW(13)|*/LPTIASW(2)|LPTIASW(4)|LPTIASW(5)|LPTIASW(9)/*|LPTIASW(10)*/; /* SW5/9 is closed to support external RTIA resistor */

    However, I am not seeing the ramp being applied in all attempts. I suspect there may be a bug in the code for the LPTIARTIA_OPEN option.

    Note: the reason I think there may be a bug is also because I see the ramp being generated in all cases if I add the bolded line.

    if(AppSWVCfg.LPTIARtiaSel == LPTIARTIA_OPEN) /* Internal RTIA is opened. User wants to use external RTIA resistor */
    {
    AppSWVRtiaCal();
    AppSWVCfg.RtiaValue.Magnitude = AppSWVCfg.ExternalRtiaValue;
    AppSWVCfg.RtiaValue.Phase = 0;

    }

    I know what I did is wrong, but since I was seeing the ramp in all cases when internal RTIA was selected which means AppSWVRtiaCal is performed, I wanted to see if the presence of AppSWVRtiaCal that had any effect on ramp generation, and it does.

    Thank you.

  • Hi,

    AppSWVRtiaCal() function is not supposed to have any effect when 

    LpTiaRtia == LPTIARTIA_OPEN

    because inside AD5940_LPRtiaCal():

    if(pCalCfg->LpTiaRtia == LPTIARTIA_OPEN)
    return AD5940ERR_PARA; /* Not supported now. By setting RTIA to open and set corresponding switches can calibrate external RTIA */

  • Hi Akila,

    Let me re type the issue so it can be understood better. My first post was sent some months ago plus you guys have to deal with lots of new information everyday so it is better to keep things simple for now Slight smile

    1. ADI provides CV and SWV codes in Github.
    2. CV code generates the predefined ramp for both internal RTIA and external RTIA (LPTIARTIA_OPEN).
    3. SWV code generates the predefined ramp for internal RTIA. For external RTIA (LPTIARTIA_OPEN) it does NOT generate the predefine ramp more often than it does.
    4. All the steps you mention in your post from March 11 are done and the problem still persists.
    5. I suspect there may be a bug in the SWV code ADI provides.

    Thank you.

  • Hi, 

    May I know if you have set the correct resistor value to

    AppSWVCfg.ExternalRtiaValue in SquareWaveVoltammetry.c?

  • Yes.

    The value is actually set in this added line:

    pRampCfg->ExternalRtiaValue = 10020000.0;

    in AD5940RampStructInit function, where application parameters are set

  • Hi,

    With LPTIARTIA_OPEN and external RTIA = 1KOhms, I am getting ramp:

    With internal RTIA = 1KOhms, I am getting almost the same ramp (slight difference due to the external resistor connection)

  • With internal RTIA I can get the ramp in all occasions. With external RTIA I can get the ramp, but not in all occasions (around 5 times out of 20 last time I tried).

    Did you make one single measurement to get the ramp with external RTIA? 

    Thank you.

  • This last time I used RTIA=1kOhms.

  • Hi,

    I repeated the measurement with external RTIA 10 times and got the same ramp all the time.