Complete step-by-step electronics wiring, pin assignments, and power regulation design
This document details the hardware configurations for the two nodes comprising the **Solar Soil IoT System**: the battery-powered field **Main Sensor Node** (which collects metrics and transmits them via LoRa) and the wall-powered **Gateway Node** (which translates incoming LoRa packets into MQTT events over Wi-Fi).
The following tables represent the components allocated from the project hardware manifest for both nodes.
| Component | Purpose | Priority | Reichelt Part No. |
|---|---|---|---|
| ESP32-C6 DevKit N8 | Main RISC-V microcontroller with sleep support | Essential | esp32-c6 n8 |
| SX1276 LoRa Module (868 MHz) | Wireless transceiver SPI breakout (RFM95W compatible) | Essential | - |
| LoRa Antenna 868MHz (SMA) | Provides high-efficiency RF transmission path | Essential | ora_868_mhz_antenna_sma_plug |
| Capacitive Soil Moisture v1.2 | Analog soil moisture sensor (corrosion resistant) | Essential | sensor_bodenfeuchte_-223620 |
| DHT22 Sensor Breakout | Reads ambient air temperature and humidity | Essential | dht22 |
| INA219 Power Monitor | I2C High-side bus voltage and current sensing | Optional | ina219 |
| Solar Panel 6V 2W | Charges batteries during sunlit hours | Essential | - |
| 4x AA NiMH Batteries (GP ReCyko) | 4.8V rechargeable battery pack | Essential | recyko_nimh-akku_aa_mignon_2100_mah |
| 4x AA Battery Holder | Series battery carriage box | Essential | holder AA |
| LM2596 Buck Converter | Regulates fluctuating battery pack voltage to 5.0V | Essential | 2596-buvk-convtr |
| Schottky Diode 1N5819 | Blocks reverse flow from battery into solar panel | Essential | in5819 |
| Passive Kit | 4.7kฮฉ, 10kฮฉ resistors; 100nF, 10ยตF capacitors | Essential | - |
| Component | Qty | Purpose | Priority | Reichelt Part No. |
|---|---|---|---|---|
| ESP32-C6 DevKit N8 | 1 | Gateway logic supervisor and Wi-Fi station connection | Essential | esp32-c6 n8 |
| LoRa Module 868MHz | 1 | Listens for sensor node telemetry frames (RFM95W/SPI) | Essential | - |
| LoRa Antenna 868MHz SMA | 1 | Ensures wide-area receive signal coverage | Essential | ora_868_mhz_antenna_sma_plug |
| OLED Display 0.96" SSD1306 | 1 | Displays local network status, Wi-Fi IP, and metrics | Optional | oled_display_0_96_128x64_pixels_ |
| USB 5V/2A Adapter | 1 | Steady 230V AC grid to 5V DC converter | Essential | - |
| USB-C Cable (1m) | 1 | Provides power and programming connection to ESP32 | Essential | - |
The Main Node is solar-recharged and battery-buffered. Precision regulation is required to step down charging currents safely and protect the ESP32 input rails.
[ SOLAR PANEL ]
(+) โโโโโโโบ [ 1N5819 DIODE (Anode) ] โโ [ (Cathode) ] โโโ
(-) โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโ
โ โ
โผ โผ
[ BATTERY PACK (4.8V) ]
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโ
โผ โผ
[ LM2596 BUCK CONVERTER ]
IN(+) โโโ IN(-)
OUT(+) โโ OUT(-)
โ โ
โผ โผ
[ BREADBOARD POWER RAILS ]
(+) โโโโโโ (-)
(5V) (GND)
Step-by-step Power Assembly Flow:
Battery Holder (+) โโโบ INA219 VIN(+) โโโบ INA219 VIN(-) โโโบ LM2596 IN(+).
The following mapping connects the sensors and the SX1276 LoRa transceiver module to the **ESP32-C6** developer board on the breadboard.
| ESP32-C6 Pin | Component Pin | Signal Name / Description |
|---|---|---|
| 5V (or VIN) | LM2596 OUT(+) | Main 5.0V Power Input (Regulated) |
| GND | LM2596 OUT(-) | Common Ground Reference |
| 3.3V | Sensors & LoRa VCC | Power distribution rail for low-power modules |
| GPIO 5 | LoRa SCK | SPI Clock |
| GPIO 19 | LoRa MISO | SPI Master In Slave Out |
| GPIO 27 | LoRa MOSI | SPI Master Out Slave In |
| GPIO 18 | LoRa SS / NSS | SPI Slave Select (Chip Select) |
| GPIO 14 | LoRa RST | SPI Reset Line |
| GPIO 26 | LoRa DIO0 | LoRa Interrupt Request Pin (detects packet transmissions) |
| GPIO 4 | DHT22 DATA | Single-bus Digital Temperature/Humidity Data Stream |
| GPIO 36 | Soil moisture AOUT | ADC Analog Input (Soil Moisture Permittivity Voltages) |
| GPIO 21 | INA219 SDA | I2C Serial Data |
| GPIO 22 | INA219 SCL | I2C Serial Clock |
The Gateway Node relies on external USB supply. It utilizes a similar SPI interface for the LoRa module, and connects an optional 0.96" SSD1306 OLED screen over I2C to show diagnostic sync states.
| ESP32-C6 Pin | Component Pin | Signal Name / Description |
|---|---|---|
| USB 5V | USB-C Port | Main 5.0V power input from wall adapter |
| 3.3V | LoRa & OLED VCC | Powers the receiver module and I2C display panel |
| GND | LoRa & OLED GND | Common Ground Reference |
| GPIO 5 | LoRa SCK | SPI Clock |
| GPIO 19 | LoRa MISO | SPI Master In Slave Out |
| GPIO 27 | LoRa MOSI | SPI Master Out Slave In |
| GPIO 18 | LoRa SS / NSS | SPI Slave Select / CS |
| GPIO 14 | LoRa RST | SPI Reset Line |
| GPIO 26 | LoRa DIO0 | LoRa Packet Rx Notification Line |
| GPIO 4 | OLED SDA | I2C Data line for SSD1306 Display |
| GPIO 15 | OLED SCL | I2C Clock line for SSD1306 Display |
| GPIO 16 | OLED RST | OLED Screen Hardware Reset Pin |
To prevent sensor reading jitter and ensure RF stability during LoRa transmission bursts, the passive components in the hardware kit must be connected as follows:
Use these visual connection maps to complete your breadboard hookups quickly and reliably. Wires are color-coded to standard prototyping conventions.
| LoRa SX1276 Pin | ESP32-C6 Pin | DHT22 Pin | ESP32-C6 Pin | Soil Moisture Pin | ESP32-C6 Pin |
|---|---|---|---|---|---|
| VCC (3.3V) | 3.3V | 1. VCC (3.3V) | 3.3V | VCC (3.3V) | 3.3V |
| GND | GND | 2. DATA | GPIO 4 | GND | GND |
| SCK | GPIO 5 | 3. NC | - | AOUT | GPIO 36 |
| MISO | GPIO 19 | 4. GND | GND | INA219 Bus Connections | |
| MOSI | GPIO 27 |
DHT22 Pull-Up: Connect a 4.7kฮฉ resistor between VCC (3.3V) and DATA (GPIO 4) pins. |
SDA | GPIO 21 | |
| CS / NSS | GPIO 18 | SCL | GPIO 22 | ||
| RST | GPIO 14 | VIN(+) | Battery Holder (+) | ||
| DIO0 | GPIO 26 |
LoRa Decoupling: 100nF Cap across VCC and GND. |
VIN(-) | LM2596 IN(+) | |
| LoRa RX Pin | ESP32-C6 Pin | SSD1306 OLED Pin | ESP32-C6 Pin | Required Action |
|---|---|---|---|---|
| VCC | 3.3V | VCC | 3.3V |
Continuous Power: Ensure the Gateway board remains powered via a USB-C cable hooked to the 5V/2A mains wall plug adapter. |
| GND | GND | GND | GND | |
| SCK | GPIO 5 | SDA | GPIO 4 | |
| MISO | GPIO 19 | SCL | GPIO 15 | |
| MOSI | GPIO 27 | RST | GPIO 16 | OLED Setup: Uses software-driven I2C connection paths on pins 4 & 15. |
| CS / NSS | GPIO 18 | - | ||
| RST | GPIO 14 | - |
LoRa Decoupling: Connect a 100nF decoupling capacitor across VCC and GND. |
|
| DIO0 | GPIO 26 | - | ||