Put modem in standby without sleeping MCU

Tags: #<Tag:0x00007fe22638fa08>


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.


Take a look at the modem documentation, specifically “AT+CFUN=”. You may be able to set the modem into “airplane mode” to save power. I have not tried this myself.

It looks like the Electron modem supports this. use Cellular.Command() to send AT+CFUN=0 to set to airplane mode (minimum functionality) and AT+CFUN=1 to return to full functionality.


Cellular.off() turns off the Cellular module. Useful for saving power, since most of the power draw of the device is the Cellular module. Note: turning off the Cellular module will force it to go through a full re-connect to the Cellular network the next time it is turned on.


That is exactly what I’m doing at the moment. This causes really excessive data usage.


This might be a good idea.
I’m worried that this will also cause a full re-connect to the cell network and therefore use a large amount of data.