Author Topic: Help with driving a fan with pwm  (Read 3499 times)

0 Members and 1 Guest are viewing this topic.

Offline MrIndecisoTopic starter

  • Newbie
  • Posts: 6
  • Country: it
Help with driving a fan with pwm
« on: March 22, 2017, 06:42:31 pm »
Hi,
I don't know if this is the right section or if I should write on Beginners, but I'm trying to make a circuit which should convert a 4 pin fan connector, with PWM, to a 3 pin fan connector that requires voltage regulation.
I searched for something similar on the forum but I didn't find anything useful.
I thought at these two (not so) different ways to do it:


(I've never used CircuitMaker before so sorry for my wiring)
Everything seems fine with one fan, and gets even better with a capacitor after the Mosfet, the voltage drop is about 0.3V  (I think). The Mosfet gets just warm with a Duty Cycle of 60%.
However when I try with two fans (every fan uses about 0.3A) the voltage drops of even 2 or 3V and the Mosfet starts heating up.
What should I do?
This is the datasheet of the mosfet: https://cdn.sparkfun.com/datasheets/Components/General/FQP30N06L.pdf
Thanks to everyone
 

Offline mrkev

  • Regular Contributor
  • *
  • Posts: 225
  • Country: cz
Re: Help with driving a fan with pwm
« Reply #1 on: March 22, 2017, 07:24:21 pm »
Hi.
It is heating up, because you have it backwards. It acts as emitor follower and even worse, the body diode keeps it open the whole time. (just try to draw a line where the current flow. From +12V, to +12V pin on the fan, to pin 3 of the transistor and you get that the diode is in the forward direction to pin 2).
Swap pins 2 and 3, and while keeping the resistor between pin 1 and 3 (you probably don't need the bipolar transistor) make the value lower (I would say even 4k7). When the transistor is switched off, its input capacitance (which is high: 1nF) is discharged through this resistor. From 680k and 1nF you get 680us time constant, which is too high.
 

Offline MrIndecisoTopic starter

  • Newbie
  • Posts: 6
  • Country: it
Re: Help with driving a fan with pwm
« Reply #2 on: March 22, 2017, 07:35:07 pm »
I checked and I just made it wrong in the schematic, on my breadbord it is right.
I'll check later for the lower value resistor
 

Offline artag

  • Super Contributor
  • ***
  • Posts: 1061
  • Country: gb
Re: Help with driving a fan with pwm
« Reply #3 on: March 23, 2017, 12:35:30 am »
If you chop the ground connection, the tacho signal will get corrupted. It may rise to 12V which could upset the motherboard. Best to chop the 12V (which is what actual 4-wire fans do)

 

Offline K5HJ

  • Regular Contributor
  • *
  • Posts: 60
Re: Help with driving a fan with pwm
« Reply #4 on: March 23, 2017, 02:47:58 am »
Brushless fans do not work well with PWM'd DC input. Use one with a proper speed control input.
 

Offline MrIndecisoTopic starter

  • Newbie
  • Posts: 6
  • Country: it
Re: Help with driving a fan with pwm
« Reply #5 on: March 23, 2017, 01:10:36 pm »
Brushless fans do not work well with PWM'd DC input. Use one with a proper speed control input.
If I have to build a circuit to convert it I think it's obvious that I can't use a fan with a proper speed control.
The fan I'm using seems happy with a PWM 12V, and better with a capacitor.
If you chop the ground connection, the tacho signal will get corrupted. It may rise to 12V which could upset the motherboard. Best to chop the 12V (which is what actual 4-wire fans do)
Unfortunately I can only use this Mosfet because it is the only one that I have at the moment, so I must switch ground

Does someone know why it is overheating?
 

Offline bktemp

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: de
Re: Help with driving a fan with pwm
« Reply #6 on: March 23, 2017, 01:35:29 pm »
Does someone know why it is overheating?
The mosfet gets hot, because a huge current flows when the mosfet turns on in every PWM cycle to recharge the capacitor. Then the mosfets acts as a resistor limiting the charge current and dissipating a lot of power.
Using PWM on a fan not designed for beeing driven by PWM is a bad design. Adding a capacitor makes it even worse.
I know it is not the answer you are looking for, but that's why there are fans with a dedicated PWM input.
 

Offline MrIndecisoTopic starter

  • Newbie
  • Posts: 6
  • Country: it
Re: Help with driving a fan with pwm
« Reply #7 on: March 23, 2017, 01:45:51 pm »
Does someone know why it is overheating?
The mosfet gets hot, because a huge current flows when the mosfet turns on in every PWM cycle to recharge the capacitor. Then the mosfets acts as a resistor limiting the charge current and dissipating a lot of power.
Using PWM on a fan not designed for beeing driven by PWM is a bad design. Adding a capacitor makes it even worse.
I know it is not the answer you are looking for, but that's why there are fans with a dedicated PWM input.
But why does this thing happen even if the Duty Cycle is 100% (so the Mosfet is always on)?
The Mosfet is a logic level one and driven by 12V so it shouldn't have a so high resistance to cause the voltage to drop to 9V (this happens only with two fans, with one it is perfect)?
 

Offline bktemp

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: de
Re: Help with driving a fan with pwm
« Reply #8 on: March 23, 2017, 02:02:15 pm »
This mosfet shouldn't get warm when driving a fan unless the fan has >50W.
Try measuring the voltage across drain-source. The voltage should be near 0V when driven at 100% duty cycle.
 
The following users thanked this post: MrIndeciso

Offline MrIndecisoTopic starter

  • Newbie
  • Posts: 6
  • Country: it
Re: Help with driving a fan with pwm
« Reply #9 on: March 23, 2017, 02:38:23 pm »
This mosfet shouldn't get warm when driving a fan unless the fan has >50W.
Try measuring the voltage across drain-source. The voltage should be near 0V when driven at 100% duty cycle.
I changed the breadboard and now Drain-Source is about 20mV, which is correct since Mosfet RDS is 0.035?
Should I try building this circuit on a stripboard? 
Is there another way to do this circuit?
 

Offline bktemp

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: de
Re: Help with driving a fan with pwm
« Reply #10 on: March 23, 2017, 02:52:41 pm »
20mV sounds right. Does the mosfet still heat up?
 

Offline MrIndecisoTopic starter

  • Newbie
  • Posts: 6
  • Country: it
Re: Help with driving a fan with pwm
« Reply #11 on: March 23, 2017, 02:56:54 pm »
20mV sounds right. Does the mosfet still heat up?
With this new breadboard it doesn't, at least when it is 100% Duty Cycle.
I'll try on the stripboard later
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: Help with driving a fan with pwm
« Reply #12 on: March 23, 2017, 03:31:05 pm »
You may want to add a freewheeling diode to prevent components from dying horribly during the switch-off phase.



As for breadboarding, in my experience mosfet pins tend to be a bit bigger that what comfortable fits. And in general, breadboard connections are not super reliable. For low current paths usually not a big problem. But for motor control you may want to make some connections with ye olde soldering iron. Especially when you get unexpected results that are about to become your next time sink learning experience.

That said, I also use mosfets in breadboard. But to be nice to my future self I put them in a specific row of the breadboard and then I mark that row with permanent marker. So, when I use that breadboard later for something completely different, I only use that row for big pins. You can of course still use small pins in there if you like intermittent contact induced surprises. ;D

And another solution is to solder the mosfet on a standard pin header. Then you can plug the pin header in the breadboard.
« Last Edit: March 23, 2017, 03:39:57 pm by mrflibble »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf