Skip to content

uThing::MNL sensor data output

Reported datapoints

The following table shows the data outputs from the device:

Output variable Unit Range Description
Noise - RMS dB (SPL) +20 - +130 ambient RMS noise SPL level (125ms long window)
Noise - Base dB (SPL) +20 - +130 ambient base noise SPL level
Noise - Peak dB (SPL) +20 - +130 ambient peak noise SPL level
PIR - detections - 0 - 10k motion detections during the last sampling period
PIR - detPerHour - 0 - 10k detections triggered during the last hour
Light - Last lux 0.01 - 64k Luminosity level - last measurement
Light - Average lux 0.01 - 64k Luminosity level - averaged (exponential moving filter)

MEMS microphone and SPL

The MEMS microphone is used to measure the ambient noise and the MCU uses digital signal processing to calculate the SPL (Sound Pressure Level), which is a logarithmic measure of the pressure level of a sound. By no means the microphone is used to sample intelligible voice or audio data, the only sound information transmited to the USB host are the SPL level measured over a 125ms time window, as in a Sound Level Meter (decibel-meter).

uThing::MNL™ provides three different reporting formats for the processed data. Check the configuration section below for instructions on how to change this output format.

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.

{
    "noise": {
        "rms": 30.8,
        "peak": 33.5,
        "base": 29.4
    },
    "pir": {
        "detections": 0,
        "detPerHour": 59
    },
    "light": {
        "last": 40.97,
        "average": 65.28
    }
}

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:

[noise_rms], [noise_peak], [noise_base], [pir_detections], [pir_lastHourD], [light_last], [light_average]
Output example:

35.3, 35.3, 30.0, 0, 65, 31.72, 39.39
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 > uThingMNL.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:

Noise: [rms: 33.2 dB, Peak: 37.8 dB, Base: 33.2 dB], 
PIR: [detections 0, detections/hour 67], 
Light: [Last 27.89, Average 32.98]