Let’s design a LoRaWAN sensor for EU868 using the formulas above. Goal: 5-year battery life on 2× AA batteries (2400 mAh).
Step 1: Choose spreading factor
- Urban environment, gateway at 500m
- Free Space Path Loss: \(\text{FSPL} = 20\log_{10}(500) + 20\log_{10}(868 \times 10^6) - 147.55 = 85.5\,\text{dB}\)
- Link budget: \(P_{rx} = 14\,\text{dBm} + 2\,\text{dBi} + 2\,\text{dBi} - 85.5\,\text{dB} - 10\,\text{dB margin} = -77.5\,\text{dBm}\)
- SF7 sensitivity is -123 dBm → link margin = \(-123 - (-77.5) = 45.5\,\text{dB}\) → SF7 works comfortably
Step 2: Calculate airtime and duty cycle
- Payload: 12 bytes, SF7 → airtime ≈ 40 ms
- EU868 duty cycle: 1% = 36 seconds TX per hour max
- Messages allowed per hour: \(36\,\text{s} \div 0.04\,\text{s} = 900\) messages/hour max
- We want 1 message every 10 minutes = 6 messages/hour → well within duty cycle (OK)
Step 3: Battery life calculation \[
\begin{align}
\text{Sleep current: } & 1\,\mu\text{A}\\
\text{TX current: } & 30\,\text{mA} \text{ @ 14 dBm}\\
\text{TX time: } & 40\,\text{ms per message}\\
\text{Messages: } & 6/\text{hour} = 144/\text{day}
\end{align}
\]
Average current: \[
I_{avg} = \frac{1\,\mu\text{A} \times (24 \times 3600 - 144 \times 0.04) + 30\,\text{mA} \times (144 \times 0.04)}{24 \times 3600} = 0.0487\,\text{mA}
\]
Battery life: \((2400\,\text{mAh} \times 0.8) \div 0.0487\,\text{mA} = 39,424\,\text{hours} = 1,643\,\text{days} = 4.5\,\text{years}\) (OK)
Key insight: Sleep current dominates! Even though TX is 30 mA vs 1 µA sleep, the device spends 99.93% of time sleeping. Reducing sleep current from 1 µA to 0.5 µA gains 1.25 years; reducing TX power from 14 dBm to 10 dBm (15 mA) only gains 2 months.