I’m hoping to get some advice on the best strategy to take. Apologies if this is answered elsewhere in another post.
We are currently using a 3g Boron in standard automatic mode to wait for a sensor event, read values from various sensors and then publish this data to the cloud just after collection. We are trying to reduce the amount of power usage.
Our application probably does not need to publish data as it is collected. We are hoping to move towards turning off the cellular or cloud connection, saving the time-stamped readings throughout the day, on an SD, and then waking at a scheduled time to publish this queue of data from the day. We would also like to schedule a period of time to stay awake so that we can push code updates during this period.
As we want to ensure the particle is keeping time throughout the day, what do you guys think would be the best sleep mode to try out?
Thanks in advance and apologies if this has been discussed elsewhere.
No worries at all as this is a very reasonable question. While it is for an Electron, I recommend checking out this repository that goes into depth regarding power consumption, sleep modes, and data management. There’s no simple answer, but this should set you on the right path! If need more support when you’ve done more reading/testing, we’ll still be here.
@StngBo, though the repository that @DJ_Volt referred to is a great foundation, it is focused, as he says, on the Electron which is based on the STM32F205 versus the Boron nRF52840. A key difference is the fact that the nRF52840 does not have a Real Time Clock and instead uses a Real Time Counter. Furthermore, that Real Time Counter is not very accurate and does not run during the deepest of sleeps (HIBERNATE).
One way around this issue is to connect to the Particle Cloud on a regular basis to resync the time. Another is to add an external “true” RTC as many have members have done including @rickkas7 (see [here])(https://github.com/rickkas7/MCP79410RK)). He also has a great library for publishing queued data here. @chipmc has also designed a great Gen3 carrier board with the specific intent on providing the most flexible power savings capabilities for remote use.
For once-a-day publishing, disconnecting and turning off the cellular modem probably makes sense. However, what you haven’t mentioned is how often you sample data and store it to the SD. This will impact how you sleep the device and likely a change in the SYSTEM_MODE you are using from AUTOMATIC to SEMI_AUTOMATIC or MANUAL.
You also haven’t mentioned what your power usage targets are. This will also help guide your choices and any advice given by this great Community.