DfRobot SEN0169 Sensor Having Trouble With Calibration

I'm working on a hydroponic water quality testing system for school. I'm using an Arduino Uno, and Matlab if possible, though I am working right now in between Arduino IDE and Matlab just to get the sensor working. I've become a bit experienced in matlab and wiring for this, but I'm really mostly just beginning. I'm posting this most places and forums I can just so I can reach as many people and get as many solutions as I can. I'll try to explain as simply as possible.

I recently purchased a SKU:SEN0169 Analog pH Pro sensor linked here: Gravity: 7/24 Industrial Analog pH Meter for Arduino - DFRobot . In the process of getting it to work for my hydroponic project, I have encountered several issues and am unsure on how to obtain the correct values. I followed the calibration to the best of my ability, but when testing in both Arduino IDE and Matlab, it has been returning values that have not made appropriate sense. I have had access to a solution that should be 7.00 pH and another that is 2.5 (working on getting one that is 4.0 per the calibration instructions).

When putting the sensor in distilled water (ph 7.00) I have read voltages of approximately 1.73 (depending on potentiometer adjustment and water purity it varies by a few tenths) and when placed in vinegar it reads 1.49 (+/- a few tenths). I have tried to follow the instructions and either short it or when in water adjust the offset but it has had little effect when not shorting the BNC connector. Likewise adjusting the potentiometer only moves the resulting pH closer to 7 and farther from 2.5 or closer to 2.5 and further from 7. Effectively when using the code provided on the wiki page, the pH sensor is not returning the appropriate values for either solution. It can get it for one (with adjustments) but not both.I have tried many different coding solutions whether it be using different offsets or scaleFactors.

I have tried getting my own slope values from the values I have obtained but it still has had little impact. Either way, I cannot get accurate values for 2 solutions to appropriately calibrate it for anything in-between.

When using different wires, Arduino boards, computers, or IDEs it returns similar values so it is likely not an issue with the sensor, but the initial values it is returning are not applicable for the calibration instructions (wants a <=0.3 difference from 7 in the water solution when the pH is at least 1 or 1.5+ pH increments from 7). I would greatly appreciate any recommendations you all might have or especially if anyone has faced this problem, and I can try to provide more information if needed.

Here is the wiki page with arduino calibration code, any tips for doing this in matlab would be great.

Really appreciate it, thanks in advance.

That is mistake #1. Use commercially available pH buffer standards for testing and calibrating the sensor. Kits with pH 4, 7 and 10 standards are readily available.

Distilled water is not pH 7. It very rapidly absorbs carbon dioxide from the air, which reacts with water to form carbonic acid, and the pH drops to 5.7 or so.

Mistake #2 is to unnecessarily complicate the project with MATLAB and other extraneous distractions. Stick with a simple setup, running standard example programs and learn how it works as you go.

I recommend to go to a high school or university lab and ask for an introduction to using a research grade pH meter, before putting much faith in a cheap hobby product.

1 Like

Part of the project requires matlab, but I'm working on getting arduino working first. Your mention about ph 7 dropping to 5.7 almost lines up with my values. I got some more accurate buffer solutions, and its working... better. Gotta do some math but its working out. Thanks!.

Glad it seems to be working.

pH sensing comes up on the forum from time to time, so if you could post the details about how well (or not) this particular sensor is working out, others would appreciate it.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.