Arduino pH-meter using PH-4502C

Reading time: 2 minutes.

Last modified: 23 April 2020

Let’s build a simple pH-meter, all we need are Arduino (Uno/Nano/Whatever), PH-4502C and BNC probe.

Arduino pH-meter

PH Probe Sensor Pinout

TO – Temperature output

DO – 3.3V pH limit trigger

PO – PH analog output

Gnd – Gnd for PH probe

Gnd – Gnd for board

VCC – 5V DC

POT 1 – Analog reading offset (Nearest to BNC connector)

POT 2 – PH limit setting

Calibration

This board have the ability to supply a voltage output to the analogue board that will represent a PH value just like any other sensor that will connect to an analog pin.

Looks like PH=0 should be presented by 0V output and a PH=14 to represent 5V, but… NO

Neutral PH=7 set to 0V, this means that the voltage will go into the minuses when reading acidic PH values and obviously cannot be read by the analog Arduino port.

The offset pot is used to change this so that a PH=7 will read the expected 2.5V to the Arduino analog pin, the analog pin can read voltages between 0V and 5V hence the 2.5V that is halfway between 0V and 5V as a PH=7 is halfway between PH 0 and PH 14.

You will need to turn the offset potentiometer to get the right offset, the offset pot is the blue pot nearest to the BNC connector.

To set the offset is fairly easy.

  1. Disconnect the probe short-circuit the BNC connector.
  2. Use your multimeter to adjust the offset potentiometer until PO measures 2.5V
  3. Done

Wiring diagram

  1. PO => Arduino A0
  2. GND =>Arduino GND
  3. GND =>Arduino GND

Sketch

#include <Arduino.h>

int pHSense = A0;
int samples = 10;
float adc_resolution = 1024.0;

void setup()
{
    Serial.begin(9600);
    delay(100);
    Serial.println("cimpleo pH Sense");
}

float ph (float voltage) {
    return 7 + ((2.5 - voltage) / 0.18);
}

void loop()
{
    int measurings=0;

    for (int i = 0; i < samples; i++)
    {
        measurings += analogRead(pHSense);
        delay(10);

    }

    float voltage = 5 / adc_resolution * measurings/samples;
    Serial.print("pH= ");
    Serial.println(ph(voltage));
    delay(3000);
}