Post Go back to editing

Voltage measurement (OCP, open circuit potential) using the AD5940 resp. ADuCM355

Hello,

we would like to use the ADC5940 respectively the ADUCM355 for voltage measurements (OCP, open circuit voltage) on an electrochemical sensor. Concerning this issue, two questions occurred. I guess ADC5940 and ADUCM355 are somehow similar.

1)We want to make a shortcut between the pins CE0 and RE0 and then measuring the voltage between CE0/RE0 and WE0 (OCP). Is it possible to measure that voltage by setting the MUXSELP-bits of the ADCCON-register to 01110 (page 70, ADuCM355 Hardware Reference Manual, https://www.analog.com/media/en/technical-documentation/user-guides/ADuCM355-Hardware-Reference-Manual-UG-1262.pdf respectivley page 61, AD5940 datasheet, https://www.analog.com/media/en/technical-documentation/data-sheets/AD5940-5941.pdf)

2) Which magnitude would be the referring input impedance?

Kind regards

Parents
  • Hi,

    AD5940 is similar with ADuCM355, the difference is ADuCM355 has a cortex-m3 MCU inside.

    1. You need to set MUXP and MUXN to the differential voltage you want to measure. For example, set MUXP to pin CE0 and MUXN to SE0 to measure the voltage between CE0 and SE0.

    2. There is no input impedance parameter in datasheet, but has a input current. Please check Table 1, ADC INPUT section.

    Regards,

    Neo

  • Hello,

    I am also interested to perform an OCP with the AD5940. In the documentation, there is no SE0 available from MUXN. According to the documentation, MUXN can be configured through the register ADCCON, bits [12:8] (MUXSELN). Here is an extract of page 61 / 134 (Rev C).

    The MUXSELP can be connected to any of pins RE0, CE0, SE0, DE0 though.

    Is there any way to measure potential between SE0 end RE0?

    Thank you.

    Best regards,

  • Hi,

    There are many ways to measure voltage across SE0 and RE0.

    One way:-

    1) Connect the two terminals of your load to AIN2 and IN3 respectively and measure the voltage across them,

    AD5940_ADCMuxCfgS(ADCMUXP_AIN3, ADCMUXN_AIN2);

    AD5940_AFECtrlS(AFECTRL_ADCPWR|AFECTRL_SINC2NOTCH, bTRUE);
    AD5940_Delay10us(16*25);
    AD5940_AFECtrlS(AFECTRL_ADCCNV, bTRUE); /* Start ADC convert*/
    AD5940_Delay10us(WaitClks);

    while (!(AD5940_INTCTestFlag(AFEINTC_1, AFEINTSRC_SINC2RDY)));

    AD5940_INTCClrFlag(AFEINTSRC_SINC2RDY);
    afeResult = AD5940_ReadAfeResult(AFERESULT_SINC2);
    AD5940_AFECtrlS(AFECTRL_ADCPWR|AFECTRL_ADCCNV|AFECTRL_SINC2NOTCH, bFALSE); /* Stop ADC */

    measured_voltage = AD5940_ADCCode2Volt(afeResult&0xffff, ADCPGA_1, 1.82);

    another way:

    1) Measure voltage of SE0 w.r.t. VERO0, (AD5940_ADCMuxCfgS (ADCMUXP_VSE0 ,ADCMUXN_VZERO0);)

    2)Measure voltage of RE0 w.r.t. VZERO0, (AD5940_ADCMuxCfgS (ADCMUXP_VRE0 ,ADCMUXN_VZERO0);)

    3) Subtract (1) from (2). 

  • Hi Akila, 

    I used the method you described above where I shorted SE0 and RE0 to AIN0 and AIN2 Respectively and then took those inputs to ADCMUXP and ADCMUXN the result looked as if the voltage was floating and I could not get a stable reading or anything close to what reading the physical pins with a multimeter would show. 

    Do you perhaps know what could be causing this and how I might be able to proceed? 

  • Hi,

    For quickly resolving this issue, kindly use the code available here:

    https://github.com/IMTEK-FreiStat/FreiStat-Framework/blob/main/src/electrochemical_methods/setup_behavior/setup_OCP/setup_OCP.cpp

    In this code.

    switch configuration is:

    LpAmpCfg.LpTiaSW = LPTIASW(8) | LPTIASW(4); 

    which means,

    - SW6 connects -ve input of PA to +ve input of LPTIA

    - SW7 connects -ve input of LPTIA to SE0 via RLoad

    - All other switches are left open.

    Hence by this configuration,

    - By the transfer function of a -ve feedback amplifier:

            

    Here, the amplifier is LPTIA,

    Rf = RTIA (feeback resistor of LPTIA whose value can be set in code)

    Rg = Rload 

    +IN - -IN in the above diagram = VRE0 -VSE0

    Hence open circuit potential across RE0 and SE0  = Vin = Vout * (-Rload/Rtia)

    For you reference:  (1) AD5941 Potentiometry Basic Example and OCP Basic Example - Q&A - Precision ADCs - EngineerZone (analog.com)

  • Hi ,

    I am afraid that the code you provided is not working, I'm always getting an ADC Code equal to 65272. I've checking the code for a while now and I cannot find the issue... They have this OCP measurement option kind of "disabled" in their framework. Not sure if it's because they know it's not working.

    They have a previous version for running potentiometry measurements:

    https://github.com/IMTEK-FreiStat/FreiStat-IoT/blob/master/Firmware/Voltammetry/RampTest.c#L1428

    But here I'm not sure if they're actually making use of the LPTIA as a voltage follower/amplifier or just getting the inputs directly to the ADC MUX without considering the op-amp output as they do:

        dsp_cfg.ADCBaseCfg.ADCMuxN = ADCMUXN_LPTIA0_N; //LPTIA0 negative input node --> routes to SE0 (see Fig 23 in datasheet)
        dsp_cfg.ADCBaseCfg.ADCMuxP = ADCMUXP_VRE0;     //Pin RE0

    Thanks again for your kind and useful responses!

  • Hi,

             LPTIA is typically not used in OCP measurements. Inputs are directly read by ADC MUX and OCP is measured.

              LPTIA is used mainly for current measurements, not voltage measurement.

             In the above example. LPTIA is used only to make use of RTIA and Rload for gain purpose.

            I am not sure where you saw the "OCP disabled" comment in the previous code shared.

           

  • Hi ,

    Let me expose the several issues here in some sort of order:

    1. I want to implement a solution for connecting to my sensors which, best case scenario, show a resistance in the order of 200 kΩ. Thus, I would need a high input impedance from the AFE side (using a suitable internal op-amp would be ideal). It would be as if I wanted to measure a pH level. However, if I could use an internal op-amp (LPTIA or other) instead of an external one (Figure 58, pg 132 of datasheet) would be optimal.
    2. In their first version of the Framework they use `ADCMUXN_LPTIA0_N` and `ADCMUXP_VRE0`. Therefore, they use the negative input node to the LPTIA and the voltage in RE0 pin, respectively, as the ADC MUX inputs. With this configuration, I understand they're not using the LPTIA as a voltage follower/amplifier, and inputs are read by ADC MUX directly to measure OCP. Then, I guess the only op-amps involved in the process are the ones in the front-end buffer before the ADC itself.
    3. I would like to have a bit more information about those op-amps in the front-end buffer because if they provide enough input impedance for my purposes, the implementation would be far easier.
    4. In their second version of the Framework they use `ADCMUXN_LPTIA0_N` and `ADCMUXP_LPTIA0_P`, instead. That is, LPTIA0 OUTPUT instead of the voltage in RE0 as the ADC MUX +IN. In this case, they're indeed trying to use the LPTIA to some extent for sure as they have LPTIA -IN and +OUT as the ADC MUX inputs.
    5. In the case of them using the LPTIA for gain purposes, wouldn't it be far easier to use the PGA in the ADC instead?
    6. Furthermore, what I meant with the "disabled OCP" capabilities regarding this second version is that they have several files where the OCP implementation is marked as 'TODO' or is not mentioned at all:
      1. OCP is not mentioned in their file for display+buttons interface
      2. OCP is marked as 'TODO (Hardware restriction)' in their file for examples via their python implementation layer
      3. They have the OCP disabled in their `constants` file
      4. OCP is not optimised because it's not working (TODO)
      5. And TODO again in the file for execution methods via python layer

    After all this background work, my final query would be:

    I need a high input impedance (such as the one you would need for reading a pH level), but I would need no gain when measuring OCP in my case. Therefore, may I use the LPTIA as a voltage follower with the `ADCMUXN_LPTIA0_N` and `ADCMUXP_LPTIA0_P` ADC MUX inputs as they seem to make sense? How could I implement it using the SE0 and RE0 pins as the ones connected to my sensor (as the solution provided by this second version of the Framework does seem to fail)?

    I'm sorry for all the plethora of text, but I really appreciate your comments and suggestions , they're extremely useful and really help us to understand the chip in depth.

  • Hi,

    1)I would like to have information about front-end buffer before the ADC.

    The ADC pre-stage channel has input mux, front-end buffers, offset cancellation buffers (aux-buffers), a single end to differential conversion stage, passive 3rd order AAF filter, and adc buffers. ADCBUFCON register controls enabling/disabling of these blocks.

               The input buffers have very high input impedance with typical leakage current within +/- 0.5nA (max and min values of leakage current are given in datasheet.

    2) Wouldn't it be far easier to use the PGA in the ADC instead? Rload and RTIA offer more flexible gain options compared to the fixed number of PGA gain options.

    3) If you are using LPTIA as a voltage follower, then voltage at `ADCMUXP_LPTIA0_P` is equal to voltage at `ADCMUXN_LPTIA0_N`.

          If LPTIA is to be used with -ve feedback, Rload and RTIA come into picture.

          If no Vout/Vin ratio is required, you may just connect SE0 and RE0 as ADC mux inputs and read the output.

Reply
  • Hi,

    1)I would like to have information about front-end buffer before the ADC.

    The ADC pre-stage channel has input mux, front-end buffers, offset cancellation buffers (aux-buffers), a single end to differential conversion stage, passive 3rd order AAF filter, and adc buffers. ADCBUFCON register controls enabling/disabling of these blocks.

               The input buffers have very high input impedance with typical leakage current within +/- 0.5nA (max and min values of leakage current are given in datasheet.

    2) Wouldn't it be far easier to use the PGA in the ADC instead? Rload and RTIA offer more flexible gain options compared to the fixed number of PGA gain options.

    3) If you are using LPTIA as a voltage follower, then voltage at `ADCMUXP_LPTIA0_P` is equal to voltage at `ADCMUXN_LPTIA0_N`.

          If LPTIA is to be used with -ve feedback, Rload and RTIA come into picture.

          If no Vout/Vin ratio is required, you may just connect SE0 and RE0 as ADC mux inputs and read the output.

Children
  • Hi  ,

    Again, thank you very much for your time and valuable replies.

    I see... Then the input front-end buffers should be enough for my purposes (200 kOhm), right (each one of the ADC MUX inputs is going through one of the two buffers)?

    Moreover (sorry), could you also address the following issues as well, please?

    • Issue (2) of my previous query. Were they using `ADCMUXN_LPTIA0_N` and `ADCMUXP_VRE0` as ADC MUX inputs directly without passing through the LPTIA?
      In their first version of the Framework they use `ADCMUXN_LPTIA0_N` and `ADCMUXP_VRE0`. Therefore, they use the negative input node to the LPTIA and the voltage in RE0 pin, respectively, as the ADC MUX inputs. With this configuration, I understand they're not using the LPTIA as a voltage follower/amplifier, and inputs are read by ADC MUX directly to measure OCP. Then, I guess the only op-amps involved in the process are the ones in the front-end buffer before the ADC itself.
    • I've just realised that, from what you said in (3), when `ADCMUXP_LPTIA0_P` equals `ADCMUXN_LPTIA0_N`, it's highly likely that's the reason why I was getting max ADC code, right (max code kind of equalling ADC Code = 0)?
      I am afraid that the code you provided is not working, I'm always getting an ADC Code equal to 65272

      Thanks a lot for all the help you provide, it's really useful.