1
\$\begingroup\$

I want to control a fan using analog voltage instead of PWM. I have a PWM signal from MCU. I want to use a low pass filter to convert this to analog, so 0 to 3.3V based on PWM duty cycle. This will go into a MOSFET which will drive the fan. I want to be able to control the speed of the fan in this manner. This way I control the current to the fan based on Vgs. I need this because it gives me greater control in fan speed and is cheap. Is there anything wrong with this method? How do I go about making this work well? And what should I keep in mind and what am I missing in this circuit?

enter image description here

I need to find a transistor with a low enough Vgs to do this, but if such a thing doesn't exist is there a way to fix that?

Thanks!

\$\endgroup\$
3
  • \$\begingroup\$ Which kind of fan is it? Is it a computer fan? \$\endgroup\$ Apr 23, 2014 at 21:58
  • \$\begingroup\$ Yes, it's a 3 wire computer fan. 3rd wire is tach. \$\endgroup\$
    – rigs
    Apr 24, 2014 at 2:37
  • 2
    \$\begingroup\$ Your circuit won't work. Move the fan up between Vcc and Q1. Also with the low input voltage you may have better results with a BJT. Then connect C1 to Vcc instead of GND so that after a cold start the transistor is shortly fully turned on and the fan will reliably speed up. \$\endgroup\$
    – jippie
    Apr 24, 2014 at 5:17

3 Answers 3

2
\$\begingroup\$

I have used analog approaches with voltage control successfully in production (10k/mo) and never had a regulator problem. Simple this 1U high 19"rack was pure analog with an OEM 180W supply that UL dictated a "coke-spill" sealed top, I chose a tiny thermistor epoxied to the SMPS hot-spot to bias a switch to drive the fan ON, above 45deg C. I computed the values and gain in a spreadsheet so the gain was 0 to 100% from 45 to 55'C.

You might find the PWM will work best but alias at some rates with some vendor fans, so test them with a pulse gen. and avoid that PWM rate if using a 2 pin fan.

The problem I had was after a few shipments, fans started to get "stuck" and needed a tiny spin to start up, otherwise they would dither back and forth a couple degrees or simply looked dead. This had nothing to do with analog or PWM control, as I recognized the process design fault as misaligned Hall sensors in the fan. the reason being the max fan power is controlled by sensor magnet alignment and commutation closest to reversal ( before top dead center ) was like a backfire in a piston which made it go back/forth so fast, it stood still. in only 1 or 2 stop positions. So I made a quick fan fail tester with 1 second only 4 seconds off to stop and tested every fan start angle 30 seconds, then after 1 hr found 5 failed in 150 fans. rejected the units. accepted the 145 and sent 1 thousand fans fan to supplier and emailed the Test Design to Distributor& Factory and said if we get 1 more fan failure , they lose our business. That worked. No more stuck fans.

It took me less time to put out this Stop ORder and test 150 fans and send the design procedure than to write up this answer.

Your driver is not linear on V+ high side, and you might want a low side with N type. i.e. the Source to Gnd and Drain to fan(-) and fan(+) to 12V or some other switch. Consider slow startup at 5V for cool and quiet.

Max power dissipation of the fan reduced to 50% at half power and RPM where the driver dissipates the same power, so clamp with isolation to a heatsink or frame. In my case it was only a few Watts out of 5W or use PWM if you prefer 3 pin fans and the thermistor speed control bits and pieces cost me ~$2 added cost to cheaper two-pin twin turbo 1.75" fans. 2 much !

\$\endgroup\$
1
\$\begingroup\$

What you propose would work, but would be inefficient and therefore have to be able to dissipate some heat. A better way is to fully PWM the fan directly. Not all fans can tolerate this, but many can. Talk to the manufacturer.

I recently had exactly the same issue, so I called the manufacturer and talked to a apps engineer. He assured me that that particular model of fan, even though it had active circuitry in it to commutate the motor, would be fine with being PWMed between off and on. Other fans with different active circuitry may not like that. Again, check with the manufacturer if this isn't clearly spelled out in the datasheet.

\$\endgroup\$
4
  • \$\begingroup\$ I did this at first but I don't have as much speed control and it's running at high frequency. I can control better with lower frequency but then the fan makes a whistling noise which is what I'm trying to avoid. \$\endgroup\$
    – rigs
    Apr 24, 2014 at 15:26
  • \$\begingroup\$ @rigs: If you can hear the PWM, then you are using too low a frequency. Try 24 kHz. That's a common PWM frequency for motor control for exactly this reason. But, again, check with the manufacturer as to whether the particular fan you are using can tolerate being rapidly cycled between off and on. If no, you can use the inefficient analog scheme you propose, or get a different fan. \$\endgroup\$ Apr 24, 2014 at 16:04
  • \$\begingroup\$ I tried increasing the PWM frequency to above hearing but when I do that the fan has an abrupt start that I'm trying to avoid, this was the case with almost all the fans I tried. I can't really change fans since the ones I have are quiet and still have enough pressure. I'm also trying to have a start that's as quiet as possible which is why I want voltage control/current control. \$\endgroup\$
    – rigs
    Apr 24, 2014 at 17:38
  • \$\begingroup\$ @rigs: If you can change the PWM duty cycle, I don't understand what you mean by "abrupt start". At some duty cycle the fan will start to spin, then faster between there and 100%. \$\endgroup\$ Apr 24, 2014 at 17:40
1
\$\begingroup\$

I did as Jippie suggested in the comments above to use a BJT. It works and it does what I want it to do. I thought I should submit my solution. The values need to be tweeked a bit to make it more manageable but I tested it and it worked.

Thanks to everybody.

enter image description here

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.