Undesired Wake-Up from Sleep Mode

I have an Electron device that automatically goes into sleep mode when it finishes it’s monitoring task, or when the user is done using it, in order to conserve battery life. There is a button on the device that can be pressed to bring it out of sleep mode and the device restarts its monitoring task. I am having issues with my devices waking up at undesired times. At first it seemed random but now I have found a way to duplicate the undesired behavior. Clicking the igniter of a fire starter lighter within 2ft of a sleeping Electron will cause it to wake up. I suspect that similar RF noises around are causing my issues.

Has anyone had similar issues? Could I somehow debounce the wake up with software? Could I put shielding in place to protect the Electron?

I am using the following lines of code to put the Electrons in sleep mode:
const int wakePin = D0;

For my circuit I am pulling power off of the 3V3 pin, go thru a 1k resistor, go thru a normally open push button, and then to the D0 pin. I have also tried adding 10k and 5k pulldown resisters to D0 pin with no change.

You can’t debounce in software since for that the software would need to run - which inevitably means it’s not sleeping :wink:

Shielding should work.

Your traces/wires act as antennas for the noise, so you’d need to keep that noise signal from traveling to your wake pin that way.

But I’m surprised D0 works for waking at all :confused:

1 Like

ScruffR you are correct; the documentation now states the wake up pin needs to be one of the following: D1, D2, D3, D4, A0, A1, A3, A4, A6, A7. But I am physically using D0. Let me try using one of the defined pins.

Actually the docs do so as long I can think :wink:

1 Like

I switched my hardware and software to use pin D1 for the wake pin; same results as when I was using D0.

That on the other hand is no surprise, since your noise issue still persists.

Shielding and low-pass filtering still need to be considered.

1 Like