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.
I'm bumping against the edges of my ignorance here. I haven't done any calculations yet. I've been reading the DC/DC Book of Knowledge by Steve Roberts.
I've got a working 5V switch mode supply using a driver ic for the ATtiny. Plan is to use that supply and the ATtiny to variably control a larger inductor/MOSFETs. This will power a resistive load around 25w max, 14.5w typical, 1.6ohm so roughly 4V/3A typical.
The data sheet gives an absolute maximum of 40mA for output on a pin with 5-10mA being ideal. My understanding of the chart above is that the voltage will also sag below the 4.5V gate actiivation. I'm assuming trying to switch the MOSFETs with just the ATtiny either leads to a blown output or an overheated MOSFET.
I guess I need to figure out my target frequency and work backwards from there. I've got a working reference circut, but all the ICs and MOSFETs have been laser obufuscated. Inductor is 1.5uH and 27A.
So I'm assuming I need a higher frequency than what I can push with the ATtiny but I don't know that.
Sorry for the novel. Writing this down helps me work the problem. Do you see anyrhing wrong in my assumptions/reasoning?
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.