Laptop Cooling Pad with Touchscreen

Hi Im working on this project to cool my laptop and to make it more simple, as I move on this project I will post any problems I encounter so the community can help me.

So I got the arduino Mega 2560 and want to connect 2 of this fans to the arduino and control them via PWM and using the mosfet down below to switch power from 12v to the arduino: http://www.amazon.com/Rosewill-RFX-120-120mm-Case-Fan/dp/B00558OQHK/ref=sr_1_3?ie=UTF8&qid=1373000613&sr=8-3&keywords=rosewill+120mm

http://www.adafruit.com/products/355

As far as I know i have to connect the arduino PWM pin to the gate pin of the MOSFET, then what? By doing it like that I will get RPM readings and fan control speed or just one of them?

I got this code from the read only section in this forum and I intend to use it as guide, but its only written to control one fan, what do I have to add to make it for 2?

void setup()
{
Serial.begin(9600);
pinMode(7, OUTPUT);
}

unsigned char speed;
unsigned int low = 1;
unsigned int high = 10;
unsigned int baseTime = 10;

void loop()
{

digitalWrite(7,LOW);
delayMicroseconds(low*10);
digitalWrite(7,HIGH);
delayMicroseconds(high*10);

if (Serial.available())
{
speed = Serial.read() - 48;
low = speed;
high = baseTime - speed;
}


}

Great help from the forum!

Great help from the forum!

People are not sitting and waiting to answer your questions, they come and go. Sarcasm is a very low level of communications.

As far as I know i have to connect the arduino PWM pin to the gate pin of the MOSFET, then what? By doing it like that I will get RPM readings and fan control speed or just one of them?

This will educate you how to control a load with a MOS FET. Add a 120 ohm resistor between the gate and the Arduino. http://www.electronics-tutorials.ws/transistor/tran_7.html

If you want to control 2 fans you can put the fans in parallel OR get a second MOS FET and drive it from a second Arduino o/p pin.

speed = Serial.read() - 48; This is really to simple to be effective since the read value is not limited in any way. -48 converts the received character to a number. ex: if you send the Arduino a 5 from the serial monitor the arduino gets 53 (ascii for 5) subtracting 48 gives the program 5 into variable "speed". Nothing here prevents you from sending a lower case z (ascii 122) -48 = 74. And so on...

The fan's website is unclear how exactly it works, however, I hope you aren't using the MOSFET to turn the fan on and off directly. That won't work (At least not in any effective manner, think on how long it takes your PC fan to wind up and down). Most likely, the fan has some form of PWM or Frequency input to control the fan speed, and you'll need to use that to control the speed.

As mentioned, You can drive 2 fans using the same signal by running them in parallel.