Scenario: A city plans to deploy 500 air quality sensors measuring PM2.5, PM10, NO2, O3, and CO every 5 minutes across 25 square kilometers. Each sensor transmits 32-byte readings (5 sensors × 4 bytes each + 12-byte header). Sensors are solar-powered with 5,000 mAh backup battery (must survive 7 days without sun). Network must support 144,000 messages/day total. Data feeds into public health dashboard and triggers pollution alerts.
Step 1 — Calculate Message Load
Per sensor:
Messages per day: 1440 minutes ÷ 5 = 288 messages
Payload size: 32 bytes (sensor data)
Daily data per sensor: 288 × 32 = 9,216 bytes = 9 KB
Network-wide:
Total messages: 500 sensors × 288 = 144,000 messages/day
Total data (payload only): 500 × 9 KB = 4.5 MB/day
Step 2 — Evaluate Protocol Candidates
Option A: LoRaWAN (SF9, 125 kHz)
Physical overhead: 13 bytes (LoRaWAN header)
Total packet: 32 + 13 = 45 bytes
Time on air (SF9): 45 bytes × 8 bits ÷ 3,125 bps = 115 ms per message
Daily airtime per sensor: 288 × 115 ms = 33.1 seconds
Network daily airtime: 500 × 33.1s = 16,550 seconds = 4.6 hours
Duty cycle check (EU868 1% limit):
Required airtime: 4.6 hours = 19.2% of day ❌ VIOLATES 1% LIMIT
Verdict: LoRaWAN fails due to duty cycle violation. At 288 msgs/day, would need ~20 gateways to stay under 1% per gateway (expensive).
Option B: NB-IoT (LTE Cat-NB1)
Physical overhead: 20 bytes (IPv6) + 8 (UDP) + 4 (CoAP) = 32 bytes
Total packet: 32 + 32 = 64 bytes
Transmission time: 64 bytes × 8 bits ÷ 62,500 bps = 8.2 ms per message
Power consumption:
- TX current: 200 mA (NB-IoT modem at 23 dBm)
- PSM sleep: 10 µA (power-saving mode)
- TX time per day: 288 × 8.2 ms = 2.36 seconds
Daily energy:
TX: 200 mA × 2.36s ÷ 3600 = 0.131 mAh
Sleep: 0.01 mA × 86,397.6s ÷ 3600 = 0.24 mAh
Total: 0.37 mAh/day
Battery life (no solar):
5000 mAh ÷ 0.37 mAh/day = 13,514 days = 37 years ✓ EXCEEDS 7-DAY BACKUP
Cost analysis:
- Module cost: $15/sensor × 500 = $7,500
- SIM subscription: $2/month/sensor × 500 × 12 months = $12,000/year
- Gateway infrastructure: $0 (uses cellular towers)
- Total 5-year cost: $7,500 + $60,000 = $67,500
Option C: Wi-Fi Mesh (802.11ah - Wi-Fi HaLow)
Physical overhead: 36 bytes (Wi-Fi) + 40 (IPv6) + 8 (UDP) + 2 (MQTT) = 86 bytes
Total packet: 32 + 86 = 118 bytes
Transmission time: 118 bytes × 8 bits ÷ 150,000 bps = 6.3 ms per message
Power consumption:
- TX power: 50 mW (Wi-Fi HaLow, lower than traditional Wi-Fi)
- Connected standby: 5 mA (Wi-Fi association + periodic beacons)
- TX time per day: 288 × 6.3 ms = 1.81 seconds
Daily energy:
TX: 50 mA × 1.81s ÷ 3600 = 0.025 mAh
Standby: 5 mA × 86,398.2s ÷ 3600 = 120 mAh/day
Total: 120.03 mAh/day
Battery life (no solar):
5000 mAh ÷ 120.03 mAh/day = 41.7 days ⚠ MARGINAL (only 6x safety margin)
Cost analysis:
- Module cost: $25/sensor × 500 = $12,500
- Access points: 50 APs × $300 = $15,000
- Network controller: $5,000
- Total 5-year cost: $12,500 + $15,000 + $5,000 = $32,500
Step 3 — Decision Matrix
| Duty cycle compliance |
❌ Violates |
✓ N/A |
✓ N/A |
Critical |
| 7-day battery backup |
✓ 37 years |
✓ 37 years |
⚠ 42 days |
Critical |
| 5-year cost |
$35K (~20 gateways) |
$67.5K |
$32.5K |
Important |
| Coverage (25 km²) |
✓ (~20 gateways) |
✓ (cellular) |
⚠ (50 APs) |
Important |
| Dashboard integration |
Gateway→MQTT |
Native CoAP |
Native MQTT |
Moderate |
| Public/private network |
Private |
Public cellular |
Private |
Moderate |
| Latency |
1-5 seconds |
1-10 seconds |
50-200 ms |
Low priority |
Step 4 — Adjusted LoRaWAN Analysis
Can we make LoRaWAN work? Try reducing message frequency:
LoRaWAN with 15-minute intervals (instead of 5-minute):
Messages per day: 1440 ÷ 15 = 96 messages/day per sensor
Network messages: 500 × 96 = 48,000 messages/day
Daily airtime: 48,000 × 115 ms = 5,520 seconds = 1.53 hours = 6.4% of day
Required gateways to stay under 1% duty cycle: 6.4 ÷ 1 = 7 gateways
Gateway cost: 7 × $1,500 = $10,500
Total 5-year cost: $7,500 (sensors) + $10,500 (gateways) + $5,000 (server) = $23,000
✓ Now complies with duty cycle AND is cheapest option.
Step 5 — Final Recommendation
Choice: LoRaWAN with 15-minute intervals + CoAP
Trade-off accepted: Reduced from 5-minute to 15-minute sampling frequency. Air quality changes slowly enough that 15-minute resolution still meets public health monitoring needs.
Rationale:
- Lowest 5-year cost: $23K vs $32.5K (Wi-Fi) vs $67.5K (NB-IoT)
- No subscriptions: One-time gateway cost, no monthly SIM fees
- Excellent battery life: 37-year theoretical, easily exceeds 7-day backup requirement
- Duty cycle compliance: 7 gateways provide redundancy and stay under 1% per gateway
- Private network: City owns infrastructure, no dependency on cellular carriers
Implementation:
- 7 LoRaWAN gateways placed at 2 km spacing across city
- Adaptive Data Rate: sensors near gateways use SF7 (faster, less power), distant sensors use SF11
- Gateway-to-cloud: MQTT over 4G/LTE from each gateway
- Sensor payload: Custom binary (32 bytes) with CRC, no JSON overhead
Why NOT NB-IoT despite better battery: $44K savings over 5 years (vs NB-IoT) justifies reduced sampling frequency. For budget-constrained municipal deployments, capital cost often trumps technical superiority.
Key lesson: Protocol selection isn’t always about maximizing every metric. Sometimes adjusting requirements (15-min vs 5-min) unlocks a dramatically cheaper solution that still meets core objectives. Real-world deployments balance technical, economic, and operational constraints.