Hey Bionic - I can sure try! ;-)
So in the simplest terms, this is a "power failed" detector for lack of a better way of describing it. Sequence is as follows :
1] Power applied to circuit - perform "cold start", switch to "on" mode.
2] Power fails. Circuit somehow keeps track of duration of failure up to one minute.
3] Power resumes - check duration of outage. If less than 15 seconds, "warm start sequence", then switch to on. There are really 3 or possibly four modes, up to power failed for > 1 minute that I would like to take action on - basically at 15 second increments on the outage.
My brain needs less coffee and more sleep at this point - I had pretty much consigned this to the dustbin until I ran into a friend who had picked up a "brake flasher" module for his car that did damned close to what I've described above - basically it can be programmed to flash the brake light in a specific sequence, and also - ONLY flash the sequence again if a programmed delay is exceeded - so "hit brakes, lights flash", "hit brakes again in < xx seconds, no flash".
It's like a perfect storm - somehow this is doable - and it meets all my constraints - module is powered by the circuit it's monitoring, is in a tiny package, short duration power on/off/action/on sequence, etc.
My need is really close to what this thing is doing - loads of cycles, short duration / long duration power cycles - as I said, to see the damned thing so close it's killing me!
EDITED : On the above sequence - probably important to mention that the power may last of only a second or so, before failing again - so -
1 second of power <> 5 seconds no power <> power back on, do action based on power loss < 15 seconds
xx seconds of power <> 16 seconds no power <> power back on, do action based on power loss > 15 seconds.
1 seconds of power <> > 60 seconds no power <> power back on, "cold start".