The speed of the fan has been controlled using PWM technique according to the room temperature. The simulation of the system has been done on Proteus Professional v 8.0 software packages and it is running in good agreement .The logic used in the system is verified and shown in the flowchart form. The duty cycle is varied according to room temperature and speed of the fan is controlled accordingly.