EC Voltage is not stable

userHead Mikael Bergvall 2023-05-15 13:57:57 977 Views13 Replies

DFRobot Gravity: analog electrical conductivity sensor/meter(K=10)


I have big problem to get stable values from my EC


voltage:480.47  temperature:25.0^C  EC:14.3ms/cm

voltage:435.55  temperature:25.0^C  EC:13.0ms/cm

voltage:440.43  temperature:25.0^C  EC:13.1ms/cm

voltage:439.45  temperature:25.0^C  EC:13.1ms/cm

voltage:421.87  temperature:25.0^C  EC:12.6ms/cm

voltage:473.63  temperature:25.0^C  EC:14.1ms/cm

voltage:459.96  temperature:25.0^C  EC:13.7ms/cm

voltage:451.17  temperature:25.0^C  EC:13.5ms/cm

voltage:454.10  temperature:25.0^C  EC:13.5ms/cm

voltage:447.27  temperature:25.0^C  EC:13.3ms/cm

voltage:458.01  temperature:25.0^C  EC:13.7ms/cm

voltage:466.80  temperature:25.0^C  EC:13.9ms/cm

voltage:459.96  temperature:25.0^C  EC:13.7ms/cm

voltage:501.95  temperature:25.0^C  EC:15.0ms/cm


Someone have a solution on this problem? 



2023-12-14 22:16:02

I've encountered several persistent challenges that have hindered the functionality of DFRobot Gravity: analog electrical conductivity sensor/meter(K=10), and despite exhaustive attempts to troubleshoot, I'm yet to find a resolution.


Here are the specific issues I've been facing:


Inconsistent Voltage Readings and Initialization Discrepancy: Upon connecting the sensor, including the temperature sensor for compensation, I observed unstable voltage values. Additionally, while the product specifies a K-value of 10, the code seems to initialize with a K-value of 2. This discrepancy has raised confusion and led to instability in readings. I would greatly appreciate clarification and guidance on resolving this initialization issue.

 Calibration Command Glitch: The calibration process, which ideally should respond to the designated commands of 'enterec,' 'calec,' and 'exitec,' has been encountering an unexpected glitch. Instead of responding to the designated commands as specified in the documentation, the sensor seems to require 'enterec ->,' 'calec ->,' and 'exitec ->' with two spaces after 'calec.' This inconsistency has been quite cumbersome and I seek guidance to resolve this irregularity.
 Unsuccessful Calibration with Buffer Solution: Despite attempts to calibrate the device using the recommended buffer solution of 12.88ms/cm, the readings remain unstable with a significant voltage range (4.88 to 24 volts). Even after multiple attempts at calibration using two of the provided solutions, I've been unable to achieve calibration with the following error.

Any help regarding these matters will be appreciated greatly.
userHeadPic Osama.Choudhry
2023-05-18 10:27:23

Hi Mikael Bergvall,


 It is recommended that you use an Arduino Uno. Please check if Uno outputs standard 5V. If powering the sensor with 3.3V, the example code needs to be modified. Upload the EEPROM sample code, and then calibrate.

The analog value read by esp32-E is not very stable. If you want to use an ec sensor, you need to add an ads module(  and modify the value of digits and voltage of the ADC in the sample code (esp32-E 3.3V ADC12bit: 2^12=4096). For example: voltage = analogRead(EC_PIN)/4096*3300;


At the same time, we do not have test records of MKR 1010 Wifi.



When calibrating, the relevant parameters are stored in the specified position in EEPROM. If other data is 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.




The signal adapter boards of K=10 and K=1 are different, please do not mix them.

 If these cannot solve your problem, please get in touch with technical support email: [email protected] for the inconvenience.



userHeadPic jenna
2023-05-17 14:21:00

Does the Gravity: Analog Electrical Conductivity Sensor PRO (K=1) mesure a value as a sample 1.413 without jumping up and down? Someone testet it? 

userHeadPic Mikael Bergvall
Mikael Bergvall wrote:

What does the K=10 and K=1 standard for? 

2023-05-18 05:41:17
1 Replies
2023-05-16 03:12:04

Also buy a new meter, a was thinking the old one was broken. 

userHeadPic Mikael Bergvall
jenna wrote:

We have two EC sensors, EC and EC PRO. Be careful not to confuse the calibration codes for the two products. When calibrating, the groove of the probe is completely immersed in the calibration liquid.

2023-05-16 09:47:07
Mikael Bergvall wrote:

From DF page ( sample code in 1.4 test solution. 


voltage:32.00  temperature:25.0^C  EC:1.4ms/cm

voltage:41.00  temperature:25.0^C  EC:1.8ms/cm

voltage:29.00  temperature:25.0^C  EC:1.3ms/cm

voltage:38.00  temperature:25.0^C  EC:1.7ms/cm

voltage:51.00  temperature:25.0^C  EC:2.2ms/cm

voltage:32.00  temperature:25.0^C  EC:1.4ms/cm

voltage:38.00  temperature:25.0^C  EC:1.7ms/cm

voltage:51.00  temperature:25.0^C  EC:2.2ms/cm

voltage:32.00  temperature:25.0^C  EC:1.4ms/cm

voltage:29.00  temperature:25.0^C  EC:1.3ms/cm

voltage:25.00  temperature:25.0^C  EC:1.1ms/cm

voltage:45.00  temperature:25.0^C  EC:2.0ms/cm

voltage:32.00  temperature:25.0^C  EC:1.4ms/cm

voltage:38.00  temperature:25.0^C  EC:1.7ms/cm

voltage:25.00  temperature:25.0^C  EC:1.1ms/cm

2023-05-16 21:29:12
2 Replies
2023-05-16 03:10:49

I have calibrate it on 3 different bords with alot of different values for voltage, tested 3,3 and 5 v. Same all the time, soon give up on this. 

userHeadPic Mikael Bergvall
jenna wrote:

What board are you using? The wiki uses an Arduino Uno. For some boards(e.g. Arduino Controllino) variables in the library need to be modified.

2023-05-16 09:42:28
Mikael Bergvall wrote:

UNO, FireBettle esp32-e and MKR 1010 Wifi

2023-05-16 21:23:11
Mikael Bergvall wrote:

What variables need to be modified?

2023-05-16 21:31:45
3 Replies
2023-05-15 16:38:59

Ensure that your sensor is properly calibrated. Follow the calibration procedure provided by the manufacturer or supplier of the sensor. Calibration helps to establish a baseline for accurate readings.


Also make sure that the sensor is placed correctly in the liquid being measured. The electrodes of the sensor should be fully immersed and not touching the container walls or other objects. Ensure that the liquid is well-mixed to obtain consistent readings.

userHeadPic bidrohini.bidrohini
2023-05-15 16:13:48

Hello Mikael,


There seem to have fluctuations in the sensor readings. Have you tried to calibrate it first? Could you please give us a little bit more information?




Best regards,

userHeadPic xingzhao.zhu