Using power switch button for other purposes

I want my device(touch tft and motor controllers) to be turned on and off long press.
Is this item(https://www.pololu.com/product/2808) will work in next modes:

  • MCU output pin connected to OFF pin of the power switch
  • button connected to A pin of the power switch and to the input pin of the MCU and shorts them to ground when pressed

Turn on:
When I press and hold button the MCU is turns on and starts counting the length of button press when some value is reached the device is powering on the TFT and other peripherals if button was released before the MCU is powering off the system by making pulse to OFF pin.

Turn off:
When I press the button when the device is powered on for some time the MCU will make pulse on OFF pin.

Is the pressed and held button in turn off mode will keep the MOSFET open so the power switch will ignore the pulse on the OFF pin?

Hello.

None of our pushbutton power switches have long press options, but it seems like you might be able to do something like that with the help of your MCU. You might take a look at the following forum thread to see how they accomplished something similar.

The OFF pin will take precedence if the button or ON pin is triggered at the same time. The button or ON pin will take precedence if the off pin is triggered at the same time.

-Derrill

Thanks for your reply. I am trying to implement long press by myself.

I connected the button to the Switch board and Arduino using two diodes.
When the button is pressed it opens the switch and turns on the Arduino.
If it was pressed and held for more than 5 sec the Arduino is turns on the peripherals.
if not Arduino is triggering the off pin.

To turn off I press and hold the button for the 5 sec then Arduino triggers the turn off pin but it seems that pressed button keeps switch opened and even after button release the switch continues to be turned on.

Hi.

Sorry, we accidentally misspoke in Derrill’s last post. The ON and A pins will take precedence over the OFF pin. In order to turn the switch off from your Arduino, you will probably need to find a way to make sure that the button is released before controlling the OFF pin.

-Claire