EC Sensor V2 by DFROBOT

Introduction

DFRobot Gravity: analog electrical conductivity meter V2 is specially used to measure the electrical conductivity of the aqueous solution, and then to evaluate the water quality, which is often used in water culture, aquaculture, environmental water detection and other fields.

This product, as an upgraded version of electrical conductivity meter V1, greatly improves the user experience and precision. It supports 3~5v wide voltage input, and is compatible with 5V and 3.3V main control board; The output signal filtered by hardware has low jitter; The excitation source adopts an AC signal, which effectively reduces the polarization effect, improves the precision and prolongs the life of the probe; The software library uses a two-point calibration method, and can automatically identify the standard buffer solution, so simple and convenient.

With this product, main control board (such as Arduino) and the software library, you can quickly build an electrical conductivity meter, plug and play, no welding. DFRobot provides a variety of water quality sensor products, uniform size and interface, not only meet the needs of various water quality testing, but also suitable for the DIY of multi-parameter water quality tester.

Conductivity is the reciprocal of the resistivity, which is related to the ability of the material to carry the current. In the liquid, the reciprocal of the resistance, the conductivity, is the measure of its ability to conduct electricity. Conductivity is an important parameter of water quality. It can reflect the extent of electrolytes present in water.

The probe is a laboratory-grade probe. Do not immerse in liquid for a long time. Otherwise this will shorten the life of the probe.
Platinum black layer is attached to the surface of the sheet metal in the probe. It should avoid any object touching it. It can only be washed with distilled water, otherwise, the platinum black layer will be damaged, resulting in the inaccurate measurement.

Specification

  • Signal Conversion Board (Transmitter) V2
    • Supply Voltage: 3.0~5.0V
    • Output Voltage: 0~3.4V
    • Probe Connector: BNC
    • Signal Connector: PH2.0-3Pin
    • Measurement Accuracy: ±5% F.S.
    • Board size: 42mm*32mm/1.65in*1.26in
  • Electrical Conductivity Probe
    • Probe Type: Laboratory Grade
    • Cell Constant: 1.0
    • Support Detection Range: 0~20ms/cm
    • Recommended Detection Range: 1~15ms/cm
    • Temperature Range: 0~40°C
    • Probe Life: >0.5 year (depending on frequency of use)
    • Cable Length: 100cm

Board Overview

Num Label Description
1 Power GND(0V)
2 + Power VCC(3.0~5.0V)
3 A Analog Signal Output(0~3.4V)
4 BNC Probe Connector

Tutorial

This tutorial will demonstrate how to use this electrical conductivity meter for calibration and measurement. Please read each step carefully.

1. In order to ensure the measurement accuracy, it is strongly recommended to add a temperature sensor to measure the temperature and achieve automatic temperature compensation. DS18B20 waterproof temperature sensor can be used.
2. Before measuring another liquid, be sure to wash the probe and absorb residual water-drops with paper to prevent contamination of the liquid. You can flush the probe with distilled water.

Requirements

  • Hardware
    • DFRduino UNO R3 (or similar) x 1
    • Analog Electrical Conductivity Meter Board(K=1) x1
    • Electrical Conductivity Probe(K=1) x1
    • Standard Buffer Solution 1413us/cm x1
    • Standard Buffer Solution 12.88ms/cm x1
    • Gravity 3pin Sensor Cable (or several DuPont cables) x1
    • Test Solution x1
  • Software

Connection Diagram

Calibration

To ensure accuracy, the probe used for the first time, or used for a period of time, needs to be calibrated. This tutorial uses two-point calibration and therefore requires standard buffer solutions of 1413us/cm and 12.88ms/cm. The following tutorial shows how to operate two-point calibration.

  • 1.Upload the sample code to the Arduino board, then open the serial monitor, you can see the temperature and electrical conductivity. If you added a temperature sensor, be sure to write the corresponding function and call it.
  • 2.Wash the probe with distilled water, then absorb the residual water-drops with paper. Insert the probe into the 1413us/cm standard buffer solution, stir gently, until the values are stable.
  • 3.After the values are stable, the first point can be calibrated. Specific steps are as follows:
  • 1. Input ENTER command in the serial monitor to enter the calibration mode.

DFR0300V2_CAL1.jpg

  • 2. Input CAL commands to start the calibration. The program will automatically identify two standard buffer solution: 1413us/cm and 12.88ms/cm. In this step, the standard buffer solution is 1413us/cm.

DFR0300V2_CAL2.jpg

  • 3. After the calibration, input EXIT command to save the relevant parameters and exit the calibration mode. Note: Only after input EXIT command in the serial monitor can the relevant parameters be saved.

DFR0300V2_CAL3.jpg

  • 4.After the above steps, the first point calibration is completed. The second point calibration will be performed below.
  • 4. Wash the probe with distilled water, then absorb the residual water-drops with paper. Insert the probe into the 12.88ms/cm standard buffer solution, stir gently, until the values are stable.
  • 5.After the values are stable, the second point can be calibrated. As same with the first calibration step, the specific steps are as follows:
  • 1. Input ENTER command in the serial monitor to enter the calibration mode.
  • 2. Input CAL commands to start the calibration. The program will automatically identify two standard buffer solution: 1413us/cm and 12.88ms/cm. In this step, the standard buffer solution is 12.88ms/cm.
  • 3. After the calibration, input EXIT command to save the relevant parameters and exit the calibration mode. Note: Only after input EXIT command in the serial monitor can the relevant parameters be saved.
  • 4.After the above steps, the second point calibration is completed.
  • 6.After completing the above steps, the two-point calibration is completed, and then it can be used for actual measurement. The relevant parameters in the calibration process have been saved to the EEPROM of the main control board.

Sample Code

Please download DFRobot_EC Library first,then install it. How to install Libraries in Arduino IDE

/*
 * file DFRobot_EC.ino
 * @ https://github.com/DFRobot/DFRobot_EC
 *
 * This is the sample code for Gravity: Analog Electrical Conductivity Sensor / Meter Kit V2 (K=1.0), SKU: DFR0300.
 * In order to guarantee precision, a temperature sensor such as DS18B20 is needed, to execute automatic temperature compensation.
 * You can send commands in the serial monitor to execute the calibration.
 * Serial Commands:
 *   enter -> enter the calibration mode
 *   cal -> calibrate with the standard buffer solution, two buffer solutions(1413us/cm and 12.88ms/cm) will be automaticlly recognized
 *   exit -> save the calibrated parameters and exit from calibration mode
 *
 * Copyright   [DFRobot](http://www.dfrobot.com), 2018
 * Copyright   GNU Lesser General Public License
 *
 * version  V1.0
 * date  2018-03-21
 */

#include "DFRobot_EC.h"
#include <EEPROM.h>

#define EC_PIN A1
float voltage,ecValue,temperature = 25;
DFRobot_EC ec;

void setup()
{
  Serial.begin(115200);
  ec.begin();
}

void loop()
{
    static unsigned long timepoint = millis();
    if(millis()-timepoint>1000U)  //time interval: 1s
    {
      timepoint = millis();
      voltage = analogRead(EC_PIN)/1024.0*5000;  // read the voltage
      //temperature = readTemperature();  // read your temperature sensor to execute temperature compensation
      ecValue =  ec.readEC(voltage,temperature);  // convert voltage to EC with temperature compensation
      Serial.print("temperature:");
      Serial.print(temperature,1);
      Serial.print("^C  EC:");
      Serial.print(ecValue,2);
      Serial.println("ms/cm");
    }
    ec.calibration(voltage,temperature);  // calibration process by Serail CMD
}

float readTemperature()
{
  //add your code here to get the temperature from your temperature sensor
}

FAQ

Q. How long does the probe need to be calibrated?
A. The calibration interval is determined by the frequency of use. Normally, you can calibrate it once a month. If used frequently, it can be calibrated once a week. When calibrating, fresh standard buffer solution is recommended.
Q. How to achieve automatic temperature compensation?
A. The temperature compensation algorithm has been integrated in the DFRobot_EC library.You only need to transfer the voltage and temperature to float readEC (float voltage, float temperature) at the same time, to obtain the electrical conductivity with temperature compensation.
Q. During the calibration, is it necessary to complete two points calibration? Can I complete only one point calibration?
A. The two points calibration must be completed because the two points respectively correspond to standard buffer solution 1413us/cm and 12.88ms/cm. The two points calibration ensure the accuracy of the entire measurement range. Therefore, two points calibration must be completed.
Q. During the first calibration, the calibration always failed. What could be the reason?
A. When calibrating, the relevant parameters are stored in the specified position in EEPROM. If other data previously saved in the same position in EEPROM, there may be a conflict, resulting in an inability to calibrate properly. Use the following code to erase the contents in the specified position in EEPROM. Run it once, then upload the sample code again to restart the calibration.
    #include <EEPROM.h>
    #define KVALUEADDR 0x0A
    void setup(){
        for(byte i = 0;i< 8; i   ){
          EEPROM.write(KVALUEADDR i, 0xFF);
        }
    }
    void loop(){
    }
For any questions, advice or cool ideas to share, please visit the DFRobot Forum.

More Documents

DFshopping_car1.png Get Gravity: Analog Electrical Conductivity Sensor /Meter V2 (K=1) from DFRobot Store or DFRobot Distributor.

Turn to the Top

112 total views, 1 views today

ใส่ความเห็น