Author Topic: Best way to control multiple PWM fans  (Read 1663 times)

0 Members and 1 Guest are viewing this topic.

Offline rthorntnTopic starter

  • Frequent Contributor
  • **
  • Posts: 400
  • Country: au
Best way to control multiple PWM fans
« on: January 31, 2024, 09:49:10 am »
Hi,

So "PC" 12v DC 4-wire PWM (signal wire frequency 25khz) fans, what would be the best way to control and monitor (tach wire) these fans over a TCPIP network, I want to replace the noisy AC single-speed, always-on fans in my inverter enclosure with this?

Thanks.
Richard
 

Offline Terry Bites

  • Super Contributor
  • ***
  • Posts: 2393
  • Country: gb
  • Recovering Electrical Engineer
Re: Best way to control multiple PWM fans
« Reply #1 on: January 31, 2024, 05:38:56 pm »
ESP32-POE?

 
The following users thanked this post: rthorntn

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: Best way to control multiple PWM fans
« Reply #2 on: February 01, 2024, 01:35:40 pm »
You'll want to take a look at Intel's 4-wire PWM fan specification.  It's not just for computer fans, all 12V PWM four-wire fans I've seen seem to follow the spec, more or less.  Definitely so for Noctuas, which is likely what you'll want to use.  If you need high airflow, look at Noctua IndustrialPPC series: noisier, but boy do they move air.

I recommend using NXP NX138AKR's (1€ for ten at Mouser, $0.03 at JLCPCB assembly, 0.32€ for ten at LCSC) to interface the microcontroller to the fan:
It works with 2.5V to 12V logic with no changes.  Depending on your microcontroller, you may need an external pull-up (R3), say 10kΩ, or you might do with the internal pull-up if your microcontroller has one on the tach input pin.  R1 limits the peak current drawn from the microcontroller 25kHz PWM pin; you may change that value as you wish, but for 2.5V-3.3V logic, 100Ω to 220Ω works well (and limits the peak current during switching to 33mA to 15mA when using 3.3V logic).  R2 is a fan tach signal pullup per the above specification, but the value isn't precise: anything between 1500Ω and 100kΩ should work, and 10kΩ is just an extremely common value and in my opinion, close to the "sweet spot".

You do not need a PCB for this.  NX138AKR are SOT23-3 packages, so you can use leaded resistors (with the leads cut much shorter) and solder wires directly to the leads ("dead-bugging"), and cover them with heatshrink.  If you want a PCB for this, I'd do one at EasyEDA online.

The downside with Olimex ESP32-POE and ESP32-POE-ISO is that to power a 12V fan –– there are 5V ones, too, though! –– you need to either step-up from 5V, or step-down from the 37V-60V to 12V by piggy-backing on the VIN supply line.  Fortunately, isolated modules like Cui PQQC6-D48-S12-OS (6.49€ at Mouser) are available that can run from 35V to 75V (DC), where you only need to add ceramic capacitors (say 10µF 100V on input, 10µF 50V on output).
Personally, I'd create a small carrier board with the PWM and tach stuff on one (long) side, and the pins and thick wires for the 12V DC-DC converter on the other, large enough to have nice big mounting holes as well, to be soldered underneath the ESP32-POE or ESP32-POE-ISO.
« Last Edit: February 01, 2024, 01:38:36 pm by Nominal Animal »
 
The following users thanked this post: rthorntn

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16620
  • Country: us
  • DavidH
Re: Best way to control multiple PWM fans
« Reply #3 on: February 02, 2024, 12:17:32 am »
You'll want to take a look at Intel's 4-wire PWM fan specification.  It's not just for computer fans, all 12V PWM four-wire fans I've seen seem to follow the spec, more or less.  Definitely so for Noctuas, which is likely what you'll want to use.  If you need high airflow, look at Noctua IndustrialPPC series: noisier, but boy do they move air.

I bought Noctua fans for my last personal computer build and would not recommend them.  The anti-vibration mounts are nice but the fans themselves were all so far out of balance that they needed them.  I ended up only running them at like 25% maximum to keep the vibration down.
 

Offline rthorntnTopic starter

  • Frequent Contributor
  • **
  • Posts: 400
  • Country: au
Re: Best way to control multiple PWM fans
« Reply #4 on: February 02, 2024, 02:24:44 am »
Thanks, the Sanyo Denki 9RA0812P1G0011 (San Ace 80) is what I have, a 10W fan that meets my requirements.
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: Best way to control multiple PWM fans
« Reply #5 on: February 02, 2024, 01:03:07 pm »
I bought Noctua fans for my last personal computer build and would not recommend them.
I must say I haven't had that misfortune myself.  Specific to some model?  Maybe damaged in transit?  I dunno, but something definitely to watch for.

I once had a Maxtor 3.5" 40GB IDE HDD whose platters were so unbalanced it would walk on the table when turned on.  Got it replaced, of course, with no issues on the new one, but put me off Maxtor drives afterwards.

Thanks, the Sanyo Denki 9RA0812P1G0011 (San Ace 80) is what I have, a 10W fan that meets my requirements.
ESP32-POE cannot deliver 10W; the ESP32-POE2 can and will support 12V output, but won't be out before end of February.

Therefore, I'd suggest a ESP32-EVB-IND (also in stock at Mouser), and your own add-on board for or dead-bugging the NX138AKR's for the fan (or two, just in case).  For power, I'd use either Mean Well RPD-60A, RD-35A, PD-45A, or similar 5VDC+12VDC supply; or a 12V 2A wall wart and a 12V-to-5V DC-DC converter (say Cui P78E05-1000, with 10µF X7R 50V like Samsung CL31B106KBHNNNE in 1206, one in input and two in output).  The 5V only input to ESP32-EVB-IND is a standard 5.5mm-2.1mm center positive barrel jack connector (female).

This way, you can power the fan through one of the relays, and fully turn it off when so desired, and still have the other (250VAC/10A / 24VDC/15A) relay for other shenanigans.  (Remember to monitor the tach output, two pulses per rotation, for fan stalling, if the bearings dry out or it gets gunked out somehow.)
« Last Edit: February 02, 2024, 01:06:35 pm by Nominal Animal »
 
The following users thanked this post: rthorntn

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16620
  • Country: us
  • DavidH
Re: Best way to control multiple PWM fans
« Reply #6 on: February 02, 2024, 05:55:53 pm »
I bought Noctua fans for my last personal computer build and would not recommend them.

I must say I haven't had that misfortune myself.  Specific to some model?  Maybe damaged in transit?  I dunno, but something definitely to watch for.

I used three of them and I doubt all three got damaged in the same way:

Noctua NF-A14 iPPC-3000 PWM, Heavy Duty Cooling Fan 3000 RPM
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: Best way to control multiple PWM fans
« Reply #7 on: February 02, 2024, 08:50:51 pm »
I used three of them and I doubt all three got damaged in the same way:

Noctua NF-A14 iPPC-3000 PWM, Heavy Duty Cooling Fan 3000 RPM
Interesting; I got an unused exact same one (NF-A14-IPPC-3000-PWM, from here) in a box –– for my fume filter project ––, but haven't tested it for vibration yet.

The iPPC series are not quiet by any means, and I do not use them for computer cases myself.  I said they're noisier!  See the specs: they're better for pushing air through filters (6.6mm H₂O static pressure) than just ensuring airflow; and generate 41 dB(A) of noise for 270 m³/h airflow.  Compare to the standard NF-A14-PWM, which moves half as much air, 140 m³/h, 2mm H₂O static pressure, and only 25 dB(A) of noise.  And I like to run these slower still.
 

Offline rthorntnTopic starter

  • Frequent Contributor
  • **
  • Posts: 400
  • Country: au
Re: Best way to control multiple PWM fans
« Reply #8 on: February 03, 2024, 12:54:41 am »
power the fan through one of the relays, and fully turn it off when so desired, and still have the other relay for other shenanigans.

Thanks, cool so ESP32-EVB-EA-IND, NX138AKR and an external 12/5v PSU, so I can run two fans from a single board and individually power each one on/off with the relays, I'm unsure from the schematic as the board is so loaded with stuff, do I have enough pins spare to output two sets of PWM and read two tach (hall)?
« Last Edit: February 03, 2024, 12:58:34 am by rthorntn »
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: Best way to control multiple PWM fans
« Reply #9 on: February 03, 2024, 09:15:41 pm »
power the fan through one of the relays, and fully turn it off when so desired, and still have the other relay for other shenanigans.

Thanks, cool so ESP32-EVB-EA-IND, NX138AKR and an external 12/5v PSU, so I can run two fans from a single board and individually power each one on/off with the relays, I'm unsure from the schematic as the board is so loaded with stuff, do I have enough pins spare to output two sets of PWM and read two tach (hall)?
The tach input on your San Ace (≲ 7000 RPM) is at most about 7000/60 ≲ 120 Hz, so you can use either pin interrupts or the pulse counter and remote control input units with any GPIO pin (see David Antliff's esp32-freqcount).

On the through-hole extension header EXT1, at least pins 7, 8, 9, 10, 11, 12 are unused and PWM-capable.  (They are for SDIO, not used on this board.)

On the 10-pin IDC connector UEXT, pins 7, 8, 9 are used by the SD/MMC card slot, but pins 3, 4, 5, 6, and 10 are unused; pin 4 is input-only because of the Schottky diode.  I'd keep its pins 5 and 6 reserved for I2C.

So, I would use the EXT1 header pins 7-12.  Since there are six pins, I'd consider using two for controlling their power, leaving the relays for other shenanigans.  For the fans, 15V 2A rating suffices, so IXYS CPC1706Y (3.43€ apiece in singles at Mouser) would do, and would only need a 330Ω current-limiting resistor on the 3.3V control pin.  I'd be very tempted to add a PAC1720 I2C monitoring chip (connected to the UEXT pins 5 and 6) with two 10mΩ shunt resistors on the fan 12V power lines, so one could detect whether each fan is drawing power or not.  I'd solder two 2×3 pin headers on the ESP32-EVB, and use female headers on the new board, so it'd sit as an add-on on top.

Remember that the tach inputs need a pull-up to 12V (if you go by my design), so you'll need to bring the 12V to the new board anyway.  The NX138AK's pullups only draw a maximum of 1.2mA per tach input, so I'd use thin tracks for safety there; but the fans can draw an amp (I'd rate everything at 2A continuously for safety), so either wires, very short, or hefty tracks are needed.

The standard 4-pin PC fan connectors use Molex 47053-1000 for the male pins on the board, each pin rated for 4A; cost 0.51€ at Mouser in singles.  It has the proper asymmetric support tab, too.  (The female connector housing in the fan cable is Molex 47054-1000 and the crimped pins that go in the female housing are 39-00-0372.)

Oh, and do remember the 12VDC and 5VDC supplies must have the same 0V reference, so I wouldn't use separate supplies, but one of the Mean Well ones I listed.
 
The following users thanked this post: rthorntn

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16620
  • Country: us
  • DavidH
Re: Best way to control multiple PWM fans
« Reply #10 on: February 04, 2024, 01:01:13 am »
I used three of them and I doubt all three got damaged in the same way:

Noctua NF-A14 iPPC-3000 PWM, Heavy Duty Cooling Fan 3000 RPM

Interesting; I got an unused exact same one (NF-A14-IPPC-3000-PWM, from here) in a box –– for my fume filter project ––, but haven't tested it for vibration yet.

The iPPC series are not quiet by any means, and I do not use them for computer cases myself.  I said they're noisier!  See the specs: they're better for pushing air through filters (6.6mm H₂O static pressure) than just ensuring airflow; and generate 41 dB(A) of noise for 270 m³/h airflow.  Compare to the standard NF-A14-PWM, which moves half as much air, 140 m³/h, 2mm H₂O static pressure, and only 25 dB(A) of noise.  And I like to run these slower still.

I installed them on the front of a Fractal Design Define 7 XL case for my new workstation.  I would have preferred the Define XL R2, but they have not been available for years now.  The case has easy to clean mesh air filters, but in retrospect slower fans would have worked.

The balance problem is what limited fan speed, and to keep the fans from synchronizing which made the noise from vibration even worse, I run them at speed differences of about 5%.  Compared to other fans I have used, I would say that these Noctua fans are the worst balanced fans that I have seen in decades.

Noctua is on my never again list.
« Last Edit: February 04, 2024, 01:04:14 am by David Hess »
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: Best way to control multiple PWM fans
« Reply #11 on: February 04, 2024, 03:29:03 pm »
I installed them on the front of a Fractal Design Define 7 XL case for my new workstation.  I would have preferred the Define XL R2, but they have not been available for years now.  The case has easy to clean mesh air filters, but in retrospect slower fans would have worked.
Agreed.  On a roughly similar old Antec P182 enclosure I ran two Gentle Typhoon 120mm fans on input at around 800 RPM, and two Noctua 120mm ones on output at about the same, with one (65W TDP AMD processor) or two (95 TDP AMD processor) Noctua fans in the NH-D12 (IIRC) heatsink, and some custom baffles inside the enclosure to ensure air mixing and avoiding laminar flows.  Ambient temperature inside the enclosure never exceeded 36°C.

Since then, I've built my own enclosures (from wood, with metal sheets scavenged from old enclosures as the inner structure); next one will be a stool/bench with upholstered top.  Much larger fans allow more airflow with lower RPMs and without high-frequency noise peaks; and when you have plenty of room, you can embed the fans in open-cell foam to absorb all vibrations.  The added mass helps damp vibrations and avoid resonances, too.

Noctua is on my never again list.
The non-Industrial line has worked very well for me over the years, but as I said, I never run any fans at their rated full speed.

Even with Gentle Typhoons (D1225C12B6ZPAA6) vibrations were an issue, which I worked around with absorbing material: open-cell foam (where room for it), felt pads in a pinch, but mostly various room temperature non-acetic acid curing silicones.  I'm always on the lookout for low durometer silicone in tubes like those used for gasket making!  Everything available here at automotive stores is too hard for good vibration insulation properties; only works well to absorb vibrations between two metal elements.
 
The following users thanked this post: rthorntn

Offline Zoli

  • Frequent Contributor
  • **
  • Posts: 498
  • Country: ca
  • Grumpy old men
Re: Best way to control multiple PWM fans
« Reply #12 on: February 04, 2024, 06:30:11 pm »
Just to chime in, since I have similar setup: Fractal Design Define R4 with Noctua NF-P14s redux-1500 PWM fans. I have to limit all(7, seven) fans to 80%max. otherwise everything vibrates. Fan placements: two front, one bottom, one back, three on the CPU cooler.
Attached is the relevant screenshot of the temperatures and fan speeds.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16620
  • Country: us
  • DavidH
Re: Best way to control multiple PWM fans
« Reply #13 on: February 04, 2024, 07:28:20 pm »
I have way more case cooling than needed on my Fractal Design Define 7 XL, but where the system lacks is the heat sink for the 65 watt Ryzen CPU.

My old 120 watt Phenom 2 with a Hyper212 cooler easily held at 65C maximum, but my 65 watt Ryzen with a cooler which should be better, runs at least 10C hotter.  My hypothesis is that the Ryzen has a higher junction-to-case thermal resistance because its CPU die size is smaller, but maybe the heat pipes in the heat sink are defective.  If I ever change the CPU, then I will replace the heat sink also.

 

Offline rthorntnTopic starter

  • Frequent Contributor
  • **
  • Posts: 400
  • Country: au
Re: Best way to control multiple PWM fans
« Reply #14 on: February 08, 2024, 06:05:11 am »
Thanks all.

So I received the ESP32-EVB-EA-IND and NX138AKR's.

Phase 1 is to dead bug the NX138AKR and get a San Ace 80 fan working.

So with power I'm cognicent about needing 5V and 12V with a common 0V, now I'm wondering why I wouldn't just run the fans and ESP32 from my 48V batteries, they are right next to the inverter enclosure, so if the source is 48VDC can I just get two DIN rail Meanwell DC-DC supplies, say a DDR-30L-5 and DDR-30L-12, or will that not work, my googlefu can't find a suitable dual output DIN rail DC to DC?

I don't want to be having PCBs made if I can avoid it, I've no idea how to create one.
« Last Edit: February 08, 2024, 06:07:04 am by rthorntn »
 

Offline sparkydog

  • Regular Contributor
  • *
  • Posts: 234
  • Country: us
Re: Best way to control multiple PWM fans
« Reply #15 on: February 08, 2024, 06:07:09 pm »
My old 120 watt Phenom 2 with a Hyper212 cooler easily held at 65C maximum, but my 65 watt Ryzen with a cooler which should be better, runs at least 10C hotter.

Many modern CPUs are designed to ramp up until they hit a certain temperature. If you aren't applying other limits (and if you are, you're potentially limiting your performance for no good reason), they'll just clock themselves higher and higher until they hit a target temperature. It may be that you're getting poorer thermal transfer, but before concluding that, have you checked whether your "65W" Ryzen is actually drawing 65W?
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16620
  • Country: us
  • DavidH
Re: Best way to control multiple PWM fans
« Reply #16 on: February 08, 2024, 11:12:11 pm »
My old 120 watt Phenom 2 with a Hyper212 cooler easily held at 65C maximum, but my 65 watt Ryzen with a cooler which should be better, runs at least 10C hotter.

Many modern CPUs are designed to ramp up until they hit a certain temperature. If you aren't applying other limits (and if you are, you're potentially limiting your performance for no good reason), they'll just clock themselves higher and higher until they hit a target temperature. It may be that you're getting poorer thermal transfer, but before concluding that, have you checked whether your "65W" Ryzen is actually drawing 65W?

It actually draws more like 85 watts, but it still runs significantly hotter with less power than my Phenom 2, so something else is going on.  The difference in area between the CPUs seems to explain the difference; the smaller area of the Ryzen yields a proportionally higher junction-to-case thermal resistance.  It is either that, or the Scythe heat sink which should be significantly better is defective.
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: Best way to control multiple PWM fans
« Reply #17 on: February 08, 2024, 11:41:14 pm »
if the source is 48VDC can I just get two DIN rail Meanwell DC-DC supplies, say a DDR-30L-5 and DDR-30L-12, or will that not work, my googlefu can't find a suitable dual output DIN rail DC to DC?
You can find the list of Mean Well DC-DC supplies here.

DDR-15L-5 suffices for the 5V rail, and DDR-30L-12 should work fine for the 12V rail.  You do need to connect their negative outputs together at one point.

I don't want to be having PCBs made if I can avoid it, I've no idea how to create one.
Well, I do suggest you try the free online EasyEDA editor, as it makes things very simple, and you can order the boards (with or without assembly) from for example JLCPCB (or, if you save the Gerbers to a ZIP file, to any other PCB manufacturer like PCBWay).

First, you draw a schematic of the components and what connections you need.  If you intend to use JLCPCB, pick components you can buy from them.
2008496-0
Then, you convert the schematic to a PCB, and start placing the components how you want them to be on the PCB.  There is a layer/feature called Ratlines, which shows which component pads are connected to where.  It can generate a 2D and 3D view of the board at any time, too.
2008484-1
Next, you sleep on it, then check the schematic and the board whether it all makes sense.  There is a feature called Design Rules Check, which can check some things for you, like whether the nets are fully connected, traces don't go too near each other or pads or through-holes, and so on.

You can find the two first steps of that here, using four NX138AKRs for two fans, two NXP NX138AKRs and two Vishay SI2393DS-T1-GE3 P-channel MOSFETs to control the power to each fan.  All the components are from JLCPCB catalog, so you can have the entire board made and assembled (optionally without the two 2×3 pin female headers on the bottom) there.  The end result looks something like the attached picture.  It is all in Public Domain/CC0-1.0, too.
2008490-2

Do note that this is not tested and not verified yet!
« Last Edit: February 08, 2024, 11:50:10 pm by Nominal Animal »
 

Offline sparkydog

  • Regular Contributor
  • *
  • Posts: 234
  • Country: us
Re: Best way to control multiple PWM fans
« Reply #18 on: February 13, 2024, 07:59:11 pm »
[...] the Scythe heat sink which should be significantly better is defective.

Perhaps. May I assume you've tried the obvious step of remounting it? (Checked that the thermal paste application looks okay? Made sure to carefully follow the directions w.r.t. mounting pressure?)
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16620
  • Country: us
  • DavidH
Re: Best way to control multiple PWM fans
« Reply #19 on: February 14, 2024, 01:40:50 am »
[...] the Scythe heat sink which should be significantly better is defective.

Perhaps. May I assume you've tried the obvious step of remounting it? (Checked that the thermal paste application looks okay? Made sure to carefully follow the directions w.r.t. mounting pressure?)

Yes, I did all of that.  And having had no problem using thermal paste for decades, I doubt that I mounted it improperly.

I have comparisons of performance between the Hyper 212 heatsinks that I used on previous systems and the Scythe which show the later being significantly better.  I also have detailed temperature measurements showing that the airflow is more than sufficient.

The estimated difference in junction-to-case thermal resistance between large and small CPU dies may be sufficient to explain all of the difference in performance.  It is either that, or the heat pipes on the Scythe heat sink are defective.  The only way I could really verify it would be to install a Hyper212, but I do not have one handy which mounts to an AM4 socket.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf