I went through and made this list to help me figure out what the best ways to conserve data and current are for publishing a small amount of data every 5 minutes. Do these numbers look correct?
Data Usage
- Handshake: up to 6000B
- Publish: 128B
- Publish(NO_ACK): 67B
- Ping every 23 mins: 122B
Current Usage
- Cellular on, system on (CSO): 250mA
- Cellular off, system on (SO): 50mA
- Deep Sleep (DS): .13mA
If sensor measurement takes 5 seconds and connection takes 20 second total.
Connecting every 5 mins from deep sleep:
Data:
- Handshake + Publish = 6000b + 128b = 6128B every 5 mins
- Per day = 1.76MB
Current:
- 25 seconds CSO + 275 seconds DS = 250(25/60/60) + .13(275/60/60) = 1.74mA every 5 mins
- Per day = 501mA
Connecting every 5 mins from deep sleep with NO_ACK:
Data:
- Handshake + Publish = 6000B + 67B = 6067B every 5 mins
- Per day: 1.74MB
Current:
- 25 seconds CSO + 275 seconds DS = 250(25/60/60) + .13(275/60/60) = 1.74mA
- Per day: 501mA
Connecting every 5 mins from deep sleep, measure data before connecting:
Data:
- Handshake + Publish = 6000B + 128B = 6128B every 5 mins
- Per day = 1.76MB
Current:
- 5 seconds SO + 20 seconds CSO + 275 seconds DS = 50(5/60/60) + 250(20/60/60) + .13(275/60/60) = 1.46mA
- Per day = 420mA
Connecting every 5 mins from deep sleep, measure data before connecting, with NO_ACK:
Data:
- Handshake + Publish = 6000B + 67B = 6067B every 5 mins
- Per day = 1.74MB
Current:
- 5 seconds SO + 20 seconds CSO + 275 seconds DS = 50(5/60/60) + 250(20/60/60) + .13(275/60/60) = 1.46mA
- Per day = 420mA
Publishing every 5 minutes, staying connected:
Data:
- Initial Handshake + Publish = 6128B initial + 128B = 6128B initial + 128B every 5 mins
- Per day = 0.042MB
Current:
- 300 seconds CSO = 250(300/60/60) = 20.83mA
- Per day = 5999mA
Publishing every 5 minutes, staying connected, with NO_ACK:
Data:
- Initial Handshake + Publish = 6000B initial + 67B = 6067B initial + 67B every 5 mins
- Per day = 0.025MB
Current:
- 300 seconds CSO = 250(300/60/60) = 20.83mA
- Per day = 5999mA
Connecting every 5 mins from deep sleep, SLEEP_NETWORK_STANDBY:
Data:
- First start consumption + Publish = 6128B + 128B = 6128B + 128B every additional 5 mins
- Per day: 0.042MB
Current:
- 25 seconds CSO + 275 seconds DS = 250(25/60/60) + .13(300/60/60) = 1.74mA
- Per day: 501mA
Connecting every 5 mins from deep sleep, with SLEEP_NETWORK_STANDBY, NO_ACK:
Data:
- First start consumption + Publish = 6067 + 67b = 6067 + 67b every additional 5 mins
- Per day: 0.025MB
Current:
- 25 seconds CSO + 275 seconds DS = 250(25/60/60) + .13(275/60/60) = 1.74mA
- Per day: 504mA
So overall it looks like the best way to save data and current is connecting every 5 mins from deep sleep, with SLEEP_NETWORK_STANDBY, NO_ACK. This is risky because there is no confirmation that the data was uploaded to the cloud, so for better safety (but with a hit with higher data usage) you should use deep sleep with SLEEP_NETWORK_STANDBY.
Do these numbers look correct?