Author Topic: PWM Fan control  (Read 9134 times)

0 Members and 1 Guest are viewing this topic.

Offline RRTopic starter

  • Contributor
  • Posts: 30
  • Country: cz
PWM Fan control
« on: May 28, 2014, 10:23:55 am »
Hi
I want to generate 16 PWM to regulate computer fans and though that it would be great way to learn some CPLD/FPGA programing.

So what i need-
16x PWM (25kHz frequency, 10bit resolution)
8x Tach counter (2pulses per rpm so about 0-150Hz)
Some interface (SPI or I2C) so i can control it with mcu


Will it be difficult for me to do as i have totally no experience with it?
How many logic it will need?
What chip do you recommend for it?
 

Offline enggricha

  • Newbie
  • Posts: 5
  • Country: in
  • Just my suggestions...
    • Ingens Tech, Chennai
Re: PWM Fan control
« Reply #1 on: May 28, 2014, 02:36:27 pm »
Depends on too many factors.. but the bigger question is if you are just experimenting to learn shouldn't you start with the hardware you already have?
 

Offline RRTopic starter

  • Contributor
  • Posts: 30
  • Country: cz
Re: PWM Fan control
« Reply #2 on: May 28, 2014, 05:28:14 pm »
I dont have anything yet. As i dont know what to get. Thats why i asking
 

Offline Zbig

  • Frequent Contributor
  • **
  • Posts: 927
  • Country: pl
Re: PWM Fan control
« Reply #3 on: May 28, 2014, 06:55:53 pm »
Generic brushless DC fans don't like to be PWM'd. You'll get all kind of weirdness like the RPM range between the fan not working at all and running full speed being severely limited, fans emitting strange noises, etc. They're not like brushed DC motors which wouldn't care. There's a control circuitry inside for switching the windings in just the right sequence which needs DC. Either use the fans of the special PWM-controlled type with four wires (DC power, tachometer, PWM control input, GND) or provide actual variable DC.
 

Offline Carrington

  • Super Contributor
  • ***
  • Posts: 1202
  • Country: es
Re: PWM Fan control
« Reply #4 on: May 28, 2014, 07:04:35 pm »
Generic brushless DC fans don't like to be PWM'd. You'll get all kind of weirdness like the RPM range between the fan not working at all and running full speed being severely limited, fans emitting strange noises, etc. They're not like brushed DC motors which wouldn't care. There's a control circuitry inside for switching the windings in just the right sequence which needs DC. Either use the fans of the special PWM-controlled type with four wires (DC power, tachometer, PWM control input, GND) or provide actual variable DC.
However, there are very few PMIC with linear output, for example the MAX6650/1 or the MAX6620. Most of them are PWM-Output.

http://www.analog.com/library/analogdialogue/archives/38-02/fan_speed.pdf
« Last Edit: May 28, 2014, 07:11:20 pm by Carrington »
My English can be pretty bad, so suggestions are welcome. ;)
Space Weather.
Lightning & Thunderstorms in Real Time.
 

Offline Dongulus

  • Regular Contributor
  • *
  • Posts: 232
  • Country: us
Re: PWM Fan control
« Reply #5 on: May 28, 2014, 07:06:55 pm »
This sounds pretty doable for a newbie in programmable logic. Do you want a development board or are you planning on doing PCB design?

Your requirements are pretty easy as far as what a FPGA can provide. You will need at least 28 IO pins which is hardly difficult to find. A PWM running at 25 kHz with 10 bits of resolution means you need a device that can run with a clock rate of at least 25 MHz, which again isn't an issue.

The logic you're looking at is 16 10-bit counters for the PWM, 8 X-bit counters for the Tach (bit number depends on what sort of measurement resolution you require), some 10-bit registers to control each PWM output, and some SPI/I2C control logic. All of this should fit into a relatively small FPGA or a CPLD.

For a FPGA, I would recommend a Spartan-3. I'm not really experienced at estimating the number of logic gates needed for a design, but my guess is that you wouldn't need any more than 5k. A CPLD is probably much more cost effective for this particular design, but I've never used a CPLD so I won't make any recommendation.
 

Offline Carrington

  • Super Contributor
  • ***
  • Posts: 1202
  • Country: es
Re: PWM Fan control
« Reply #6 on: May 28, 2014, 07:18:15 pm »
My English can be pretty bad, so suggestions are welcome. ;)
Space Weather.
Lightning & Thunderstorms in Real Time.
 

Online tszaboo

  • Super Contributor
  • ***
  • Posts: 8374
  • Country: nl
  • Current job: ATEX product design
Re: PWM Fan control
« Reply #7 on: May 28, 2014, 08:20:08 pm »
Im not sure why would you ever need 1024 speed setting on a fan, though. Isn't like 10 of it enough?
 

Offline 128er

  • Regular Contributor
  • *
  • Posts: 229
  • Country: de
Re: PWM Fan control
« Reply #8 on: May 28, 2014, 10:06:30 pm »
Either use the fans of the special PWM-controlled type with four wires (DC power, tachometer, PWM control input, GND) or provide actual variable DC.

Maybe a R2R ladder with opamp buffer? Or a PWM signal with lowpass filter and a opamp? Could be fun for a beginner.


« Last Edit: May 28, 2014, 10:19:18 pm by 128er »
 

Offline RRTopic starter

  • Contributor
  • Posts: 30
  • Country: cz
Re: PWM Fan control
« Reply #9 on: May 28, 2014, 10:45:08 pm »
Thats exactly what i have in my head- one pwm signal to pwm control and one for variable DC so i can choose what way i want it to regulate

Im not sure why would you ever need 1024 speed setting on a fan, though. Isn't like 10 of it enough?
Its a part of ATE for testing computer coolers so many different fans with diferent rpm on 12V and if i want later make graphs for thermal resistance depend on RPM,voltage or whatever i need more resolution.
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 7815
  • Country: ca
  • Non-expert
Re: PWM Fan control
« Reply #10 on: May 28, 2014, 10:49:12 pm »
Maybe a R2R ladder with opamp buffer? Or a PWM signal with lowpass filter and a opamp? Could be fun for a beginner.

I had a silent fan controller, which was basically a bunch of buck converters: http://www.techwarelabs.com/reviews/cooling/vantec_nexus/pcb.JPG

This looks like the same idea: http://geoffg.net/fancontroller.html but lower power.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline Evil Lurker

  • Regular Contributor
  • *
  • Posts: 67
Re: PWM Fan control
« Reply #11 on: May 28, 2014, 11:22:39 pm »
Generic brushless DC fans don't like to be PWM'd. You'll get all kind of weirdness like the RPM range between the fan not working at all and running full speed being severely limited, fans emitting strange noises, etc. They're not like brushed DC motors which wouldn't care. There's a control circuitry inside for switching the windings in just the right sequence which needs DC. Either use the fans of the special PWM-controlled type with four wires (DC power, tachometer, PWM control input, GND) or provide actual variable DC.

You are 100% correct. If you are going to PWM most computer fans you need to have full buck or linear regulator for the reasons you mentioned.

Most fans nowadays have their own special PWM controller complete with resistor/capacitor timers for setting the duty cycle along with hall element feedback sensors so it knows if the fan is actually turning or not and how fast.  A couple of ICs that I have seen are the LB1861 and LB1668 if you want to check out their datasheets. You go throwing a raw pulsed power to one of those ICs and the best way I know to explain what happens is it just totally confuses the hell out of it. Of course if your switching frequency is high enough the effects are somewhat mitigated as there are some ceramic capacitors on the fan PCBs which will absorb a lot of the ripple, but still it isn't good for them.

If you want to control a fan you might look into getting one with an onboard NTC thermistor which sets the fan speed based upon ambient temperature flowing through the fan. NTCs are used as part of a voltage divider the fan controller ICs use to set the duty cycle... when the temperature increases the resistance decreases and the feedback voltage changes. If you can find one with an NTC that isn't too hard to get to you can desolder it and use something else to control your fan speed. That something else being a potentiometer which changes your "smart" fan into a "dumb" fan that is easily controlled manually. I'm thinking that along the same lines you can even probably just feed a voltage into it and it would work just like one of those four wire fans that take the special PWM signal. So basically instead of driving the fan with a PWM signal you would be using your microcontroller's digital to analog converter to control your fan speed.

Of course you would still have your rotation detect signal coming off the white wire which from what I gather is basically a transistor tied to an internal op-amp or comparator of the fan driver IC. That would make it an open collector so you would need a pull up resistor off the microcontrollers power supply to get a signal. And  you would want a nice linear ramp from near stall at ambient temperature to dustbuster at the maximum temperature you want whatever it is your cooling to reach. That would require multiple NTC voltage dividers connected to your microcontroller in each "zone" you want to cool. Then there is the prerequisite buzzer circuit which would indicate fan failure/over temperature conditions and the external LCD that tells you the temperature of each zone and how fast each fan is going (hell if your going to to build the damn thing you might as well go all out)...

Oh well I will shut up for now.  :P

 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: PWM Fan control
« Reply #12 on: May 29, 2014, 05:48:18 pm »
You might what to think on what those 16 PWM's are going to do to your power source. With all 16 set at 50% your power source will go from 0 load to full load at your 25k rate unless you stager the times of the PWMs.

You have 160 bits (16 * 10 ) input.

You also have 1024 (10 bits ) states each with 16 bits.
So if you had a 1k  *16 bit memory chip driven by a counter that cycles through those locations you could compute the best contents for that memory for the power source. To keep power supply ripple lower might mean adding additional transitions to some outputs.

In place of a memory chip you could use logic to get close to the same results. In place of 16 locations containing 10 bits think of 10 locations containing 16 bits.

C
 

Online tszaboo

  • Super Contributor
  • ***
  • Posts: 8374
  • Country: nl
  • Current job: ATEX product design
Re: PWM Fan control
« Reply #13 on: May 31, 2014, 09:47:49 am »
Oh, that makes sense! In that case, I would rather use multiple microcontorllers to achieve the task. I dont think a single, even a Cortex M3 category microcontroller would have 16 PWM channels, but who knows? I've seen 6 of it on motor control families.  But it is probably more time efficient to design it one channel way, and put one microcontroller on every channel, connect them on I2C or SPI, and have a backplane connect each. If it is a ATE, than the cost of hardware is not important, you only make so much of it, but having only one channel makes life easier when it comes to programming/ designing. Dont go CPLD way if you haven't used it yet. The learning curve is not nice for new projects.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf