1. System Objectives
Agricultural projects supported by OurSiamDream operate in climates subject to severe wet-dry seasonality. Over-irrigation leaches soil nutrients and depletes precious village groundwater, while under-irrigation strains young fruit trees during dry season droughts.
This runbook guides field technicians through the assembly, soil calibration, and LoRaWAN gateway registration for automated precision micro-irrigation nodes.
2. Sensor Placement & Soil Depth Stratification
Ground Surface 0cm
=========================================================== [Mulch Layer]
|
| 15cm Depth: Root-Zone Probe A
+---> Measures active feeder roots & surface evaporation
|
| 45cm Depth: Deep Subsoil Probe B
+---> Detects aquifer recharge & water-table drainage
|
Subsoil 60cm+
3. LoRaWAN Uplink Packet Format (Hex Spec)
To conserve battery life and comply with the Thailand NBTC AS923 duty-cycle regulations, metrics are packed into a compact 8-byte payload:
| Byte Index | Measurement | Encoding Type | Resolution |
|---|---|---|---|
| 0 - 1 | Soil Volumetric Water Content (VWC) | 16-bit Unsigned Integer | 0.01% (0-10000) |
| 2 - 3 | Soil Temperature (°C) | 16-bit Signed Integer | 0.01°C (-2000 to +6000) |
| 4 - 5 | Soil Electrical Conductivity (EC) | 16-bit Unsigned Integer | 1\,\mu\text{S/cm} |
| 6 | Battery Voltage | 8-bit Unsigned Integer | 0.02\,\text{V} + 1.8\,\text{V} |
| 7 | Valve Status & Flags | Bitmask (Bit 0: Open/Closed) | Binary Flag |
4. ChirpStack Payload Decoder (JavaScript)
Paste this decoder into your ChirpStack or TTN Application Device Profile:
function decodeUplink(input) {
var bytes = input.bytes;
var vwc = ((bytes[0] << 8) | bytes[1]) / 100.0;
var temp = (((bytes[2] << 8) | bytes[3])) / 100.0;
var ec = (bytes[4] << 8) | bytes[5];
var batt = (bytes[6] * 0.02) + 1.8;
var valveOpen = (bytes[7] & 0x01) === 1;
return {
data: {
soil_moisture_vwc_percent: vwc,
soil_temperature_celsius: temp,
soil_ec_us_cm: ec,
battery_voltage: Number(batt.toFixed(2)),
valve_state: valveOpen ? "OPEN" : "CLOSED"
}
};
}
5. Field Commissioning Checklist
- Slurry calibrate capacitive sensor in local soil bucket prior to trench burial.
- Ensure sensor PCB housing is sealed with marine-grade silicone and IP67 gland.
- Orient LoRa antenna vertically at least 1.5 meters above maximum crop foliage height.
- Verify gateway RSSI is stronger than -115\,\text{dBm} and SNR is > -5\,\text{dB}.
- Program safety cutoff timer in valve firmware: maximum 30-minute runtime per trigger event.
- Pack trench tightly to eliminate air pockets around sensor prongs.