user67474: My goal is to save energy, and I intend to do so by powering a chip with itself, and cut power whenever unnecessary. The best image I can have is of a startled monkey who jumps on the branch, screams its profanities while holding to the branch, and when the screams are done, lets go of the branch and falls back on the floor, asleep.
The chip, in my case an ATtiny45, has a program that just makes a specific sound (hopefully more pleasing than an angry monkey's) with a PWM, but would also power an output pin connecting to a transistor acting as a relay between the battery and the power pin.
This is the ideal protocol:
(No closed circuit, no power)
Press Button
Battery power goes through to transistor
Transistor allows current from Battery to PWR pin
Software: Chip starts PWM to Speaker and Outputs constantly the Hold Pin
Hold pin powers the transistor and thus the chip for when the button won't be pressed
Software: When Button still pressed, makes Chip Scream louder
Software: Button not pressed anymore makes chip scream softer until it's done screaming
Software: Scream is finished, stops powering the Hold Pin
Transistor isn't powering the chip anymore.

I think the idea is plausible, though I can't test it at the moment due to not having NPN transistors (?)
My questions are the following:

Truth: Is is possible for a transistor as relay to power a chip on demand?
Risks: Is the power going to be stronger due to the amplifying nature of the transistor? What about the chip, I've read that a chip can maintain its code for 20+ years without power supply. Is this true?
Goals: Is there a better way to save power? Would it be best for the chip to just have sleep enabled?
Name: If this works, is there a better name than the Startled Monkey?

Thanks again for your help, this community has already taught me a lot!

simulate this circuit – Schematic created using CircuitLab

user7859: I think all this effort is unnecessary. The ATTINY45 pulls a maximum of 2uA when sleeping...

..and in practice I've found the typical current to be much less.
If, say, you are using AAA batteries for you project then you could sleep for more than 100 years. In practice your batteries will self discharge long before this, so any potential power savings by completely disconnecting the chip are wasted (and remember there is some leakage loss though the transistors that might even be more than the sleep power used by the ATTINY).
Instead connect the batteries directly to the power pins of the ATTINY and connect the button between any IO pin and ground. Activate the internal pullup on the IO pin and then set a pinchange interrupt on that pin to wake the chip when the button is pressed. Now go to sleep and wait for a button press to wake you.

user4143: Your idea is sound, but your implementation is flawed.
First, you don't want to bother with "wake" and things like that - when the chip gets power it just starts from scratch - that's your "wake" signal. Your code will just be "Hold it on" and "Make a sound" followed by "Let it switch off".
You only need one IO pin for that - the "Hold it on" signal. The "catch" signal in your schematic is just the chip getting power.
And then there's your schematic.  You should really use a P-channel MOSFET to do the switching of the power, not an NPN transistor. An NPN won't work, and a PNP (which would be what you would use for this if you were using a BJT) would impose a voltage drop, which you don't want.
Your circuit would in fact need to look like this:

simulate this circuit – Schematic created using CircuitLab
When idle M1 (P-channel with threshold voltage well below the battery voltage) is turned off by R1 pulling the gate up to the source voltage. Pressing the button pulls the gate below its threshold voltage allowing M1 to turn on. The chip then gets power.
M2 (N-channel with threshold voltage well below the chip voltage) is then activated by the chip by driving the GPIO HIGH to bypass the switch and connect the gate of M1 to GND.  R2 keeps M2 turned off while idle.
M2 is needed so that there is no current flow between the battery and the GPIO when the power is turned off.  Without it current can flow through R1 into the GPIO, through the ESD protection diodes inside the chip, and potentially break the chip.
Now to help clear up some of your questions:

Truth: Is is possible for a transistor as relay to power a chip on demand?

Yes, it is.

Risks: Is the power going to be stronger due to the amplifying nature of the transistor?

No. Amplification, with a BJT, is really a misnomer. It doesn't "amplify" a signal, it takes one small signal and uses that to proportionally control a larger signal. But that's only in the "linear" portion of the curve. When used in "saturation" like this it's more like a switch - power applied to the base turns on the flow of current from collector to emitter.

What about the chip, I've read that a chip can maintain its code for 20+ years without power supply. Is this true?

Yep. Flash memory typically has a retention time in the order of 10 to 100 years. 20 years is a reasonable ballpark figure.

Goals: Is there a better way to save power? Would it be best for the chip to just have sleep enabled?

Zero power is the best low power there is. Even in the deepest sleep mode the chip will still draw power. But if you do it right there can be little difference between the current drawn by a sleeping chip and the self-discharge of a battery as it sits idle.

Name: If this works, is there a better name than the Startled Monkey?

I like the name Startled Monkey. I think I'll use that in future myself.

67474: <p>My goal is to save energy, and I intend to do so by <strong>powering a chip with itself, and cut power whenever unnecessary</strong>. The best image I can have is of a startled monkey who jumps on the branch, screams its profanities while holding to the branch, and when the screams are done, lets go of the branch and falls back on the floor, asleep.</p>
<p>The chip, in my case an ATtiny45, has a program that just makes a specific sound (hopefully more pleasing than an angry monkey's) with a PWM, but would also power an output pin connecting to a transistor acting as a relay between the battery and the power pin.</p>
<p>This is the ideal protocol:</p>
<pre><code>(No closed circuit, no power)
Press Button
Battery power goes through to transistor
Transistor allows current from Battery to PWR pin
Software: Chip starts PWM to Speaker and Outputs constantly the Hold Pin
Hold pin powers the transistor and thus the chip for when the button won't be pressed
Software: When Button still pressed, makes Chip Scream louder
Software: Button not pressed anymore makes chip scream softer until it's done screaming
Software: Scream is finished, stops powering the Hold Pin
Transistor isn't powering the chip anymore.
</code></pre>
<p>I think the idea is plausible, though I can't test it at the moment due to not having NPN transistors (?)</p>
<p>My questions are the following:</p>
<ul>
<li><strong>Truth: Is is possible for a transistor as relay to power a chip on demand?</strong></li>
<li><strong>Risks: Is the power going to be stronger due to the amplifying nature of the transistor? What about the chip, I've read that a chip can maintain its code for 20+ years without power supply. Is this true?</strong></li>
<li><strong>Goals: Is there a better way to save power? Would it be best for the chip to just have sleep enabled?</strong></li>
<li><strong>Name: If this works, is there a better name than the Startled Monkey?</strong></li>
</ul>
<p>Thanks again for your help, this community has already taught me a lot!</p>

<p><img src="https://i.stack.imgur.com/lE3m3.png" alt="schematic" /></p>

<p><sup><a href="/plugins/schematics?image=http%3a%2f%2fi.stack.imgur.com%2flE3m3.png">simulate this circuit</a> &ndash; Schematic created using <a href="https://www.circuitlab.com/" rel="nofollow">CircuitLab</a></sup></p>
 7859: <p>I think all this effort is unnecessary. The ATTINY45 pulls a <em>maximum</em> of 2uA when sleeping...</p>
<p><a href="https://i.stack.imgur.com/PZOrd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PZOrd.png" alt="enter image description here" /></a></p>
<p>..and in practice I've found the typical current to be much less.</p>
<p>If, say, you are using AAA batteries for you project then you could sleep for <a href="https://frinklang.org/fsp/frink.fsp?fromVal=%282600%20milliamp%20hours%29%20%2F%20%282%20microamp%29&amp;toVal=years#calc" rel="nofollow noreferrer">more than 100 years</a>. In practice your batteries will self discharge long before this, so any potential power savings by completely disconnecting the chip are wasted (and remember there is some leakage loss though the transistors that might even be more than the sleep power used by the ATTINY).</p>
<p>Instead connect the batteries directly to the power pins of the ATTINY and connect the button between any IO pin and ground. Activate the internal pullup on the IO pin and then set a pinchange interrupt on that pin to wake the chip when the button is pressed. Now go to sleep and wait for a button press to wake you.</p>
 4143: <p>Your idea is sound, but your implementation is flawed.</p>
<p>First, you don't want to bother with &quot;wake&quot; and things like that - when the chip gets power it just starts from scratch - that's your &quot;wake&quot; signal. Your code will just be &quot;Hold it on&quot; and &quot;Make a sound&quot; followed by &quot;Let it switch off&quot;.</p>
<p>You only need one IO pin for that - the &quot;Hold it on&quot; signal. The &quot;catch&quot; signal in your schematic is just the chip getting power.</p>
<p>And then there's your schematic.  You should really use a P-channel MOSFET to do the switching of the power, not an NPN transistor. An NPN won't work, and a PNP (which would be what you would use for this if you were using a BJT) would impose a voltage drop, which you don't want.</p>
<p>Your circuit would in fact need to look like this:</p>

<p><img src="https://i.stack.imgur.com/TCKv3.png" alt="schematic" /></p>

<p><sup><a href="/plugins/schematics?image=http%3a%2f%2fi.stack.imgur.com%2fTCKv3.png">simulate this circuit</a> &ndash; Schematic created using <a href="https://www.circuitlab.com/" rel="nofollow">CircuitLab</a></sup></p>
<p>When idle M1 (P-channel with threshold voltage well below the battery voltage) is turned off by R1 pulling the gate up to the source voltage. Pressing the button pulls the gate below its threshold voltage allowing M1 to turn on. The chip then gets power.</p>
<p>M2 (N-channel with threshold voltage well below the chip voltage) is then activated by the chip by driving the GPIO HIGH to bypass the switch and connect the gate of M1 to GND.  R2 keeps M2 turned off while idle.</p>
<p>M2 is needed so that there is no current flow between the battery and the GPIO when the power is turned off.  Without it current can flow through R1 into the GPIO, through the ESD protection diodes inside the chip, and potentially break the chip.</p>
<p>Now to help clear up some of your questions:</p>
<blockquote>
<p>Truth: Is is possible for a transistor as relay to power a chip on demand?</p>
</blockquote>
<p>Yes, it is.</p>
<blockquote>
<p>Risks: Is the power going to be stronger due to the amplifying nature of the transistor?</p>
</blockquote>
<p>No. Amplification, with a BJT, is really a misnomer. It doesn't &quot;amplify&quot; a signal, it takes one small signal and uses that to proportionally control a larger signal. But that's only in the &quot;linear&quot; portion of the curve. When used in &quot;saturation&quot; like this it's more like a switch - power applied to the base turns on the flow of current from collector to emitter.</p>
<blockquote>
<p>What about the chip, I've read that a chip can maintain its code for 20+ years without power supply. Is this true?</p>
</blockquote>
<p>Yep. Flash memory typically has a retention time in the order of 10 to 100 years. 20 years is a reasonable ballpark figure.</p>
<blockquote>
<p>Goals: Is there a better way to save power? Would it be best for the chip to just have sleep enabled?</p>
</blockquote>
<p>Zero power is the best low power there is. Even in the deepest sleep mode the chip will still draw power. But if you do it right there can be little difference between the current drawn by a sleeping chip and the self-discharge of a battery as it sits idle.</p>
<blockquote>
<p>Name: If this works, is there a better name than the Startled Monkey?</p>
</blockquote>
<p>I like the name Startled Monkey. I think I'll use that in future myself.</p>
