Gravity__Analog_Spear_Tip_pH_Sensor___Meter_Kit__For_Soil_And_Food_Applications__SKU__SEN0249-DFRobot

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

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

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.

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:

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.

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.

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.

Documents

Schematic
PCB Design Layout

DFshopping_car1.png Get Gravity: Analog Spear Tip pH Sensor / Meter Kit from DFRobot Store or DFRobot Distributor.

Turn to the Top