Fork me on GitHub

Project Notes

#128 ATtiny TotalSleep

Test a total power shutdown with an ATtiny85 processor on a breadboard.

Here’s a quick video of the circuit in action:



The ATtiny SleepMode project showed me that even in CPU sleep mode, an ATtiny85 circuit can still draw something in the order of 238µA.

This project tests a scheme for total power shutdown triggered by the microcontroller itself. The circuit then draws virtually no current (certainly less than 10µA - the resolution of the ammeter I was using in-circuit).

The trade-off is that the circuit requires an external trigger to wake-up again. Here it uses a push-button.

How it works:

  • power is supplied to the ATtiny and other circuit elements through a p-channel MOSFET (I’m using a BS250 here)
  • when power is turned on, the 1MΩ resistor charges the 100nF capacitor with a time constant of 100ms
  • this keeps the FET Vgs negative long enough for the ATtiny to power up and apply a high signal to the base of the NPN transistor
  • the NPN collector-emitter conduction holds the FET Vgs negative, and therefore “powered on”
  • when the ATtiny wants to power-down, it brings the NPN base low, cutting the collector-emitter channel, and sending the FET Vgs to 0V.
  • this turns off the FET and everything is powered down. The current drawn in this state is limited to leakage of the components
  • to powerup, the push-button shorts the capacitor, bringing the FET Vgs down and setting the cycle off again

This all seems to work very reliably.



The Schematic

The Build

Credits and References

Project Source on GitHub Project Gallery Return to the LEAP Catalog

This page is a web-friendly rendering of my project notes shared in the LEAP GitHub repository.

LEAP is just my personal collection of projects. Two main themes have emerged in recent years, sometimes combined:

  • electronics - usually involving an Arduino or other microprocessor in one way or another. Some are full-blown projects, while many are trivial breadboard experiments, intended to learn and explore something interesting
  • scale modelling - I caught the bug after deciding to build a Harrier during covid to demonstrate an electronic jet engine simulation. Let the fun begin..
To be honest, I haven't quite figured out if these two interests belong in the same GitHub repo or not. But for now - they are all here!

Projects are often inspired by things found wild on the net, or ideas from the many great electronics and scale modelling podcasts and YouTube channels. Feel free to borrow liberally, and if you spot any issues do let me know (or send a PR!). See the individual projects for credits where due.