Temperature based fan control using arduino uno -Circuit diagram required

I am making a temperature based fan control using PWM. The fan is 12 v dc fan. temperature sensor is using lm35. Can somebody give me a proper diagram of how to connect the fan as it runs on 12 v and arduino on 5v. I need it urgently so please help me.

http://www.ecs.umass.edu/ece/m5/tutorials/tip122_transistor_tutorial.html

Thanks bro but little queries

  1. my fan has 3 wires while the fan in picture has two wires. how to connect this 3 wire fan.
  2. can i make the darlington transistor myself using combinations of transistor, resistor and diode. If so how?

zammikao: Thanks bro but little queries 1) my fan has 3 wires while the fan in picture has two wires. how to connect this 3 wire fan. 2) can i make the darlington transistor myself using combinations of transistor, resistor and diode. If so how?

1) The third wire is probably the speed sensor output from a Hall sensor, if you ever need to know the actual speed. 2) I have no idea.... in fact it might not need a Darlington anyway, I wouldn't know.

PS... You should check if your fan can actually be PWM'd. Some of them have a 4th wire for that specific purpose becasue the speed controller is built into the fan. Not sure if 3 wire ones are PWM'able.... I did run one once off a flat battery and it ran at low speed, but that wasn't PWM.