All of us are used to long press a single button to switch on/off our devices. Most of the time this button is also used when the device is off to launch a menu or any other actions.
In my project the devices is normally supply with a 7-32V DC. I am using a Recom R78B to obtain a 5VDC power supply and I am using a LDO connected to the 5VDC to obtain 3.3V.
Between 5VDC and the LDO I added supercaps in order to ensure data intergrity in case of power loss detection, the processor detects it on an analog input and start flushing file system to unmount it. Supercaps are 2x 2.7V 5F connected in series.
A power button is connected to the processor (G400D). I would like to be able to use this button to enter for exemple in an admin mode if pressed with an other one, hybernate the device for medium duration press and stop the device for long press.
Do you have any hints or idea on how to achive such kind of thing? I spend a hard time trying to use a mosfet and bipolar transistor but without any success. I am practicaly sure than some ICs can do that.