SPX-17870 stays on with no delay

hi,

I’ve started to play around with the ‘soft power switch’ and out-of-the-box, the switch powers on the system load and stays on without requiring to press the button for a specific period of time, which I understood it was supposed to be 500 ms. Is this the expected behavior?

thanks

Hello, I’m not Sparkfun staff but someone who is also playing around with this part. Maybe we can compare notes?

From what I gather, it seems that the intention for this switch is to have code in the Arduino that wakes up on button press and then does a wait for 500 ms (or some other specified time) and then turn on for real if the button is still pressed after that amount of time. If the button is released in that interval, the Arduino is programmed to go back to sleep. You can refer to the code in the provided [Example Sketch.

If you’re using something that isn’t a microcontroller or can’t turn on extremely fast (like a Raspberry Pi with linux on it), then there isn’t much hope to get that feature of this part working. If you really need it, you can put an Arduino in front of the Raspberry Pi and then use a transistor or relay to turn on the RPi once the Arduino has processed the button press… That might be overkill depending on your application.

The good news is that if you don’t want to write any code, the switch still works out of the box, but it has no turn-on delay and works as you described.](https://cdn.sparkfun.com/assets/5/6/b/2/8/SoftPowerSwitch_Example.zip)