> **Source:** Core Electronics is an Australian maker-electronics retailer and manufacturer based in Newcastle, NSW, run by a team of makers and educators. We design and manufacture our own product lines (PiicoDev, CE originals) and are official retailers for iconic maker and industrial brands including Raspberry Pi, Arduino, Adafruit, SparkFun and DFRobot. Orders ship Australia-wide from our Newcastle warehouse. Prices are in AUD and include GST. Pricing, stock and dispatch on this page are generated from the store's live catalog. Full machine-readable index: https://core-electronics.com.au/llms.txt

# Soft Power Switch

**Type:** Product page · **SKU:** SPX-17870 · **Brand:** [Sparkfun](https://core-electronics.com.au/brands/sparkfun-australia)
**Page:** https://core-electronics.com.au/soft-power-switch.html ([markdown](https://core-electronics.com.au/soft-power-switch.html.md))

## Retired product

This product is retired and no longer available for purchase. Replaced by: SPX-25365.

**Replacement:** https://core-electronics.com.au/catalog/product/view/sku/SPX-25365

## How to buy

- **Search the catalogue:** `https://core-electronics.com.au/search/{query}.md` (URL-encode the query; pages 2-3 at `search/{query}/{page}.md`; `search.md?q=` also works)
- **Payment methods, purchase orders, policies and contact details:** https://core-electronics.com.au/llms.txt
## Description

The Soft Power Switch is a passive, hard on/off switch with software feedback and control. In other words, it's like the on/off switch on a laptop. A simple press will turn the system on. Another press can (with MCU intervention) turn off the system. And if things go really wrong, pressing and holding the button will force a power-down. If you're building something with an enclosed battery and need a good power button, this is the board you need.

The Sense/Control pin can act as an output to a microcontroller indicating the state of the power button (high = not pressed, low = user in pressing power button). This can be used as an input to your firmware to begin to shut down before power is lost. Alternatively, the Sense/Control pin can be driven low by the system forcing power off via software. Additionally, the Fast Off pin can be used to immediately power down a system.

The most common use case is something like this:

- Microcontroller begins running code and checks to see if power button is still being pressed for X milliseconds.
- If not, it's just a tap, go back to sleep.
- If yes, power up and run normal program.
 
Later...

- User presses power button in normal program
- If power button is pressed for &lt;X milliseconds, it's just a tap, ignore.
- If power button is pressed for &gt;X milliseconds, it's time to power down.
 
The wake-up and power-down times can be tweaked for your own user experience but Sparkfun found 500ms for power up and 2s for power down work really well.

If needed, pads are provided for a larger, external button. A measurement jumper is available to measure passive and active current so you can verify the quiescent current of your system.

The Soft Power Switch supports battery charging. If the target device has onboard LiPo charging, current can be passed back through the cut-off circuit and charge the battery.

The Soft Power Switch works up to 12V. There is a 3.3V clamping diode to prevent over-voltage exposure.

The current design is good but has a few problems. The 22uF cap Sparkfun used requires an override time of 13 seconds. Under normal operation, the system will power down as quickly as you define in the code (1-2s) so users will rarely experience this. But if the system locks up, 13s is a long time to wait. We've also seen a few edge cases (low load or no load) where the override cut-off occurs only after the button is held for &gt;13s and then released. This is caused by shorting between the finger on the button and the near by capacitor. Using an external button allows the unit to power down correctly every time.

We'll continue to refine the design but it's really handy as it is so Sparkfun decided to release it!

Pros:

- Very low &lt;50nA quiescent current
- Hard override power down in case your microcontroller loses its mind
- Sense/Control pin can be connected to a microcontroller
 
Cons:

- Limited to 4A
- No AC loads
 
This product is similar to but slightly different than our [Nano Power Timer](https://core-electronics.com.au/search/?q=15353). The NPT is very low power as well but a microcontroller cannot detect if the override (power) button has been pressed.

We do not plan to regularly produce SparkX products so get them while they’re hot!

**Experimental Product:** [SparkX](https://www.sparkfun.com/sparkx) products are rapidly produced to bring you the most cutting edge technology as it becomes available. These products are tested but come with no guarantees. Live technical support is not available for SparkX products. Head on over to our [forum](https://forum.core-electronics.com.au/) for support or to ask a question.

**Documents**

- [Example Sketch](https://core-electronics.com.au/attachments/localcontent/SoftPowerSwitch_Example_21398d0b75.zip)
- [Schematic](https://core-electronics.com.au/attachments/localcontent/SparkFun_Soft_Power_Switch_75480a94a63.pdf)
- [Eagle Files](https://core-electronics.com.au/attachments/localcontent/SparkFun_Soft_Power_Switch_11091d093d4.zip)
- [Hardware repo](https://github.com/sparkfunX/Soft_Power_Switch)

## Images

- [Product image 1](https://core-electronics.com.au/media/catalog/product/1/7/17870-soft_power_switch-01.jpg)
