Pages: [1]   Go Down
Author Topic: (help) Control a 3-pin PC fan  (Read 883 times)
0 Members and 1 Guest are viewing this topic.
Hellas
Offline Offline
Jr. Member
**
Karma: 0
Posts: 60
when life gives lemons make a lemonade
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello !
I have read lots of post about controlling a common 12v fan with the 3rd yellow pwm pin
and tried all of them without success. All the  time the fan was spinning at 100%

I either  do something wrong or my fans are failed.


I use common ground of 12v psu for fan and for arduino, then I connect the yellow (signal) wire of fan to digital pin of the arduino according to the code, and nothing happens again...

For instance, if  use 

void loop()
{  digitalWrite(7,LOW);  }

it should stop spinning , right ?

Please help.. give me some guidance, thank you !
Logged

living on an island.....Oh boy, we’re having fun
I wish I'd kept some of my old computers.  

Florida
Offline Offline
God Member
*****
Karma: 2
Posts: 559
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would try analog write. I think digital wright probably would not work for this application as it only has to states High/Low. You could also try controlling it like a servo. 


Best of luck!
Logged

Hellas
Offline Offline
Jr. Member
**
Karma: 0
Posts: 60
when life gives lemons make a lemonade
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,  I have tried analog write 0...255  with no luck, also tried some servo examples but again nothing happened.


Maybe those fans yellow wire is a speed output ?
Logged

living on an island.....Oh boy, we’re having fun
I wish I'd kept some of my old computers.  

Florida
Offline Offline
God Member
*****
Karma: 2
Posts: 559
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That is very possible. Take a multimeter and put the red side on the yellow wire and the ground to the fan ground and see if you get some return voltage. If you do get some return voltage the yell wire is the encoder. If so you can probably control the fans speed by slightly lowering the voltage.


Keep us updated!
Logged

Hellas
Offline Offline
Jr. Member
**
Karma: 0
Posts: 60
when life gives lemons make a lemonade
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 Hello again,  (well, I could use a transistor/fet and trigger its base/gate from the arduino's out however..)

I count the yellow wire.
When fan spins 100%  vout = 250mv
When fan stalls 100% (when i stop it with my finger)  vout = 50mV
seems like pwm out on multimeter...
ancient greek tragedy......

so that means that it speed sensor right ?
« Last Edit: June 25, 2013, 05:33:10 pm by thebadtall » Logged

living on an island.....Oh boy, we’re having fun
I wish I'd kept some of my old computers.  

Florida
Offline Offline
God Member
*****
Karma: 2
Posts: 559
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That would be my guess. Try powering it with 10v and see if it slows down. Also, what is the fans part number? You might be able to find a data sheet online.

Also, the "speed sensor" would actually be called an encoder.


Tell us what happens when you apply lower voltage to the fan.


Best of luck!
Logged

Earth
Offline Offline
Edison Member
*
Karma: 52
Posts: 1735
My browser no longer is binding static IP, Floating is the way to go.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The yellow line is Tacho meter line and it is output only.

Tacho meter is 2 Hz/rpm and it is pfm (pulse frequency modulation).

You could use Arduino to read it frequency, then divide by 2 to get rpm.

To do what you want to do, you need 4 wire PC Fan.

http://www.formfactors.org/developer%5Cspecs%5C4_Wire_PWM_Spec.pdf
Logged

Hellas
Offline Offline
Jr. Member
**
Karma: 0
Posts: 60
when life gives lemons make a lemonade
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you for the information and your time.

For sure when I supply with less voltage it stalls.
My initial intention was to read a NTC temperature  and set  a gradual increase in the pwm of the fan (from arduino) parallel to the temperature increase,(or even with the temperature acceleration increase), but now my plan has changed, and probably I will use this
  
as it is just a simple analog circuit wich i've used lots of times in the past. It seems history wants me stucked in the past.

About the tacho, thank you for verifying my doubts , as  I wasted 2 hours by testing several fans / codes / layouts to realise that the yellow wire is not pwm input
Logged

living on an island.....Oh boy, we’re having fun
I wish I'd kept some of my old computers.  

Pages: [1]   Go Up
Jump to: