CPC H05K 7/20209 (2013.01) [G05B 15/02 (2013.01)] | 8 Claims |
1. A fan control method, applied to an electronic device, the electronic device comprising a fan and a setting unit, the setting unit having a plurality of setting values, each of the setting values corresponding to a sampling number, the fan control method comprising:
continuously detecting a temperature of a heat source to obtain a plurality of temperature values;
selecting one of the setting values based on variations of the temperature values;
acquiring a value set from the temperature values based on the sampling number corresponding to the selected setting value, and generating an updated temperature value based on the value set; and
controlling rotation of the fan based on the updated temperature value;
wherein the temperature values comprise a current temperature value, and the step of selecting one of the setting values based on the variations of the temperature values comprises:
acquiring a reference value set from the temperature values based on a preset number, and calculating a reference average value of the reference value set;
calculating a difference between the current temperature value and the reference average value; and
selecting one of the setting values based on the difference;
wherein the sampling numbers comprise a first sampling number and a second sampling number, the first sampling number is less than the second sampling number, the setting unit has a temperature difference, and the step of selecting one of the setting values based on the difference comprises:
selecting the setting value corresponding to the first sampling number, when the difference is greater than the temperature difference; and
selecting the setting value corresponding to the second sampling number, when the difference is less than or equal to the temperature difference.
|