Using An Arduino Promini PWM Pin To Drive a Small 5v Fan

The guy's a wind-up.

so its a mosfet, but an n channel or p channel (sorry if I should be understanding but I really don't understand)

Many brushless fans with PWM pins do not work properly if you attempt to apply PWM to the power lead, as both of those proposals suggest.

That approach works fine with brushed DC motors, and with some but not all brushless fans that do have a PWM control lead.

The first thing you should try is to follow the tutorial linked in post #12.

1 Like

Commercial fan controllers use sloooow 30Hz PWM for that reason.
That also reduces whining noises.
Leo..

You asked about an NPN (2N2222). And I had replied 'yes'. What's hard to follow?

Sorry about that I just couldn't keep up because of the many replies, sorry @runaway_pancake

Thank you for the clear steps @jremington

That's why the wind-up does what he does.

@jremington that helped a lot but do you recommend a specific pnp transistor a bc638/a tip136/etc.
and is the 2n2222 a good option for the npn signal switching transistor or is there a better alternative to it

For the PWM pin, any small signal transistor is fine.

@jremington ok but what about the pnp transisitor?

First mention of "PNP".
Just use NPN - the one you named in No.4 (or 2N3904, or...)

→ because you have a 5V fan assembly

No, not at all. The link in post #12, which the OP took the time to read, suggests viable strategies to control the PWM pin of the fan.

But that's for a "3-pin", isn't it?
That shown in No.1 is just a 'garden variety' 2-pin 5V.
@youssefshaalan
Are you buying another fan, the 3-pin sort?

no I thought of just removing the 3rd pin electronics (they are for rpm monitoring)

Maybe somebody could tell me what advantage there is to that versus using an NPN as I showed several posts ago.

The site says it has a lot of EMI and some times it is sent to the microcontroller's digital pin
(They showed that on an oscilloscope)

If you want to use the tach pin of a 3-pin fan, then you must leave ground connected to ground, and PWM high-side with a PNP transistor.

If you don't need tach, then you can PWM the fan low-side with a single NPN transistor.
Leo..

I'm aware - but he's not using a 3-pin fan and he's not going to get a 3-pin fan.

Once it's cobbled together, I'm sure that it will be rewarding on one hand and disappointing on the other.

I didn't know the only reason for a PNP is the tachometer, sorry @runaway_pancake I guess I will use your circuit instead