# Electron waking itself up from deep sleep

**URL:** https://community.particle.io/t/electron-waking-itself-up-from-deep-sleep/47189
**Category:** Troubleshooting
**Tags:** electron
**Created:** [January 22, 2019, 4:01pm UTC](https://community.particle.io/t/electron-waking-itself-up-from-deep-sleep/47189 "2019-01-22T16:01:18Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![dpatey](https://avatars.discourse-cdn.com/v4/letter/d/e56c9b/32.png) [@dpatey](https://community.particle.io/u/dpatey)
#### Post date: [January 22, 2019, 4:01pm UTC](https://community.particle.io/t/electron-waking-itself-up-from-deep-sleep/47189/1 "2019-01-22T16:01:18Z")

</div>

I have several devices deployed in office buildings around Toronto. The devices are very simple - buttons which, when pressed, wake an Electron from deep sleep. The Electron then connects to the network and publishes two events before and goes back to sleep. They’ve been deployed for over a year at this point with no trouble. Recently though, two of them have started waking themselves up without the buttons being pressed.

I’m really having trouble thinking about how to even start troubleshooting here. Does anybody have any ideas on what might be causing this? Certainly we’ve had some very cold and dry weather here the last few days so I’ve wondered about the possibility of increased static electricity causing the devices’ WKP pins to get enough of a charge sent to them through the air to wake them up. As far fetched as that seems, it’s the only theory I have at this point.

I’d love to hear if anybody else has had a similar problem, or if anybody has any ideas on what could be going on.

Happy to provide more context/info if it’ll help.

Thanks!

---

<div class="post-metadata">

### Author: ![ninjatill](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/ninjatill/32/17370_2.png) [@ninjatill](https://community.particle.io/u/ninjatill)
#### Post date: [January 22, 2019, 4:07pm UTC](https://community.particle.io/t/electron-waking-itself-up-from-deep-sleep/47189/2 "2019-01-22T16:07:55Z")

</div>

To validate your theory, we would need more information on your design/schematic. Can you post a schematic or photo? Do you have an external pull-down resistor on the WKP pin?

---

<div class="post-metadata">

### Author: ![dpatey](https://avatars.discourse-cdn.com/v4/letter/d/e56c9b/32.png) [@dpatey](https://community.particle.io/u/dpatey)
#### Post date: [January 22, 2019, 4:25pm UTC](https://community.particle.io/t/electron-waking-itself-up-from-deep-sleep/47189/3 "2019-01-22T16:25:26Z")

</div>

Thanks for the quick response!

I don’t have a resistor on the WKP pin. Here are some photos of the board.

 ![IMG_8210](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/b/1/b19eafe221438710bcdd984e8ca51cb6222c69df.jpeg) ![IMG_9163](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/b/3/b3f252830bdbcfcbb045f27f1d389a5374839cf2.jpeg) ![IMG_0577](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/0/1/015dd2f0435ecde10ab164e2558553a927f7775f.jpeg)

---

<div class="post-metadata">

### Author: ![bko](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bko/32/20704_2.png) [@bko](https://community.particle.io/u/bko)
#### Post date: [January 22, 2019, 4:31pm UTC](https://community.particle.io/t/electron-waking-itself-up-from-deep-sleep/47189/4 "2019-01-22T16:31:50Z")

</div>

You almost certainly need some input protection and signal conditioning. Here is a decent little guide:

[https://www.digikey.com/en/articles/techzone/2012/apr/protecting-inputs-in-digital-electronics](https://www.digikey.com/en/articles/techzone/2012/apr/protecting-inputs-in-digital-electronics)

There are about a million ways to protect an input like this but having series resistance and a cap has worked well for me in the past. You might need extra protection diodes (they can’t hurt) or you might not.

It is also possible to trip inputs like this with a radiated signal like from a cell phone or other transmitter, depending on the wire length. Ferrites can be helpful in that case.

---

<div class="post-metadata">

### Author: ![dpatey](https://avatars.discourse-cdn.com/v4/letter/d/e56c9b/32.png) [@dpatey](https://community.particle.io/u/dpatey)
#### Post date: [January 22, 2019, 4:41pm UTC](https://community.particle.io/t/electron-waking-itself-up-from-deep-sleep/47189/5 "2019-01-22T16:41:44Z")

</div>

Thanks to you as well for the quick reply.

I guess I just got lucky with the other ones which have been behaving like good little buttons. Thankfully they’re pretty easy to retrieve so I can at least upgrade the ones that are misfiring and get my life back. 🙂

---

<div class="post-metadata">

### Author: ![dpatey](https://avatars.discourse-cdn.com/v4/letter/d/e56c9b/32.png) [@dpatey](https://community.particle.io/u/dpatey)
#### Post date: [January 22, 2019, 6:42pm UTC](https://community.particle.io/t/electron-waking-itself-up-from-deep-sleep/47189/6 "2019-01-22T18:42:48Z")

</div>

@bko Follow-up question on ferrites if you have a moment or two to spare.

I’ve been doing research on this the last couple hours and have come to confirm that I’m not familiar at all with the with the use of ferrite beads. My projects have been entirely hobbyist in nature and it simply hasn’t come up before.

Based on the photos I posted, where would I add the bead? Or would I need to shield all of the wiring between the WKP and 3v3 pins somehow?

Thanks for your time as always.

---

<div class="post-metadata">

### Author: ![bko](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bko/32/20704_2.png) [@bko](https://community.particle.io/u/bko)
#### Post date: [January 22, 2019, 6:52pm UTC](https://community.particle.io/t/electron-waking-itself-up-from-deep-sleep/47189/7 "2019-01-22T18:52:19Z")

</div>

The ferrite (and beads are just one kind of ferrite) goes in series with the input, between the switch and and the input pin. It can replace or reduce the series resistor in some cases since it has DC resistance.

Again they are used to reduce RF interference, particularly with long wires and are placed near the chip they are protecting. I would verify that your problem is RF before using them, but if you just want to learn, that’s OK.

Here is a nice little writeup in the first half of this paper from Analog Devices about how to model them. As you can see they have resistive, capacitive, and inductive behavior all in one device.

[https://www.analog.com/en/analog-dialogue/articles/ferrite-beads-demystified.html](https://www.analog.com/en/analog-dialogue/articles/ferrite-beads-demystified.html)

---

<div class="post-metadata">

### Author: ![dpatey](https://avatars.discourse-cdn.com/v4/letter/d/e56c9b/32.png) [@dpatey](https://community.particle.io/u/dpatey)
#### Post date: [January 22, 2019, 7:50pm UTC](https://community.particle.io/t/electron-waking-itself-up-from-deep-sleep/47189/8 "2019-01-22T19:50:14Z")

</div>

Thanks again. I’m going to give this a try. I didn’t include it in my initial post because I was trying to keep it concise, but when I was initially building these I had some problems with random wakeups that I had a real challenge trying to debug. I could not reproduce it ever but a coworker of mine kept telling me that he’d noticed the lights coming on randomly during the day. The only theory I had at the time was that his newfangled Apple Watch was triggering them somehow. Very weak evidence, I know, but its what I’ve got right now. Ha.

Cheers!
