Skip to main content Microfireย 

Mod-pH for Arduino



๐Ÿ“ฆ Arduino

Library available in Arduino IDE and PlatformIO

PDF DOC HTML

๐Ÿ“’ Datasheet

Datasheet

PDF DOC HTML


1.

๐Ÿ”ฝ Install Arduino IDE

Install the Arduino IDE

2.

๐Ÿ“ฆ Install the library

Start the Arduino IDE, press the Sketch menu, and thenInclude Library > Manage Libraries. Search for Microfire_Mod-pH and install the library.

3.

๐Ÿ”Œ Connections

  • Wiring for ESP32 and the sensor module
    Module
    Controller
    GND ground
    VCC 3.3 - 5 volt power supply
    SCL SCL
    SDA SDA
    PROBE_1 input probe wire
    PROBE_2 reference probe wire
  • Wiring for ESP32 and the carrier board
    Carrier Board
    Controller
    GND ground
    VIN 3.3 - 5 volt power supply
    SCL SCL
    SDA SDA
    1W optional 1-wire device signal line
    EN optional EN wire, drive HIGH to disable both power modules
    Carrier 1W Header
    1-Wire Sensor
    GND ground
    VCC 3.3 - 5 volt power supply
    SIG signal data line for 1-Wire sensor

    Probe connection is made with the SMA connector, using a SMA-BNC Bulkhead or similar.


4.

๐Ÿ”ข Code

Below is the Basic example. It can be found in File > Examples > Microfire_Mod-pH > Basic in the Arduino IDE.

1
#include <Microfire_Mod-pH.h>
2
Microfire::Mod_pH::i2c ph;
3

4
void setup() {
5
	Serial.begin(9600);
6
	Wire.begin();
7
	ph.begin();
8
}
9

10
void loop() {
11
	ph.measurepH(ph.tempC);
12
	Serial.println((String) ph.pH + " pH");
13
	delay(1000);
14
}


5.

โžก๏ธ Upload the code

Pick the board and port, then Upload the code.


6.

๐Ÿ”Ž View the output

Open the Serial Monitor, measurements should be displayed in the monitor, with updates every second.



Related items