Fan speed control chopper circuit

Shafto

Senior Member
Hello,

I'm building the circuit seen here:

https://www.youtube.com/watch?v=TF018JPytSg

To control the speed of some 3 pin fans from the 4 pin headers on my computer motherboard. The circuit diagram has no output capacitor, but you can see it in the video, and it's mentioned in the comments, but not the value of the capacitor. Looks like a small ceramic cap to me. What would be a good value for this capacitor, and is it even needed?

Another question I have is about a freewheeling diode, shouldn't this circuit have one? Or maybe it's depending on one typically already installed in the fans?

Here are the design specs for 4 wire fans:

http://www.formfactors.org/developer/specs/4_Wire_PWM_Spec.pdf

The PWM is signal ~25khz, I'll be using a picaxe to generate this for testing the circuit.

Thanks!
 

inglewoodpete

Senior Member
These small fans have a brushless 3-phase motor, with an integrated DC-to-AC converter. No external diodes needed. The PWM is low energy - just used to tell the controller how fast to run the motor. A small electrolytic capacitor (=<10uF) may help reduce switching noise getting back to your electronics but is often not required.
 

Shafto

Senior Member
Thanks inglewoodpete. Does the cap in the video not look like a small ceramic though?

I'm trying to visualize what happens with the current when the FET is switched on by the low power PWM signal. If there's a 10uF electrolytic between the drain of the FET and ground, would there not be a lot of ripple current running through that cap every time the FET turns and and off?

The two fans I plan to connect to this device will draw about 350mA each, on full power.
 

Shafto

Senior Member
I've been toying with this for a few days now. The output capacitance has a huge effect on how the device operates. With no output cap the fans will go full speed at ~95% duty cycle, and anything bellow is barely moving, and completely stops spinning bellow 50% duty. There is a sudden surge of speed like going from near nothing to full power when you hit 95% duty.

A 1uF ceramic output cap seems to work the best for my setup, with the two fans I'm using, but if I unplug one fan the characteristics completely change. With 1uF the fan can spin very slow at around 10% duty, it picks up speed nicely until about 40% duty, at this point, and up until about 65%, the fan seems stuck between two modes, speeding up and slowing down. At 70% the fan speed levels out abruptly, quite a bit higher than before, and then continues to clime nicely again until full power.

If I use 10uF electrolytic in conjunction with the 1uF ceramic, I can't get the fan to slow down much, even at 10% duty, then it shuts off suddenly just bellow 10%, there is no low speed, and the fan is nearly full speed at 10%, and doesn't get much faster all the way to 100%. I only tested this briefly on the motherboard, because I assumed it must be drawing a large current suddenly, even at low duty, to fill the cap sufficiently to keep the fans going that quick.

I also tried using a "slow down cap" on the base of the buffer transistor, and then on the gate of the power MOSFET. I saw this in a technical sheet for alleviating fan PWM induced noise for small fans, but it seemed to be geared for low frequency PWM, as the cap suggestions were ~5% time constant of the PWM period. Something around 1-4.7uF depending on the base/gate resistor. For the 25kHz I get from the motherboard, I ended up using a 0.001uF capacitor with a 2.7k resistor, which should have slowed down the switching, and I was hoping this would alleviate the "between speed modes" of the fan, which was maybe caused by PWMing the circuitry of the fan which wasn't designed to take it, and a smoother turn on/off would help, but it didn't seem to make any difference with any of the output capacitor values. Maybe more effective at slower switching frequencies.

So, those are my findings. Currently I just run the fan curve to never go above 40% so it doesn't get into the rev up and down thing, until it hits a certain temp, then jumps all the way to 70%, where the fans speed up a lot but doesn't do the rev bounce thing. I'm missing a lot of adjustablility, but it's still better than full blast all the time or fixed with a resistor.

If anyone who has the knowledge can suggest another approach, or shine some light on what's going on, I'd love to learn. Was thinking I might try using a picaxe to turn the 25kHz into something like 200hZ to drive the fans. A little more involved but if the results were better it'd be worth it.

This project really makes me want to get an Oscope so I can probe around and see what's going on.
 
Last edited:

hippy

Technical Support
Staff member
Many PC-like fans control their motors by using an internal microcontroller and PWM. These expect to be permanently supplied with power. If power is switched on and off, controlled by PWM, they may not work as expected. That seems to be what is happening here.

To control the speed of such fans one needs to use a variable voltage supply rather then PWM. Adding the capacitor to the PWM is possibly creating a variable voltage supply, but to convert the 'desired speed' PWM input into a suitable voltage it probably needs to processed through a PICAXE or other micro rather than being sent direct to the MOSFET.
 

Shafto

Senior Member
Thanks for the reply hippy.

I figured it was likely to do with the internal circuitry of the fan. I've seen a couple other designs, while scouring random forums. One of them used the PWM to drive a MOSFET in linear mode to get a constant output. Would make a decent amount of heat though. I'm sure I would need a heatsink.

I just thought of another idea I could try which should be doable. I have some adjustable output voltage buck regulators I got from ebay (they come in handy for a lot of little projects). With 12V input, the dropout is only 0.5V with the pot turned all the way up. I figure I can replace the pot with a digital pot and shouldn't be a problem to control the output voltage with a picaxe. Now I just need to figure out how to deduce the PWM coming from the motherboard.

I know you can count pulses with pulsein, but is there any way to digitally determine the duty cycle of a pulse?, or would I have to use an RC connected to an analogue input?
 
Top