Electron waking itself up from deep sleep

electron
Tags: #<Tag:0x00007f038e8e70e0>

#1

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!


#2

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?


#3

Thanks for the quick response!

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


#4

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

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.


#5

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. :slight_smile:


#6

@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.


#7

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


#8

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!