Deep sleep sample code?

Hi, I would like to come down to below 2mA average power consumption. My goal is to look for messages once/twice per day and sleep the rest in order to run on 7Ah for half a year. I have understood it is feasible to come down to 1.7mA on the MKR 1300. I guess the 1400 is similar (?). I ave understood Arduino is not made to be powered long on battery. Gammon favours building a circuit without ON-leds and voltage-regulator etc (

Here is a reference for 1300 stating 1.7mA is feasible. But it is not specific.

I believe RTCZero is useful. Standby mode is probably not sufficient. It only brought me down to around 60mA. I guess deep sleep with something like set_sleep_mode(SLEEP_MODE_PWR_DOWN) is needed. Then I have understood that RTCZero is not working (?) since it is disabled? I have understood it is possible to sleep in cycles of 8 seconds.

What about this library?

I am afraid to do too much trial and error. I don't want to brick the device sleeping forever. Any helpful person could share some code for how to get down to 1.7mA sleeping and waking up on a timer interrupt?

Very interested in this also, I know the MKR GSM 1400 has a couple of power options which can be set via the AT commands, but to get down to that sort of power level I'd think you'd almost need some sort of external timer device and just to switch the whole MKR unit off until you want it on again. I'm sure you'll work out quickly enough how long you need to leave it in order for it to reconnect to the network etc as well when you power it all back up.

Interested to see what you do here and happy to do some experimenting if i get some time as well.


I have tested a few times. It seems to receive SMS-messages queued if powered for 5 minutes. Sometimes the message comes after <1 min, sometimes 4 minutes.

Maybe I have to go to external circuit to cut power. But it is not so clean.
For external circuits cutting power, what do you recommend to do? Some low power RTC-circuit that controls power through a transistor I guess; which one?
I would like the sleep of this RTC-circuit to be configurable from the Arduino.