Lab-grade digital conductivity (EC) module

For Arduino, Raspberry Pi, embedded

The EC module is currently is out of stock🙁.


Easy to use


ec conductivity module / circuit
ec conductivity module / circuit
EC conductivity probe

Buy module and K=1.0 probe for $80

Buy module only for $40

Buy K=1.0 probe for $40

For laboratory, hydroponics, aquarium, and education

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 minimal Arduino example

#include <Anyleaf.h>

EcSensor ecSensor;

void setup(void) {
    ecSensor = EcSensor(1.0);  // Set K=1.0

void loop(void) {
    float ec =;
    float airTemp = ecSensor.read_temp();


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: {}")


if __name__ == "__main__":


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


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.