Why some 2/3-pin fans cannot be driven by PWM? - Page 1
Forum section: electronics / beginners

author: czbaterka
author_rank: Contributor
timestamp: December 05, 2024, 09:32:47 pm
content: I have question about small DC Brushless fans in general. Why some of them cannot be driven by external PWM controllers?I have bunch of 12V PC fans that are 2/3-pin ones (without dedicated PWM input) and I can easily drive them by MOSFET and Arduino that generates with ~25kHz PWM.When I try to do the same for some other fans like for example SUNON MF60252VX-1000U-G99 (https://www.tme.eu/cz/details/mf60252vx-g99-a/ventilatory-dc-24v/sunon/mf60252vx-1000u-g99/) it just won't work well. The fan spins very fast even for 50% PWM duty cycle (at like 90% of max speed) and for anything under around 50%, the fan just stops and starts buzzing. Is it because the hall sensor in the fan is somehow contributing to fan control and the PWM just messes with it?What is my other options to drive this type of fans using MCU? I need to change speed based on temp sensor, but I also need to datalog the temps and RPM, so I cannot use analog solution.

author: soldar
author_rank: Super Contributor
timestamp: December 05, 2024, 09:38:02 pm
content: Some devices do not care so much about RMS but about peak voltage. Think of any device that starts with a rectifyer and capacitor. The capacitor with fill up to the peak voltage regardles of the RHS voltage.So different devices behave differently.

author: czbaterka
author_rank: Contributor
timestamp: December 05, 2024, 09:58:27 pm
content: That did not really answered me why some brushless dc fans can be controlled by pwm and some not, tbh. They should be basically the same right?

author: Nominal Animal
author_rank: Super Contributor
timestamp: December 05, 2024, 10:19:48 pm
content: Some brushless fans use thepeakinput voltage to determine their speed, some use theaverageinput voltage.The two typically have very different brushless driving mechanisms, that mechanism determining which (peak or average) ends up defining the speed.I personally haven't investigated how the two are implemented, only observed the practical differences. (Specifically, that many, but not all, 4-pin 12V PWM fans can be voltage-controlled using three wires, not connecting the PWM input at all, controlling the speed using voltages between 8V - 13V. Some will only run at max speed without PWM input.)The fan itself has a small PCB on the hub where the wires connect. For most fans (certainly all 3- or 4-wire 12V fans with tachometer output), this includes a Hall effect sensor detecting two pulses per rotation. For all brushless fans, it includes the full or half bridge(s) needed to drive the coils, and the controller for timing that, often integrated to a single tiny chip. It is this IC (and its operational principle) that determines the fan behaviour.As an abstract example, consider a driver with a constant current input, followed by a low-pass filter. These would be controlled by average input voltage. Now, compare to a buck-boost driver with bulk capacitance on the input. These would be controlled by the peak input voltage.In practice, the fans use highly specific driver ICs that include things like the initial start-up peak (to ensure the fan starts rotating even at lower input voltages/RPMs); so one can consider them to be controlled by small microcontrollers, and just knowing/assuming that some are controlled by peak voltage, and others by average voltage, is the most useful model.

author: Benta
author_rank: Super Contributor
timestamp: December 05, 2024, 10:33:43 pm
content: 2/3-pin fans are not suitable for 25 kHz switching. You're fast switching the complete BLDC control circuit, which is completely out of their normal operating area.50...500 Hz is realistic.4-pin fans are different, they have a dedicated PWM input for 25 kHz modulation.

author: janoc
author_rank: Super Contributor
timestamp: December 05, 2024, 10:52:12 pm
content: You can't modulate the power using PWM hoping to control the speed of the motor - it is not a light bulb or a toy brushed motor which an be controlled like this. The DC fan has a brushless motor with a small electronic controller in the hub that can't cope with that kind of control. Some will work better than others but you are really operating the poor controller way outside of its design limits. You could even kill it.BTW, most small & cheap fans don't have Hall sensors, only a small IC driving two coils of the motor in sensorless mode. I.e. it starts open loop and then uses back EMF for commutation once the fan gets up to speed. Such motors really don't like attempts at speed control because the controller will lose sync and the motor will stall - that's where you get that buzzing and it isn't turning.If you want to control the speed of a DC fan, get a 4 pin one. That one has both tacho output and a special PWM input for speed control. That's the most reliable method.

author: Nominal Animal
author_rank: Super Contributor
timestamp: December 06, 2024, 12:11:24 am
content: I like the 4-pin 12V PWM fans, and have designed asingle fan controller with I2C using ATtiny85(for use with I2C temperature sensors for example), adual fan controller using ATtiny85, and even adual fan controller add-onforOlimex ESP32-EVB.All you need is a microcontroller that can generate the 25 kHz PWM signal (anything between 21 kHz to 29 kHz should work, so the frequency is not that important). In the Arduino environment, you will need to change the default PWM frequency, and possibly use a specific PWM output that allows a sufficiently high original clock rate (something around 6.4MHz will work well for 8-bitters, anything at or higher for 16/32-bitters). I use NX138AKR N-channel MOSFETs (very similar to BSS138, but slightly faster switching due to smaller gate charge) for both the open collector PWM output and the tachometer input (two pulses per rotation, so from a few Hz to a couple of hundred Hz at most for the fastest fans). The 220Ω resistor on the NX138AKR gate is to limit the current draw spike when changing state, and is small enough to allow switching at 25kHz (and much higher) rates using 2.5V to 5.5V logic level control.Basically all 12V four-wire PWM fans and controllers follow the original Intel specifications (PDF), except for the wire colors and exact pull-up voltages.Note, however, that I'm only a hobbyist myself, not an Electronics Engineer.

author: Benta
author_rank: Super Contributor
timestamp: December 06, 2024, 12:18:09 am
content: @Nominal Animal,very nice, but just how does that relate to 2/3-pin fans?

author: fzabkar
author_rank: Super Contributor
timestamp: December 06, 2024, 12:22:25 am
content: Quote from: janoc on December 05, 2024, 10:52:12 pmThat's exactly the principle that is used by pseudo-sinusoidal 3-phase SMOOTH motor controllers in hard drives.I don't understand why anyone would want to PWM the supply voltage of a motor that uses electronic commutation. It must drive the electronics mad.

author: Original
author_rank: Contributor
timestamp: December 06, 2024, 12:25:55 am
content: Most fans have a rudimentary hall effect controller two output flip flop (i.e. ATS276G or similar) that can tolerate some "ripple" caused by the PWM switching on and off.If the fan has a more advanced fan controller it will not work with the power signal switching on and off.The only way to control those fans is to separate the coil driving voltage (where you will feed your PWM power signal) and the internal fan controller supply voltage, where you will need to feed continuous 12V supply.I have done this many times with large PAPST fans in the old days...I am not familiar with the fan you are trying to control. but if you disassemble it maybe we can have a look at its pcb.

author: Nominal Animal
author_rank: Super Contributor
timestamp: December 06, 2024, 12:59:40 am
content: Quote from: Benta on December 06, 2024, 12:18:09 amWhichthat?#3, or#6continuing on what janoc wrote in#5in the hopes of helping solve the actual underlying problem (whatever that might be) by showing that changing the fan itself to an easily controlled one is not difficult or resource-intensive?