So, I'm the process of making the -in my opinion- ultimate PC fan/pump controller for use with a water cooling system.
The idea is to make a bracket which fits into a 5.25" bay and holds an LCD, some type of input (probably joystick) and an arduino, so the temperature responses are completely programmable. It should have three fan/pump channels and 3-6 (however many ADCs I have left, at least 3) temperature sensors.
At the moment I'm trying to figure out how to get an rpm reading from a fan. I quickly found this, which uses interrupts. The problem is that an arduino nano only has 2 interrupt pins, which means I would only be able to read two instead of three channels. I'm unable to figure out how to do this without the use of interrupts.
Can anyone help me on this? Is it at all possible? Am I being silly? How kick-ass do you think this idea is? Let me know! ;)
--EDIT--
Right after I created this, I realized that there is a pulseIn command which does the trick! For anyone interested: you can find the code below!
unsigned long time;
unsigned int rpm;
void setup()
{
Serial.begin(9600);
digitalWrite(2, HIGH);
}
void loop()
{
time=pulseIn(2,HIGH);
rpm=(1000000*60)/(time*4);
Serial.println(rpm,DEC);
delay(700);
}
It should be noted that if the rpms drop below ~200, this won't work anymore...