23
Driving a logic level MOSFET with an ATtiny 3224
(thelemmy.club)
For questions about component-level electronic circuits, tools and equipment.
1: Be nice.
2: Be on-topic (eg: Electronic, not electrical).
3: No commercial stuff, buying, selling or valuations.
4: Be safe.
Ah okay, I read a stat for max total current on a pin group, but I guess the single pin current is lower.
If you have a capacitor on your supply pin, it should reduce fluctuations due to changing outputs, but I found the stat you're talking about: At 5.0V supply a 15mA load only guarantees 4.0V.
So for it to be reliable you'll need to use another driver in-between. A single smaller transistor with a fast switching time and low voltage drop when saturated/on would be able to multiply that 5-10mA up to the 100mA you might want, and stay above the 4.5V threshold. You can probably find something within 0.4V.
In terms of switching time, I think the main thing is just picking a frequency outside the audible range, so something like 30kHz or above would work. You can probably figure out your own tradeoffs going to a higher frequency. I think the main benefit is you can use smaller capacitors and get less ripple on the output, but it makes the switching control harder to get right.