pH Measurement with Arduino

This tutorial will guide you How to measure water quality and other parameters ? and How  to use with Arduino? In this tutorial we use analog 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. If you measure the dirty aqueous solution, you need to increase the frequency of calibration.


  • Water quality testing
  • Aquaculture

In chemistry, pH is the negative log of the activity of the hydrogen ion in an aqueous solution. Solutions with a pH less than 7 are said to be acidic and solutions with a pH greater than 7 are basic or alkaline. Pure water has a pH of 7. Contrary to popular belief, this value can extend past 0 or 14 for sufficiently concentrated acids and bases, however it is difficult to measure precisely.
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.

Step to Use the pH Sensor with Arduino


  • Please use an external switching power supply, and the voltage as close as possible to the +5.00V. More accurate the voltage, more 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.

Step 1: Components Required for pH Measurement

ph Measurement Components
ph Measurement Components

Step 2: pH Measurement Arduino Circuit

Do not solder on pH Module, it is high sensitive, high impedance circuit. You may easily damage it by soldering wires on it, Never cut or solder the BNC Connector wires.

Connect pH sensor according to the circuit diagram, that is, The pH electrode is connected to the BNC connector on the pH sensor circuit board,and pH sensor board is connected to the digital pins 2 and 3 (software serial) of the Arduino controller. When the Arduino controller gets power,you will see the blue LED on board is on. (color and LED depends on board manufacturer)

Arduino ph Measurement Circuit
ph Measurement Circuit

Step 3: pH Measurement Arduino Code

Upload the sample code to the Arduino controller.

Step 4: Testing and Result

Put the pH electrode into the standard solution whose pH value is 7.00. Open the serial monitor of the Arduino IDE, you can see the pH value printed on it.

Leave a Reply