On some of the sleep modes available for the electron it is possible to set the SLEEP_NETWORK_STANDBY flag. This will put the modem in standby mode before putting the MCU to sleep.
It would be really handy to put the modem in standby mode but keep the MCU active. This would drastically reduce power consumption and when data is ready to be sent a connection to the operator can quickly be made.
I’ve tried using SYSTEM_MODE(SEMI_AUTOMATIC) along with the SLEEP_NETWORK_STANDBY flag but this doesn’t prevent the modem from coming out of standby mode every time the electron wakes up. The modem then takes about 4 seconds to go back to standby.
I also opened an issue on Gihub.
Some background information:
I built a solar powered weather station also measuring wind speed. Anemometer rotations are counted using a counter IC. Every 5 seconds the Electron is woken from sleep, reads and clears the counter and goes back to sleep. After 5 minutes of collecting data, the average, maximum and minimum wind speed are calculated. The modem is turned on and the results are published to a web server. Then the modem is turned off and the Electron goes back to sleep. The cycle repeats.
The problem with this approach it that it takes at least 20 seconds to connect to the cellular network and a lot of data is used in the process.
The alternative is not to sleep at all, but this is really power hungry which is a problem for a solar powered system.
My proposed solution:
Put the modem in standby mode. When the Electron is woken up every 5 seconds to read the counter the modem should remain in standby mode. When 5 minutes passed, the modem should come out of standby mode, publish data and then go back to standby.
Currently the modem only remains in standby while the Electron is sleeping.
Any advice on how to achieve this would be appreciated.