PH-Meter
For our swimming pool I was looking for a way to easily determine the PH value so that the salt would work well on the algae to keep them out of the water.
After some disappointing experiences with some test equipment I decided to look around at the arduino projects.
There I found several examples and came up with the PH test pen from diymore (https://www.diymore.cc/collections/ph-value-detect-sensor/products/diymore-liquid-ph-value-detection-detect-sensor-module-monitoring-control-for-arduino-m).
The pin-out of the PH board is as follows:
PH Sensorprint Pinout:
TO - Temperature output
DO - 3.3V Output (from pot pot pot POT2 - see below)
PO - PH analog output ==> Arduino A0
Gnd - Arduino GND
Gnd - idem (were already connected on my print
VCC - 5V DC (Arduino 5V)
POT 1 - Analog offset readout (closest to BNC connector)
POT 2 - PH limit setting - in combination with in 'DO' you can, for example, control a LED to indicate when a certain PH value has been reached; not applicable for me.
The offset can be adjusted as follows: connect the power supply to the PCB and briefly close the bnc connector with a wire (the middle with the sleeve). This corresponds to a neutral PH of 7.0 for the tester.
Then turn the potentiometer (POT1) to get the "volt in" value to 2.5.
I also found additional information from http://www.auto-ctrl.com, but this site is no longer accessible. I will attach the documentation in the zip-file.
In this information I also found the arduino code on which I based my project.
To avoid a lot of calculations while measuring, I wanted to calibrate the tester so that the correct PH-value appears in the display.
In the code the measured voltage from the PH interface board is converted to the correct PH value. However, this PH value appears to be different for each measuring sensor and offered power supply.
For the calibration I have 3 different PH test solutions : PH 4.01, PH 6.86 and PH 9.18. The contents of the bags are dissolved in their own 250 ml distilled water after which the calibration can start.
Make sure to rinse the measuring sensor in 'clean' water when changing liquids and tap it dry in order to get as little contamination of the test liquids as possible.
When all components are connected and the meter is working, calibration can be started.
- First set the PH 7.0 value with the potentiometer on the PCB (see above).
Rinse the sensor and hold it in the PH 4.01 fluid for over 1 minut. The reading should now be (approximately) stable. Then write down the number under 'Volt in'.
Do this in the same way for the other two test fluids.
The conversion of voltage to PH-value is done in the code in line 60 (float phValue = x * pHVol + y; // calibrate PH-Value).
The project files include a microsoft excel file to convert the values just found to x and y values for the calculation.
The calculation goes as follows:
x = (4, 01-9, 18)/("Voltage at PH4.01" - "Voltage at PH9.18"). We need this x-value for the program (line 20) and for calculating the y-value:
y = 9, 18 - "Voltage at PH9.18". * x; we then enter this y-value in the code (line 21).
Finally, compile the code and upload it to the PH-meter. When it is now right, the tester indicates the correct PH-value when we keep the measuring sensor in the separate test liquids again (think of cleaning between the various test liquids!!).
Since and a small deviation appeared in my situation around the PH 6.86 test fluid, I added a 2nd calculation. This because the value I want the pool on should be between PH 7.2 and 7.4.
I use the found voltages of PH 6.86 and PH 9.19 measurements. The calculations are then:
x = (6.86-9.18)/("Voltage at PH6.86" - "Voltage at PH9.18"). We need this x-value again for the program (line 20) and for calculating the y-value`is the same calculation:
y = 9.18 - "Voltage at PH9.18" * x; we then enter this y-value in the code (line 21).
This makes the measuring range I need just a little more accurate...
The whole thing is made complete with a 3D printed box, of which I added the STL files to the project file.
Unfortunately, the PH value displayed appears to depend on the supply voltage offered. I have two USB batteries that I can use and both emit a slightly different voltage, so the PH value differs per battery...
In the meantime I have ordered a step-up converter which I will use to convert the 3.3 Volt of the Arduino Nano to 5 Volt for the PH sensor board.
With that I hope to solve the problem. I will come back to this in this project.
With this I hope to contribute to the realization of one of your projects.........
To be found also on https://www.htm63.com/arduino/ph-meter
Comments