I have a microcontroller (uC1) which outputs a TTL signal that simultaneously closes a switch on another microcontroller (uC2) AND controls a power MOSFET that cuts power to the entire system. I need to delay the MOSFET signal (via IC1) by about 20 seconds so that uC2 can save its files and go to sleep. Here's my basic schematic:
Closing SW1 changes the TTL level. Ideally the delay on IC1 would only happen on the falling edge (turning the system off, when uC2 requires time to enter sleep mode). Here's a basic timing diagram illustrating the relationship between the shifting TTL level and IC1's output to the MOSFET:
I've found some similar questions on here, particularly this one, and also this one, and it seems like a simple microcontroller is the easiest solution (I've got a few ATTiny's laying around). HOWEVER, current consumption is a real issue with this project, so if anyone has something even smaller, like a single 555 circuit, I'd love to know.
EDIT: My uCs require some explanation. Both are units which have been purchased and so I don't have access to their firmware. uC1 is an "intelligent battery system" which outputs power from 16V battery. uC2 is a device which records analog data to an SSD.