Post Go back to editing

outputting the voltage in the Ramp code for Cyclic Voltammetry

Hi there,

I'm now using the Ramp example code to do CV - it's working as expected. However, I'm trying to modify the code to output the voltage associated with each current in addition to the current (like how you can see the Voltage in SensorPal). But I'm not sure exactly how to derive the voltage value. Of course I can infer it from the parameters I set, but I'd like to be able to read it directly from the firmware to verify the assumptions I'm making about the Vzero values. I thought maybe I could use the AD5940_ADCCode2Volt function somehow, but I'm not sure how. Does anyone else have an idea how to do this?

Thank you!

  • Hi,

    If you capture for a long duration, you will get both the upward and downward phases:

    Also, you may modify the lines as below:

    wupt_cfg.SeqxWakeupTime[SEQID_2] = (uint32_t)(2*(AppRAMPCfg.LFOSCClkFreq * AppRAMPCfg.SampleDelay / 1000.0f)) - 4 - 2;
    wupt_cfg.SeqxSleepTime[SEQID_0] = 4;
    wupt_cfg.SeqxWakeupTime[SEQID_0] = (uint32_t)(2*(AppRAMPCfg.LFOSCClkFreq * (AppRAMPCfg.RampDuration / AppRAMPCfg.StepNumber - AppRAMPCfg.SampleDelay) / 1000.0f)) - 4 - 2;

  • Hi Akila,

    We tried this and It still doesn't seem to yield what we're expecting. In the graph above, what parameters did you use for the CV run, so I can try to replicate your graph exactly?

    thanks and happy holidays!