First post..Arduino Newbie!! Horray.... First project Reef/LED Controller..anyways
"trying" to control a 12vdc 150mA fan using pin 9 PWM. PWM is feeding a 1K resistor feeding the base of a transistor (NTE 375). All is fine for anything over 250 PWM but below that the fan just stops and buzzes and looks like it wants to start but doesn't. Fan is a typical 3 wire (red/black/yellow for RPM reading that I'm not using yet)
Sunon w/maglev brearing.
Help..??
Just reading a temp sensor and performing the Write. As soon as I change it to 249 or lower the fan stalls.
Genernal consensus seems to be that PC fans do not work well with PWM. Rather you need a varying DC voltage. One option is to convert PWM to DC. You can find more information in this topic:
If you want to experiment, you could also try to increase PWM frequency (as high as possible). I have a 12V DC fan controlled with high frequency PWM directly using a MOSFET. This has worked reliably with no apparent ill effects for more than a year. Don't expect the fan to work through the full 0-255 range however. They need a minimum RPM (e.g. 600-700) in order not to stall.
vampist, I have a 12vdc supply hooked to the red wire of the fan, black wire to NTE375 collector, emitter to ground (diode reversed across the motor for emf). Tried a 1uF ceramic cap across the motor too. No luck. Something ain't right or there is LOADS of BS on the internet about how easy it is to run a fan with PWM. I was going to try a mosfet but not sure if that will really make a difference.
BenF, Funny you say that as there are thousands of posts about running fans via pwm pin 9. and only 1 or 2 guys who says it's no good. This is the setup I'm duplicating Arduino temperature controlled PC Fan. – uCHobby (I removed the optocoupler though to try to rule that out as the cause for the stall)
there are thousands of posts about running fans via pwm pin 9. and only 1 or 2 guys who says it's no good.
It depends on what fans they are using. older fans tend to be DC and work quite happily with PWM. However newer motors actually generate PWM from the DC you feed them. This allows them to have better internal speed regulation. The problem is that if you feed them with PWM this beats with the internal PWM and results in periods where the motor wants to apply voltage to the coils but at that instant there is no voltage to apply because the source is having a down period with it's PWM
It sounds like this is what you are experiencing. You can try dropping the frequency of the arduino's PWM or smoothing the PWM with a filter:- http://www.thebox.myzen.co.uk/Tutorial/PWM.html
I will try (when I get home again) increasing PWM freq, decreasing PWM freq, smoothing PWM.
and yes add me to the list of people who cannot PWM a fan for some odd reasons. The fan just wobbles and tries to start.