+91-7834999925       contact@tacthub.in

Arduino Liquid pH0-14 Detection Sensor Project

This project is based on detecting the pH level of a liquid on the scale of 0-14 using a simple arduino circuit. The power of Hydrogen (pH) is an important parameter when we need to find whether a solution is acidic or basic or when we want to form a new solution with certain pH value.

Hardware Required

 

  • Liquid pH0-14 Detection Sensor​
  • BNC pH Electrode Probe
  • Arduino
  •  Jumper Wires

 

Software Required

 

  • Arduino IDE


Connections

 

  • Male BNC connector of the electrode probe to the female BNC connector of the sensor.
  • P0 pin of sensor to A1 pin of arduino
  • GND of sensor to GND of arduino
  • Vcc of sensor to 5V of arduino

Code

 

#define SensorPin 1       

unsigned long int avgValue;

float b;

int buf[10],temp;

 

void setup()

{

  pinMode(13,OUTPUT); 

  Serial.begin(9600); 

}

void loop()

{

  for(int i=0;i<10;i++)      

  {

    buf[i]=analogRead(SensorPin);

    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 phValue=(float)avgValue*5.0/1024/6;

  phValue=3.5*phValue;                  

  Serial.print("    pH:"); 

  Serial.print(phValue,2);

  Serial.println(" ");

  digitalWrite(13, HIGH);      

  delay(800);

  digitalWrite(13, LOW);

 

}

Price: 7000 INR

Buy Now