Skip to content

Sensor Data Outputs

The uThing::iPH provides precise pH and temperature measurements. This page details each output field and the available reporting formats.


Data Dictionary

This section serves as a reference for every data point the device can report.


pH
Units: pH
Range: 0 to 14

Description: The measured pH value. The JSON and human-readable formats provide two sub-fields:

  • last: The most recent pH measurement.
  • average: A running average of the pH measurements.
voltage
Units: Millivolts (mV)
Range: -536 to +536
Description: The raw voltage potential reported by the pH electrode. This is the direct input to the pH calculation. It is provided in last and average sub-fields.
temperature
Units: Degrees Celsius (°C)
Range: -55 to +125

Description: The temperature used for Automatic Temperature Compensation (ATC). The output provides two distinct values:

  • onBoard: The temperature measured by the sensor integrated into the uThing::iPH dongle.
  • external: The temperature measured by the external waterproof probe. Reads 0 if the probe is not connected.
Temperature Compensation

When a external temperature sensor probe is not used, the system will use the onboard temperature sensor for automatic temperature compensation.


Output Formats

The device can report the data above in three different formats. You can change the format by sending a configuration command.

JSON (Default)

The default format is JSON, which is easily parsed by most applications.

{
    "ph": {
        "last": 6.378,
        "average": 6.381
    },
    "voltage": {
        "last": 38.21,
        "average": 38.07
    },
    "temperature": {
        "onBoard": 23.10,
        "external": 23.31
    }
}

CSV

For easy logging to spreadsheets, you can use the Comma-Separated Values (CSV) format.

The column order is:

ph_last, ph_average, voltage_last, voltage_average, temperature_onBoard, temperature_external

6.378,6.381,38.21,38.07,23.10,23.31
Tip: Logging to a CSV File

As a quick way to do simple datalogging, the sensor data can be sent to a plain text file with the following command:

cat /dev/ttyACM0 > uThingIPH.csv &
The & symbol runs the process in the background. The generated file can then be opened in Excel or any spreadsheet application.

Human-Readable

This format includes units and is useful for quick interactive checks in a serial terminal.

pH: [last: 6.378, Average: 6.381], voltage: [last: 38.21 mV, Average: 38.07 mV], temperature: [OnBoard: 23.10 C, External: 23.31 C]