ArduinoGeneral

Gravity EC Meter (K=1) v2.0 SKU DFR0300

userHead cgarcia 2019-06-14 22:54:38 5264 Views4 Replies
• The SKU of the product you are having issues with: SKU DFR0300
• What IDE are you using? (e.g. Arduino IDE v 1.7.9): Arduino IDE v1.8.9
• What is the intended function of your project? Read pH, EC and temperature (only EC is failing)
• Are you using any libraries? Links to the source are helpful! SigFox, ArduinoLowPower, OneWire, DallasTemperature (the latter 2 used to read a temperature probe)
• Provide a sample of the code you are using between code tags so we can easily check it for any errors, e.g.:
Code: Select all
String medirEC() {
  float a = 0, EC = 0;

  // Encendemos sonda EC
  analogReference(AR_DEFAULT);
  digitalWrite(pinQ3, HIGH);

  // Esperamos a estabilizar lectura
  delay(250);

  uint8_t i = 0;
  for (i = 0; i < 6; i++) {
    a += analogRead(pinEC);
    delay(300);
  }

  // Apagamos sonda
  digitalWrite(pinQ3, LOW);
  analogReference(AR_INTERNAL1V0);

  // Promedio de lecturas
  a = a / 6;

  // Pasamos de analogico a voltaje real
  a = (a / 1024 * 1000 * 3.3);

  //if (debug) Serial.println(a);

  // Traducido de la libreria de DFRobot
  EC = 1000 * a / 820 / 200;
  // Compensacion por temperatura, tambien cogido de DFRobot
  EC = EC / (1.0 + 0.0185 * (temp - 25.0));
  // "temp" is a float, temperature read from another probe

  if (debug) Serial.println(" EC after comp: " + (String)EC );

  return (String)round(1000 * (EC + offsetEC));
  // offsetEC is defined as:
  // #define offsetEC -0.1
}
I'm developing with a MKRFOX1200, and I can't use the DFRobot library.
I've been able to manually extrapolate the code for the pH library, and the pH sensor works perfectly, but I cannot get the EC sensor to work correctly


EDIT: No, it is not calibrated because I'm using a MKRFOX 1200 (no EEPROM) and thus cannot use the DFRobot library
2023-09-15 14:27:10

Good day, 

 

I have this board EC Meter V2.0.but the problem is whenever I try any reading after calibration no matter which solution I put in,it only gives me the 12.88ms/cm reading.I really don't know what else to do any ideas or propositions are welcome.thank you 

 

userHeadPic Frank.Muland
2020-10-02 20:48:56
yuyouliang2012 wrote:
Fri Jun 21, 2019 6:26 am
MKRFOX1200 adopt the SAMD21 chip, but the EEPROM library is not compatible with the SAMD21. But you can calculate the mathematic relation to get the value.

Example 1. pH value
Please finish wiring according to the picture on the wiki. Then put the probe into the 7.0 buffer solution, record the voltage output of the converter board. Wash the probe, then put the probe into the 4.0 buffer solution, record the voltage output of the converter board.
You will get the two point:(voltage1, 7.0), (voltage2, 4.0). Then you can get the formula : y = kx+b.
That is, you can get the pH value culculated from the formula.
BTW, pH calibration is to adjust the value of k (slope) and b (intercept).

Example 2. EC value
The formula of the DFR0300 is : EC = 1000*voltage/820/200*K.
The unit of EC is ms/cm, not us/cm.
Please finish wiring according to the picture on the wiki. Then put the probe into the 1.413ms/ms buffer solution, record the voltage output of the converter board. Then you will calculate the K. Record the K. We call it K1.
Wash the probe, then put the probe into the 12.88ms/cm buffer solution, record the voltage output of the converter board. Then you will calculate the K. Record the K. We call it K2.
Finally, write a piecewise function. For example, when the EC < 2, you can call the formula: EC = 1000*voltage/820/200*K1. If the EC>2, you can call the formula: EC = 1000*voltage/820/200*K2.

Hope these information will help you.
you can do one example tanks!
userHeadPic wavearturo
2019-09-16 23:04:38 Thank you!!
Sorry for the late response, the project was temporarily taken away from me, but I'll now resume development and do as you told me.
Thanks again for the help and I will make sure to message again in any case
userHeadPic cgarcia
2019-06-21 14:26:59 MKRFOX1200 adopt the SAMD21 chip, but the EEPROM library is not compatible with the SAMD21. But you can calculate the mathematic relation to get the value.

Example 1. pH value
Please finish wiring according to the picture on the wiki. Then put the probe into the 7.0 buffer solution, record the voltage output of the converter board. Wash the probe, then put the probe into the 4.0 buffer solution, record the voltage output of the converter board.
You will get the two point:(voltage1, 7.0), (voltage2, 4.0). Then you can get the formula : y = kx+b.
That is, you can get the pH value culculated from the formula.
BTW, pH calibration is to adjust the value of k (slope) and b (intercept).

Example 2. EC value
The formula of the DFR0300 is : EC = 1000*voltage/820/200*K.
The unit of EC is ms/cm, not us/cm.
Please finish wiring according to the picture on the wiki. Then put the probe into the 1.413ms/ms buffer solution, record the voltage output of the converter board. Then you will calculate the K. Record the K. We call it K1.
Wash the probe, then put the probe into the 12.88ms/cm buffer solution, record the voltage output of the converter board. Then you will calculate the K. Record the K. We call it K2.
Finally, write a piecewise function. For example, when the EC < 2, you can call the formula: EC = 1000*voltage/820/200*K1. If the EC>2, you can call the formula: EC = 1000*voltage/820/200*K2.

Hope these information will help you.
userHeadPic Youyou