This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

I have a question about the power switch.

Hello!

I'm doing the firmware that will be applied to the custom device.
This device contains one button, which has two functions. (Function output according to button input time)

(This device is not yet manufactured.)

One of the two functions is to turn the power on/off.  This is the first time to control the power, is the power of the device done in the design of the hardware? Or should I control the firmware after setting up the hardware?

Can I know about this?

Thank you in advance.

Parents
  • Hi,

    I'm not sure I understood your question right.. The common way is to connect a button with power-on functionality to some GPIO like any other button. The device will be powered on automatically when battery is connected, then you can configure wake-up from PORT event and put CPU into SYSTEM OFF mode (power consumption will be about 3uA).

  • Hi, Dmitry.

    Thank you for helping me.

    I am about to turn the power on or off by pressing the button for 3 seconds. Is SYSTEM OFF mode the same as turning off the device completely? And can I turn it on again by pressing the button for 3 seconds?

    Thank you!

  • SYSTEM OFF is the most power-saving mode in nRF52 - you can configure system to turn off everything except a single GPIO that will be monitored for wake-up signal. Another way is to add an external MOSFET switch to power line, but it has no sense unless the device will be stored on the shelf for years and you need to save 2-3 uA.

    3-second delay can be implemented with software: device wakes up instantly on button event, then you can set a timer for 3 seconds - if a button is still held, it turns on, otherwise put to sleep again.

Reply
  • SYSTEM OFF is the most power-saving mode in nRF52 - you can configure system to turn off everything except a single GPIO that will be monitored for wake-up signal. Another way is to add an external MOSFET switch to power line, but it has no sense unless the device will be stored on the shelf for years and you need to save 2-3 uA.

    3-second delay can be implemented with software: device wakes up instantly on button event, then you can set a timer for 3 seconds - if a button is still held, it turns on, otherwise put to sleep again.

Children
Related