Let’s quantify how protocol overhead impacts both bandwidth costs and battery life for a real IoT deployment.
Scenario: 1,000 temperature sensors transmitting 2-byte readings every 10 minutes for one year.
Annual message count: \[N_{\text{messages}} = 1{,}000 \text{ sensors} \times \frac{60 \times 24}{10} \times 365 = 52{,}560{,}000 \text{ messages/year}\]
Protocol stack comparison:
Option A: MQTT over TCP/IPv6 (typical cloud MQTT broker) - Overhead: 62 bytes (MQTT 2B + TCP 20B + IPv6 40B) - Bytes per message: \(2 + 62 = 64\) bytes - Annual data: \(52{,}560{,}000 \times 64 = 3{,}363{,}840{,}000\) bytes \(\approx 3.2\) GB - Bandwidth cost @ $0.10/MB: \(3{,}363.84 \text{ MB} \times \$0.10/\text{MB} = \$336.38/\text{year}\) - Payload efficiency: \(\frac{2}{64} \times 100\% = 3.1\%\)
Option B: CoAP over UDP/IPv4
- Overhead: 32 bytes (CoAP 4B + UDP 8B + IPv4 20B)
- Bytes per message: \(2 + 32 = 34\) bytes
- Annual data: \(52{,}560{,}000 \times 34 = 1{,}787{,}040{,}000\) bytes \(\approx 1.7\) GB
- Bandwidth cost: \(1{,}787.04 \text{ MB} \times \$0.10/\text{MB} = \$178.70/\text{year}\)
- Payload efficiency: \(\frac{2}{34} \times 100\% = 5.9\%\)
- Savings vs MQTT: \(336.38 - 178.70 = \$157.68/\text{year}\) (47% reduction)
Option C: LoRaWAN
- Overhead: 17 bytes (MAC header 13B + MIC 4B)
- Bytes per message: \(2 + 17 = 19\) bytes
- Annual data: \(52{,}560{,}000 \times 19 = 998{,}640{,}000\) bytes \(\approx 0.95\) GB
- Bandwidth cost: \(\$99.86/\text{year}\)
- Payload efficiency: \(\frac{2}{19} \times 100\% = 10.5\%\)
- Savings vs MQTT: \(336.38 - 99.86 = \$236.52/\text{year}\) (70% reduction)
Battery impact:
Assuming 20mW transmit power, 2 seconds TX time per message:
Energy per message: \[E_{\text{message}} = 20 \text{ mW} \times 2 \text{ s} = 40 \text{ mWs} = 0.011 \text{ mWh}\]
Annual energy per sensor:
- Messages per sensor: \(\frac{60 \times 24}{10} \times 365 = 52{,}560\) messages
- Energy: \(52{,}560 \times 0.011 = 578 \text{ mWh} = 0.578 \text{ Wh/year}\)
Battery capacity needed (10-year life): \[C_{\text{battery}} = 0.578 \times 10 = 5.78 \text{ Wh} \approx 1{,}560 \text{ mAh at 3.7V}\]
Key insight: Protocol overhead doesn’t significantly affect radio energy (TX time is the same), but batching multiple readings into one packet amortizes overhead. Sending 10 readings per message instead of 1 reduces messages by 10× and bandwidth costs from $336 to $44/year (87% savings).