I'd like to have a circuit that provides a few seconds of power to an ATTiny circuit after the main power is removed. Using a simple 7805 voltage regulator circuit as an example (below), can I add a super capacitor somewhere into that circuit to do this. Eg in the output stage? Across + and -? The idea being that 12V would be supplied to the regulator input, when 12V is removed the supercap would kick in and provide a few moments residual power before the circuit shuts off?

See reason for not doing that. High output capacitance can cause damage when regulator input drops lower then output voltage. Bypass diode can protect possible damage mechanism, but would also discharge the 'super cap' faster.

If you add capacitance to the output of the regulator you need a diode from in to out on the regulator. If the input is shorted even 25uF is enough to damage the regulator. The output of the regulator does not sink current so if output is greater than input you can damage the regulator without a diode. Unfortunately, as retolefy said, it will discharge the supercap (through the diode and into the input of the regulator).

If you add the supercap to the input it will safely power the regulator.The diode, as shown in the 7805 crt. will only protect reverse input voltage.

What about putting the supercap on the output and having a transistor/relay (powered by the input) disconnect the supercap from the regulator when power is removed?

That seems nicer. You could use a variable regulator if 5V - the diode drop is not enough for crt. but the ATtiny (0 to 10MHz min.) will be happy enough with that.What is the diode on the regulator gnd for?

It causes the 7805 output to change from 5v to 5.7v due to the .7v voltage drop across the diode. The 5.7v output is dropped back to 5v due to the same voltage drop across the second diode. The second diode also prevents the 10uf capacitor from being discharged back into the servos when supply voltage drops.

Google forum search: Use Google Search box in upper right side of this page. Why I like my 2005 Rio Yellow Honda S2000 https://www.youtube.com/watch?v=pWjMvrkUqX0