PC motherboard with 3-pin fan output - read with arduino?

So i have a mobo with 3pin connectors for fans. I can set my bios to change fan speed from 40% to 100%.

I reckon that its possible to read the pin with arduino and change to 0-100%?

So if mobo gives out 40% then arduino will control fan to 0%. So i want to shutdown or slow down fans even more if not needed or computer is idling. And add some aftercooling to keep fans at high speed after high temps to let all hot air flow away :slight_smile:

So the question is. I could read it with voltage divider to make computer output 0-1023 to arduino and control fan with that information. How about reading rpm of a fan? Could it be possible to read the yellow wire from fan with arduino?

Could it be possible to read the yellow wire from fan with arduino?

A simple google search led me to this page: http://fritzing.org/projects/reading-pc-fan-rpm-with-an-arduino/. I guess it's what you're looking for.

I could read it with voltage divider to make computer output 0-1023 to arduino and control fan with that information.

I'd guess that the computer is also using PWM to control the fan speed, so you don't get an analog voltage reading easily. But interpreting a PWM signal shouldn't be that hard.

So if mobo gives out 40% then arduino will control fan to 0%.

Considering that there is a minimum PWM value needed to get the fan moving at all, and that there is a higher value needed to get the fan to at least displace more heat than it is generating, I suspect that the motherboard manufacturer knew what they were doing when they set the lower limit.

And add some aftercooling to keep fans at high speed after high temps to let all hot air flow away

Don't you suppose that the motherboard manufacturer had the same thought?

neepie:
So i want to shutdown or slow down fans even more if not needed or computer is idling. And add some aftercooling to keep fans at high speed after high temps to let all hot air flow away :slight_smile:

You might look at PC-utilities that allow you to do the same thing. They have the benefit of not having to change any of your wiring, plus have direct access to the temperature sensors inside your PC. How would your Arduino get access to those temperature sensors?

You might look at PC-utilities that allow you to do the same thing. They have the benefit of not having to change any of your wiring, plus have direct access to the temperature sensors inside your PC.

On my earlier board i used speedfan to make fans work as i wanted. I could change fans from 0% to 100% and configure it according to computer sensors. But this new motherboard doesnt react to speedfan at all, cant change any speeds.

How would your Arduino get access to those temperature sensors?

Arduino would not need to get access to sensors. It would take its controlling signal from motherboards fan output. My bios is set to change fan speed according to temperatures. So After all motherboard would be the one controlling the fans but arduino would just finetune that signal to fans.

Don't you suppose that the motherboard manufacturer had the same thought?

Motherboard slows down fans right after CPU temps have gone lower. It would be nice to keep fans running faster after that for GPU etc to cool more.

Considering that there is a minimum PWM value needed to get the fan moving at all, and that there is a higher value needed to get the fan to at least displace more heat than it is generating, I suspect that the motherboard manufacturer knew what they were doing when they set the lower limit.

I bet they did do this to keep newbs from frying their computers. But i am aware that computer needs cooling but with my computer at idle state its not necessary to keep fans running that fast when idle.

To clarify what im doing, i wrote some code to explain the usage. Feel free to comment.

const int moboPin = 2;
const int fanPin = 5;


void setup{
pinMode(fanPin, OUTPUT);
analogWrite(fanPin, 255); // start fan
delay(1000);
analogWrite(fanPin, 50); // back to normal operation
}

void loop{
int nopeus = analogRead(moboPin);

nopeus = map(nopeus, 255, 1023, 50, 255); // 50 is a example minimum to fan speed. 
analogWrite(fanPin, nopeus);

if (nopeus >= 250) {
delay(10000); // if we need fans to run at max speed. Keep them running at max speed for awhile to cool other components
}

delay(1000);
}

btw, i am going to use optocoupler between arduino and motherboard. So arduino will get output as voltage(?)

btw, i am going to use optocoupler between arduino and motherboard. So arduino will get output as voltage(?)

Probably not as most optocouplers only transfer digital signals, only few are also suitable for analog usage. As I mentioned earlier, the output of the motherboard is probably a PWM signal so you don't have to measure voltages but take the time between the edges. A digital input is better for such purposes. Easiest to implement is using an external interrupt (pin 2 and 3).

Could someone shortly tell me about interrupts? How do they differ from analogRead? I haven't used them before but i would like to know more about them!

edit: Okay this cleared something for me http://www.dave-auld.net/index.php?option=com_content&view=article&id=107:arduino-interrupts&catid=53:arduino-input-output-basics&Itemid=107

But dont know how i could use it with my project?

Take a read at Wikipedia what PWM is in difference to an analog value.

When using interrupts you let the microcontroller interrupt the currently running program if the observed pin is changing from LOW to HIGH (rising) or from HIGH to LOW (falling). The interrupt handler is then being run and as soon as it's returning, the interrupted program is continuing it's execution where it was stopped. If you imagine this it gets clear that interrupt handler routines have to be as short as possible to not interrupt the main routine for too long.

Usually in the interrupt handler only a counter is increased or the current time stored to be analysed later.

If you have PWM signal you can measure the time from the rising edge to the falling (and to the rising again). The quotient of the two is about equal to the corresponding analog value that should be represented.

So you suggest me to use interrupts and read with RISING or FALLING and calculate the signal speed? Sounds to me that its just a harder way to do this.
I might use RC-circuit with opto to make the signal more stable DC.

What does the pro's say?