Hi,
I am building an application for Thingy:91, currently using SDK 1.3.0. The application is supposed to collect data using BLE and forward it with LTE to the MQTT broker. I am currently trying to figure out the best solution for power management to obtain the lowest power consumption. From what I read on the forum, usually this issue comes down to whether or not use the deep sleep or not (because waking up from deep sleep and reattaching to network may burn a lot of power). The choice here seems to be case-specific, which is why I want to present my case and ask for advice.
In my applicaiton the device is going to be used most likely few times a day, for a few minute long session of collecting data from BLE devices and forwarding it to the broker. Between those sessions there are going to be few hour long breaks with no required activity on the device. The nRF52 application is based on connectivity bridge application, I modified it to automatically connect to some BLE devices, get the data and send it over UART to nRF91 chip. On nRF91 application I have a thread that initiates and maintains the MQTT connection, and another thread for processing data received on UART and building MQTT messages.
So, I would like to keep the device in the lowest possible power consumption mode for few hours, then wake it up (both 91 and 52 chips) by pressing the button, perform all tasks and go to sleep/idle again.
My questions are:
1. While researching this topic on forum I have run into few terms that refer to power modes, like: system ON and system OFF, sleep and deep sleep or idle mode. I am not sure what is the difference and where could I find some information about it. Also then what are differences between: k_sleep(), k_cpu_idle(), __WFI(), and sd_app_evt_wait()?
2. What happens with the power state/consumption, when a thread is waiting on k_sem_take() or k_fifo_get()?
3. What would be the best strategy for power saving on nRF52 chip, considering that the application is mainly based on Connectivity Bridge? I only need to scan and connect to devices during those few minute long active sessions. Between them the BLE and all other peripherals can be inactive. I guess in that case it makes more sense to put the device into deep sleep mode.
4. If the device is going to be used 3-4 times a day, does it make sense to use the deep sleep (considering high current during attaching to network procedure after wake up), or just the PSM on the modem would be enough (and all threads would be waiting on either k_sem_take or k_fifo_get?
Thanks for help.