I used a Humidity sensor. I used DHT22 humidity and temperature sensor with relay to control the fan. I made a program in Arduino to control the fan on basis of temperature.
In this programe the fan is turnd on with help of a relay. DHT 22 sensor is located at top of the dome near the outlet.