Introduction
The pH value of soil is an important factor affecting the growth of plants. Suitable pH values for different plants differ from each other. The pH value of foods, such as fruit, meat and vegetable are also an important indicator of their quality. For example, by measuring the pH value of meat, we can determine whether the meat we bought is fresh or not.
The pH probe of this kit is attached with a spear like protection shield made of stainless steel with a sharp tip. It can be directly stabbed into the soft semisolid material to measure the pH value, such as wet soil or foods. But this can not be done with common pH probe, or it will be damaged.
This kit is Arduino compatible and easy to use. It helps you to quickly build a pH meter to measure the pH value of soil or foods directly.
![]() |
It is forbidden to measure hard solid samples and semisolid samples containing sharp particles. Please keep the plug of the probe, signal transmitter board (especially the BNC connector) clean and dry. This pH probe is a laboratory electrode, which is not suitable for prolonged online testing. Therefore, do not immerse the electrode in the measured object for a long time. After using the pH probe, please clean it carefully. The components of this probe which touch the measured objects have a black ABS shell, a glass component and a silicone rubber material. Before testing the object, it is necessary to confirm that the measured objects are not harmful to these materials. Not suitable for measurement: oily samples, samples with higher viscosity, samples with more fine particles. Not suitable for non-aqueous titration. The head of the stainless steel spear tip is sharp. Please use safety when using it. |
---|
Specification
Spear Tip pH Probe
Measuring Range: 0~10pH
Accuracy: ± 0.1pH
Operating Temperature: 5~60 ℃
Response Time : ≤2min(in standard buffer solution)
Salt Bridge Material: Poly Tetra Fluoro Ethylene (PTFE)
Shell Material: Polyoxymethylene (POM)
Filling Solution: Can NOT be Filled
Wiring Connector: BNC
Wire Length: 850mm (BNC connector included)
Signal Transmitter Board
Input Power : 5.00V
Ouput Signal: 0 ~ 4.0V
Accuracy : < ±0.2pH (25 ℃)
Probe Connector: BNC
Module Connector: Gravity:PH2.0-3Pin
Dimension: 43mm×32mm(1.69inch*1.26inch)
Board Overview

No. | Name | Description |
---|---|---|
1 | A | Analog signal output (0~4.0V) |
2 | + | Positive power supply (5.0V) |
3 | - | Negative power supply (GND) |
4 | BNC | pH probe connector |
pH Probe Characteristics
The relation between the output voltage and the pH value is shown as followed (25 ℃):
Voltage (mV) | pH Value | Voltage (mV) | pH Value |
---|---|---|---|
414.12 | 0.00 | 59.16 | 6.00 |
354.96 | 1.00 | 0.00 | 7.00 |
295.80 | 2.00 | -59.16 | 8.00 |
236.64 | 3.00 | -118.32 | 9.00 |
177.48 | 4.00 | -117.48 | 10.00 |
118.32 | 5.00 |
Tutorial
This tutorial will demonstrate how to use this spear tip pH probe to measure the pH value of semisolid material,such as soil and food.
Requirements
Hardware
- DFRduino UNO(or similar) x 1
- Spear tip pH probe x 1
- Signal Transmitter Board x 1
- Stainless Steel Spear Tip Shield x 1
- Gravity Analog Cable 3pin(or Dupont Wires) x 1
- pH 4.0 standard buffer solution x 1
- pH 7.0 standard buffer solution x 1
Software
- Arduino IDE (V1.0.x, V1.6.x or V1.8.x), Click to Download Arduino IDE from Arduino®
Spear Tip Shield Installation
Before measuring the semisolid material, the included stainless steel spear tip shield should be installed first to protect the glass probe. If you want to immerse the pH probe into the buffer solution to calibrate it, you could install the spear tip shield after finishing calibration. First, unscrew the protective solution bottle and pull out the top cap with rubber pad from the probe. Then, unscrew the fixed ring and carefully insert the spear tip shield to the probe. Finally, screw the fixed ring back to the probe to hold the shield. The following diagram below shows how to install the spear tip shield to the probe step by step.

Connection Diagram

Calibration
If this product is used for the first time, or if it has been used for a while, calibration is needed to reduce the error. During calibration, if bubbles in the glass bulb of the electrode head were found, you could slightly thrown off the probe several times to make the bubbles disappear.
Cautions | Please use an external power supply for more accuracy voltage. The closer your power supply can maintain a steady 5.00V the higher pH accuracy readings are. It is recommended to calibrate the probe with the standard solution before each use to obtain more accurate results. The best calibration temperature is about 25 ℃. It is necessary to use pure water to clean the probe before measuring another solution to prevent solution contamination. Cleaning with distilled water is recommended. After 2 hours of continuous use, the probe should be calibrated again to ensure the accuracy. Please keep the signal transmitter board clean and dry to avoid affecting the input resistance of the BNC connector. |
---|
- Put the pH probe into the 7.00 standard buffer solution and wait for one minute. Open the serial monitor of the Arduino IDE, then the pH value will be printed on it. The error should be less than 0.3. Record the printed value and compare it with 7.00. The difference should be input into the "Offset" variable in the sample code. For example, the printed value is 6.88, so the difference is 0.12. The "# define Offset 0.00" should be changed to "# define Offset 0.12" in your code. Then upload the new code.
Clean the pH probe with pure water. Distilled Water is recommended. Then absorb the residual water traces with filter paper. Put the pH probe into the 4.00 pH standard solution. Then wait for at least one minute. Then open the serial monitor of the Arduino IDE and adjust the potentiometer on the transmitter board to tune the gain until the printed value is stable at around 4.00.
- Clean the pH probe with pure water. Distilled Water is recommended. Then absorb the residual water with filter paper. After the above steps have been completed, the calibration is complete. Then the pH electrode can be used for the actual measurement.
Measuring the pH Value of Semisolid Material
After the calibration, the pH probe is ready for measuring the pH value of the semisolid material.
During measurement, if bubbles in the glass bulb of the electrode head were found, you could slightly thrown off the probe several times to make the bubbles disappear.
After inserting the pH probe into the test object, it is recommended to wait 5 minutes for reading.
The measurement method is as follows:
- Measuring the pH Value of Fruit
Stab the pH probe spear tip into the flesh of a fruit. The probe should be stabbed about 10mm into the flesh of the fruit. After the measurement, pull out the probe and screw off the spear tip. Wash the probe with pure water or distilled water back and forth. Dry the probe carefully with filter papaer and screw the protection cap back to the probe for the next use.
- Measuring the ph Value of Meat
Stab the pH probe spear tip into your meat.You should stab a centain depth to make sure the glass bulb of the probe has been closely touch with the meat. If the readings is unstable, you can pull the probe out, uninstall the spear tip and directly insert the probe back into the hole in the meat made by the spear tip previously. This will let the probe and the meat have close contact, and the readings will be more stable and reliable. After the measurement, pull out the probe and screw off the spear tip. Wash the probe with thin liquid soap or detergent to get rid of the fat. Then wash the probe with pure water or deionized water back and forth. Dry the probe carefully with filter paper and screw the protection cap back to the probe for the next use.
- Measuring the ph Value of Wet Soil
![]() |
The soil being measured must be wet! And does not contain hard or sharp material! |
---|
The probe can not directly measure dry material, so you should wet the soil with appropriate pure water or distilled water before measurement. Stab the pH probe which has been installed the spear tip into the wet soil.You should stab a centain depth to make sure the glass bulb of the probe closely touches the wet soil. After the measurement,pull out the probe and screw off the spear tip. Wash the probe with pure water or distilled water back and forth. Dry the probe carefully with filter papaer and screw the protection cap back to the probe for the next use.
Sample Code
/***************************************************
DFRobot Gravity: Analog Spear Tip pH Sensor / Meter Kit (For Soil And Food Applications)
<https://www.dfrobot.com/wiki/index.php/Gravity:_Analog_Spear_Tip_pH_Sensor_/_Meter_Kit_(For_Soil_And_Food_Applications)_SKU:_SEN0249>
***************************************************
This product is used to measure the pH value of the semisolid,such as meat,fruit,moist soil and so on.
This sample code reads the pH value.
Created 2017-9-10
By Jason <jason.ling@dfrobot.com@dfrobot.com>
GNU Lesser General Public License.
See <http://www.gnu.org/licenses/> for details.
All above must be included in any redistribution
****************************************************/
/***********Notice and Trouble shooting***************
1. This code is tested on Arduino Uno and Leonardo with Arduino IDE 1.0.5 r2 and 1.8.2.
2. More details, please click this link: <https://www.dfrobot.com/wiki/index.php/Gravity:_Analog_Spear_Tip_pH_Sensor_/_Meter_Kit_(For_Soil_And_Food_Applications)_SKU:_SEN0249>
****************************************************/
#define PHSensorPin A2 //dissolved oxygen sensor analog output pin to arduino mainboard
#define VREF 5.0 //for arduino uno, the ADC reference is the AVCC, that is 5.0V(TYP)
#define OFFSET 0.00 //zero drift compensation
#define SCOUNT 30 // sum of sample point
int analogBuffer[SCOUNT]; //store the analog value in the array, readed from ADC
int analogBufferTemp[SCOUNT];
int analogBufferIndex = 0,copyIndex = 0;
float averageVoltage,phValue;
void setup()
{
Serial.begin(115200);
pinMode(PHSensorPin,INPUT);
}
void loop()
{
static unsigned long analogSampleTimepoint = millis();
if(millis()-analogSampleTimepoint > 30U) //every 30 milliseconds,read the analog value from the ADC
{
analogSampleTimepoint = millis();
analogBuffer[analogBufferIndex] = analogRead(PHSensorPin); //read the analog value and store into the buffer
analogBufferIndex++;
if(analogBufferIndex == SCOUNT)
analogBufferIndex = 0;
}
static unsigned long printTimepoint = millis();
if(millis()-printTimepoint > 1000U)
{
printTimepoint = millis();
for(copyIndex=0;copyIndex<SCOUNT;copyIndex++)
{
analogBufferTemp[copyIndex]= analogBuffer[copyIndex];
}
averageVoltage = getMedianNum(analogBufferTemp,SCOUNT) * (float)VREF / 1024.0; // read the value more stable by the median filtering algorithm
phValue = 3.5 * averageVoltage + OFFSET;
Serial.print("Voltage:");
Serial.print(averageVoltage,2);
Serial.print(" pH value:");
Serial.println(phValue,2);
}
}
int getMedianNum(int bArray[], int iFilterLen)
{
int bTab[iFilterLen];
for (byte i = 0; i<iFilterLen; i++)
{
bTab[i] = bArray[i];
}
int i, j, bTemp;
for (j = 0; j < iFilterLen - 1; j++)
{
for (i = 0; i < iFilterLen - j - 1; i++)
{
if (bTab[i] > bTab[i + 1])
{
bTemp = bTab[i];
bTab[i] = bTab[i + 1];
bTab[i + 1] = bTemp;
}
}
}
if ((iFilterLen & 1) > 0)
bTemp = bTab[(iFilterLen - 1) / 2];
else
bTemp = (bTab[iFilterLen / 2] + bTab[iFilterLen / 2 - 1]) / 2;
return bTemp;
}
FAQ
Q1. How to properly store the pH probe? |
---|
A1. Please add 3.0mol/L KCL(potassium chloride) solution at a height of about 10 mm to the protective solution bottle,and install it on the front of the probe. Put the probe back into the box and store at room temperature. |
Q2. How long does the probe need to be calibrated? |
---|
A. The probe needs to be calibrated with a standard buffer solution before each use. In addition, the probe should be calibrated again after 2 hours of use. |