Cooling fan control system and control method for temperature sensor server
By designing a temperature sensor server cooling fan control system including temperature acquisition, data processing, fan control and status monitoring modules, the problem that traditional fan control systems cannot automatically adjust the fan status according to real-time temperature changes is solved, and efficient heat dissipation and intelligent operation are achieved.
Patent Information
- Application Number
- CN202510410220.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-06-13
AI Technical Summary
Traditional fan control systems cannot automatically adjust the fan's operating status and speed according to real-time temperature changes, resulting in waste of energy consumption or inaccurate temperature control, which cannot effectively solve the problem of server heat dissipation.
A temperature sensor server cooling fan control system is designed, including a temperature acquisition and data processing module, a fan control and adjustment module, and a status monitoring and alarm module, to realize intelligent fan control by reading temperature data in real time, processing and adjusting fan speed, as well as monitoring and alarm.
It realizes real-time and accurate monitoring of server temperature, intelligent adjustment of fans, and timely alarms. It has the advantages of efficient heat dissipation, real-time monitoring, intelligent operation and flexible alarms, effectively solving the problem of server heat dissipation.
Smart Images

Figure CN120143952A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fan control, and particularly to a temperature sensor server cooling fan control system and a control method thereof. Background Art
[0002] With the rapid development of information technology, the number of servers and data centers is increasing continuously, and the computing power and processing power of servers are also improving continuously. At the same time, when the server works under high load, it will generate a large amount of heat, resulting in an increase in temperature, which in turn affects the performance and stability of the server. Excessive temperature will not only shorten the service life of the hardware, but may also cause serious problems such as system failures and data loss. Therefore, keeping the server running within a safe temperature range is crucial for ensuring the stability and reliability of the system. As an important part of the server cooling system, the cooling fan plays a crucial role in helping the device cool down. However, traditional fan control systems often rely on simple on-off control and cannot automatically adjust the running state and speed of the fan according to real-time temperature changes, resulting in energy waste or inaccurate temperature control. Therefore, it is particularly important to develop an intelligent fan control system based on temperature sensors. Summary of the Invention
[0003] The present invention aims to solve at least one of the technical problems in the related art to some extent.
[0004] The present invention proposes a temperature sensor server cooling fan control system, aiming to solve the server cooling problem.
[0005] Another object of the present invention is to propose a temperature sensor server cooling fan control method.
[0006] To achieve the above object, on the one hand, the present invention includes: a temperature acquisition and data processing module, a fan control and regulation module, and a status monitoring and alarm module; wherein,
[0007] The temperature acquisition and data processing module is used to read real-time ambient temperature data from a temperature sensor and process the real-time ambient temperature data to obtain processed temperature data;
[0008] The fan control and regulation module is used to compare the processed temperature data with a set temperature threshold and control the start, stop and speed of the cooling fan according to the temperature change result to control the fan state;
[0009] The status monitoring and alarm module is used to monitor the real-time ambient temperature data of the temperature sensor and the fan control state, judge whether the temperature exceeds the highest safety threshold, judge whether the system is within the normal working range, and trigger an alarm mechanism when an abnormality occurs.
[0010] The heat dissipation fan control system of the temperature sensor server according to the embodiments of the present invention may further have the following additional technical features:
[0011] In an embodiment of the present invention, the temperature acquisition and data processing module is composed of a digital temperature sensor and a microcontroller STM32 single-chip microcomputer; real-time ambient temperature data is transmitted to the microcontroller STM32 through the GPIO or I2C / SPI interface, and the temperature value is read regularly through a timing task.
[0012] In an embodiment of the present invention, the fan control and regulation module controls the fan speed through PWM, making the fan speed proportional to the temperature. When the temperature is higher than the set temperature threshold, the fan is started; when the temperature drops below the set safety value, the fan is turned off.
[0013] In an embodiment of the present invention, the status monitoring and alarm module displays the current temperature and the working status of the fan through an LED display screen. When the temperature exceeds the highest temperature threshold, the buzzer is triggered for alarm. When the fan is not turned on or the speed is abnormal, a fan failure alarm is triggered.
[0014] To achieve the above object, on the other hand, the present invention proposes a method for controlling a heat dissipation fan of a temperature sensor server, including:
[0015] Extracting real-time ambient temperature data from a temperature sensor based on a preset temperature acquisition and filtering strategy, and processing the real-time ambient temperature data to obtain processed temperature data;
[0016] Comparing the processed temperature data with a set temperature threshold based on a preset fan control strategy and a fan speed dynamic regulation strategy, and controlling the start, stop and speed of the heat dissipation fan according to the temperature change result to control the fan state;
[0017] Monitoring the real-time ambient temperature data collected by the temperature sensor and the fan control state based on a preset alarm and anomaly detection strategy, judging whether the temperature exceeds the highest safety threshold to determine whether the system is within the normal working range, and triggering an alarm mechanism when an anomaly occurs.
[0018] The heat dissipation fan control system and method of the temperature sensor server according to the embodiments of the present invention can accurately monitor the server temperature in real time, intelligently adjust the fan, and alarm in time by using algorithms such as temperature acquisition and filtering, fan control, alarm and anomaly detection. It has the advantages of efficient heat dissipation, real-time monitoring, intelligent operation and flexible alarm, and can solve the server heat dissipation problem.
[0019] The additional aspects and advantages of the present invention will be partially given in the following description, partially become obvious from the following description, or be understood through the practice of the present invention. Description of the Drawings
[0020] The above and / or additional aspects and advantages of the present invention will become apparent and be readily understood from the following description of embodiments in conjunction with the accompanying drawings, where:
[0021] Figure 1 is a structural diagram of a temperature sensor server cooling fan control system according to an embodiment of the present invention;
[0022] Figure 2 is a data timing diagram of a temperature sensor server cooling fan control system according to an embodiment of the present invention;
[0023] Figure 3 is a flowchart of the operation of a temperature acquisition and data processing module according to an embodiment of the present invention;
[0024] Figure 4 is a flowchart of the operation of a fan control and regulation module according to an embodiment of the present invention;
[0025] Figure 5 is a flowchart of the operation of a status monitoring and alarm module according to an embodiment of the present invention;
[0026] Figure 6 is a flowchart of a temperature sensor server cooling fan control method according to an embodiment of the present invention;
[0027] Figure 7 is a flowchart of a temperature acquisition and filtering algorithm according to an embodiment of the present invention;
[0028] Figure 8 is a flowchart of a fan control according to an embodiment of the present invention;
[0029] Figure 9 is a flowchart of a dynamic regulation algorithm for fan speed based on temperature according to an embodiment of the present invention;
[0030] Figure 10 is a flowchart of an alarm and anomaly detection algorithm according to an embodiment of the present invention;
[0031] Figure 11 is a flowchart of a temperature history record and data storage algorithm according to an embodiment of the present invention. Detailed Embodiments
[0032] It should be noted that, without conflict, the embodiments in the present invention and the features in the embodiments may be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
[0033] To enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of protection of the present invention.
[0034] The temperature sensor server cooling fan control system and control method according to an embodiment of the present invention will be described below with reference to the accompanying drawings.
[0035] Figure 1 FIG. is a structural diagram of a temperature sensor server cooling fan control system according to an embodiment of the present invention, including a temperature acquisition and data processing module 100, a fan control and regulation module 200, and a status monitoring and alarm module 300; wherein,
[0036] The temperature acquisition and data processing module 100 is configured to read real-time ambient temperature data from a temperature sensor and process the real-time ambient temperature data to obtain processed temperature data;
[0037] The fan control and regulation module 200 is configured to compare the processed temperature data with a set temperature threshold and control the start / stop and rotation speed of the cooling fan according to the temperature change result to control the fan status;
[0038] The status monitoring and alarm module 300 is configured to monitor the real-time ambient temperature data of the temperature sensor and the fan control status, determine whether the temperature exceeds the highest safety threshold, determine whether the system is within the normal operating range, and trigger an alarm mechanism when an abnormality occurs.
[0039] As Figure 2 shown, is a data timing diagram of the temperature sensor server cooling fan control system of the present invention, and the specific process is as follows:
[0040] (1) Regularly read the temperature value of the temperature sensor.
[0041] (2) Transmit the collected temperature data to the fan control module.
[0042] (3) The fan control module determines whether to turn on the fan or adjust the rotation speed according to the received temperature data, and controls the on / off state or PWM signal output of the fan.
[0043] (4) The status monitoring and alarm module displays the current temperature and fan status in real time, and triggers an alarm when the temperature exceeds the set threshold.
[0044] (5) The system periodically updates the temperature and fan status to ensure continuous operation and real-time adjustment of the system.
[0045] In one embodiment of the present invention, the temperature acquisition and data processing module 100 is used to read real-time ambient temperature data from the temperature sensor and process the acquired data (such as denoising, filtering, etc.). This module is the core part of the system, providing real-time temperature information and ensuring the stability and accuracy of temperature data through data processing. As Figure 3 shown, the working process of the temperature acquisition and data processing module in the embodiment of the present invention is as follows:
[0046] The temperature sensor periodically acquires the ambient temperature and sends the raw data to the main control unit. The sensor usually acquires data once per second to ensure that it can reflect environmental changes in real time.
[0047] After the temperature data is read from the sensor, it is directly transmitted to the data processing unit. The data processing unit filters the acquired temperature data (such as moving average filtering, Kalman filtering, etc.) to remove noise and instantaneous outliers, ensuring the smoothness and stability of the temperature data.
[0048] If the temperature sensor has systematic errors (for example, inaccurate readings due to sensor deviation), calibration can be performed. Common calibration methods include setting a conventional error correction coefficient or using a standard temperature source for calibration.
[0049] The temperature data after filtering and calibration will be transmitted to the fan control module and other modules that require temperature information. The fan control module makes decisions based on this temperature information to turn on / off the fan or adjust the fan speed.
[0050] To track temperature changes over a long period, the temperature data can be stored in a local memory (such as an SD card, EEPROM) for subsequent analysis and troubleshooting.
[0051] Among them, the temperature acquisition and data processing module consists of a digital temperature sensor DS18B20 and a microcontroller STM32 single-chip microcomputer. The temperature data is transmitted to the microcontroller STM32 through the GPIO or I2C / SPI interface, and the temperature value is regularly read through a timing task. At the same time, the temperature sensor needs to convert the acquired temperature data into a usable format (such as degrees Celsius) and transmit it to the control module.
[0052] In an embodiment of the present invention, the fan control and regulation module 200 is responsible for controlling the start / stop and speed of the cooling fan according to the temperature information from the temperature acquisition and data processing module. This module determines whether to turn on the fan and the running speed of the fan by judging the temperature change through the set temperature thresholds. Its main function is to ensure that the device is maintained within a reasonable temperature range, prevent overheating, and optimize energy efficiency. The working flowchart of the fan control and regulation module in the embodiment of the present invention is as shown in Figure 4 shown below:
[0053] 1. Obtain the current temperature data from the temperature acquisition module or the data processing module.
[0054] 2. Determine whether the temperature exceeds the set low temperature threshold (e.g., 50 °C): If the temperature is lower than the set low temperature threshold, turn off the fan (set the speed to 0).
[0055] 3. Determine whether the temperature exceeds the set medium temperature threshold (e.g., 60 °C): If the temperature is between the low and medium temperature thresholds (e.g., 50 °C - 60 °C), turn on the fan and set it to run at low speed.
[0056] 4. Determine whether the temperature exceeds the set high temperature threshold (e.g., 70 °C): If the temperature exceeds the high temperature threshold (e.g., 70 °C), turn on the fan and set it to run at high speed.
[0057] 5. Feed back the current state (off, low speed, medium speed, high speed) of the fan to the control system.
[0058] 6. Complete the fan control and regulation, and return to the system to wait for the trigger of the next temperature change.
[0059] Among them, the fan control module controls the fan speed through PWM (pulse width modulation) to make the fan speed proportional to the temperature. When the temperature is higher than a certain set value, the fan is started; when the temperature drops below the set safety value, the fan is turned off.
[0060] In an embodiment of the present invention, the status monitoring and alarm module 300 is responsible for real-time monitoring of the working status of the server, especially the temperature, fan status, and other possible abnormal conditions. This module judges whether the system is within the normal working range by real-time monitoring of the temperature sensor data and the fan control status, and triggers the alarm mechanism when an abnormality occurs to remind the user or start protection measures to avoid system failures due to overheating and other reasons. The working process of the status monitoring and alarm module in the embodiment of the present invention is as shown in Figure 5 shown below:
[0061] 1. Obtain the current temperature: Obtain the current ambient temperature data from the temperature acquisition module.
[0062] 2. Determine whether the temperature exceeds the normal range: If the temperature exceeds a predetermined threshold (for example, a high - temperature alarm is triggered when the temperature is above 70°C, and a low - temperature alarm is triggered when the temperature is below 0°C), an alarm is triggered.
[0063] 3. Determine whether the fan is working properly: If the fan is not turned on or the rotation speed is abnormal (judged by the feedback signal of the fan control module), a fan - fault alarm is triggered.
[0064] 4. Trigger the alarm mechanism: When the temperature exceeds the limit or the fan fails, the alarm module activates alarm devices such as a buzzer and an LED indicator, and displays alarm information (such as high temperature, fan failure, etc.).
[0065] 5. Record the fault information: Record the fault events (such as abnormal temperature, fan failure, etc.) in a log file for later analysis.
[0066] 6. Remote notification: If the system supports remote monitoring, the alarm module will send the fault information to a remote server through the communication module to notify the administrator or user.
[0067] 7. After the fault is handled, wait for the next monitoring trigger.
[0068] Among them, the status monitoring and alarm module displays the current temperature and the working status of the fan through an LED display screen, facilitating the administrator to view the system status in real - time. When the temperature exceeds the set range, a buzzer alarm is triggered to remind the administrator to perform manual intervention.
[0069] According to the temperature - sensor server cooling - fan control system of the embodiment of the present invention, the temperature - acquisition and data - processing module is responsible for acquiring and processing data, the fan - control module controls the fan accordingly, and the status - monitoring and alarm module is responsible for monitoring abnormalities and alarming. The system adopts algorithms such as temperature acquisition and filtering, fan control, alarm and anomaly detection, etc., which can accurately monitor the server temperature in real - time, intelligently adjust the fan, and alarm in time, having the advantages of efficient heat dissipation, real - time monitoring, intelligent operation and flexible alarming.
[0070] To implement the above - mentioned embodiment, as Figure 6 shown, the present embodiment also provides a temperature - sensor server cooling - fan control method, including:
[0071] S1, extract real - time ambient - temperature data from the temperature sensor based on a preset temperature - acquisition and filtering strategy, and process the real - time ambient - temperature data to obtain processed temperature data;
[0072] S2, compare the processed temperature data with a set temperature threshold based on a preset fan - control strategy and a fan - rotation - speed dynamic - adjustment strategy, and control the start - stop and rotation speed of the cooling fan according to the temperature - change result to control the fan status;
[0073] S3. Monitor the real-time ambient temperature data collected by the temperature sensor and the fan control status based on a preset alarm and anomaly detection strategy, determine whether the temperature exceeds the maximum safety threshold to judge whether the system is within the normal operating range, and trigger the alarm mechanism when an anomaly occurs.
[0074] In an embodiment of the present invention, the temperature acquisition and filtering algorithm is responsible for obtaining the original temperature data from the temperature sensor DS18B20 and removing noise through data filtering technology to ensure the stability and reliability of the collected temperature data. The temperature data needs to undergo a certain degree of smoothing to prevent occasional fluctuations of the sensor from misleading the fan control. As Figure 7 shown, the specific implementation steps are as follows:
[0075] Data acquisition: Regularly read the temperature data from the temperature sensor (once per second), and the returned data usually has a certain degree of fluctuation, especially when the temperature changes drastically.
[0076] Filtering process: Moving average filtering, averaging the continuous temperature values to reduce occasional fluctuations. Set the window size NNN to 5 or 10, and average the temperature values collected in the past NNN times each time to obtain the current temperature value.
[0077] Output stable value: The filtered temperature value is passed to the fan control module to reduce the overreaction of the system response.
[0078] In an embodiment of the present invention, the fan control algorithm controls the fan according to the temperature data and the preset temperature threshold. Its core is to judge whether to start or stop the fan and whether to adjust the fan speed according to different temperature ranges. As Figure 8 shown, the specific implementation steps are as follows:
[0079] 1. Temperature threshold setting: Set multiple temperature thresholds (such as: 50°C, 60°C, 70°C, etc.) and corresponding different fan control strategies. For example: low temperature threshold (50°C): fan off; medium temperature threshold (60°): fan starts to work at the lowest speed; high temperature threshold (70°C): fan runs at full speed.
[0080] 2. Fan control: If the current temperature exceeds the high temperature threshold, the fan runs at full speed; if the temperature is between medium and low temperatures, the fan works at a lower speed; if the temperature is lower than the low temperature threshold, the fan is turned off.
[0081] 3. Control mechanism: Use PWM (pulse width modulation) signal to adjust the fan speed so that the fan speed is proportional to the temperature change.
[0082] In one embodiment of the present invention, the fan speed dynamic adjustment algorithm dynamically adjusts the fan speed based on the current temperature and the set temperature threshold, and controls the fan speed through a PWM (pulse width modulation) signal so that it can be linearly adjusted with the change of temperature to achieve precise temperature control and energy saving effects. Figure 9 As shown, the specific implementation steps are as follows:
[0083] Speed calculation: The fan speed is dynamically calculated based on the linear relationship between the temperature and the minimum threshold (50°C) and the maximum threshold (70°C).
[0084] Use the proportional control formula: FanSpeed = (Temperature-50)(70-50)×100; where FanSpeed is the speed and Temperature is the current temperature;
[0085] When the temperature is 50℃, the fan stops; when the temperature is 70℃, the fan runs at full speed.
[0086] PWM (Pulse Width Modulation) signal output: Output the corresponding PWM signal according to the calculated speed value, and achieve precise control of the fan speed by adjusting the pulse width ratio.
[0087] In one embodiment of the present invention, the alarm and anomaly detection algorithm is used to monitor the abnormal temperature of the server and send out an alarm signal (sound alarm, LED flashing, etc.) when the temperature exceeds the set safety threshold. The alarm mechanism provides early warning when the system is overloaded to prevent equipment damage. Figure 10 As shown, the specific implementation steps of the algorithm are as follows:
[0088] Temperature abnormality judgment: When the temperature exceeds the set maximum safety threshold (such as 75°C), an alarm is triggered immediately. Different alarm levels can be set, and the system can provide different levels of response, such as sound alarm when the temperature exceeds 75°C, and emergency measures (such as forced shutdown of the server, etc.) when the temperature exceeds 80°C.
[0089] Alarm mechanism: buzzer to sound alarm; LED light flashes to indicate over-temperature.
[0090] Alarm response: When an alarm occurs, the system will record the temperature data and notify the administrator so that the temperature control problem can be dealt with in a timely manner.
[0091] Furthermore, it also includes temperature history recording and data storage algorithms, such as Figure 11 As shown in Figure 1, the algorithm is responsible for collecting and storing temperature data and saving the temperature history to the system memory for later analysis and troubleshooting. It includes:
[0092] Temperature data storage: Use a circular buffer to store the most recent N temperature records (such as storing temperature data for the past 24 hours). This can prevent storage space overflow while maintaining monitoring of the temperature history. The temperature data can be stored via an SD card or EEPROM.
[0093] Data storage logic: Each time a new temperature value is read, store it in the circular buffer and delete the oldest data; record the timestamp and temperature value to generate a data log.
[0094] Data query and analysis: Provide an interface for querying historical temperature data and outputting charts or logs for analysis.
[0095] The temperature sensor server cooling fan control method according to an embodiment of the present invention aims to solve the server cooling problem. By using algorithms such as temperature acquisition and filtering, fan control, alarm and anomaly detection, it can accurately monitor the server temperature in real time, intelligently adjust the fan, and give an alarm in a timely manner, with advantages such as efficient cooling, real-time monitoring, intelligent operation, and flexible alarm.
[0096] In the description of this specification, the description referring to terms such as "an embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.
[0097] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of such features. In the description of the present invention, "a plurality" means at least two, such as two, three, etc., unless otherwise specifically defined.
Claims
1. A temperature sensor server cooling fan control system, characterized in that: include: Temperature collection and data processing module, fan control and regulation module and status monitoring and alarm module; among them, The temperature acquisition and data processing module is used to read the real-time ambient temperature data from the temperature sensor and process the real-time ambient temperature data to obtain processed temperature data; The fan control and regulation module is used to compare the processed temperature data with the set temperature threshold, and control the start and stop and speed of the cooling fan according to the temperature change result to control the fan state; The status monitoring and alarm module is used to monitor the real-time ambient temperature data of the temperature sensor and the fan control status to determine whether the temperature exceeds the maximum safety threshold and whether the system is within the normal working range, and trigger the alarm mechanism when an abnormality occurs.
2. The system according to claim 1, characterized in that The temperature acquisition and data processing module is composed of a digital temperature sensor and a microcontroller STM32 single-chip microcomputer; the real-time ambient temperature data is transmitted to the microcontroller STM32 through the GPIO or I2C / SPI interface, and the temperature value is regularly read through a timing task.
3. The system according to claim 1, characterized in that The fan control and regulation module controls the fan speed through PWM so that the fan speed is proportional to the temperature. When the temperature is higher than a set temperature threshold, the fan is started; when the temperature drops below a set safety value, the fan is turned off.
4. The system according to claim 1, characterized in that The status monitoring and alarm module displays the current temperature and the working status of the fan through the LED display screen. When the temperature exceeds the maximum temperature threshold, the buzzer alarm is triggered. When the fan is not turned on or the speed is abnormal, the fan fault alarm is triggered.
5. A method for controlling a cooling fan of a temperature sensor server, characterized in that: include: Extracting real-time ambient temperature data from the temperature sensor based on a preset temperature collection and filtering strategy, and processing the real-time ambient temperature data to obtain processed temperature data; Based on the preset fan control strategy and fan speed dynamic adjustment strategy, the processed temperature data is compared with the set temperature threshold, and the start and stop and speed of the cooling fan are controlled according to the temperature change result to control the fan state; Based on the preset alarm and anomaly detection strategy, the real-time ambient temperature data and fan control status collected by the temperature sensor are monitored to determine whether the temperature exceeds the maximum safety threshold, so as to determine whether the system is within the normal working range, and trigger the alarm mechanism when an abnormality occurs.
6. The method according to claim 5, characterized in that Temperature collection and filtering strategies, including: Read ambient temperature data from the temperature sensor at a preset time to determine the temperature value; Set the window size of the moving average filter, calculate the average of the current temperature value and the previously collected temperature value, and use the average as the current actual temperature value.
7. The method according to claim 6, characterized in that Fan control strategies, including: Setting multiple temperature thresholds and corresponding to different fan control strategies, wherein the multiple temperature thresholds include: a low temperature threshold, a medium temperature threshold, and a high temperature threshold; Based on the fan control strategy, if the current actual temperature value exceeds the high temperature threshold, the fan runs at full speed; if the current actual temperature value is between the low temperature threshold and the medium temperature threshold, the fan runs at a low speed; if the current actual temperature value is lower than the low temperature threshold, the fan is turned off; The PWM signal is used to adjust the fan speed so that the fan speed is proportional to the temperature change.
8. The method according to claim 7, characterized in that Fan speed dynamic adjustment strategy, including: The fan speed is dynamically calculated based on the linear relationship between the current actual temperature value and the minimum threshold of 50° and the maximum threshold of 70°; The fan speed calculation formula is: FanSpeed = (Temperature-50)(70-50) × 100; where, FanSpeed is the rotation speed, Temperature is the current actual temperature value; When the temperature is 50℃, the fan stops; when the temperature is 70℃, the fan runs at full speed; The corresponding PWM signal is output according to the calculated speed value, and the fan speed is controlled by adjusting the pulse width ratio.
9. The method according to claim 5, characterized in that Alerting and anomaly detection strategies, including: When the collected current ambient temperature data exceeds the set maximum safety threshold, an alarm is triggered immediately. If the fan is not turned on or the speed is abnormal, a fan failure alarm is triggered. Different alarm levels are set to provide different levels of response. Start the alarm device and display the alarm information; Record failure events to a log file.
10. The method according to claim 5, characterized in that The method further comprises: Use a circular buffer to store the most recent N temperature records; Store each new temperature value read into a circular buffer and delete the oldest data; record timestamps and temperature values and generate data logs; Use the data interface to query historical temperature data and output charts or logs for analysis.