Author Topic: PC high-current PWM fan controller issues  (Read 14331 times)

0 Members and 1 Guest are viewing this topic.

Offline ratdude747Topic starter

  • Regular Contributor
  • *
  • Posts: 96
  • Country: us
PC high-current PWM fan controller issues
« on: August 28, 2017, 11:22:12 pm »
I recently aquired a somewhat old server with loud non-PWM fans hooked to a straight up 12V power distribution board ("molex" plug and 6 3 pin fan ports, one side 12V, the other ground). Since the motherboard in it (and the one that I'm swapping in) supports PWM, I decided to make my own replacement distribution board with two PWM channels; while controllers can be bought, each of the 4 fans is rated at 1.5A... so a cheaply made 2A max unit of ebay wasn't going to cut it.

The PCBs came in today (ordered from allPCB, they turned out nice), but unfortunately it's not throttling connected fans.

Attached are the schematic for the board, gerber files for the PCB, and the intel PWM spec I designed it to meet.

The topology is based on a schematic I found here: https://electronics.stackexchange.com/questions/275561/use-motherboard-pwm-to-control-non-pwm-fans-with-mosfet

...and I verified the circuit with some rough back of the envelope calculations.



Here's what I've done for diganostics

  • No PWM signal: Fans run at full blast
  • grounded PWM signal: Fan shuts off
  • connected to computer with known working PWM fan connector (tested before and after with a PWM fan): No throttling, fans at full blast
  • Tach signal: present on output
  • grounding the ground connector on the PWM in ports: No change
  • Swapping D1 for two more 2.7K resistor's in parallel: no change
  • testing a PWM fan with a jumper wire on the PWM port: grounding slows fan, connecting to 12V does nothing, confirming that PWM fan signals are NPN, not PNP in nature

Ideas on what to check next. Sadly, unlike my college days, I don't have good scope access; I do have a couple of good mutimeters though.
« Last Edit: August 28, 2017, 11:40:38 pm by ratdude747 »
 

Online floobydust

  • Super Contributor
  • ***
  • Posts: 7015
  • Country: ca
Re: PC high-current PWM fan controller issues
« Reply #1 on: August 29, 2017, 03:47:34 am »
I don't see how that author's circuit is going to work with a tach.

If you are modulating the fan's low-side then the tach signal is scrambled by the PWM because you are (pulsing) lifting the fan's ground.
Imagine the MOSFET is off, so your fan GND and TACH are sitting at 12V.
You might get backfeed from the fan's tach output seeking lower potential, into the motherboard's input gate. It looks like needs to be a 3.3V logic signal, so your tach output signals make sure resistors drop to 3.3V max. Even then, the tach freq. is mistakenly seen as too high by the motherboard, IMHO.


 

Offline mihnen

  • Newbie
  • Posts: 2
  • Country: us
Re: PC high-current PWM fan controller issues
« Reply #2 on: August 29, 2017, 04:38:11 am »
According to the fan connector pin-out you are switching the ground side of the fan with your mosfet, you should have a flyback diode across that output from +12V to V_Outx.

The previous poster is correct about the tach not being valid because of the low side switching although it should still work without the tach signal being clean depending on the motherboard firmware.

What is your PWM frequency? the pwm output of a motherboard is meant for 4-wire fans and so should be around 20kHz which may be to fast when your trying to PWM the actual supply voltage for the fan. If you say it runs at full blast with no PWM signal that is what is expected since you have a pullup on the gate. When you ground the signal it shuts off is also good since fet is off so no current should flow through the fan.

You can find the details for PC fan interfaces here:

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

If your just looking for something to get your fans working I have used this in the past. It takes a pwm signal (4-wire) from your motherboard and allows you to use it to control up 6 dc fans.

http://www.phanteks.com/PH-PWHUB.html

Also if your interested I made a fan controller in the past for my PC. Its special feature was that it had both high side DC control with a switcher controlled by a dac as well as standard PWM control. It ran off a micro-controller but you could look at the fan control parts for some inspiration. See attached
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19538
  • Country: gb
  • 0999
Re: PC high-current PWM fan controller issues
« Reply #3 on: August 29, 2017, 08:55:51 am »
As others have said you're messing up the tachometer signal by PWM'ing the fans' 0V terminal.

Ordinary fans don't work well with PWM. You're better off filtering the motherboard's PWM to make a DC voltage and amplifying that to drive the fans.

This is all a bodge. Replace the fans with proper 4 wire fans which have the PWM signal.
 

Offline ratdude747Topic starter

  • Regular Contributor
  • *
  • Posts: 96
  • Country: us
Re: PC high-current PWM fan controller issues
« Reply #4 on: August 29, 2017, 12:41:40 pm »
^The fans are in a special enclosure/hotswap, so a direct swap would have been a hack to say the least.

As for the  off-the-shelf controller... It's only good for 2.5A. No bueno.

Would putting a large filter cap on the fan outputs help at all? I might try it when I get off work.
 

Offline ratdude747Topic starter

  • Regular Contributor
  • *
  • Posts: 96
  • Country: us
Re: PC high-current PWM fan controller issues
« Reply #5 on: August 29, 2017, 03:03:15 pm »
I did think about it some more... Technically I could rewire the hot swap plugs (which happen to have 4 positions) for PWM and recrimp some appropriately rated PWM fans. Would be a PITA and such fans are not cheap but I do have some extra PWM fan extenders left over from this project that I could crimp in.

Still, I would much prefer to make a system to control non-PWM fans via PWM (working tach signals are nice but not required). What would I need to do? Use a transistor to drive a P-channel mosfet (or perhaps a darlington) amplifier with filtering?

 

Offline ratdude747Topic starter

  • Regular Contributor
  • *
  • Posts: 96
  • Country: us
Re: PC high-current PWM fan controller issues
« Reply #6 on: August 29, 2017, 03:23:25 pm »
Would this be a better circuit to use?


Note that I'm using the transistor as my input snubber (0.7V is well under 5.25V) . I assume that's a valid move, or do I need to add a series resistor and a zener to ground in case the transistor fails? Edit- Yeah, I probably should, to ensure switching signal "completely" turns off the transistor.
« Last Edit: August 29, 2017, 03:27:05 pm by ratdude747 »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19538
  • Country: gb
  • 0999
Re: PC high-current PWM fan controller issues
« Reply #7 on: August 29, 2017, 03:34:28 pm »
^The fans are in a special enclosure/hotswap, so a direct swap would have been a hack to say the least.

As for the  off-the-shelf controller... It's only good for 2.5A. No bueno.

Would putting a large filter cap on the fan outputs help at all? I might try it when I get off work.
A filter capacitor would be a bad idea, because every time the transistor turns on, it will have to charge the capacitor, resulting in a high current surge.

I did think about it some more... Technically I could rewire the hot swap plugs (which happen to have 4 positions) for PWM and recrimp some appropriately rated PWM fans. Would be a PITA and such fans are not cheap but I do have some extra PWM fan extenders left over from this project that I could crimp in.

Still, I would much prefer to make a system to control non-PWM fans via PWM (working tach signals are nice but not required). What would I need to do? Use a transistor to drive a P-channel mosfet (or perhaps a darlington) amplifier with filtering?

I was thinking a PWM circuit with a filter and emitter follower to drive the motor. The PWM voltage is 12V, which can be obtained from the 5V using a MOSFET driver. The output stage will always drop around a volt, so even with 100% PWM it will never run at full speed.

 

Offline ratdude747Topic starter

  • Regular Contributor
  • *
  • Posts: 96
  • Country: us
Re: PC high-current PWM fan controller issues
« Reply #8 on: August 29, 2017, 03:36:35 pm »
Here's the two stage idea I posted above with a better input design. Should accomplish what I want while keeping a consistant ground?

Side note- I'm OK with not getting full speed. I'm not running 15K drives or anything (these are case fans; the CPU fans I swapped for PWM already)
« Last Edit: August 29, 2017, 03:38:14 pm by ratdude747 »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19538
  • Country: gb
  • 0999
Re: PC high-current PWM fan controller issues
« Reply #9 on: August 29, 2017, 03:40:29 pm »
Here's the two stage idea I posted above with a better input design. Should accomplish what I want while keeping a consistant ground?

Side note- I'm OK with not getting full speed. I'm not running 15K drives or anything (these are case fans; the CPU fans I swapped for PWM already)
As I said above, the capacitor across the motor will result in large current surges, which will put strain on the transistor.
 

Offline ratdude747Topic starter

  • Regular Contributor
  • *
  • Posts: 96
  • Country: us
Re: PC high-current PWM fan controller issues
« Reply #10 on: August 29, 2017, 03:45:04 pm »
^The fans are in a special enclosure/hotswap, so a direct swap would have been a hack to say the least.

As for the  off-the-shelf controller... It's only good for 2.5A. No bueno.

Would putting a large filter cap on the fan outputs help at all? I might try it when I get off work.
A filter capacitor would be a bad idea, because every time the transistor turns on, it will have to charge the capacitor, resulting in a high current surge.

Isn't that the principle of how the secondary of a SMPS works? The capacitor smooths out the switching ripple. I have an intentionally overspec'd MOSFET so inrush current isn't a huge concern.

I did think about it some more... Technically I could rewire the hot swap plugs (which happen to have 4 positions) for PWM and recrimp some appropriately rated PWM fans. Would be a PITA and such fans are not cheap but I do have some extra PWM fan extenders left over from this project that I could crimp in.

Still, I would much prefer to make a system to control non-PWM fans via PWM (working tach signals are nice but not required). What would I need to do? Use a transistor to drive a P-channel mosfet (or perhaps a darlington) amplifier with filtering?

I was thinking a PWM circuit with a filter and emitter follower to drive the motor. The PWM voltage is 12V, which can be obtained from the 5V using a MOSFET driver. The output stage will always drop around a volt, so even with 100% PWM it will never run at full speed.



You do know that the PWM signal is open collector; it must be pulled up to no more than 5.25V in the fan (or in this case, the amplfier board). Not to say that wouldn't work, just know that the PWM signal's voltage is set in the circuit via pull-up.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19538
  • Country: gb
  • 0999
Re: PC high-current PWM fan controller issues
« Reply #11 on: August 29, 2017, 09:58:56 pm »
^The fans are in a special enclosure/hotswap, so a direct swap would have been a hack to say the least.

As for the  off-the-shelf controller... It's only good for 2.5A. No bueno.

Would putting a large filter cap on the fan outputs help at all? I might try it when I get off work.
A filter capacitor would be a bad idea, because every time the transistor turns on, it will have to charge the capacitor, resulting in a high current surge.

Isn't that the principle of how the secondary of a SMPS works? The capacitor smooths out the switching ripple. I have an intentionally overspec'd MOSFET so inrush current isn't a huge concern.
Totally different, since in a switched mode power supply there's a big fat inductor to momentarily act as a current source, thus limiting the current. In the circuit you've depicted, there's nothing to limit the current, other than the capacitor's ESR and the MOSFET's on resistance.

Quote
You do know that the PWM signal is open collector; it must be pulled up to no more than 5.25V in the fan (or in this case, the amplfier board). Not to say that wouldn't work, just know that the PWM signal's voltage is set in the circuit via pull-up.
Yes, that's why I said you need something to level shift the 5V PWM to 12V for this to work. You could use a MOSFET driver such as the MCP1402 or TC4427 or (cheaper but it will have a higher output resistance) a level shifter IC such as the CD40109 or CD4504.
http://ww1.microchip.com/downloads/en/DeviceDoc/20002052D.pdf
http://ww1.microchip.com/downloads/en/DeviceDoc/21422c.pdf
http://www.ti.com/lit/ds/symlink/cd40109b-q1.pdf
http://www.ti.com/lit/ds/symlink/cd4504b.pdf


I was thinking a PWM circuit with a filter and emitter follower to drive the motor. The PWM voltage is 12V, which can be obtained from the 5V using a MOSFET driver. The output stage will always drop around a volt, so even with 100% PWM it will never run at full speed.


« Last Edit: August 29, 2017, 10:15:53 pm by Hero999 »
 

Offline ratdude747Topic starter

  • Regular Contributor
  • *
  • Posts: 96
  • Country: us
Re: PC high-current PWM fan controller issues
« Reply #12 on: August 29, 2017, 10:38:17 pm »
^I did realize that. Actually, why not design it as a SMPS:

Using this calculator:

https://learn.adafruit.com/diy-boost-calc/the-calculator

Vin Max= 12V, Vin Min =10V

Vout Max=12V, Vout Max = 6V (50% is the lowest any motherboard will ever command)

Which yielded me this:



Maybe this is the way to go? (Yes, I know Q3's pin numbers are wrong)

« Last Edit: August 29, 2017, 10:40:33 pm by ratdude747 »
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9023
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: PC high-current PWM fan controller issues
« Reply #13 on: August 30, 2017, 01:24:25 am »
Move the diode to the other side of the inductor, then you have a good starting point.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline ratdude747Topic starter

  • Regular Contributor
  • *
  • Posts: 96
  • Country: us
Re: PC high-current PWM fan controller issues
« Reply #14 on: August 30, 2017, 02:48:55 am »
^good catch. Doh!

See attached schematic. Since we have two transistor stages, I'm going back to an old setup that switched the PWM signals and not the raw output for channel 2. Direct driving the mosfet was too much to double up but even with a measly gain of 50 I'll be more than OK to double them (old design also had passthrough jacks for the input, but I'm not putting those back in).

I'm working on PCB artwork now but won't order until I've had a chance to breadboard this... lesson learned: not having stuff from college readily available is a poor excuse not to test things!

Edit- Pulled schematic, I forgot to swap the connections on the ouput connectors.  :palm:

Edit #2: Fixed Schematic.
« Last Edit: August 30, 2017, 02:55:35 am by ratdude747 »
 

Offline ratdude747Topic starter

  • Regular Contributor
  • *
  • Posts: 96
  • Country: us
Re: PC high-current PWM fan controller issues
« Reply #15 on: August 30, 2017, 06:24:31 am »
Final updates before I go to bed. See attached files.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19538
  • Country: gb
  • 0999
Re: PC high-current PWM fan controller issues
« Reply #16 on: August 30, 2017, 10:36:03 am »
^good catch. Doh!

See attached schematic. Since we have two transistor stages, I'm going back to an old setup that switched the PWM signals and not the raw output for channel 2. Direct driving the mosfet was too much to double up but even with a measly gain of 50 I'll be more than OK to double them (old design also had passthrough jacks for the input, but I'm not putting those back in).

I'm working on PCB artwork now but won't order until I've had a chance to breadboard this... lesson learned: not having stuff from college readily available is a poor excuse not to test things!

Edit- Pulled schematic, I forgot to swap the connections on the ouput connectors.  :palm:

Edit #2: Fixed Schematic.
I strongly recommend using a proper MOSFET driver, rather than Q3. The MOSFET's gate will have to discharge through R3, which will take awhile. If you can't stretch to a proper MOSFET driver IC, such as the MCP1402 or TC442, then you can make do with the CD40109 or CD4504, with several of logic gates connected in parallel, to increase the output drive. Alternatively you can make your own proper driver with several transistors.
« Last Edit: August 30, 2017, 11:02:11 am by Hero999 »
 

Offline ratdude747Topic starter

  • Regular Contributor
  • *
  • Posts: 96
  • Country: us
Re: PC high-current PWM fan controller issues
« Reply #17 on: August 30, 2017, 02:23:38 pm »
The TC4426 looks like a winner... if I'm reading the datasheet and counting my inversions right. This chip require any bypass caps on the power rail?
 

Offline b_force

  • Super Contributor
  • ***
  • Posts: 1381
  • Country: 00
    • One World Concepts
Re: PC high-current PWM fan controller issues
« Reply #18 on: August 30, 2017, 04:11:49 pm »
You can also use a simple totem pole buffer with just two transistors.
You can also just use a buck converter and use that to control the fan.
OR connect the positive side of the fan to the power supple and the negative part at the output of the buck converter.

Btw, what is the reason why normal fans are not fan (lol pun) of PWM signals?

Offline ratdude747Topic starter

  • Regular Contributor
  • *
  • Posts: 96
  • Country: us
Re: PC high-current PWM fan controller issues
« Reply #19 on: August 30, 2017, 04:28:51 pm »
^for a push-pull totem pole to work I'd need to add 4 transistors (2 per channel) as I still need Q3/Q4 to convert from 4.7V logic to 12V logic, which would then feed the totem pole. . Technically 4v and above will work with the Mosfet, but since the max is 25V, I think 12V will do a better job of ensuring saturation.

Could I? Yes. But at $1.40 for the microchip driver (which is designed for what I'm doing) and a lot of circuitry removed (4 resistors and two transistors removed) it's an appealing choice. The costs are compareable; while the totem pole gives more board space/routing options (getting traces around power busses is a slight pain on this board), the chip is hopefully less fussy. Flip a coin?

As for a buck converter, I already have the PWM signal so half of a Switch mode  converter is already there. Although without feedback, one concern I have is stability and output variation due to lack of load. Maybe I do have to put dedicated supply in and use a cap to convert the PWM to DC for a set voltage? Once I have parts (and breadboards, all of my existing ones are tied up in an old college project I don't want to scrap), we shall see.

Edit- lack of feedback might not be an issue after skimming this: http://www.electronics-tutorials.ws/power/switch-mode-power-supply.html... Basically what I made IS a buck converter.
« Last Edit: August 30, 2017, 04:39:40 pm by ratdude747 »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19538
  • Country: gb
  • 0999
Re: PC high-current PWM fan controller issues
« Reply #20 on: August 30, 2017, 06:44:51 pm »
You can also use a simple totem pole buffer with just two transistors.
I don't see how it can be done with just two transistors. I tried but couldn't get the current and voltage gain to drive the MOSFET at any decent speed.

The TC4426 looks like a winner... if I'm reading the datasheet and counting my inversions right. This chip require any bypass caps on the power rail?
Yes, it needs bypass capacitors, as does the circuit I posted with transistors.
 

Offline b_force

  • Super Contributor
  • ***
  • Posts: 1381
  • Country: 00
    • One World Concepts
Re: PC high-current PWM fan controller issues
« Reply #21 on: August 30, 2017, 09:36:09 pm »
You can also use a simple totem pole buffer with just two transistors.
I don't see how it can be done with just two transistors. I tried but couldn't get the current and voltage gain to drive the MOSFET at any decent speed.
This totem pole circuit is done in a lot of switching regulators and Class-D power amplifiers.
Basically standard circuit for everything that uses high current MOSFETs to be honest.

You can simply use a NPN and PNP, but there are also smaller options available from Zetex (Dioded Inc)
Like the ZXGD3005 and similar. Which are a lot smaller and cheaper than the TC4426.
« Last Edit: August 30, 2017, 10:18:04 pm by b_force »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19538
  • Country: gb
  • 0999
Re: PC high-current PWM fan controller issues
« Reply #22 on: August 30, 2017, 10:03:40 pm »
You can also use a simple totem pole buffer with just two transistors.
I don't see how it can be done with just two transistors. I tried but couldn't get the current and voltage gain to drive the MOSFET at any decent speed.
This totem pole circuit is done in a lot of switching regulators and Class-D power amplifiers.
Basically standard circuit for everything that uses high current MOSFETs to be honest.
A totem pole circuit has four transistors.

https://electronics.stackexchange.com/questions/16864/totem-pole-output-driver

Quote
You can simply use a NPN and PNP, but there are also smaller options available from Zetex (Dioded Inc)
Like the ZXGD3005 and similar. Which are a lot smaller and cheaper than the TC4426.
No, that won't do, as it has no voltage gain, only current gain. The voltage needs to be level shifted i.e. boosted, from 5V logic levels, to 12V to control the P-MOSFET.
 

Offline b_force

  • Super Contributor
  • ***
  • Posts: 1381
  • Country: 00
    • One World Concepts
Re: PC high-current PWM fan controller issues
« Reply #23 on: August 30, 2017, 10:24:48 pm »
Mm, I guess there is some miscommunication what a totem pole is.

To my knowledge it is just a NPN/PNP pair.
As you can see here, page 17
http://www.ti.com/lit/ml/slua618/slua618.pdf

Level shifting with just a ground is pretty easy actually.
(it's a bit more a pain when working with a symmetrical power supply)
I guess what you're looking for here as well, is a bootstrap circuit.
« Last Edit: August 30, 2017, 10:43:41 pm by b_force »
 

Offline ratdude747Topic starter

  • Regular Contributor
  • *
  • Posts: 96
  • Country: us
Re: PC high-current PWM fan controller issues
« Reply #24 on: August 31, 2017, 03:23:16 am »
Here's another round of schematics and artwork.

Changes from last time:

Swapped 1st stage from BJT's and resistors to a TC4426 based driver
Added main filter cap C3 and bypass cap C4

---

The TC4426 is cheap enough. I don't want to use SMD if I can at all avoid it... This isn't a mass production project (I'm making 3-5 units, for me and a buddy or two). IMHO not worth it (not to mention not as easy to breadboard).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf