PH level indicator
PH meter sensor, specially designed for Arduino controllers and has built-in simple, convenient and practical connection and features. It has an LED which works as the Power Indicator, a BNC connector and PH2.0 sensor interface. To use it, just connect the pH sensor with BNC connector, and plug the PH2.0 interface into the analog input port of any Arduino controller.
Attention: In order to ensure the accuracy of the pH probe, you need to use the standard solution to calibrate it regularly. These standard calibration solutions come with this pH sensor. Generally, the period is about half a year.

- Please use an external switching power supply, and the voltage as close as possible to the +5.00V. More accurate the voltage, higher the accuracy.
- Before using pH electrode, you need to calibrate it by the standard solution provided in sensor kit, in order to obtain more accurate results.
- The best environment temperature is about 25 ℃, and the pH value is known and reliable, close to the measured value. If you measure the acidic sample, the pH value of the standard solution should be 4.00. If you measure the alkaline sample, the pH value of the standard solution should be 9.18.
- Before the pH electrode measure different solutions, Cleaning of electrode using deionized water is recommended.
- The pH scale is traceable to a set of standard solutions whose pH is established by international agreement. Primary pH standard values are determined using a concentration cell with transference, by measuring the potential difference between a hydrogen electrode and a standard electrode such as the silver chloride electrode. Measurement of pH for aqueous solutions can be done with a glass electrode and a pH meter, or using indicators.
Mathematically, pH is the negative logarithm of the activity of the (solvated) hydronium ion, more often (albeit somewhat inaccurately) expressed as the measure of the hydronium ion concentration.
Calibration Theory
The most important part of calibration is watching the readings during the calibration process. It is easiest to calibrate the device in its default state (UART mode, with continuous readings enabled). Switching the device to I2C mode after calibration will not affect the stored calibration. If the device must be calibrated in I2C mode, be sure to continuously request readings so you can see the output from the probe. In this tutorial, the calibration will be done in UART mode.
Interfacing With Arduino:

Code:
const int analogInPin = A0;
int sensorValue = 0;
unsigned long int avgValue;
float b;
int buf[10],temp;
void setup() {
Serial.begin(9600);
}
void loop() {
for(int i=0;i<10;i++)
{
buf[i]=analogRead(analogInPin);
delay(10);
}
for(int i=0;i<9;i++)
{
for(int j=i+1;j<10;j++)
{
if(buf[i]>buf[j])
{
temp=buf[i];
buf[i]=buf[j];
buf[j]=temp;
}
}
}
avgValue=0;
for(int i=2;i<8;i++)
avgValue+=buf[i];
float pHVol=(float)avgValue*5.0/1024/6;
float phValue = -5.70 * pHVol + 21.34;
Serial.print(“sensor = “);
Serial.println(phValue);
delay(20);
}
Applications of pH in our daily life are:-
- It is used to determine the nature of the soil before farming. If the soil is acidic it needs to be neutralized.
- PH of sea water is very essential for oceanic cycles.
- PH of mouth determines the acidic nature which leads to tooth decay.
- Water quality testing
- Aquaculture
Reference:
https://circuits4you.com/2016/05/13/arduino-ph-measurement/
https://www.instructables.com/id/ARDUINO-PH-METER/
https://create.arduino.cc/projecthub/atlasscientific/arduino-ph-sensor-calibration-ea1b65