(help) Control a 3-pin PC fan

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 !

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!

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 ?

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!

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 ?

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!

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.

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