I'm still learning the basics so please bare with me if something seems unclear ;-)
I want to hook up an Attiny85 to a WiFi module (esp8266) and 2 sensors. The VCC will be provided by a battery pack and a step-up/step-down converter to ensure steady voltage without too much efficiency loss. Right now the modules are all hooked up to the VCC rail, together with the Attiny85 in one circuit.
I would like to take a sample, and then make as much of the circuit power down until the next reading with a 2 minute interval or so.
While looking for power saving modes for the esp8266 and struggling a bit with it, it got me thinking. What if I let Attiny85 handle the WiFi and sensors circuit via an OUTPUT pin and just turn that high or low. I read somewhere that an OUTPUT pin would not be able to supply as much current as if it was directly connected. That would probably be the case for me here since the WiFi module draws significant current.
Maybe using a transistor to "flip the switch" be a good solution instead if that is the case?
So my question is, is my way of thinking here even viable? How do I know what kind of max current can go through an OUTPUT pin?