Server fan control system based on single chip microcomputer
By using a microcontroller-based fan control system, the temperature is detected by a thermistor and a PWM waveform is output to control the fan speed, which solves the problem of high temperature caused by unreasonable server fan control and achieves stable server operation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2026-03-24
AI Technical Summary
Existing server fan control systems cannot effectively adjust fan speeds and dissipate heat in a timely manner when operating under high loads, resulting in excessively high CPU and graphics card temperatures, which may lead to server crashes or performance degradation.
A microcontroller-based fan control system is adopted. The temperature detection circuit uses a thermistor to detect the chassis temperature. The microcontroller outputs PWM waveforms with different duty cycles according to the temperature change to control the fan speed, thereby realizing closed-loop control of the fan speed.
It effectively regulates the internal temperature of the server chassis, preventing server crashes or performance degradation caused by overheating and ensuring stable server operation.
Smart Images

Figure CN224032810U_ABST
Abstract
Description
Technical Field
[0001] This utility model relates to the field of server chassis heat dissipation, specifically to a server fan control system based on a microcontroller. Background Technology
[0002] Cloud computing, big data, and artificial intelligence services place increasingly higher demands on data processing and storage, thus placing greater demands on the computing and data processing capabilities of servers. When servers operate under high load, components such as the CPU and graphics card generate significant heat. The ability to dissipate this heat effectively directly impacts the server's stability. To prevent components like the CPU and graphics card from operating in high-temperature environments for extended periods, in addition to requiring heatsinks with good thermal conductivity, a larger airflow is needed to dissipate the heat. This necessitates fans generating sufficient air pressure.
[0003] The Baseboard Management Controller (BMC) is primarily used to monitor the health status of various server components, including temperature and voltage. It also adjusts fan speeds in real-time based on temperature readings from different data points to prevent overheating and control overall power consumption, ensuring the server remains in a healthy state. Inadequate fan control within the chassis can lead to excessively high CPU and GPU temperatures, potentially causing server crashes or system slowdowns. Summary of the Invention
[0004] To overcome the shortcomings of the above technologies, this utility model provides a server fan control system that adjusts the fan speed according to the internal temperature of the server chassis.
[0005] The technical solution adopted by this utility model to overcome its technical problem is:
[0006] A microcontroller-based server fan control system includes:
[0007] The microcontroller has its PB12 pin connected to a 3.3V power supply via resistor IV, its PB13 pin connected to a 3.3V power supply via resistor IV, its PB14 pin connected to a 3.3V power supply via resistor IV, its PB15 pin connected to a 3.3V power supply via resistor IV, and its BOOT0 pin grounded via resistor V.
[0008] Temperature detection circuit, which is connected to the microcontroller, is used to detect the internal temperature of the server chassis;
[0009] A plurality of fan connectors are arranged in the server case, and a fan control connected to the server case is connected to the corresponding fan connector. The 1st pin and the 5th pin of the fan connector are connected to a 12V power supply, the 2nd pin and the 6th pin are grounded, the 8th pin is connected to one end of a resistor IX, the other end of the resistor IX is connected to a 3.3V power supply through a resistor IV and a PB12 pin of a single-chip microcomputer or a PB13 pin of the single-chip microcomputer or a PB14 pin of the single-chip microcomputer or a PB15 pin of the single-chip microcomputer, and the 4th pin of the fan connector is connected to a PA2 pin of the single-chip microcomputer or a PA3 pin of the single-chip microcomputer or a PA6 pin of the single-chip microcomputer or a PA7 pin of the single-chip microcomputer through a resistor X.
[0010] A triode is connected to a PA8 pin of the single-chip microcomputer or a PA9 pin of the single-chip microcomputer or a PA10 pin of the single-chip microcomputer or a PA11 pin of the single-chip microcomputer, the collector of the triode is connected to a 3rd pin of the fan connector through a resistor IX, and the base of the triode is connected to a 3.3V power supply through a resistor VI.
[0011] Further, the temperature detection circuit comprises a thermistor arranged in the server case, one end of the thermistor is grounded, and the other end of the thermistor is connected to a PA0-WKUP pin of the single-chip microcomputer and a 3.3V power supply.
[0012] Further, the temperature detection circuit further comprises a resistor I and a capacitor I, the thermistor and the capacitor I are connected in parallel, one end of the thermistor and the capacitor I is grounded, the other end of the thermistor and the capacitor I is connected to a PA0-WKUP pin of the single-chip microcomputer and one end of the resistor I, and the other end of the resistor I is connected to a 3.3V power supply.
[0013] Further, a PB2 pin of the single-chip microcomputer is grounded through a resistor III.
[0014] Further, a NRST pin of the single-chip microcomputer is connected to one end of a resistor II and one end of a capacitor II, the other end of the capacitor II is grounded, and the other end of the resistor II is connected to a 3.3V power supply.
[0015] Further, a VBAT pin of the single-chip microcomputer is grounded through a capacitor III.
[0016] Further, the triode is an NPN triode.
[0017] Further, the temperature detection circuit further comprises a diode I, a diode II and a resistor VII, the diode I and the diode II are connected in parallel, the diode II and the resistor VII connected in parallel are connected to a 3.3V power supply through a negative electrode of the diode II and one end of the resistor VII, the diode II and the resistor VII connected in parallel are connected to a collector of the triode and one end of a resistor IX through a positive electrode of the diode II and the other end of the resistor VII, and the other end of the resistor IX is connected to a 3rd pin of the fan connector.
[0018] Further, the diode III and the diode IV are connected in parallel, the negative pole of the parallel diode IV and one end of the resistor VIII are connected to a 3.3V power supply, the negative pole of the parallel diode IV and the other end of the resistor VIII are respectively connected to a PA2 pin of the single-chip microcomputer or a PA3 pin of the single-chip microcomputer or a PA6 pin of the single-chip microcomputer or a PA7 pin of the single-chip microcomputer and one end of the resistor X, and the other end of the resistor X is connected to a 4 pin of the fan connector.
[0019] The temperature detection circuit detects the environment temperature of the server case through the thermistor, in a relatively wide temperature range, the resistance value of the thermistor circuit changes with the change of the environment temperature, so that the voltage of the thermistor also changes, and the single-chip microcomputer obtains the temperature value of the server internal case by collecting the voltage of the thermistor. BRIEF DESCRIPTION OF DRAWINGS
[0020] Figure 1 It is the temperature detection circuit diagram of the utility model;
[0021] Figure 2 It is the single-chip microcomputer circuit diagram of the utility model;
[0022] Figure 3 It is the fan drive circuit diagram of the utility model;
[0023] In the drawing, 1. resistor I 2. thermistor 3. capacitor I 4. single-chip microcomputer 5. resistor II 6. capacitor II 7. capacitor III 8. resistor III 9. resistor IV 10. resistor V 11. triode 12. resistor VI 13. diode I 14. diode II 15. resistor VII 16. diode III 17. diode IV 18. resistor VIII 19. resistor IX 20. resistor X 21. resistor XI 22. fan connector. DETAILED DESCRIPTION
[0024] The utility model discloses a kind of server fan control systems based on single-chip microcomputer, including: Figure 1 , attached Figure 2 , attached Figure 3 Further illustrate the utility model.
[0025] A kind of server fan control system based on single-chip microcomputer, including:
[0026] The single-chip microcomputer 4 has its PB12 pin connected to a 3.3V power supply through a resistor IV 9, its PB13 pin connected to a 3.3V power supply through a resistor IV 9, its PB14 pin connected to a 3.3V power supply through a resistor IV 9, its PB15 pin connected to a 3.3V power supply through a resistor IV 9, and its BOOT0 pin connected to ground through a resistor V 10. A temperature detection circuit is connected to the single-chip microcomputer 4 and used for detecting the internal temperature of the server case. A plurality of fan connectors 22 are arranged in the server case, and the fan control installed on the server case is connected to the corresponding fan connector 22. The 1 pin and 5 pin of the fan connector 22 are respectively connected to a 12V power supply, the 2 pin and 6 pin are respectively connected to ground, the 8 pin is connected to one end of a resistor XI 21, the other end of the resistor XI 21 is respectively connected to a 3.3V power supply through a resistor IV 9 and the PB12 pin of the single-chip microcomputer 4 or the PB13 pin of the single-chip microcomputer 4 or the PB14 pin of the single-chip microcomputer 4 or the PB15 pin of the single-chip microcomputer 4, and the 4 pin of the fan connector 22 is connected to the PA2 pin of the single-chip microcomputer 4 or the PA3 pin of the single-chip microcomputer 4 or the PA6 pin of the single-chip microcomputer 4 or the PA7 pin of the single-chip microcomputer 4 through a resistor X 20. A triode 11 has its emitter connected to the PA8 pin of the single-chip microcomputer 4 or the PA9 pin of the single-chip microcomputer 4 or the PA10 pin of the single-chip microcomputer 4 or the PA11 pin of the single-chip microcomputer 4, its collector connected to the 3 pin of the fan connector 22 through a resistor IX 19, and its base connected to a 3.3V power supply through a resistor VI 12. The 1 pin and 5 pin of the fan connector 22 provide a 12V voltage for the fan installed on the server case. After the single-chip microcomputer 4 detects the internal temperature value of the server case through the temperature detection circuit, it outputs a synchronous duty ratio PWM waveform signal according to a preset control strategy. After the PWM waveform signal is current-limited through the resistor VI 12, it drives the base of the triode 11. When the PWM is a high-level signal, the triode 11 is turned on, the running current flows from the 3.3V power supply to the ground through the fan, and the fan of the server case operates. When the PWM is a low-level signal, the triode 11 is cut off, and the fan stops. By adjusting the duty ratio of the PWM waveform signal, the average voltage of the fan can be controlled, so as to adjust the rotating speed. Since the 2 pin and 6 pin of the fan connector 22 are connected to ground, the in-place signal in the fan is connected to the ground wire. When the fan is not installed, the in-place signal is a high-level signal. When the fan is installed, the in-place signal is a low-level signal. The 4 pin of the fan connector 22 is connected to the rotating speed feedback signal of the fan and transmits the rotating speed feedback signal to the PA2 pin of the single-chip microcomputer 4 or the PA3 pin of the single-chip microcomputer 4 or the PA6 pin of the single-chip microcomputer 4 or the PA7 pin of the single-chip microcomputer 4, so that the single-chip microcomputer 4 obtains the rotating speed feedback from the fan, and realizes the closed-loop control of the rotating speed of the fan.
[0027] In an embodiment of the utility model, the temperature detection circuit comprises: a thermistor 2 installed in the server case, one end of the thermistor 2 is grounded, and the other end is connected to the PA0-WKUP pin of the single-chip microcomputer 4 and the 3.3V power supply respectively. The resistance value of the thermistor 2 is linearly related to temperature in a wide temperature range, and it is a component whose resistance value is controlled by temperature. Because the resistance value of the thermistor 2 changes with the ambient temperature, the voltage on the thermistor also changes, so the voltage at the single-chip microcomputer 4 changes with the ambient temperature, realizing the collection of the temperature in the server. In the embodiment, preferably, it further comprises a resistor I 1 and a capacitor I 3, the thermistor 2 and the capacitor I 3 are connected in parallel, one end is grounded, and the other end is connected to the PA0-WKUP pin of the single-chip microcomputer 4 and one end of the resistor I 1 respectively, and the other end of the resistor I 1 is connected to the 3.3V power supply. The resistor I 1 and the thermistor 2 are connected in series to form a voltage divider circuit, converting the temperature change into a voltage change, which is read by the single-chip microcomputer 4, and the capacitor I 3 plays a filtering role, ensuring that the signal obtained by the PA0-WKUP pin of the single-chip microcomputer 4 is smooth and stable.
[0028] In an embodiment of the utility model, the PB2 pin of the single-chip microcomputer 4 is grounded through the resistor III 8. The resistor III 8 plays the role of a pull-up resistor.
[0029] In an embodiment of the utility model, the NRST pin of the single-chip microcomputer 4 is connected to one end of the resistor II 5 and one end of the capacitor II 6 respectively, the other end of the capacitor II 6 is grounded, and the other end of the resistor II 5 is connected to the 3.3V power supply. The resistor II 5 plays the role of a pull-up resistor, ensuring signal reliability, and the capacitor II 6 plays a filtering role.
[0030] In an embodiment of the utility model, the VBAT pin of the single-chip microcomputer 4 is grounded through the capacitor III 7. The capacitor III 7 plays a filtering role.
[0031] In an embodiment of the utility model, preferably, the triode 11 is an NPN triode.
[0032] In an embodiment of the utility model, still include diode I 13, diode II 14 and resistance VII 15, diode I 13 is parallelly connected with diode II 14, and the negative pole of diode II 14 and one end of resistance VII 15 after parallel connection are connected to 3.3V power supply, and the positive pole of diode II 14 and the other end of resistance VII 15 after parallel connection are connected to the collector of triode 11 and one end of resistance IX 19 respectively, and the other end of resistance IX 19 is connected to 3 pin of fan connector 22.Diode I 13 and diode II 14 are freewheeling diode, and the protection circuit is protected from inductive load reverse electromotive force.The resistance VII 15 is as pull-up resistance, ensures that fan PWM signal level is stable, and promotes the anti-interference ability of control signal.
[0033] Still include diode III 16, diode IV 17 and resistance VIII 18, diode III 16 is parallelly connected with diode IV 17, and the negative pole of diode IV 17 and one end of resistance VIII 18 after parallel connection are connected to 3.3V power supply, and the negative pole of diode IV 17 and the other end of resistance VIII 18 after parallel connection are connected to PA2 pin of singlechip 4 or PA3 pin of singlechip 4 or PA6 pin of singlechip 4 or PA7 pin of singlechip 4 and one end of resistance X 20 respectively, and the other end of resistance X 20 is connected to 4 pin of fan connector 22.Diode III 16 and diode IV 17 pass through accurate clamping and reverse blocking function, ensure the safe operation of singlechip 4 in high noise environment or abnormal working condition, and the protection circuit is protected from inductive load reverse electromotive force.The resistance VIII 18 is as current-limiting resistance.
[0034] Finally, it should be noted that: the above only for preferred embodiment of the utility model has been described, and is not used to limit the utility model, although the utility model has been described in detail with reference to the foregoing embodiment, for the person skilled in the art, it still can modify the technical scheme recorded in the foregoing each embodiment, or equivalent replacement to part of technical features. Any modification, equivalent replacement, improvement etc. that is made in the spirit and principles of the utility model, should be contained in the protection scope of the utility model.
Claims
1. A server fan control system based on a microcontroller, characterized in that, It comprises: a single-chip microcomputer (4), a PB12 pin of which is connected to a 3.3V power supply via a resistor IV (9), a PB13 pin of which is connected to the 3.3V power supply via the resistor IV (9), a PB14 pin of which is connected to the 3.3V power supply via the resistor IV (9), a PB15 pin of which is connected to the 3.3V power supply via the resistor IV (9), and a BOOT0 pin of which is grounded via a resistor V (10); a temperature detection circuit connected to the single-chip microcomputer (4) for detecting the temperature inside a server case; a plurality of fan connectors (22) arranged in the server case, a fan control mounted on the server case being connected to the corresponding fan connector (22), a 1 pin and a 5 pin of the fan connector (22) being connected to a 12V power supply respectively, a 2 pin and a 6 pin of the fan connector (22) being grounded respectively, an 8 pin of the fan connector (22) being connected to one end of a resistor XI (21), the other end of the resistor XI (21) being connected to the 3.3V power supply and the PB12 pin of the single-chip microcomputer (4) or the PB13 pin of the single-chip microcomputer (4) or the PB14 pin of the single-chip microcomputer (4) or the PB15 pin of the single-chip microcomputer (4) via a resistor IV (9) respectively, and a 4 pin of the fan connector (22) being connected to a PA2 pin or a PA3 pin or a PA6 pin or a PA7 pin of the single-chip microcomputer (4) via a resistor X (20); and a transistor (11), an emitter of which is connected to a PA8 pin or a PA9 pin or a PA10 pin or a PA11 pin of the single-chip microcomputer (4), a collector of which is connected to a 3 pin of the fan connector (22) via a resistor IX (19), and a base of which is connected to the 3.3V power supply via a resistor VI (12).
2. The single-chip microcomputer-based server fan control system according to claim 1, characterized by, The temperature detection circuit comprises a thermistor (2) mounted in the server case, one end of the thermistor (2) being grounded, and the other end of the thermistor (2) being connected to a PA0-WKUP pin of the single-chip microcomputer (4) and the 3.3V power supply respectively.
3. The single-chip microcomputer-based server fan control system according to claim 2, characterized by: It further comprises a resistor I (1) and a capacitor I (3), the thermistor (2) and the capacitor I (3) being connected in parallel, one end of the thermistor (2) and the capacitor I (3) being grounded, and the other end of the thermistor (2) and the capacitor I (3) being connected to the PA0-WKUP pin of the single-chip microcomputer (4) and one end of the resistor I (1) respectively, and the other end of the resistor I (1) being connected to the 3.3V power supply.
4. The single-chip microcomputer-based server fan control system according to claim 1, characterized by: A PB2 pin of the single-chip microcomputer (4) is grounded via a resistor III (8).
5. The single-chip microcomputer-based server fan control system according to claim 1, characterized by: A NRST pin of the single-chip microcomputer (4) is connected to one end of a resistor II (5) and one end of a capacitor II (6) respectively, the other end of the capacitor II (6) is grounded, and the other end of the resistor II (5) is connected to the 3.3V power supply.
6. The single-chip microcomputer-based server fan control system according to claim 1, characterized by: A VBAT pin of the single-chip microcomputer (4) is grounded via a capacitor III (7).
7. The single-chip microcomputer-based server fan control system according to claim 1, characterized by: The transistor (11) is an NPN type transistor.
8. The microcontroller based server fan control system as claimed in claim 1, wherein: Also includes diode I (13), diode II (14) and resistance VII (15), diode I (13) and diode II (14) are parallel, parallel diode II (14) and resistance VII (15) negative and one end of resistance VII (15) are connected to 3.3V power supply, parallel diode II (14) and resistance VII (15) positive and the other end of resistance VII (15) are connected to the collector of the transistor (11) and one end of resistance IX (19), the other end of resistance IX (19) is connected to the 3 pin of fan connector (22).
9. The microcontroller based server fan control system as claimed in claim 1, wherein: Also includes diode III (16), diode IV (17) and resistance VIII (18), diode III (16) and diode IV (17) are parallel, parallel diode IV (17) and resistance VIII (18) negative and one end of resistance VIII (18) are connected to 3.3V power supply, parallel diode IV (17) and resistance VIII (18) negative and the other end of resistance VIII (18) are connected to the PA2 pin of single chip microcomputer (4) or the PA3 pin of single chip microcomputer (4) or the PA6 pin of single chip microcomputer (4) or the PA7 pin of single chip microcomputer (4) and one end of resistance X (20), the other end of resistance X (20) is connected to the 4 pin of fan connector (22).