Best Methods for Conserving Electron Current and Data Usage

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?

2 Likes

I guess you mean “6000 + 128 = 6128 + 128 every 5min” and “6000 + 67 = 6067 + 67 every 5min” in your first lines of the SLEEP_NETWORK_STANDBY blocks.
But the use of the equals sign is a bit confusing from the mathematical point of view (since the two sides aren’t ;-))

On the latest 0.6.2_rc2 firmware for the Electron, you will not have the 6000-byte handshake after your first connect as long as you reconnect or send data before 23 mins pass by after your initial connection where the 6000-byte handshake happens.

With the latest firmware, this is true even if you put the device into deep sleep.

I have not checked your power consumption numbers but if you tested with a good multimeter then your probably right on with them.

Using NO_ACK indeed, saves data when your publishing often since the savings adds up.

In my test, I was sending 5 min updates using a Particle Publish event for an almost 200+ byte data string using NO-ACK and it ended up using 1.68 MB per month or 30 days.