Lab-grade digital pH and ORP circuit

For Arduino, Raspberry Pi, embedded


Easy to use


Buy with pH probe for $60

Buy with ORP probe for $80

Buy without probe for $20

For laboratory, hydroponics, aquarium, and brewing

Available with lab-grade pH probe. Connects directly to your device (Arduino, Raspberry Pi, or embedded) - no other parts required. Our open-source software makes measuring fast and easy.

Suitable for continuous immersion

Beyond pH

Includes temperature compensation, with built in sensor. Can be used with Oxidation Reduction Potential(ORP) , and other ion-selective electrodes. (Nitrate, Potassium, etc) probes.

This module can be used with any probe with a BNC connection. The I2C interface can send data to nearly any microcontroler.

Fully tested on Arduino, Raspberry Pi, and STM32

Output pins are labeled on the board, as follows:

Arduino wiring

Raspberry Pi wiring

Installing software

Arduino: From the Arduino IDE: SketchInclude LibraryManage Libraries → select Anyleaf

C++: Download Anyleaf.cpp and Anyleaf.h from the C++ Github link below, and place them in your project directory

Python: Run sudo apt install python3-scipy, then pip3 install anyleaf. Ensure I2C is enabled.

Example code, and driver source

A miminal Arduino example

#include <Anyleaf.h>

PhSensor ph_sensor;

void setup(void) {

    ph_sensor = PhSensor();

        CalPt(0., 7., 25.), CalPt(0.18, 4., 25.)

void loop(void) {
    Serial.print("pH: "); Serial.println(;


A miminal Raspberry Pi Python example

import time
import board
import busio
from anyleaf import PhSensor, CalPt, OnBoard

def main():
    i2c = busio.I2C(board.SCL, board.SDA)
    delay = 1  # Time between measurements, in seconds
    ph_sensor = PhSensor(i2c, delay)

        CalPt(0., 7., 25.), CalPt(0.18, 4., 25.)

    while True:
        print(f"pH: {}")


if __name__ == "__main__":


Regular calibration is required for accurate measurements. The official drivers support 2 or 3 point calibration. 2 point is sufficient for hydroponics, aquarium, or brewing use. 3 points, or 2 carefully chosen points are required for sufficient accuracy for lab use.


Specifications pertaining to the pH probe only:

Compatible with the Mycodo Environmental Monitoring and Regulation System. If you're using a Raspberry Pi, this is a simple way to get it running with a GUI, charts, and logging. Follow the installation instructions on that page, and add AnyLeaf pH as an input.