Post Go back to editing

Square Wave

Category: Software
Product Number: AD5941
Software Version: @version: $Revision: 766 $

Dear Sir/Madam,

I've been comparing AD5940 Square Wave Voltammetry measurement results to other commercial potentiostats and am not receiving the same results. I would like to clarify these questions I have:

When I use oscilloscope to detect the output signal between WE (work electrode) and RE (Reference electrode). I have attached the signal and configure square wave signal. No matter how the RampeakVolt value changes, the start and end point of the signal at the inverse of RamStartVolt. I want to signal output look like the 3rd picture. (I couldn't take pictures of the waves so I drew a description).

Hope to hear from you soon. 

Best regards.

 

  • Hi  ,

    Can your team please help look into this?

    Thanks,
    Janine

  • HI,

       Your SqrWvAmplitude is 200mV. Hence each jump is of 200mV amplitude.

    Could you check with a smaller SqrWvAmplitude?

  • I don't understand why the VzeroStart and VzeroPeak values are needed. I read about Square Wave in AN-1563, I see there is no content talking about VzeroStar and VzeroPeak.
    Looking forward to an explanation of those two values in the code and what effect they have on the stat and end points of the signal.
    /**
    * @brief Calculate DAC code step by step.
    * @details The calculation is based on following variables.
    *          - RampStartVolt
    *          - RampPeakVolt
    *          - VzeroStart
    *          - VzeroPeak
    *          - StepNumber
    *          Below variables must be initialzed before call this function. It's done in function @ref AppSWVInit
    *          - RampState
    *          - CurrStepPos
    *          - bDACCodeInc
    *          - CurrRampCode
    * @return return error code.
    */
    static AD5940Err RampDacRegUpdate(uint32_t *pDACData)
    {
      uint32_t VbiasCode, VzeroCode;
     
      if (AppSWVCfg.bRampOneDir)
      {
      if(AppSWVCfg.RampStartVolt > AppSWVCfg.RampPeakVolt)
        AppSWVCfg.bDACCodeInc = bFALSE;
        switch(AppSWVCfg.RampState)
        {
        case SWV_STATE0: /* Begin of Ramp  */
          AppSWVCfg.CurrVzeroCode = (uint32_t)((AppSWVCfg.VzeroStart - 200.0f)/DAC6BITVOLT_1LSB);
          AppSWVCfg.RampState = SWV_STATE1;
          break;
        case SWV_STATE1:
          if(AppSWVCfg.CurrStepPos >= AppSWVCfg.StepNumber/2)
          {
            AppSWVCfg.RampState = SWV_STATE2;   /* Enter State2 */
            AppSWVCfg.CurrVzeroCode = (uint32_t)((AppSWVCfg.VzeroPeak - 200.0f)/DAC6BITVOLT_1LSB);
          }
          break;
        case SWV_STATE2:
          if(AppSWVCfg.CurrStepPos >= AppSWVCfg.StepNumber)
            AppSWVCfg.RampState = SWV_STOP;     /* Enter Stop */
          break;
        case SWV_STOP:
          break;
        }
      }
     
      else
      {
        switch(AppSWVCfg.RampState)
        {
        case SWV_STATE0: /* Begin of Ramp  */
          AppSWVCfg.CurrVzeroCode = (uint32_t)((AppSWVCfg.VzeroStart - 200.0f)/DAC6BITVOLT_1LSB);
          AppSWVCfg.RampState = SWV_STATE1;
          break;
         
        case SWV_STATE1:
          if(AppSWVCfg.CurrStepPos >= AppSWVCfg.StepNumber/4)
          {
            AppSWVCfg.RampState = SWV_STATE2;   /* Enter State2 */
            AppSWVCfg.CurrVzeroCode = (uint32_t)((AppSWVCfg.VzeroPeak - 200.0f)/DAC6BITVOLT_1LSB);
          }
          break;
         
        case SWV_STATE2:
          if(AppSWVCfg.CurrStepPos >= (AppSWVCfg.StepNumber*2)/4)
          {
            AppSWVCfg.RampState = SWV_STATE3;   /* Enter State2 */
            AppSWVCfg.bDACCodeInc = AppSWVCfg.bDACCodeInc ? bFALSE : bTRUE;
          }
          break;
        case SWV_STATE3:
          if(AppSWVCfg.CurrStepPos >= (AppSWVCfg.StepNumber*3)/4)
          {
            AppSWVCfg.RampState = SWV_STATE4;   /* Enter State2 */
            AppSWVCfg.CurrVzeroCode = (uint32_t)((AppSWVCfg.VzeroPeak - 200.0f)/DAC6BITVOLT_1LSB);
          }
          break;    
        case SWV_STATE4:
          if(AppSWVCfg.CurrStepPos >= (AppSWVCfg.StepNumber))
            AppSWVCfg.RampState = SWV_STOP;     /* Enter Stop */
          break;
        case SWV_STOP:
          break;
        }
       
      }
  • SWV start voltage = RampStartVolt + VzeroStart

    SWV end volatge = RampPeakVolt + VzeroPeak

  • For getting positive ramp, you config :

    pRampCfg->bRampOneDir = bTRUE;//bTRUE;
    But the results are not as expected, how do I configure the parameters of the square wave?
    Hope to hearing from you soon. 
  • Square wave parameters are configured here:

    You may capture the square wave by monitoring (VCE0 - VSE0) voltage using oscilloscope to check if excitation is as expected.