Post Go back to editing

pH and conductivity on a EVAL-AD5940ELCZ (AD5940 chip)

Dear Support,

I'm using with success the CN0428 Water Quality Measurement System with your evaluation software: it's great!

Now, for the project I'm developing I will prefer the AD5940 component to be used with a companion MCU. I've downloaded from your ftp server the examples pack related to the EVAL-AD5940ELCZ, they are very easy to understand and to implement, but I have not been able to find any example regarding the measurement of pH and conductivity, although the BNC suitable for this is present on the board.

Now, since the porting of your examples from ADuCM355 (CN0428) to the EVAL-AD5940ELCZ is not so fast, I wonder if you can provide me with the example code to carry out these measurements on the EVAL-AD5940ELCZ board in an easy and fast way to validate the product.


Stefano T

privacy hint
[edited by: Stefano T at 8:38 AM (GMT 0) on 28 Nov 2019]

Top Replies

Parents Reply Children
  • Hi Akila, what do you mean by taking reference? Could you possibly elaborate more on how to set up the AD5941 to do PH measurement.

    I am working with a EVAL-AD5941ELCZ board. 

    I have tried taking the output from the High Z Channel. Which is connected to AFE4 to the ADC. But the results were very unpredictable and did not seem correct.

    I have also tried setting up a sequencer and FIFO for doing the reading but again the results were unpredictable.

    Please could you give some guidance on how to move forward. 

  • Hi,

    AD5940 and ADuCM355 have same analog front end, same library files and functions . (Only difference is ADuCM355 has built in cortex M3 processor).

    Below water quality measurement example explains pH, ORP and conductivity measurements taken by ADuCM355: 

    aducm355-examples/examples/ApplicationExamples/M355_WaterQuality at master · analogdevicesinc/aducm355-examples (

    The above example does EIS measurements for calculating pH and conductivity of water. 

    AD5940_EIS example is available in Github: ad5940-examples/examples/AD5940_ECSns_EIS at master · analogdevicesinc/ad5940-examples (

    In case you are opting for CN0428:

    GUI for CN0428:

    Below are the EIS outputs obtained with loads= resistors mentioned:


    Console output:

    Please wait for sensor startup and initialization:


    Sensor in site 1: 0x04 initialization error. Address 0x0A!

    Water Quality Sensor in site 2 initialized successfully. Address 0x0B!

    Sensor in site 3: 0x04 initialization error. Address 0x0C!

    Water Quality Sensor in site 4 initialized successfully. Address 0x0D!


    Sensor Site: 2!


    Available commands:

    help                   - Display available commands

    sensortype <type>      - Change the type of sensor that is connected (default:pH).

                              <type> = ph, conductivity, orp

    measuretemp            - Measure and print current temperature value

    measuresensor          - Make sensor measurement for configured sensor (pH, conductivity, orp)

    measureeis             - Perform EIS sweep on sensor and estimate sensor health

                              add optional argument bode to print bode instead of nyquist plot

    printhealth            - Print sensor health value from last EIS measurement

    printtemp              - Print temperature without updating (i.e., temp of last sensor meas)

    printconfig            - Print configuration (sensortype, hizmode, temperature enabled)

    printserialnumber      - Print ADuCM355 unique ID (can be used to store calibrations)

    enabletemp <en>        - Enable/disable temperature sensor channel.

                              <en> = 1 to <en> = 0 to disable

    enablehizmode <en>     - Enable/disable high-impedance TIA. Ensure S2 matches this setting

                              <en> = 1 to <en> = 0 to disable

    setmineisfreq <freq>   - Set minimum frequency for eis measurement

    setmaxeisfreq <freq>   - Set minimum frequency for eis measurement

                              <freq> = 0.1 to 200000 or full to set to full range

    renamesensor <name>    - Rename the sensor.

                              <name> = new name (<16 characters)

    switchsensor <site>    - Switch to sensor board at <site>.

                              <site> = 1, 2, 3, 4. Channel num of the sensor board to switch to


    Switching to site 4

    Unknown command!


    Min EIS Frequency set to 5.00 Hz


    Max EIS Frequency set to 5000.00 Hz


    Starting EIS Measurement. This will take about 30 seconds.

    Impedance Result:













    Min EIS Frequency set to 0.10 Hz


    Max EIS Frequency set to 500.00 Hz


    Starting EIS Measurement. This will take about 30 seconds.

    Impedance Result:
















    Note: Measurement at 50Hz (49.9934 Hz) is ignored (power supply rejection).