Skip to content

uThing::iPH sensor data output

Reported datapoints

The following table shows the data outputs from the device:

Output variable Unit Range Description
pH - latest pH 0 - 14 pH value (last measurement)
pH - average pH 0 - 14 pH value (average)
Voltage - latest mV -536 - +536 raw voltage (last measurement)
Voltage - average mV -536 - +536 raw voltage (average)
Temperature - onBoard ºC -55 - +125 On board temperature sensor
Temperature - probe ºC -55 - +125 Temperature external probe (0 if not present)

JSON

JSON is the default output reporting format due to its ubiquitous use on IoT applications. It’s also human readable. An output example is shown below.

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

CSV

For applications where a simple mean for data-logging is needed, the board can be configured to output the data in CSV format (comma separated values).

When the board is configured in this mode, the column order is the following:

[ph_last], [ph_average], [voltage_last], [voltage_average], [temperature_internal], [temperature_probe]

Output example:

6.378, 6.381, 38.21, 38.07, 23.10, 23.31
tip: Exporting CSV data to Excel

As a quick way to do some simple datalogging into a file, the sensor data can be sent to a plain text file with the following command: $ cat /dev/ttyACM0 > uThingIPH.csv

Additionally, if the “&” symbol is added at the end of the command, the process will be forked, and the system will keep storing the data until the user logs out or the dongle is disconnected.

Then the generated file can easily be opened in Excel or any spreadsheet application for evaluation.

Optionally, the column formatting can be pasted into the first line of the generated CSV file, simplifying the analysis on the spreadsheet apps.

Human-readable

The 'human-readable' format reports a more descriptive output that includes the measuring units.

Output example:

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]