I got the mosfets in the mail today (yay!). I know you mentioned these may not work for switching an Arduino, but for educational purposes I wanted to play around with them today to get a better understanding of how they work.
I hooked up my circuit and incidentally blew one right away lol. I had my fan's positive lead hooked to the gate and the negative lead to the drain by accident... whoops. This was me just being too eager and clumsy.
The second time around, I connected the fan's positive lead to source V and the negative to the gate. This actually worked and I was able to modulate the fan's speed with the Arduino surprisingly. However, I was still encountering an issue where I could not get the full range of speed out of the fan. Specifically, I could not turn it off all the way..
From the learnings while playing around with the S8050 transistor, I tried attaching a 300 ohm resistor to the gate of the mosfet, hoping that it would reduce any possible amplification. And that, well-- managed to blow my second mosfet (if you keep reading though, it might not actually have been due to the resistor).
I realized and remembered right then, that a mosfet and a transistor behave differently in their gating mechanisms. One is moreso influenced by current and the other, by voltage.
I removed the resistor, but kept blowing Mosfets.
"Hmmm. This is perplexing. This exact configuration worked a second before..."
After tinkering around a bit more, googling, and doing some investigation with my multi-meter, I discovered why I was not able to get the full range of speed of the fan to work prior with the transistor or the mosfet. There was a problem in my Arduino code where I was not returning the remaped variable during it's function call. A silly mistake... but a critical one.
This was also why it took me awhile to figure out why I kept blowing out mosfets. The PWM signal from the Arduino was outputting a full 0-5 volts range instead of a more constrained range. Based on what you told me with the mosfets having limited current output with lower voltage levels, I pulled up the datasheet to investigate. According to this graph, this little 2n7000 mosfet should be able to supply 100mah at a minimum of around 3ish volts. And this was probably why when I had started my circuit before, I was blowing mosfets right and left. My potentiometer was probably set at a lower state below 3V, it would instantly blow the mosfet trying to drive the fan.
Once the mapping was fixed and I had initialized the circuit with the Pot all the way on, it was stable enough to drive the fan no problem. It didn't even get hot at all! I slowly lowered the potentiometer down to 3.5 volts and it very slowly started to smoke and burn up. Interesting...it should still be stable at these values. ???
Then I remembered I swapped the old 24v 0.1 amp fan I had previously been testing with, for a 12v fan with an unknown current rating. I did this because the power source I am limited to is a 12v lithium cell battery. I figured it would be more sensible to use a fan that matches the batteries voltage output, than to limit the max RPM's automatically due to the lower voltage drop across the battery. As a result, the fan could actually be pulling more power than 0.1amp and need a higher voltage across the mosfet's gate to drive it safely.
So in conclusion from this little mosfet shit show, I have basically learned that when using this 2N7000 mosfet, I can probably get away with driving a low-powered device (such as a small PC fan), so long as I do not incidentally lower the voltage across the gate. I can vary the HIGH/LOW switching speed of the PWM output, but I do not want to change the logic gating voltage.
As a side question, I wanted to learn more about the power dissipation of the mosfet. An article I came across while troubleshooting the circuit had some good information on how the drain resistance effects the temperature and power dissipation of the component. If we know the drain current, then we can calculate the power dissipation by using the formula:
P(d) = I^2(d) * R(ds)
So in my scenario, lets say I am powering a 0.1 Amp fan while using this 2n7000 Mosfet with a Resistance of 5ohms. 0.1^2 * 5 = 0.05 watts. Did I do this right?
How and when is this power dissipation formula useful? Could you provide an example?
Thank you everyone so far for your replies thus far. Learning a lot here