×

SparkFun will be closed on Tuesday, November 5th to support our team in being able to go out and vote! Orders placed after 2 pm MT Monday, November 4th will ship on Wednesday, November 6th. Thanks for your patience and understanding.

Soft Power Switch

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 <X milliseconds, it's just a tap, ignore.
  • If power button is pressed for >X milliseconds, it's time to power down.

The wake-up and power-down times can be tweaked for your own user experience but we 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 we 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 >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 we decided to release it!

Pros:

  • Very low <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. 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 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 for support or to ask a question.

Comments

Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • Member #1849713 / about 9 months ago / 1

    I can't get the fast off pin to work with a raspberry pi pico. I set to low but nothing happens. I measured the fast off pin without connecting anything to it and I get like 2v there. Is that normal? If I connect the fast off to the ground, it works but that's not ideal.. according to the example sketch, a low digital pin should work. Any ideas anyone?

  • Member #1860235 / last year / 1

    Using the provided files and BOM (and a microscope to check), I fabricated one of these boards myself. However, 9 out of 10 boards only work when the diode is heated up higher than room temperature to drop the forward voltage of the diode low enough to drop below the minimum threshold of the N/PFET pair to shut off (turn on is fine)... Using the Nexperian BAS16J (and looking at page 3 of 8 Figure 1), the datasheet shows the room temperature forward voltage of the diode is 0.5V (at 250uA). Measuring the voltage on the board Under operation (with the soft reset button depressed) I get 0.55V or so. The MOSFET array has a Vth between 0.5 and 1V with typical being 0.7V. So, if you get some MOSFETs that have lower threshold voltages than typical and diodes that have higher than expected forward voltages MOSFETs; then you could have a circuit that doesn't work. Meaning the Voltage drop across the diode does not take the gate of the NMOS below the threshold value to shut off the power. Looking at the datasheet of the diode, the forward voltage reduces with increasing temperature. Using a heat gun, I increased the temperature on the diodes and the 9 non-working boards worked properly while heating the diodes for this soft power switch.

  • Member #1269814 / about 4 years ago / 1

    I LOVE this little guy! It's brilliant. Not only did it solve my battery management problem, it made modes available through a single-button interface. So brilliant. So simple. Hopefully someone else will make these if SparkFun can't produce them for a profit.

  • Member #1269814 / about 4 years ago / 1

    This is so brilliant. I desperately needed this functionality at the exact time this was released. I hope this finds it's way into SparkFun's standard catalog some day.

  • This is great! I just started drawing up a circuit like this for my battery powered projects. This one has some very nice features, and the fact you can still charge the lipo battery through the body diode when off is huge.

    I have one recommendation for when you design your next board. Can you add another cut-able jumper to disable the hold to power off part of the circuit? This would allow users to also use SPDT on/off switches. I have an application where the user could turn it off at any time with the power switch, but the arduino needs to do one last thing before officially shutting down. This can also be useful if someone does not need the auto power off and can trust their Arduino to turn itself off, but with some arbitrarily long software controlled time.

Customer Reviews

No reviews yet.