This project is a bare-metal wireless telemetry system built on STM32 microcontrollers. The edge node samples soil moisture and temperature over I2C, packages the payload, and transmits telemetry over a sub-GHz LoRa RF link to a central gateway hub, which streams real-time diagnostic logs to a workstation terminal via UART.
FIG 1.0 — System Overview: Dual STM32 node configuration sampling soil telemetry over I2C and routing sub-GHz payloads over 915MHz LoRa RF to gateway UART log.
Sensor data acquisition is handled through an Adafruit Seesaw coprocessor over I2C on the primary edge node. Developing bare-metal C drivers required extracting 32-bit big-endian register values, handling bitwise byte order reconstruction, and scaling raw capacitive measurements into standard physical units.
FIG 1.1 — Edge Sensor Node: I2C wiring between the primary STM32 node and the capacitive sensor coprocessor, including pull-up resistor verification and logic probing.
To extend communications far past short-range limitations, raw telemetry buffers are serialized and passed over high-speed SPI to a 915MHz LoRa transceiver. The receiving central gateway hub captures the sub-GHz payload, unpacks the data string, and streams live diagnostic logs directly over UART to the host workstation console at 115200 Baud.
FIG 1.2 — Central Hub Gateway: Receiving node running bare-metal LoRa receiver firmware and UART serial logging setup.
FIG 1.3 — Live Telemetry Stream: Console log updating in real time, demonstrating dynamic capacitance jumps as physical contact with the sensor blade alters the payload on each LoRa pulse.
Hardware testing exposed critical edge cases under real-world bus conditions, including persistent I2C state lockups (`0xFFFF`) caused by uncleared open-drain slave registers and inadequate ADC conversion windows. Resolving these required introducing software reset sequences, optimizing bus timing parameters, and enforcing 20ms delays between write commands and read executions.