The most recent version of this page is a draft.DiffThis version (29 Jul 2021 09:13) was approved by Harvey John De Chavez.The Previously approved version (03 Jan 2021 21:55) is available.Diff

This is an old revision of the document!

CN0359 Conductivity Measurement System User Guide


Completely self-contained, microprocessor controlled, highly accurate conductivity measurement system ideal for measuring the ionic content of liquids, water quality analysis, industrial quality control, and chemical analysis.

A carefully selected combination of precision signal conditioning components yields an accuracy of better than 0.3% over a conductivity range of 0.1 μS to 10 S (10 MΩ to 0.1 Ω) with no calibration requirements.

Automatic detection is provided for either 100 Ω or 1000 Ω platinum (Pt) resistance temperature devices (RTDs), allowing the conductivity measurement to be referenced to 25°C.

The system accommodates 2- or 4-wire conductivity cells, and 2-, 3-, or 4-wire RTDs for added accuracy and flexibility.

Hardware Connections

The following sections will describe the hardware in more detail.

The CN0359 have 5 connectors:

  • J1 for power supply
  • J2 for RS-485 communication
  • J3 for RTD temperature sensor
  • J4 for JTAG/SWD debug
  • J5 for conductivity sensor

To evaluate the full function of CN0359, you need following equipment:

  • EVAL-CN0359-EB1Z evaluation board
  • EVAL-CFTL-6V-PWRZ 6V DC wall connector
  • 2-wire and 4-wire conductivity cells
  • 2-wire and 3-wire and 4-wire PT100 and PT1000 RTDs
  • A PC with Microsoft Windows 7 or later OS and USB 2.0 or faster USB port
  • A USB to RS-485 convert cable

To reprogram or debug CN0359, you need following extra equipment

  • J-link debug cable or equivalent JTAG/SWD debug cable

RTD Connections

The CN0359 can support PT100 and PT1000 type of RTD sensors connected in 2-wire or 3-wire or 4-wire mode. The RTD type and connection mode is automatically detect by software. The RTD temperature sensor on the EVAL-CN0359-EB1Z should be connected to header J3.

The J3 pin map is following:

Pin Number Signal Name Pin Description
Pin 1 I(+) Source Excitation Current
Pin 2 V(+) High Voltage Potential Output
Pin 3 V(-) Low Voltage Potential Output
Pin 4 I(-) Sink Excitation Current

The I signal inject the constant excitation current into RTD, the V signal output will be sample by ADC to measure, the connections for different wire mode please reference following picture.

RTD 4-wire connection

RTD 3-wire connection

RTD 2-wire connection

Conductivity Sensor Connections

The CN0359 support both 2-electrode and 4-electrode conductivity sensor. The conductivity sensor connect to J5 of the EVAL-CN0359-EB1Z.

The J5 pin map is following:

Pin Number Signal Name Pin Description
Pin 1 I(+) Source Excitation Current
Pin 2 V(+) High Voltage Potential Output
Pin 3 V(-) Low Voltage Potential Output
Pin 4 I(-) Sink Excitation Current
Pin 5 GND Ground
The EVAL-CN0359-EB1Z board error specification is +/- 0.3% under conductivity range: 0.1 μS to 10 S (10 MΩ to 0.1 Ω) condition, if the conductivity range you are using is out of specification, extra error will be introduced.

The connections for different sensor please reference following picture:

2-electrode conductivity sensor connection

If using 2-electrode sensors connected to CN0359
  • pin1 ⇔ pin2 of J5 MUST be shorted
  • pin3 ⇔ pin4 of J5 MUST be shorted

4-electrode conductivity sensor connection

The I signal inject the excitation current into conductivity sensor, after the amplifier the I and V signal will be sample by ADC to measure.

RS-485 interface connections

The EVAL-CN0359-EB1Z J2 is RS-485 connector.

The J2 pin map is following:

Pin Number Signal Name Pin Description
Pin 1 B RS-485 B Signal
Pin 2 GND Ground
Pin 3 A RS-485 A Signal
The CN0359 software support up to 254 (RS-485 address from 1 to 254) boards connected to one RS-485 network, but for the noise performance the RS-485 terminal resistor R10 on EVAL-CN0359-EB1Z PCB is set to 10kΩ, if you want to use multiply devices on same RS-485 network maybe you need to change or remove R10 to following the RS-485 standard, for more detail about RS-485 network please reference or ANSI/TIA/EIA-485 standard

RS-485 pin map

JTAG/SWD connections

The EVAL-CN0359-EB1Z J4 is the JTAG/SWD debug connector. This JTAG/SWD connector is pin compatible with SEGGER J-Link debug probe.

The EVAL-CN0359-EB1Z JTAG/SWD debug interface only support SWD debug mode.

Usage Instructions

The CN0359 system runs using a 6V DC wall connector (EVAL-CFTL-6V-PWRZ) and will run automatically when the power on. The system has two interfaces to show the conductivity and RTD results: LCD screen and RS-485 interface, and those two interfaces can working simultaneously as well.

The CN0359 usage is depend on the software version, maybe there have difference between following instructions and shipped CN0359, please check cn0359-DesignSupport for latest software update download

The CN0359 has the following opinions which can be set by the user:

  • Excitation voltage
  • Excitation frequency
  • Track-hold setup time
  • Track-hold hold time
  • Temperature coefficient
  • Conductivity cell constant
  • RS-485 baud rate
  • RS-485 address
  • LCD contrast
Please check with the conductivity sensor excitation signal requirements in sensor's datasheet before connecting the sensor or changing the setting, to make sure no damage is caused by inappropriate setting.

LCD Screen and Encoder User Interface

The LCD screen can show the measurement results and settings of CN0359, user interactive with CN0359 could be done using the LCD and encoder S1.

General usage instructions

The CN0359 LCD display area have 3 status with different meaning:

  • normal status (dark font with light background) ⇒ item normal displayed
  • reverse status (light font with dark background) ⇒ item has been selected
  • blink status (keep flipping between normal status and reverse status) → item has been selected and in value chang status

The CN0359 encoder S1 can be turned clockwise or counterclockwise (no mechanical stop), and can also be used as a push button. The following is the encoder operating meaning:

  • turn clockwise at reverse status ⇒ change selection to next item.
  • turn clockwise at blink status ⇒ increase value
  • turn counterclockwise at reverse status ⇒ change selection to previous item
  • turn counterclockwise at blink status ⇒ decrease value
  • push button at reverse status ⇒ enter selected item
  • push button at blink status ⇒ exit blinked item
There have two exception dialogs:
  • home dialog ⇒ no selected item in this dialog, push button will enter setting menu
  • LCD contrast setting dialog ⇒ in case the LCD display abnormal there is no blinked item in this dialog, turn encoder clockwise/counterclockwise will increase/decrease LCD contrast, push button will return

The CN0359 have a buzzer on PCB, it will beeping when value limit reached or notify asserted.

CN0359 start up and LCD contrast

The CN0359 LCD screen contrast can be set by user, if the LCD contrast value set improper it will cause LCD display murky dull or have crosstalk, in this case user need to recover LCD contrast blindly, the following step can adjust LCD contrast blindly:

  1. power up CN0359, the CN0359 will beep for 50ms immediately, this means all setting is right, flash disk is good.
  2. the LCD should be showing the splash screen for 3s, maybe LCD show nothing or black screen if the contrast set improper, please push encoder button S1 within 3s from powering on in splash screen.
  3. the CN0359 will beeping 100ms two times, interval 100ms, this means the CN0359 entered LCD contrast setting status
  4. turning the encoder S1 clockwise/counterclockwise will increase/decrease LCD contrast, set the LCD display to clear and sharp
  5. push button S1 return to setting dialog
  6. enter “reurn to home” menu item, CN0359 LCD will display properly and contrast setting will be saved

Buzzer and Alarm

The EVAL-CN0359-EB1Z board have a buzzer U2 on it, the buzzer will beeping in the following cases:

  • notify beeping 50ms at power up
  • notify beeping 200ms when from splash screen entering home dialog
  • notify beeping 100ms twice, interval 100ms, when button pushed at splash screen, entering LCD contrast setting dialog
  • alarm beeping 50ms for 5 times, interval 50ms when startup internal error, then means all the settings restore to default value, if this error asserted, please set all the settings to requirement
  • alarm beeping 10ms at home dialog when RTD error, if this error asserted, please check RTD connection
  • alarm beeping 100ms at home dialog when conductivity sensor error, if this error asserted, please check conductivity sensor connection
  • notify beeping 10ms if encoder turned to against software limit

RS-485 Interface

The RS-485 interface can connect multi (up to 254) CN0359 in the same RS-485 network, in the following chapter the CN0359 in the RS-485 network will be called client, the PC or any type of RS-485 device who can initiate the communications will be called host. Please notice: because the CN0359 use the single duplex mode RS-485 network, so there only one device can send the data at the same time, otherwise the RS-485 network will involve into the signal conflict, this will cause unpredictable result. In usually the CN0359 RS-485 network have only one host, if you have multi host in the network, please make sure there is no conflict occur in any time.

The in the RS-485 network all the clients will keep in receive status in idle time. The client only send data when it response the right command.

The EVAL-CN0359-EB1Z board RS-485 address can only be set by LCD interface. Make sure you set the address first before trying to send RS-485 commands to the board.

RS-485 command usage

In order to use the RS-485 interface, a terminal program such as Putty or Tera Term must be used. Please check the software settings before start, to make sure the terminal program output data stream on UART line can satisfy the following command format exactly.

The CN0359 command format is following:


address command [options]


address is the integer value of CN0359 address, range from 1 to 254, the address should be issue before any command to wake corresponding CN0359 to receive command

The CN0359 RS-485 interface use char '\n' LF (Line Feed) as ending character, that means the CN0359 will response the right command immediately after received char '\n', to prevent the half duplex RS-485 signal conflict, please make sure the char '\n' is the last byte send to CN0359 in each command string. Some of serial port terminal software add '\n' char to output stream when you press return key, if the software can not append '\n' automatically please send the command string in hexadecimal format append with 0x0a.

The CN0359 use char ' ' space character as delimiter, please make sure no ' ' space character lost in command string.



poll - query setting and result




The poll command use to query the CN0359 for setting measurement result.

This example:

  100 poll

will query the address 100 of CN0359 for setting and result



setvolt - set excitation voltage


setvolt voltage


The setvolt command use to set the excitation voltage, the voltage is peak value of voltage, voltage is float type number range from 0.1 to 10

This example:

  100 setvolt 2.5

will set the address 100 of CN0359 excitation voltage to 2.5V



setfreq - set excitation frequency


setfreq frequency


The setfreq command use to set the excitation frequency, frequency is float type number range from 10 to 100000

This example:

  100 setfreq 85.6

will set the address 100 of CN0359 excitation frequency to 85.6Hz



setk - set cell constant


setk K


The setk command use to set the cell constant, K is float type number range from 0.01 to 100

This example:

  100 setk 1.268

will set the address 100 of CN0359 cell constant to 1.268/cm



setcof - set temperature coefficient


setcof coefficient


The setcof command use to set the temperature coefficient, coefficient is float type number range from -10 to 10

This example:

  100 setcof -2.58

will set the address 100 of CN0359 temperature coefficient to -2.58%/°C



setstm - set track-hold setup time


setstm time


The setstm command use to set the track-hold setup time, the time is the percentage of half excitation period, time is float type number range from 0 to 80

setup time: the time from excitation signal transient to track beginning time

This example:

  100 setcof 5.8

will set the address 100 of CN0359 track-hold setup time to 5.8% of half excitation period. If excitation frequency is 100Hz, the half of excitation period will be 5ms, track-hold setup time will be 290us



sethtm - set track-hold hold time


sethtm time


The sethtm command use to set the track-hold hold time, the time is the percentage of half excitation period, time is float type number range from 0 to 10

hold time: the time from track ending time to excitation signal transient

This example:

  100 sethtm 1.5

will set the address 100 of CN0359 track-hold hold time to 1.5% of half excitation period. If excitation frequency is 1kHz, the half of excitation period will be 500us, track-hold hold time will be 7.5us

Software Programming

In this section we are going to talk about how to program the EVAL-CN0359-EB1Z. We are also going to describe the software and how it works, so that you can change parameters to more closely fit your system requirements.

How to download binary firmware to the CN0359

The EVAL-CN0359-EB1Z evaluation board have a JTAG/SWD debug interface J4, the J4 connector is 0.1 inch pitch 20 pins male header, the header pin map compatible with SEGGER J-Links, to download binary firmware to MCU (ADuCM360) of CN0359 you need a J-Link debug probe or equivalent.

The following step will download the binary firmware to EVAL-CN0359-EB1Z evaluation board:

  1. Download latest J-Link Software and Documentation Pack to your computer hard disk
  2. Download latest CN0359 Design & Integration Files to your computer hard disk
  3. Install J-Link Software and Documentation Pack to your computer following the instructions in package
  4. Extract CN0359 Design & Integration Files to your computer hard disk
  5. Extract CN0359 source code package in CN0359 Design & Integration Files to your computer hard disk
  6. Find the “CN0359.bin” binary file in CN0359 source code package, usually it in: “x:\yyy\CN0359\Release\CN0359.bin”, x is your disk driver, yyy is the path of CN0359 source code package, remembers the path for later use
  7. Connect J-Link debug probe to the USB port of your computer and EVAL-CN0359-EB1Z evaluation board J4
  8. Power on EVAL-CN0359-EB1Z evaluation board
  9. Open J-Link from command line
        SEGGER J-Link Commander V6.00i (Compiled Sep  2 2016 19:25:27)
        DLL version V6.00i, compiled Sep  2 2016 19:25:12
        Connecting to J-Link via USB...O.K.
        Firmware: J-Link ARM V8 compiled Nov 28 2014 13:44:46
        Hardware version: V8.00
        License(s): RDI,FlashDL,FlashBP,JFlash,GDBFull
        VTref = 3.300V
        Type "connect" to establish a target connection, '?' for help 
  10. In J-Link command line terminal input command: device ADuCM360 press return
        J-Link>device ADuCM360 
  11. In J-Link command line terminal input command: if swd press return
        J-Link>if swd
        Selecting SWD as current target interface. 
  12. In J-Link command line terminal input command: speed 4000 press return
        J-Link>speed 4000
        Selecting 4000 kHz as target interface speed 
  13. In J-Link command line terminal input command: erase press return
        Target connection not established yet but required for command.
        Device "ADUCM360" selected.
        Found SWD-DP with ID 0x2BA01477
        AP-IDR: 0x24770011, Type: AHB-AP
        Found Cortex-M3 r2p0, Little endian.
        FPUnit: 6 code (BP) slots and 2 literal slots
        CoreSight components:
        ROMTbl 0 @ E00FF000
        ROMTbl 0 [0]: FFF0F000, CID: B105E00D, PID: 002BB000 SCS
        ROMTbl 0 [1]: FFF02000, CID: B105E00D, PID: 002BB002 DWT
        ROMTbl 0 [2]: FFF03000, CID: B105E00D, PID: 002BB003 FPB
        Cortex-M3 identified.
        Erasing device (ADUCM360)...
        Comparing flash   [100%] Done.
        Erasing flash     [100%] Done.
        Verifying flash   [100%] Done.
        J-Link: Flash download: Total time needed: 5.630s (Prepare: 0.063s, Compare: 0.000s, Erase: 5.564s, Program: 0.000s, Verify: 0.000s, Restore: 0.003s)
        Erasing done. 
  14. In J-Link command line terminal input command: loadfile x:\yyy\CN0359\Release\CN0359.bin 0 press return, please notice: x is your disk driver, yyy is the path of CN0359 source code package
        J-Link>loadfile x:\yyy\CN0359\Release\CN0359.bin 0
        Downloading file [x:\yyy\CN0359\Release\CN0359.bin]...
        Comparing flash   [100%] Done.
        Erasing flash     [100%] Done.
        Programming flash [100%] Done.
        Verifying flash   [100%] Done.
        J-Link: Flash download: Flash programming performed for 1 range (76288 bytes)
        J-Link: Flash download: Total time needed: 5.945s (Prepare: 0.065s, Compare: 0.529s, Erase: 0.023s, Program: 5.157s, Verify: 0.131s, Restore: 0.038s)
  15. After downloading the program, remove J-Link debug probe and power off EVAL-CN0359-EB1Z evaluation board
  16. Upon next power on, the EVAL-CN0359-EB1Z evaluation board will run new downloaded program
the J-Link debug probe detailed usage instructions can be found at J-Link Manual

Software development environment

The CN0359 software source code could be download at: CN0359-DesignSupport, the software binary executable firmware generated by GNU tools under eclipse IDE, debugged by OpenOCD.

The tools for CN0359 development could be downloaded at following list:

Please refer to the handbook of each tools for detail usage instructions.

The CN0359 source code doesn't support Keil or IAR IDE

Software Structure

The CN0359 software divided in to 3 layers, from top to bottom is:

  • application layer
  • newlib
  • hardware abstraction layer

All the devices is abstracted to the file, the application read and write device file to communicate with hardware.

The following chart is the source file structure:

  ├── applications
  │   ├── command
  │   │   ├── cmd_cellconstant.cpp
  │   │   ├── cmd_coefficient.cpp
  │   │   ├── cmd_frequency.cpp
  │   │   ├── cmd_holdtime.cpp
  │   │   ├── cmd_poll.cpp
  │   │   ├── cmd_setuptime.cpp
  │   │   └── cmd_voltage.cpp
  │   ├── dialog
  │   │   ├── AddressDialog.cpp
  │   │   ├── BaudRateDialog.cpp
  │   │   ├── CellConstantDialog.cpp
  │   │   ├── CoefficientDialog.cpp
  │   │   ├── ContrastDialog.cpp
  │   │   ├── Dialog.cpp
  │   │   ├── FirmwareDialog.cpp
  │   │   ├── FrequencyDialog.cpp
  │   │   ├── HoldTimeDialog.cpp
  │   │   ├── HomeDialog.cpp
  │   │   ├── SettingDialog.cpp
  │   │   ├── SetupTimeDialog.cpp
  │   │   ├── SplashDialog.cpp
  │   │   └── VoltageDialog.cpp
  │   ├── main.cpp
  │   ├── message.cpp
  │   └── uart_exec.cpp
  ├── hal
  │   ├── devices.cpp
  │   ├── drivers
  │   │   ├── ad8253.cpp
  │   │   ├── adc.cpp
  │   │   ├── buzzer.cpp
  │   │   ├── dac.cpp
  │   │   ├── dma.cpp
  │   │   ├── encoder.cpp
  │   │   ├── flash.cpp
  │   │   ├── lcd.cpp
  │   │   ├── pwm.cpp
  │   │   └── uart.cpp
  │   ├── Exceptions.cpp
  │   ├── RTD.cpp
  │   ├── syscalls.cpp
  │   └── timer.cpp
  ├── include
  │   ├── applications
  │   │   ├── command
  │   │   │   ├── cmd_cellconstant.h
  │   │   │   ├── cmd_coefficient.h
  │   │   │   ├── cmd_frequency.h
  │   │   │   ├── cmd_holdtime.h
  │   │   │   ├── cmd_poll.h
  │   │   │   ├── cmd_setuptime.h
  │   │   │   └── cmd_voltage.h
  │   │   ├── dialog
  │   │   │   ├── AddressDialog.h
  │   │   │   ├── BaudRateDialog.h
  │   │   │   ├── CellConstantDialog.h
  │   │   │   ├── CoefficientDialog.h
  │   │   │   ├── ContrastDialog.h
  │   │   │   ├── Dialog.h
  │   │   │   ├── FirmwareDialog.h
  │   │   │   ├── FrequencyDialog.h
  │   │   │   ├── HoldTimeDialog.h
  │   │   │   ├── HomeDialog.h
  │   │   │   ├── SettingDialog.h
  │   │   │   ├── SetupTimeDialog.h
  │   │   │   ├── SplashDialog.h
  │   │   │   └── VoltageDialog.h
  │   │   ├── message.h
  │   │   └── uart_exec.h
  │   └── hal
  │       ├── devices.h
  │       ├── drivers
  │       │   ├── ad8253.h
  │       │   ├── adc.h
  │       │   ├── buzzer.h
  │       │   ├── dac.h
  │       │   ├── dma.h
  │       │   ├── encoder.h
  │       │   ├── flash.h
  │       │   ├── lcd.h
  │       │   ├── pwm.h
  │       │   ├── Sampling.h
  │       │   └── uart.h
  │       ├── Initial.h
  │       ├── RTD.h
  │       └── timer.h
  └── system
      ├── cmsis
      │   ├── startup_ADuCM360.S
      │   └── system_ADuCM360.c
      └── include
          └── cmsis
              ├── ADuCM360.h
              ├── arm_common_tables.h
              ├── arm_const_structs.h
              ├── arm_math.h
              ├── cmsis_armcc.h
              ├── cmsis_armcc_V6.h
              ├── cmsis_device.h
              ├── cmsis_gcc.h
              ├── core_cm0.h
              ├── core_cm0plus.h
              ├── core_cm3.h
              ├── core_cm4.h
              ├── core_cm7.h
              ├── core_cmFunc.h
              ├── core_cmInstr.h
              ├── core_cmSimd.h
              ├── core_sc000.h
              ├── core_sc300.h
              └── system_ADuCM360.h
  • the applications folder contained all application layer source, it include all RS-485 command and LCD dialog routines.
  • the hal folder contained all hardware abstraction layer source, each of device has his own driver file in this folder to access newlib low level interface.
  • the include and system folder is ADuCM360 support file for external declaration and cortex-m3 cmsis library support.

Schematic, Bill of Materials, Gerber Files, Source Code

Change Log

Rev0 to RevA:

  • U1 (from MCCOG128064A6S-SPTLY to BTHQ128064AVC1-COG-STF-LED)
  • U7 (from ADM3483ARZ to ADM3075EARZ)
  • C32 (from 330n to NP)
  • Software (conductivity result reliability routines removed)
  • Software (setup and hold time setting added)
  • Software (RS-485 communication routines added)


Receive software update notifications, documentation updates, view the latest videos, and more when you register your hardware. Register to receive all these great benefits and more!

resources/eval/user-guides/circuits-from-the-lab/cn0359.1627542821.txt.gz · Last modified: 29 Jul 2021 09:13 by Harvey John De Chavez