3-Wire fan speed control

hi everyone

thanks all for reading this topic

Im working on PID system that my actuator is a 3-wire fan(AVC BA10033B12U 12V-2.5A) that has a wire for

PWM. As I read in articles and this forum topics most fan needs 25kHz frequency work with PWM but

arduino has at most 980Hz and I need to increase it.

I have Mega2560 and pro-min and i need both of them to control speed of the fan.

first i read this topic and i try ''dlloyd'' method in that he wrote in this link:

https://forum.arduino.cc/index.php?topic=415167.0

but it didnt work and the fan was working with max speed.

then i try some libraries like "Timerone" and "Timerthree" but again the same problem. description in below link:

https://www.pjrc.com/teensy/td_libs_TimerOne.html

i send a picture of my circuit. my GND for fan and arduino is same even. and power supply is a simple

12V-5A adapter and I use potentiometer to give duty value manually by hand.

What is my problem?? :confused: :confused:

The third wire on those fans is typically a tach signal output, not PWM input.

This ad seems to confirm that the 3rd wire is a tach output.

AVC BA10033B12U Blower Fan

AVC BA10033B12U-023
Dimensions: 100x100x33 MM
Voltage: DC 12V
Operating Voltage: DC 7V ~ 13.8V
Current: 1.55A, (Max. 2.4A)
Input Power: 18.6W
Speed: 4200 RPM
Air Flow: 38.63 CFM
Noise: 58.5 dBA
Bearing: Ball
Feature: Speed Sensor (Tach)   [color=red]<<<<<<[/color]
Termination: 3-Pin / 3-wire

4 wire fans do have a PWM input as well as a tach output.

The regular or slightly modified PWM works well on almost all 12 volt fans.

Mors so if you run them through MOSFETS.

Just ensure you use a blocking diode.
I have a pair of those back to back pushing waste warm air through 50 foot of 6' pipe to prevent the water pipes that also run inside the 6" pipe from freezing.

Very good for long term use too as this pair has been running for over a year.

Be aware that you may also have to set a minimum lower point to start the fans rolling with whatever PWM approach you use.

I use a TICK value in this project for fans and also modify a couple of registers to account for different fan types.

groundFungus:
The third wire on those fans is typically a tach signal output, not PWM input.

This ad seems to confirm that the 3rd wire is a tach output.

AVC BA10033B12U Blower Fan

AVC BA10033B12U-023
Dimensions: 100x100x33 MM
Voltage: DC 12V
Operating Voltage: DC 7V ~ 13.8V
Current: 1.55A, (Max. 2.4A)
Input Power: 18.6W
Speed: 4200 RPM
Air Flow: 38.63 CFM
Noise: 58.5 dBA
Bearing: Ball
Feature: Speed Sensor (Tach)  <<<<<<
Termination: 3-Pin / 3-wire




4 wire fans do have a PWM input as well as a tach output.

but as i read in catalog of this fan, this wire is for PWM

http://static6.arrow.com/aropdfconversion/cb9055d99b6b40a8e7156b35c7b314945a0afa09/fan_catalogue.pdf

page 112

Some fans send a TACH signal back to a mainboard which then applies the correct PWM to the power input.

dear ballscrewbob

I think I have to control speed by a simple MOSFET

but just a matter

1)Do I need to change the frequency of Arduino PWM? or default 980Hz is enough?

2)What do you mean by minimum lower point? you mean x in analogWrite(x) must not become lower than eg. 100?

3)the circuit in this picture is enough or i need something more?

  1. it might be ok, but it might cause an audible whine in the fan. The 25KHz figure is chosen because it is too high pitched to hear.
  2. The fan may not start at a low duty cycle. For example it might not start at a duty cycle below 25%. But once it has started, it may be possible to reduce the duty cycle down to 10% and the fan will still run.
  3. You should put a 10K pull-down on pin 9. This will prevent the mosfet from partly switching on while the Arduino is booting.

If you want to use the tach output of a 3-pin fan, then you must control/PWM high-side.
Third diagram on this page.
Commercial 3-pin PC fan controllers use AFAIK a frequency below our hearing range (30Hz).
It would ofcourse be a lot easier to just use a 4-pin fan (and ~25kHz PWM).
Leo..

PaulRB:

  1. it might be ok, but it might cause an audible whine in the fan. The 25KHz figure is chosen because it is too high pitched to hear.
  2. The fan may not start at a low duty cycle. For example it might not start at a duty cycle below 25%. But once it has started, it may be possible to reduce the duty cycle down to 10% and the fan will still run.
  3. You should put a 10K pull-down on pin 9. This will prevent the mosfet from partly switching on while the Arduino is booting.

thank you very much

1)so again i need to change the PWM frequency of pin 9 in arduino? eg. set it to 20-30kHz?

2)then i can write a code to first start fan at high duty then give the output of PID to fan?

3)1K will remain and a 10K resistor should be used between gain and GND?

Wawa:
If you want to use the tach output of a 3-pin fan, then you must control/PWM high-side.
Leo..

you mean that the third wire(blue one) in this fan model is useless for PWM control at all?

BehradInstrument:
you mean that the third wire(blue one) in this fan model is useless for PWM control at all?

Yes, that was explained in a previous post.

  1. maybe not. Try it with the standard PWM frequency

  2. yes.

  3. the 1K remains and the 10K connects pin 9 to ground.

I find the exiting PWM to suite most of my needs.

The exception being where the same voltage fans are used but they are from different makers and may have differing RPM specs.
That is possibly the only time I would want to change the frequency and then only on maybe one or two outputs to ensure they are a closer match and have a suitable start up frequency that will engage the motor.

As already suggested that once the start up has been achieved it is possible to lower the overall frequency of the PWM and still keep them rotating.
But usually at such low rotations there will be very little airflow so I prefer at that point to either keep them running at the tickover speed as I call it or OFF.

They can still stall out at the lower frequencies which is not particularly good for them.
That's why I "MAP" the PWM too so in essence it gives me a little more range control and I think it saved me from a few extra calculations.

In your case as the fans match you probably need not worry too much about matching motor starts to a frequency or simply use whatever you find kicked them in as a minimum base number.

You could always measure the TACH output before connecting to an Arduino to see if it can produce a useful signal and if so map that to a better output.

PaulRB:

  1. maybe not. Try it with the standard PWM frequency

  2. yes.

  3. the 1K remains and the 10K connects pin 9 to ground.

I wired up the circuit now and its working

i didnt find IRF740 so i used 840 instead

first the PWM frequency of mega2560 was default but it cause an audible whine in the fan so i set it to 25kHz and

now its better

but there is a problem

even at value of analogwrite(1023) the fan is not working at max speed?

i changed the 1k resistor to 82 and it get a little better

but again not max whats the problem?my 840 MOSFET?

i used 12k instead of 10k

BehradInstrument:
but again not max whats the problem?my 840 MOSFET?

Could be, yes. IRF840 is not a "logic-level" MOSFET, and the 5V signal from the Arduino may not be enough to fully switch it on. IRF840 has a "Gate Threshold Voltage" which can be up to 4.0V, so the ~5V signal from the Arduino is only a little higher. Look for a MOSFET that has a logic level gate, for example IRL540. The "L" in the name often tells you it is logic level. The IRL540 has a Gate Threshold Voltage of no more than 2.0V, so the ~5V signal from the Arduino should switch it strongly on.

BehradInstrument:
i used 12k instead of 10k

Fine, the exact value is not very important. Anything from 4K7 to 22K is OK.

PaulRB:
Could be, yes. IRF840 is not a "logic-level" MOSFET, and the 5V signal from the Arduino may not be enough to fully switch it on. Look for a MOSFET that has a logic level gate, for example IRL540. The "L" in the name often tells you it is logic level.

I Found IRLZ44 in our local market
it has V_gs(th): min:2V max=4V
i think it might work

BehradInstrument:
it has V_gs(th): min:2V max=4V

That's the same spec as IRF840. You might be lucky and the actual value is closer to 2V

BehradInstrument:
I Found IRLZ44 in our local market
it has V_gs(th): min:2V max=4V

Nonsense! The IRLZ44 has VGS(th) minimum 1.0, maximum 2.0 V.

And more of relevance, its specified conductance at VGS 4.0 V is quite comparable to that at 10 V. It is the correct device for the job.

BehradInstrument:
...first the PWM frequency of mega2560 was default but it cause an audible whine in the fan so i set it to 25kHz and now its better but there is a problem even at value of analogwrite(1023) the fan is not working at max speed?

10-bit PWM @25kHz? Don't think a Mega can do that when clocked at 16Mhz.
25000*1024 = ...

"Im working on PID system"
Don't see how you are going to do that with an N-channel fet (see post#7).

Read this.
Leo..