I have the output of a GPIO of an ST microcontroller which switches high (3.3V) or low (0V).
I want a fan to turn on when the output is high and turn off when it is low.
So I need to apply a simple mosfet (between the gpio and the fan) that switches between the saturation region and the cut-off region (like a switch)
Assuming I use this fan and this mosfet (I know it's not the best choice, but let's assume we're using this), I have some doubts on circuit dimensioning:
1) The chosen mosfet has Vgs(th) = 1.7V ... so it will conduct and turn on the fan if Vgs > 1.7V
Since I have 0V or 3.3V output from the GPIO, can I connect the mosfet directly to the pin? Do I need a resistor or some protection diodes?
Since no current is flowing on the gate, I think the only condition to be met is that any voltage on the input of the pin (i.e. Vgs(th)) does not exceed the maximum breakdown voltage of the pin itself ... right?
If it is true, in this case I don't think it will happen since Vgs(th) << Vgpio tolerant (it should be 3V or 5V)
2) The fan datasheet states that the maximum rated current is 74mA ... this means that my drain current must not exceed that value, is this correct?
But it is not clear to me how I can calculate the drain current flowing when the mosfet conducts in saturation (switch circuit closed).
Once I understand what I have to calculate, I can also definitely add a resistor.
View attachment 279230
So, to recap:
1) the circuit I drew in my original post is correct (although the mosfet should be represented as @dl324 suggests in post #8) ... tell me if any components are missing
2) in this application I don't need a resistor on the gate (if I want I'll put it for example 1k)
3) the power dissipated on the drain by the mosfet while it's on is Rds(on)*I_drain^2 = Rds(on)*I_fan^2 = 0.147mW < maximum power dissipated by the mosfet in question (i.e. 1.3W at 25°C) .. so I don't need a Rd.
Should I worry about the rated power consumption of the fan (i.e. 1.78W) ?
Sorry, but I get a bit confused between power dissipated by the mosfet and that of the fan.
4) The fan current on the drain (Id) is about 74mA, much less than the Id that the selected mosfet can handle .. so as before, I may not add an Rd
If nothing is missing .. then I ask for some advice on the choice of mosfet.
(of course I thank everyone for the answers)