Pin Status and DEEP_SLEEP

Hi all,

I have had some power trouble with my electrons out in the field. Some of them run down their battery and others operate just fine. All are using the same equipment, power supplies, and code.

I was doing some trouble shooting with my multimeter recently and noticed something.

I am powering a 12V sensor with a 12V step-up voltage regulator and a DC load switch. I turn D3 on HIGH to activate the load switch and then set it LOW at the end of my measurement cycle to turn it off. This works well when the electron is on and connected however i noticed that when the electron went into DEEP_SLEEP the 12V step up turned back on, even though it shouldn’t.

I then put the electron into SLEEP_MODE_NETWORK_STANDBY and everything operated as expected.

Could any one shed some light as to why there is this difference in behavior with the two sleep modes?


I believe in stop mode sleep (pin + time) the state of GPIO is preserved.

When you use SLEEP_MODE_DEEP all of the pins are put into high impedance state, so they’re essentially floating.

You may need to put an external pull-down on your load switch control line to make sure it stays off when essentially disconnected. But that’s just a guess.


That makes sense. Thanks @rickkas7!