Soil Scope is a bench platform I developed to record the received signal strength indicator (RSSI) voltage of a 5.8 GHz receiver during soil experiments. It connects a transmitter–receiver assembly to an STM32 Blue Pill and a desktop application, providing a traceable path from analog voltage to stored observations and comparative figures.
The immediate question is an instrumentation question: what voltage response does this receiver produce under the recorded configurations, and how stable is that response over time? Estimating a soil property requires a further experimental and calibration stage. This note documents the implemented acquisition chain and a preliminary comparison between recordings labeled without soil and with a soil sample.
From the experimental assembly to a recorded voltage
The setup comprises a 5.8 GHz transmitter, a receiver with an accessible RSSI output, antennas, and a sample container. The photographs document several configurations used during development. They establish the physical context of the platform; they do not provide a complete geometric specification for every archived recording.
| Initial assembly | Transmitter and receiver | Soil sample configuration |
|---|---|---|
![]() | ![]() | ![]() |
The acquisition unit measures the receiver's RSSI output at PA0, referenced to a common receiver–microcontroller ground. The signal must remain between ground and the analog supply voltage, nominally 3.3 V. A receiver output exceeding that range requires voltage division and a corresponding correction in the conversion to millivolts.
The signal path is:
Loading diagram…
The RF field is not sampled directly by the microcontroller. The recorded observable is the receiver's analog indicator voltage. This distinction determines which physical conclusions the data can support.
Acquisition firmware and voltage conversion
The firmware targets the STM32F103C6T6 using Arduino and PlatformIO. Each transmitted observation is the arithmetic mean of 32 readings from the 12-bit analog-to-digital converter. With ADC codes , the conversion is
where is expressed in millivolts. The firmware uses a nominal value of 3300 mV; the ADC_REFERENCIA_MV constant can be adjusted to the voltage measured on the board. Automatic reference calibration is not implemented.
A 200 μs delay separates ADC readings, and a 100 ms delay follows each transmitted observation. Those delays do not define an exact reporting frequency because conversion and communication add overhead. In the two recordings examined below, the median interval between host timestamps was 108 ms, corresponding to approximately 9.26 reported observations per second. The timestamps describe host-side receipt rather than hardware-timed ADC events.
Alongside millivolts, the firmware transmits a percentage referenced to 2500 mV and clipped to the interval from 0 to 100%. This is a voltage display scale. It does not express received power in dBm, attenuation in decibels, or volumetric soil moisture.
USB CDC provides communication with the computer, with the serial interface configured at 115200 baud and DTR enabled. ST-Link is used for firmware programming. The native USB connection avoids the need for an additional USB-to-UART adapter.
Making acquisition independent of visualization
The desktop application uses Python bindings for Dear ImGui and ImPlot. Its oscilloscope-style display supports adjustable time and voltage scales, automatic vertical scaling, and a crosshair for inspecting coordinates. Statistics over the visible window include mean, RMS, peak-to-peak amplitude, extrema, and standard deviation.

Acquisition runs in a separate thread from rendering. Freezing the display with STOP leaves acquisition active, allowing the visible trace to be inspected while incoming observations continue to enter the buffer. The history retains up to 36,000 observations and must be exported before clearing or reconnecting.
Rendering is limited to 30 frames per second, with displayed data updates at up to 20 Hz. These are visualization limits, independent of the acquisition timing. Long traces are reduced to at most 2,000 displayed points using segment minima and maxima, while statistical calculations and exports preserve the retained observations. CSV loading and figure exports execute in the background.

The offline analysis can load two CSV recordings without a connected board. An optional initial exclusion interval supports inspection after a chosen stabilization period. Exported figures use a fixed analysis snapshot, so changing the live display window does not alter the dataset represented in the exported result.
Preliminary comparison of two recordings
The comparison uses rssi_bar_antenna_no_soil.csv and rssi_bar_antenna_soil_sample.csv, both collected on 12 October 2026. Each file contains 3,000 observations over approximately 324 s. All observations were retained for the reported comparison, including the initial portion of each recording.
| Quantity | Without soil | With soil sample |
|---|---|---|
| Recorded observations | 3,000 | 3,000 |
| Duration (s) | 323.866 | 323.868 |
| Median timestamp interval (s) | 0.108 | 0.108 |
| Mean RSSI voltage (mV) | 1171.20 | 1183.43 |
| Sample standard deviation (mV) | 4.53 | 1.32 |
The mean voltage in the recording labeled with soil exceeded the reference mean by 12.23 mV, equivalent to approximately 1.04% of the reference voltage. The sample standard deviation was lower in the recording with soil. These are descriptive properties of the two recorded time series.

The time series are aligned by elapsed time from the start of each recording, without pairing observations across conditions. The analysis flags values outside the 1.5-interquartile-range limits but does not remove them. Eight repeated timestamps occurred in the reference recording and two in the soil recording; their observations were preserved.
There is one recording per condition. The 3,000 observations within a recording are not 3,000 independent experimental replicates, and temporal dependence has not been quantified. The difference between means therefore does not establish statistical significance, a soil-specific causal effect, or a predictive moisture relationship. Changes in geometry, receiver behavior over time, or other session conditions remain possible contributors.
What the measurements establish
The implemented chain provides receiver-voltage acquisition, timestamped storage, live inspection, and descriptive comparisons. The archived pair shows a difference in voltage level and within-recording variability under the two labels used during acquisition.
The physical interpretation remains conditional on calibration. Recovering received power requires characterization of the receiver's voltage-to-power transfer function. Estimating soil moisture additionally requires independently measured moisture content, controlled sample preparation, and validation on samples or sessions excluded from calibration. The present workflow does not directly recover permittivity, a reflection coefficient, or a backscatter coefficient.
The next experimental stage should separate instrument variability from sample response. A useful protocol would fix antenna spacing and orientation, channel, transmit power, sample mass and depth, and acquisition duration; document warm-up and temperature; and repeat independently prepared conditions in a randomized order. A reference measurement before and after each sequence would help identify drift. These are proposed controls for subsequent experiments, rather than procedures demonstrated by the current data.
Reproducing the comparison
In a checkout of the project repository, create a Python environment and run the offline analysis:
python3 -m venv .venv
.venv/bin/python -m pip install -r scripts/requirements.txt
.venv/bin/python scripts/analyze_soil_rssi.pyThe default command writes statistics, a report, and a comparison figure to analysis/soil_rssi/. Alternative input files, condition labels, an initial exclusion interval, and output locations are available through --help.
The material accompanying this post includes:
- Reference recording without soil.
- Recording with a soil sample.
- Descriptive statistics.
- Original analysis report, in Portuguese.
- Comparison figure.
The project repository contains the firmware, desktop application, and analysis scripts. The current contribution is an inspectable acquisition platform and an exploratory dataset; establishing a soil sensing model remains a separate experimental objective.
Related reading
Data availability
- Data
- /posts/microwave-soil-sensing/estatisticas.csv
The two source recordings, descriptive statistics, analysis report, and comparison figure accompany this note. The comparison contains one recording per condition and does not establish a calibrated soil moisture response.








