arduino variable speed fan controller

hello
I want to build a variable speed fan controller.
I have my arduino hooked up to a temp sensor that I want to take readings and control a fan. At first I thought relays would do the trick but somebody mentioned using a MOSFET. I want to be able to control the voltage to the fan through PWM perhaps? What do you think the best method would be to set this system up?

thanks

It very much depends on the fan. What can you tell us about it?

--
The Rugged Motor Driver: two H-bridges, more power than an L298, fully protected

something like this

I think these fans have a variable speed controller that you can buy but I want the arduino to control that

thanks

hmmm
my friend insists that these controllers I want to mimic are varying the speed of the fan dependent of temp. I figured a relay circuit would accomplish the same goal. I figured I would use pwm to tell the switch how much current to let pass. Am I barking up the wrong tree?
should I go with a motor driver circuit with a l293d?

thanks

You are not barking up the wrong tree, you are playing in the wrong forest.

If the fan is an AC motor that counts on 60 Hz 115VAC then you need a variable-frequency drive (VFD) and hope that the fan is OK with it. If you apply that kind of voltage to an L293D you will get a lot of smoke and maybe fire but no motion.

Now, you mention that there are some controllers you want to mimic. What are they?

--
The Aussie Shield: breakout all 28 pins to quick-connect terminals

here is one controller
http://www.randmsupply.com/productdisp.php?pid=114&navid=6

seems this controller uses a relay
guess I should just go with a relay

I don't think that controller creates a variable speed. I think it just turns the AC and humidifer on and off. So yes, you can use a relay to just switch your fans on and off.

--
The Quick Shield: breakout all 28 pins to quick-connect terminals

Thanks for the advice. Seems i will be going back to my original design