AnyLeaf

Lab-grade digital conductivity (EC) module

For Arduino, Raspberry Pi, embedded

Accurate

Easy to use

Affordable

Coming soon!

For laboratory, hydroponics, aquarium, and brewing

Available with lab-grade K=1.0 probe. Connects directly to your device (Arduino, Raspberry Pi, or embedded) - no other parts required. Our open-source software makes measuring fast and easy. Compatible with probes of other conductivivity constants. (eg K=0.1, K= 10)

Suitable for continuous immersion

This module can be used with any conductivity probe with a BNC connection. The UART interface can communicate with nearly any microcontroller.

Fully tested on Arduino, Raspberry Pi, and STM32

Output pins are labeled on the board, as follows:

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 Serial is enabled. (Run raspi-config. Select P6 Serial. Do not allow a login shell to be accessible. Enable the serial port hardware).

Example code, and driver source

A miminal Arduino example

#include <Anyleaf.h>

EcSensor ecSensor;

void setup(void) {
    Serial.begin(9600);

    ecSensor = EcSensor();
}

void loop(void) {
    Serial.print("conductivity: "); Serial.println(ecSensor.read());

    delay(1000);
}

A miminal Raspberry Pi Python example

import time
from anyleaf import EcSensor, OnBoard

def main():
    delay = 1  # Time between measurements, in seconds
    ec_sensor = EcSensor(K=1.0)

    while True:
        print(f"conductivity: {ec_sensor.read(OnBoard())}")

        time.sleep(delay)


if __name__ == "__main__":
    main()

Datasheet

Can be calibrated using a single point, but this isn't required.

Specifications:

Specifications pertaining to the K=1.0 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 EC as an input.