A method and circuit for automatic control of fan speed

CN122880767APending Publication Date: 2026-10-09JINDI SPACE TIME (ZHUHAI) TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611021060.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-09
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

[0006]本发明目的在于针对现有技术所存在的不足而提供一种风扇调速自动控制方法和电路的技术方案,解决无MCU场景下风扇无法自动调速和无法检测堵转的技术问题,实现低成本、高可靠性的风扇智能控制

Benefits of technology

[0053]1、本发明无需MCU参与,整个控制电路由定时器芯片、运算放大器芯片、单稳态多谐振荡器以及电阻、电容、晶体管等分立元器件构成,不依赖任何MCU或软件程序,适用于纯硬件环境,降低了系统成本和开发复杂度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122880767A_ABST
    Figure CN122880767A_ABST
Patent Text Reader

Abstract

The application discloses a fan speed regulation automatic control method and circuit, comprising the following steps: generating a triangular wave signal with a set frequency by using a square wave generating circuit; detecting the ambient temperature by using an NTC thermistor to generate a detection signal varying with the temperature; comparing the triangular wave signal with the detection signal, and outputting a PWM control signal according to the comparison result, the duty ratio of the PWM control signal increasing with the temperature rise; driving the fan to operate according to the PWM control signal; obtaining a TACH signal of the fan, and judging whether the fan is in a locked-rotor state according to the pulse interval time of the TACH signal by using a monostable multivibrator; when it is determined that the fan is in the locked-rotor state, cutting off the power supply of the fan and sending an alarm signal. The application solves the technical problems that the fan cannot be automatically regulated and cannot be detected in the locked-rotor state in the scene without MCU, and realizes the intelligent control of the fan with low cost and high reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of hardware design technology, and in particular to an automatic fan speed control method and circuit, which is applicable to pure hardware circuit scenarios that do not require the participation of a microcontroller unit (MCU). Background Technology

[0002] With the increasing integration and power consumption of electronic devices, thermal management has become a crucial aspect of ensuring stable system operation. As the primary active cooling component, the control method of fans has evolved from simply running at full speed upon power-on to an intelligent control mode that can adjust the speed according to the system temperature.

[0003] Currently, conventional adjustable speed fans typically include a PWM (Pulse Width Modulation) signal input pin and a TACH (tachometer) signal output pin. Their working principle involves adjusting the fan speed by changing the duty cycle of the PWM control signal input to the fan; simultaneously, by reading the number of pulses in the TACH signal returned by the fan, the actual fan speed is calculated, and it is determined whether the fan is stalled.

[0004] In the existing technology, there are two mainstream solutions to realize the above-mentioned PWM signal output and TACH signal reading functions: one is that the MCU directly outputs the PWM control signal and reads the TACH signal; the other is that a dedicated fan control chip completes the PWM output and TACH reading, and then interacts with the main control MCU through communication interfaces such as UART or IIC to realize the speed control and speed monitoring of the fan.

[0005] However, all of the above solutions heavily rely on the involvement of an MCU. In certain specific scenarios, such as pure hardware circuit designs, due to factors such as cost, space, or system complexity, an MCU may not be included in the system. In scenarios without an MCU, the simplest solution is usually adopted: using a regular fan without speed control and keeping it running at full speed all the time after power-on. While this solution is simple, it has significant drawbacks: firstly, the fan's continuous full-speed operation leads to high energy consumption and accelerates the fan's aging; secondly, the system completely loses the ability to detect fan stall. If the fan stops due to obstruction or other reasons, not only will there be no timely alarm, but the continuous power supply may also cause the fan coil to overheat and burn out, posing a safety hazard. Summary of the Invention

[0006] The purpose of this invention is to provide a technical solution for an automatic fan speed control method and circuit that addresses the shortcomings of existing technologies, solving the technical problems of fans being unable to automatically adjust speed and detect stall in scenarios without an MCU, and achieving low-cost, high-reliability intelligent fan control.

[0007] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0008] A method for automatic fan speed control, characterized by the following steps:

[0009] S1. Use a square wave generator circuit to generate a triangular wave signal with a set frequency;

[0010] S2. Utilize an NTC thermistor to detect ambient temperature and generate a detection signal that changes with temperature.

[0011] S3. Compare the triangular wave signal with the detection signal, and output the PWM control signal according to the comparison result. The duty cycle of the PWM control signal increases with the increase of temperature.

[0012] S4. Drive the fan to operate according to the PWM control signal;

[0013] S5. Obtain the fan's TACH signal and use a monostable multivibrator to determine whether the fan is in a stalled state based on the pulse interval of the TACH signal. When the fan is determined to be stalled, cut off the fan power supply and issue an alarm signal.

[0014] The above design eliminates the need for an MCU, enabling automatic fan speed control and stall detection through pure hardware circuitry. This solves the technical problems of automatic fan speed control and stall detection in scenarios without an MCU. An NTC thermistor is used to detect temperature and generate a temperature-dependent detection signal. This signal is compared with a triangular wave signal to output a PWM control signal. The duty cycle increases with temperature, allowing the fan speed to automatically adjust to temperature: lower speed and lower energy consumption at low temperatures, and higher speed and stronger heat dissipation at high temperatures. Simultaneously, a monostable multivibrator is used to determine the stall status based on the TACH signal pulse interval. If stalling occurs, the power supply is immediately cut off and an alarm is triggered, effectively preventing the fan coil from overheating and burning out, improving system safety and reliability. The overall solution is low-cost and suitable for large-scale applications.

[0015] Furthermore, step S5, which uses a monostable multivibrator to determine whether the rotor is in a stalled state based on the pulse interval of the TACH signal, specifically includes:

[0016] S5.1 sets the transient duration of the monostable multivibrator;

[0017] S5.2 When the fan is running normally, the TACH signal generates a pulse jump during the transient duration, and the monostable multivibrator outputs the first level signal.

[0018] S5.3 When the fan is stalled, the TACH signal has no pulse transition during the transient duration, and the monostable multivibrator outputs the second level signal.

[0019] By setting the transient duration of a monostable multivibrator and utilizing its timing characteristics to monitor the pulse interval of the TACH signal, the judgment logic is clear and the response is reliable. It does not require MCU to participate in the calculation and can accurately distinguish between the two states of normal fan rotation and stall by using only pure hardware circuits, thereby improving the accuracy and real-time performance of stall detection and reducing the complexity and cost of the system.

[0020] Furthermore, the transient duration is longer than the pulse period of the TACH signal when the fan is running normally. This ensures that the monostable multivibrator is continuously triggered within each TACH signal cycle when the fan is running normally, thus maintaining the first-level signal output at all times. This avoids the situation where normal rotation is mistakenly judged as stalled due to the transient duration being too short, effectively improving the anti-interference capability and judgment accuracy of stall detection. It also ensures that the fan will not be erroneously cut off from power due to misjudgment during normal operation, thereby improving the stability and reliability of the system.

[0021] Furthermore, a stall condition is defined as a fan speed below 60 r / min, with a transient duration greater than 1 second. When the fan speed is below 60 r / min, the pulse period of the TACH signal is greater than 1 second, exceeding the transient duration, and the monostable multivibrator outputs a second-level signal to trigger stall protection. When the fan speed is above 60 r / min, the pulse period of the TACH signal is less than 1 second, and the monostable multivibrator continuously outputs a first-level signal to maintain normal power supply. This threshold setting is reasonable, avoiding misjudging extremely low speed rotation as stall while responding promptly to genuine stall faults, ensuring the sensitivity and reliability of stall detection. At the same time, this speed threshold matches the stall judgment criteria for conventional fans, demonstrating good versatility and practicality.

[0022] Furthermore, it also includes:

[0023] Set an activation temperature threshold. When the ambient temperature is lower than the activation temperature threshold, the PWM control signal is low and the fan stops running.

[0024] When the ambient temperature reaches the start-up temperature threshold, the fan starts to run, and the speed increases as the temperature rises.

[0025] When the ambient temperature reaches the full-speed temperature threshold, the PWM control signal is continuously high, and the fan runs at full speed.

[0026] Furthermore, the start-up temperature threshold is 45℃, and the full-speed temperature threshold is 90℃.

[0027] An automatic fan speed control circuit, used to implement the automatic fan speed control method described above, is characterized by comprising:

[0028] A square wave generator circuit is used to generate a triangular wave signal with a set frequency.

[0029] Temperature detection circuit, including NTC thermistor, is used to detect ambient temperature and output a detection signal that changes with temperature.

[0030] The comparator circuit is connected to the square wave generator circuit and the temperature detection circuit respectively. It is used to compare the triangular wave signal with the detection signal and output a PWM control signal according to the comparison result. The duty cycle of the PWM control signal increases with the increase of temperature.

[0031] The fan drive circuit is connected to the output of the comparator circuit and is used to drive the fan to operate according to the PWM control signal.

[0032] The stall detection circuit includes a monostable multivibrator. The input terminal of the monostable multivibrator is connected to the TACH signal output terminal of the fan. It is used to determine whether the fan is in a stall state based on the pulse interval time of the fan's TACH signal.

[0033] It also includes an alarm circuit, which is connected to the output of the stall detection circuit and is used to issue an alarm signal when the stall detection circuit determines that the fan is stalled.

[0034] The circuit described above combines a square wave generator circuit, a temperature detection circuit, a comparator circuit, a fan drive circuit, a stall detection circuit, and an alarm circuit to achieve pure hardware fan speed control and stall detection without the need for an MCU. The outputs of the square wave generator circuit and the temperature detection circuit are compared by the comparator circuit to generate a PWM control signal with a duty cycle that varies with temperature, enabling automatic temperature-controlled fan speed regulation. The stall detection circuit uses a monostable multivibrator to monitor the TACH signal pulse interval, enabling a rapid response and power cut-off when the fan stalls, while simultaneously triggering the alarm circuit. The entire circuit has a simple structure, high reliability, and low cost. It does not rely on any software program or MCU chip, making it suitable for a pure hardware design environment. Furthermore, the division of labor among the circuit modules is clear, making it easy to debug and mass-produce.

[0035] Furthermore, the square wave generator circuit, temperature detection circuit, comparator circuit, fan drive circuit, stall detection circuit, and alarm circuit are all composed of discrete components and do not contain an MCU chip. This completely eliminates reliance on an MCU, reducing material and development costs, eliminating software development, debugging, and programming processes, shortening the product development cycle, and offering advantages such as fast response speed, strong anti-interference capability, and high operational stability. It is suitable for industrial control scenarios with high reliability and real-time performance requirements.

[0036] Furthermore, the square wave generator circuit includes a timer chip U1, resistors R1 and R2, and a capacitor C1. Resistor R1 is connected between the power supply and the discharge terminal of timer chip U1, resistor R2 is connected between the discharge terminal and the trigger terminal of timer chip U1, and capacitor C1 is connected to the trigger terminal of timer chip U1 and grounded. The output terminal of the timer chip outputs a triangular wave signal. This square wave generator circuit does not involve any digital circuits or software, and the output waveform is stable and reliable, providing a reference signal source for the comparator circuit and ensuring the frequency stability of the PWM control signal, thereby achieving smooth fan speed regulation.

[0037] Furthermore, the frequency of the triangular wave signal is determined by the values ​​of resistor R1, resistor R2, and capacitor C1, and the frequency calculation formula is as follows: ;

[0038] Where R1 is the resistance value of resistor R1, R2 is the resistance value of resistor R2, and C1 is the capacitance value of capacitor C1.

[0039] Furthermore, the temperature detection circuit also includes resistor R3. An NTC thermistor is connected in series with resistor R3 between the power supply and ground. The common terminal of the NTC thermistor and resistor R3 serves as the output terminal of the temperature detection circuit, outputting a detection signal to the inverting input terminal of the comparator circuit. The NTC thermistor and resistor R3, connected in series, form a voltage divider circuit. Utilizing the characteristic that the resistance of the NTC thermistor decreases with increasing temperature, a voltage detection signal that changes with temperature is output at the common terminal. This temperature detection circuit has a simple structure, requiring only one NTC thermistor and one ordinary resistor to achieve temperature signal acquisition and conversion, resulting in low cost and sensitive response. It allows for flexible configuration of the temperature detection circuit, facilitating adjustment of the fan's operating temperature threshold according to specific application scenarios.

[0040] Furthermore, the comparator circuit includes an operational amplifier chip U2. The positive input of operational amplifier chip U2 receives a triangular wave signal output from a square wave generator circuit, the negative input receives a detection signal output from a temperature detection circuit, and the output of operational amplifier chip U2 outputs a PWM control signal. Using operational amplifier chip U2 to form a voltage comparator, the triangular wave signal at the positive input is compared with the temperature detection signal at the negative input: when the triangular wave signal voltage is higher than the detection signal voltage, a high level is output; when the triangular wave signal voltage is lower than the detection signal voltage, a low level is output. As the temperature rises, the resistance of the NTC thermistor decreases, the detection signal voltage at the negative input decreases, and the high-level portion of the triangular wave signal gradually increases, thus realizing the function of increasing the duty cycle of the PWM control signal with increasing temperature. This comparator circuit has a simple structure, fast response speed, and accurate output waveform. It does not require an analog-to-digital converter or any digital processing stage; the conversion from temperature to PWM duty cycle is implemented purely in hardware, and the control accuracy meets the requirements of fan speed regulation.

[0041] Furthermore, the monostable multivibrator is a dual-channel monostable multivibrator, including a first monostable multivibrator U3A and a second monostable multivibrator U3B. The trigger input terminal of the first monostable multivibrator U3A is connected to the TACH signal output terminal of the fan, and its output terminal is connected to the source of the second NMOS transistor Q2. It is used to output a high-level signal when the fan is rotating normally and a low-level signal when the fan is stalled. The output terminal of the second monostable multivibrator U3B is connected to the fan drive circuit and the alarm circuit respectively. When the operational amplifier chip U2 outputs a PWM control signal, the second monostable multivibrator U3B outputs a high level. When the operational amplifier chip U2 outputs a high level, the second monostable multivibrator U3B outputs a low level. At this time, the high-level signal of the operational amplifier chip U2, after passing through diode D1, keeps the gate of the first NMOS transistor Q1 at a high level. The cascaded design of two-stage monostable multivibrators improves the reliability and anti-interference capability of detection, while a single dual-channel chip can realize the full function, reducing the number of components and lowering the circuit board area and cost.

[0042] Furthermore, the first monostable multivibrator U3A and the second monostable multivibrator U3B are respectively equipped with a timing resistor and a timing capacitor.

[0043] Furthermore, the fan drive circuit includes a first NMOS transistor Q1, a second NMOS transistor Q2, a third NMOS transistor Q3, and a PMOS transistor Q4:

[0044] The gate of the first NMOS transistor Q1 is connected to the drain of the second NMOS transistor Q2, the drain of the first NMOS transistor Q1 is connected to the negative terminal of the fan, and the source of the first NMOS transistor Q1 is grounded.

[0045] The gate of the second NMOS transistor Q2 is connected to the output of the fan power enable control circuit, the drain of the second NMOS transistor Q2 is connected to the gate of the first NMOS transistor Q1, and the source of the second NMOS transistor Q2 is connected to the output of the first monostable multivibrator U3A.

[0046] The gate of the third NMOS transistor Q3 is connected to the output of the fan power enable control circuit, the drain of the third NMOS transistor Q3 is connected to the negative terminal of the buzzer, and the source of the third NMOS transistor Q3 is grounded.

[0047] The source of PMOS transistor Q4 is connected to the power supply, the drain of PMOS transistor Q4 is connected to the positive terminal of the buzzer, and the gate of PMOS transistor Q4 is connected to the drain of the second NMOS transistor Q2.

[0048] The fan drive circuit, through the cooperation of the first NMOS transistor Q1, the second NMOS transistor Q2, the third NMOS transistor Q3, and the PMOS transistor Q4, achieves coordinated control of the PWM speed regulation signal and the stall protection signal. During normal operation, the PWM signal output from the comparator circuit controls the on / off switching of the fan power supply via the first NMOS transistor Q1, achieving PWM speed regulation. During stall protection, the output signal from the stall detection circuit pulls down the gate of the first NMOS transistor Q1 via the second NMOS transistor Q2, thus turning off the first NMOS transistor Q1. Simultaneously, the third NMOS transistor Q3 drives the PMOS transistor Q4 to conduct, pulling the fan power supply terminal down to the power supply voltage, achieving reliable power cutoff for the fan. This drive circuit features clear logic, fast switching speed, and strong driving capability. It can simultaneously meet both PWM speed regulation and stall protection control requirements, and is entirely composed of discrete transistors, eliminating the need for a dedicated driver chip and reducing costs.

[0049] Furthermore, the fan drive circuit also includes capacitor C5, which is connected between the gate of the second NMOS transistor Q2 and ground. Capacitor C5 delays the turn-on of the second NMOS transistor Q2 when the fan starts. This delayed start-up function avoids the problem of the first NMOS transistor Q1 being forcibly turned off and unable to start due to the second NMOS transistor Q2 turning on too early, ensuring reliable fan operation during low-temperature startup and demonstrating meticulous circuit design considerations.

[0050] Furthermore, the alarm circuit includes a buzzer, which is connected to the output of the stall detection circuit. When the stall detection circuit determines that the fan is stalled, the buzzer sounds an alarm.

[0051] Furthermore, the fan is a fan without PWM speed control. The fan drive circuit includes an electronic switch, the control terminal of which is connected to the output terminal of a comparator circuit. One end of the electronic switch is connected to the negative terminal of the fan, and the other end is grounded. The output terminal of the electronic switch is connected to the power supply terminal of the fan, used to control the on / off of the fan power supply according to the PWM control signal, thereby adjusting the average speed of the fan. This circuit is also applicable to ordinary fans without PWM speed control. By controlling the on / off of the fan power supply according to the PWM control signal through the electronic switch, and adjusting the average speed of the fan using the PWM duty cycle, speed control of ordinary fans is achieved. This extended application makes the technical solution of this invention applicable not only to high-end fans with PWM speed control, but also to lower-cost ordinary fans without PWM speed control, greatly expanding the scope of application and versatility of the solution. Users can flexibly choose the fan type according to actual cost and performance requirements, further reducing the overall system cost and improving the cost-effectiveness and market competitiveness of the solution.

[0052] The present invention, by adopting the above-described technical solution, has the following beneficial effects:

[0053] 1. This invention does not require the participation of an MCU. The entire control circuit is composed of a timer chip, an operational amplifier chip, a monostable multivibrator, and discrete components such as resistors, capacitors, and transistors. It does not depend on any MCU or software program, is suitable for a pure hardware environment, and reduces system cost and development complexity.

[0054] 2. This invention enables intelligent temperature-controlled speed regulation. It utilizes an NTC thermistor to detect the ambient temperature in real time and generates a PWM signal with a duty cycle that changes with temperature through a comparison circuit. This allows the fan speed to automatically increase as the temperature rises, and the fan to stop or operate at low speed at low temperatures, thereby reducing energy consumption and noise and extending the fan's lifespan.

[0055] 3. This invention features reliable stall detection and protection. By using a monostable multivibrator to monitor the pulse interval of the fan's TACH signal, it can accurately determine whether the fan is stalled. Once stall is detected, the power supply to the fan is immediately cut off to prevent motor burnout, and an alarm signal is simultaneously emitted via a buzzer, improving system safety.

[0056] 4. The circuit structure of this invention is simple, low in cost, easy to implement and mass-produce. Attached Figure Description

[0057] The present invention will be further described below with reference to the accompanying drawings:

[0058] Figure 1 This is a flowchart of the automatic fan speed control method and the control method in the circuit of the present invention;

[0059] Figure 2This is a schematic diagram of the waveform in this invention;

[0060] Figure 3 This is a schematic diagram of the output waveform of the operational amplifier in this invention;

[0061] Figure 4 This is a circuit diagram of the fan speed control in Embodiment 1 of the present invention when PWM speed control is used;

[0062] Figure 5 This is a circuit diagram of fan speed control without PWM speed control in Embodiment 2 of the present invention. Detailed Implementation

[0063] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0064] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0065] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion.

[0066] like Figure 1 As shown, this invention provides an automatic fan speed control method, which includes the following steps:

[0067] S1. Use a square wave generator circuit to generate a triangular wave signal with a set frequency;

[0068] S2. Utilize an NTC thermistor to detect ambient temperature and generate a detection signal that changes with temperature.

[0069] S3. Compare the triangular wave signal with the detection signal, and output the PWM control signal according to the comparison result. The duty cycle of the PWM control signal increases with the increase of temperature.

[0070] S4. Drive the fan to operate according to the PWM control signal;

[0071] S5. Obtain the fan's TACH signal and use a monostable multivibrator to determine whether the fan is in a stalled state based on the pulse interval of the TACH signal. When the fan is determined to be stalled, cut off the fan power supply and issue an alarm signal.

[0072] Determining whether a rotor is in a stalled state using a monostable multivibrator based on the pulse interval of the TACH signal specifically includes:

[0073] S5.1 sets the transient duration of the monostable multivibrator;

[0074] S5.2 When the fan is running normally, the TACH signal generates a pulse transition during the transient duration, and the monostable multivibrator outputs a first-level signal; the first-level signal is a high-level signal.

[0075] S5.3 When the fan is stalled, the TACH signal has no pulse transition during the transient duration, and the monostable multivibrator outputs a second-level signal. The second-level signal is a low-level signal.

[0076] By setting the transient duration of a monostable multivibrator and utilizing its timing characteristics to monitor the pulse interval of the TACH signal, the judgment logic is clear and the response is reliable. It does not require MCU to participate in the calculation and can accurately distinguish between the two states of normal fan rotation and stall by using only pure hardware circuits, thereby improving the accuracy and real-time performance of stall detection and reducing the complexity and cost of the system.

[0077] The transient duration is longer than the pulse period of the TACH signal when the fan is running normally. This ensures that the monostable multivibrator is continuously triggered within each TACH signal cycle when the fan is running normally, thus maintaining the first-level signal output at all times. This avoids the situation where normal rotation is mistakenly judged as stalled due to the transient duration being too short, effectively improving the anti-interference capability and judgment accuracy of stall detection. It also ensures that the fan is not mistakenly cut off from power due to misjudgment during normal operation, thereby improving the stability and reliability of the system.

[0078] A stall condition is defined as a fan speed below 60 rpm, with a transient duration greater than 1 second. When the fan speed is below 60 rpm, the pulse period of the TACH signal is greater than 1 second, exceeding the transient duration, and the monostable multivibrator outputs a second-level signal to trigger stall protection. When the fan speed is above 60 rpm, the pulse period of the TACH signal is less than 1 second, and the monostable multivibrator continuously outputs a first-level signal to maintain normal power supply. This threshold setting is reasonable, avoiding misjudging extremely low speeds as stall while promptly responding to genuine stall faults, ensuring the sensitivity and reliability of stall detection. Furthermore, this speed threshold matches the stall judgment criteria for conventional fans, demonstrating good versatility and practicality.

[0079] Also includes:

[0080] Set the start-up temperature threshold. When the ambient temperature is lower than the start-up temperature threshold, the PWM control signal is low and the fan stops running. The start-up temperature threshold is 45℃ and the full-speed temperature threshold is 90℃.

[0081] When the ambient temperature reaches the start-up temperature threshold, the fan starts to run, and the speed increases as the temperature rises.

[0082] When the ambient temperature reaches the full-speed temperature threshold, the PWM control signal is continuously high, and the fan runs at full speed.

[0083] The above design eliminates the need for an MCU, enabling automatic fan speed control and stall detection through pure hardware circuitry. This solves the technical problems of automatic fan speed control and stall detection in scenarios without an MCU. An NTC thermistor is used to detect temperature and generate a temperature-dependent detection signal. This signal is compared with a triangular wave signal to output a PWM control signal. The duty cycle increases with temperature, allowing the fan speed to automatically adjust to temperature: lower speed and lower energy consumption at low temperatures, and higher speed and stronger heat dissipation at high temperatures. Simultaneously, a monostable multivibrator is used to determine the stall status based on the TACH signal pulse interval. If stalling occurs, the power supply is immediately cut off and an alarm is triggered, effectively preventing the fan coil from overheating and burning out, improving system safety and reliability. The overall solution is low-cost and suitable for large-scale applications.

[0084] Example 1

[0085] like Figure 4 As shown, this invention provides an automatic fan speed control circuit, which specifically includes a square wave generator circuit, a temperature detection circuit, a comparison circuit, a fan drive circuit, a stall detection circuit, and an alarm circuit.

[0086] A square wave generator circuit is used to generate a triangular wave signal with a set frequency.

[0087] The square wave generator circuit consists of a timer chip U1 (model 555 chip), resistors R1 and R2, and capacitor C1. Resistor R1 is connected between the power supply VCC and the discharge terminal (DIS) of the timer chip U1. Resistor R2 is connected between the discharge terminal (DIS) and the trigger terminal (THR) of the timer chip U1. Capacitor C1 is connected to the trigger terminal (THR) of the timer chip U1 and grounded. The output terminal of the timer chip U1 outputs a triangular wave signal.

[0088] This square wave generator circuit does not involve any digital circuits or software, and its output waveform is stable and reliable. It provides a reference signal source for the comparison circuit, ensuring the frequency stability of the PWM control signal, thereby achieving smooth fan speed regulation.

[0089] The frequency of the triangular wave signal is determined by the values ​​of resistor R1, resistor R2, and capacitor C1. The frequency calculation formula is as follows: ;

[0090] Where R1 is the resistance value of resistor R1, R2 is the resistance value of resistor R2, and C1 is the capacitance value of capacitor C1.

[0091] In this embodiment, the fan control frequency is set to 25KHz, R1=10KΩ, R2=8.2KΩ, C1=2.2nF, and the output square wave frequency is calculated to be approximately 24.8KHz according to the frequency calculation formula.

[0092] The temperature detection circuit consists of an NTC thermistor RT (model 10K-3380K) and a resistor R3 connected in series and connected between the power supply and ground. It is used to detect the ambient temperature and output a detection signal that changes with the temperature.

[0093] Table 1 shows the resistance values ​​of NTC thermistors ranging from 10K to 3380K at different temperatures:

[0094] Table 1

[0095] NTC thermistors can be calculated using the following formula: ;

[0096] Where R is the resistance value in kΩ and T is the temperature in °C.

[0097] The common terminal of the NTC thermistor and resistor R3 serves as the output terminal of the temperature detection circuit, outputting the detection signal to the inverting input terminal of the comparator circuit. The NTC thermistor and resistor R3 are connected in series to form a voltage divider circuit. Utilizing the characteristic that the resistance of the NTC thermistor decreases with increasing temperature, a voltage detection signal that changes with temperature is output at the common terminal. This temperature detection circuit has a simple structure, requiring only one NTC thermistor and one ordinary resistor to achieve temperature signal acquisition and conversion, offering low cost and high sensitivity. It also allows for flexible configuration of the temperature detection circuit, facilitating the adjustment of the fan's operating temperature threshold according to specific application scenarios.

[0098] The comparator circuit is connected to the square wave generator circuit and the temperature detection circuit respectively. It is used to compare the triangular wave signal with the detection signal and output a PWM control signal according to the comparison result. The duty cycle of the PWM control signal increases with the increase of temperature.

[0099] The comparator circuit includes operational amplifier chip U2 (model LM393). The non-inverting input (+) of operational amplifier chip U2 receives the triangular wave signal VA output from the square wave generator circuit, and the inverting input (-) receives the detection signal VB output from the temperature detection circuit. The output of operational amplifier chip U2 outputs a PWM control signal. Its working principle is as follows: Figure 2 and Figure 3 As shown in the figure (VCC=5V), when VA>VB, the operational amplifier chip U2 outputs a high level; when VA<VB, the operational amplifier chip U2 outputs a low level.

[0100] The fan start-up temperature threshold is set to 45℃. At 45℃, the resistance of the NTC thermistor RT is 4.92KΩ. To ensure the fan starts at this temperature, the voltage VA at the non-inverting input of the comparator must be greater than the voltage VB at the inverting input. Calculations show that resistor R3 = 2.49KΩ is selected, resulting in VB = 3.32V, which meets the start-up condition. At this point, the high-level duty cycle of the rectangular wave output by operational amplifier chip U2 is small, and the fan speed is low. As the temperature rises, the resistance of the NTC thermistor decreases, and the VB voltage decreases accordingly, causing the high-level duty cycle of the PWM wave to increase, thus increasing the fan speed with increasing temperature. When the temperature reaches the full-speed temperature threshold of 90℃, i.e., the resistance of the NTC thermistor drops below 1.27KΩ and the VB voltage is less than 1.68V, the PWM signal duty cycle reaches 100%, and the fan operates at full speed.

[0101] An operational amplifier chip U2 is used to construct a voltage comparator, which compares the triangular wave signal at the positive input with the temperature detection signal at the negative input: when the triangular wave signal voltage is higher than the detection signal voltage, the output is high; when the triangular wave signal voltage is lower than the detection signal voltage, the output is low. As the temperature rises, the resistance of the NTC thermistor decreases, the detection signal voltage at the negative input decreases, and the high-level portion of the triangular wave signal gradually increases, thus realizing the function of increasing the duty cycle of the PWM control signal with increasing temperature. This comparator circuit has a simple structure, fast response speed, and accurate output waveform. It does not require an analog-to-digital converter or any digital processing stage; the temperature to PWM duty cycle conversion is implemented purely in hardware, and the control accuracy meets the requirements of fan speed regulation.

[0102] The fan drive circuit is connected to the output of the comparator circuit and is used to drive the fan to operate according to the PWM control signal.

[0103] The fan drive circuit includes a first NMOS transistor Q1, a second NMOS transistor Q2, a third NMOS transistor Q3, and a PMOS transistor Q4.

[0104] The gate of the first NMOS transistor Q1 is connected to the drain of the second NMOS transistor Q2. The drain of the first NMOS transistor Q1 is connected to the negative terminal of the fan, and the source of the first NMOS transistor Q1 is grounded. The gate of the second NMOS transistor Q2 is connected to the output terminal of the fan power enable control circuit. The drain of the second NMOS transistor Q2 is connected to the gate of the first NMOS transistor Q1. The source of the second NMOS transistor Q2 is connected to the output terminal of the first monostable multivibrator U3A. The gate of the third NMOS transistor Q3 is connected to the output terminal of the fan power enable control circuit. The drain of the third NMOS transistor Q3 is connected to the negative terminal of the buzzer, and the source of the third NMOS transistor Q3 is grounded. The source of the PMOS transistor Q4 is connected to the power supply. The drain of the PMOS transistor Q4 is connected to the positive terminal of the buzzer, and the gate of the PMOS transistor Q4 is connected to the drain of the second NMOS transistor Q2. The fan power enable control circuit includes a second monostable multivibrator U3B, diodes D1, D2, and D3, resistors R7, R8, R9, and R10, and capacitor C5.

[0105] The fan drive circuit, through the cooperation of the first NMOS transistor Q1, the second NMOS transistor Q2, the third NMOS transistor Q3, and the PMOS transistor Q4, achieves coordinated control of the PWM speed regulation signal and the stall protection signal. During normal operation, the PWM signal output from the comparator circuit controls the on / off switching of the fan power supply via the first NMOS transistor Q1, achieving PWM speed regulation. During stall protection, the output signal from the stall detection circuit pulls down the gate of the first NMOS transistor Q1 via the second NMOS transistor Q2, thus turning off the first NMOS transistor Q1. Simultaneously, the third NMOS transistor Q3 drives the PMOS transistor Q4 to conduct, pulling the fan power supply terminal down to the power supply voltage, achieving reliable power cutoff for the fan. This drive circuit features clear logic, fast switching speed, and strong driving capability. It can simultaneously meet both PWM speed regulation and stall protection control requirements, and is entirely composed of discrete transistors, eliminating the need for a dedicated driver chip and reducing costs.

[0106] The fan drive circuit also includes capacitor C5, which is connected between the gate of the second NMOS transistor Q2 and ground. Capacitor C5 delays the turn-on of the second NMOS transistor Q2 when the fan starts. This delayed start-up function avoids the problem of the first NMOS transistor Q1 being forcibly turned off and unable to start due to the second NMOS transistor Q2 turning on too early, ensuring reliable fan operation during low-temperature startup and demonstrating the meticulous consideration in circuit design.

[0107] The stall detection circuit includes a monostable multivibrator U3 (model 74HC4538). The input of the monostable multivibrator is connected to the TACH signal output of the fan, and is used to determine whether the fan is in a stall state based on the pulse interval of the fan's TACH signal.

[0108] The monostable multivibrator is a dual-channel monostable multivibrator, including a first monostable multivibrator U3A and a second monostable multivibrator U3B. The trigger input terminal of the first monostable multivibrator U3A is connected to the TACH signal output terminal of the fan, and its output terminal is connected to the source of the second NMOS transistor Q2. It is used to output a high-level signal when the fan is rotating normally and a low-level signal when the fan is stalled. The output terminal of the second monostable multivibrator U3B is connected to the fan drive circuit and the alarm circuit respectively. When the operational amplifier chip U2 outputs a PWM control signal, the second monostable multivibrator U3B outputs a high level. When the operational amplifier chip U2 outputs a high level, the second monostable multivibrator U3B outputs a low level. At this time, the high-level signal of the operational amplifier chip U2, after passing through diode D1, keeps the gate of the first NMOS transistor Q1 at a high level.

[0109] The truth table for the 74HC4538 is shown in Table 2:

[0110] Table 2

[0111] The working principle of 74HC4538 is as follows: When R is high, if within a set time Ta... A continuous falling edge on pin B (when pin B is low) or a continuous rising edge on pin B (when pin B is low) When the input is at a high level, the output Q remains high. Keep low level if time Ta is exceeded. If there is no signal transition on pins B and B, then output Q goes low, and output... When R is low, it becomes high, regardless of What are the states of pins B and B? Q outputs a low level. Output high level.

[0112] The first monostable multivibrator U3A and the second monostable multivibrator U3B are respectively equipped with timing resistors (R5, R6) and timing capacitors (C3, C4) to set the transient duration. In this embodiment, a fan speed below 60 r / min is considered stalled, meaning the TACH signal pulse frequency must be greater than 1 Hz to be considered normal. Therefore, the transient duration must be greater than 1 s, i.e., Ta must be greater than 1 s. Taking R5=R6=680KΩ and C3=C4=2.2μF, according to the transient time calculation formula Ta=0.7×R5×C3, we calculate Ta=1.05s.

[0113] When R of the 74HC4538 is high, and the fan speed is below 60 rpm (i.e., when it is determined to be stalled), Q outputs a low level. The Q output is high when the fan speed is higher than 60 r / min. Output low level.

[0114] When the fan is running normally, the TACH signal generates a falling edge pulse within 1.05 seconds, continuously triggering the first monostable multivibrator U3A, causing its Q terminal to continuously output a high level. This high level triggers the second monostable multivibrator U3B, causing its Q terminal to output a high level (first level signal), controlling the fan to continue receiving power. When the fan is stalled, the TACH signal shows no pulse change within 1.05 seconds, the Q terminal of the first monostable multivibrator U3A outputs a low level, causing the Q terminal of the second monostable multivibrator U3B to output a low level (second level signal). This signal is used to cut off the fan power supply and activate the alarm.

[0115] The alarm circuit is connected to the output of the stall detection circuit and is used to issue an alarm signal when the stall detection circuit determines that the fan is stalled.

[0116] The alarm circuit includes a buzzer BZ1, which is connected to the output of the stall detection circuit. The buzzer sounds an alarm when the stall detection circuit determines that the fan is stalled. When the stall detection circuit determines that the fan is stalled, the Q terminal of U3B outputs a low level, and its complementary output terminal... (Output high level) drives buzzer BZ1 to emit an alarm sound.

[0117] The circuit described above combines a square wave generator circuit, a temperature detection circuit, a comparator circuit, a fan drive circuit, a stall detection circuit, and an alarm circuit to achieve pure hardware fan speed control and stall detection without the need for an MCU. The outputs of the square wave generator circuit and the temperature detection circuit are compared by the comparator circuit to generate a PWM control signal with a duty cycle that varies with temperature, enabling automatic temperature-controlled fan speed regulation. The stall detection circuit uses a monostable multivibrator to monitor the TACH signal pulse interval, enabling a rapid response and power cut-off when the fan stalls, while simultaneously triggering the alarm circuit. The entire circuit has a simple structure, high reliability, and low cost. It does not rely on any software program or MCU chip, making it suitable for a pure hardware design environment. Furthermore, the division of labor among the circuit modules is clear, making it easy to debug and mass-produce.

[0118] The square wave generator circuit, temperature detection circuit, comparator circuit, fan drive circuit, stall detection circuit, and alarm circuit are all composed of discrete components and do not contain an MCU chip. This completely eliminates reliance on an MCU, reducing material and development costs, eliminating software development, debugging, and programming steps, shortening the product development cycle, and offering advantages such as fast response speed, strong anti-interference capability, and high operational stability. It is suitable for industrial control scenarios with high reliability and real-time performance requirements.

[0119] The operating status of each device under different temperature conditions is as follows:

[0120] 1. When the circuit is powered on and the temperature is below 45℃, the output waveform of the 555 timer chip U1 remains unchanged. At this time, VA < VB, the operational amplifier continuously outputs a low level, the fan does not turn, the TACH signal has no pulse, the Q terminal of the first monostable multivibrator U3A outputs a low level, the Q terminal of the second monostable multivibrator U3B outputs a low level, the first NMOS transistor Q1 is cut off, the second NMOS transistor Q2 and the third NMOS transistor Q3 are cut off, and the PMOS transistor Q4 is turned on. However, because the first NMOS transistor Q1 is cut off, no current flows through the fan power supply terminal (VCC_FAN), the fan does not turn, and the buzzer does not sound.

[0121] 2. When the temperature is between 45℃ and 90℃, the output waveform of the 555 timer chip U1 remains unchanged, the VB voltage decreases as the temperature rises, the duty cycle of the rectangular wave output by the operational amplifier chip increases as the temperature rises, and the fan speed increases as the temperature rises. When the first high-level pulse arrives, the first NMOS transistor Q1 is not turned on, so the fan does not turn. The Q output of the first monostable multivibrator U3A is low, and the Q output of the second monostable multivibrator U3B is high. Due to the charging delay effect of capacitor C5, the gate of the second NMOS transistor Q2 does not immediately become high, so the second NMOS transistor Q2 does not immediately turn on. At this time, the gate of the first NMOS transistor Q1 immediately becomes high, turning on the first NMOS transistor Q1, and the fan receives power and starts to rotate.

[0122] Once the fan starts running, the Q output of the first monostable multivibrator U3A is high. This high level is directly output to the gate of the first NMOS transistor Q1 through the internal diode of the second NMOS transistor Q2, ensuring continuous power supply to the fan. After a certain period of time (approximately 5ms), the gate of the second NMOS transistor Q2 will become high, and the second NMOS transistor Q2 will turn on. If the fan is not stalled, the Q output of the first monostable multivibrator U3A is high, the Q output of the second monostable multivibrator U3B is high, the second NMOS transistor Q2 is turned on, the first NMOS transistor Q1 is turned on, the third NMOS transistor Q3 is turned on, and the PMOS transistor Q4 is not turned on. The fan is continuously powered, and the buzzer does not sound. If the fan is stalled, the Q output of the first monostable multivibrator U3A is low, the Q output of the second monostable multivibrator U3B is high, the second NMOS transistor Q2 is turned on, the first NMOS transistor Q1 is not turned on, the third NMOS transistor Q3 is turned on, and the PMOS transistor Q4 is turned on. The fan is not powered, and the buzzer sounds.

[0123] 3. When the temperature exceeds 90℃, the output waveform of the 555 timer chip U1 remains unchanged. At this time, VA > VB, the operational amplifier chip continuously outputs a high level, and the fan rotates at full speed. If the fan is not stalled, the Q terminal of the first monostable multivibrator U3A outputs a high level. Because there is no pulse at the Q terminal of the second monostable multivibrator U3B, the Q terminal of the second monostable multivibrator U3B outputs a low level. However, diode D2 conducts and continuously outputs a high level, the second NMOS transistor Q2 conducts, the first NMOS transistor Q1 conducts, the third NMOS transistor Q3 conducts, and the PMOS transistor Q4 does not conduct. The fan is continuously powered, and the buzzer does not sound. If the fan stalls, the Q terminal of the first monostable multivibrator U3A outputs a low level, diode D2 conducts and continuously outputs a high level, the second NMOS transistor Q2 conducts, the first NMOS transistor Q1 does not conduct, the third NMOS transistor Q3 conducts, and the PMOS transistor Q4 conducts. The fan is not powered, and the buzzer sounds.

[0124] Based on the above three points, it can be determined that the fan will only turn on after reaching the specified temperature to save power consumption. Moreover, the higher the temperature, the higher the fan speed will be to enhance heat dissipation. Furthermore, the fan speed can be detected in real time to see if it is stuck. When the fan is detected to be stuck, the fan power will be turned off to prevent the fan from burning out, and at the same time, a buzzer will sound an alarm.

[0125] Example 2

[0126] like Figure 5 The illustration shows a modified design of the present invention, which can be used for automatic control of fans without PWM speed control. The difference between this embodiment and the previous one is that the fan is a standard two-wire or three-wire fan (with only power, ground, and TACH signals), whose speed cannot be adjusted via PWM signals.

[0127] Its working principle is as follows: The structure and operation of the square wave generating circuit, temperature detection circuit, and comparator circuit are exactly the same as in Example 1, generating a PWM control signal. However, this PWM control signal no longer directly drives the fan speed adjustment, but is used to control an electronic switch (e.g., a switching circuit with an NMOS transistor Q1). The control terminal of the electronic switch is connected to the output terminal of the comparator circuit. One end of the electronic switch is connected to the negative terminal of the fan, and the other end is grounded. The output terminal of the electronic switch is connected to the power supply terminal of the fan, used to control the on / off of the fan power supply according to the PWM control signal, so as to adjust the average speed of the fan. Resistors R1 = 10KΩ, R2 = 8.2KΩ, R3 = 2.49KΩ, and C1 = 2.2nF are set. When the temperature of the NTC thermistor is below 45℃ (i.e., the resistance of the NTC thermistor is greater than 4.92KΩ), the operational amplifier outputs a low level, the first NMOS transistor Q1 is not turned on, and the fan does not rotate. When the temperature of the NTC thermistor is between 45℃ and 90℃ (i.e., the resistance of the NTC thermistor is between 4.92KΩ and 1.27KΩ), the operational amplifier outputs a square wave, and the duty cycle of the square wave increases with the increase of the NTC thermistor temperature. The conduction time of the MOSFET is longer, and the fan speed increases. When the temperature of the NTC thermistor is higher than 90℃ (i.e., the resistance of the NTC thermistor is less than 1.27KΩ), the operational amplifier outputs a high level, the MOSFET is fully turned on, and the fan runs at full speed.

[0128] The working principle of the stall detection circuit and the alarm circuit is exactly the same as that of Example 1. They both determine whether the fan is stalled by monitoring the pulse interval of the TACH signal, and cut off the power and alarm when the fan is stalled.

[0129] This circuit is also applicable to ordinary fans without PWM speed control. An electronic switch controls the fan's power supply based on the PWM control signal, and the average fan speed is adjusted using the PWM duty cycle, thus achieving speed control for ordinary fans. This extended application means that the technical solution of this invention is applicable not only to high-end fans with PWM speed control but also to lower-cost ordinary fans without PWM speed control, greatly expanding the scope and versatility of the solution. Users can flexibly choose the fan type according to actual cost and performance requirements, further reducing the overall system cost and improving the cost-effectiveness and market competitiveness of the solution.

[0130] The above are merely specific embodiments of the present invention, but the technical features of the present invention are not limited thereto. Any simple changes, equivalent substitutions, or modifications made based on the present invention to achieve substantially the same technical effect are all covered within the protection scope of the present invention.

Claims

1. An automatic fan speed control method, characterized in that... Includes the following steps: S1. Use a square wave generator circuit to generate a triangular wave signal with a set frequency; S2. Utilize an NTC thermistor to detect ambient temperature and generate a detection signal that changes with temperature. S3. Compare the triangular wave signal with the detection signal, and output a PWM control signal according to the comparison result. The duty cycle of the PWM control signal increases with the increase of temperature. S4. Drive the fan to operate according to the PWM control signal; S5. Obtain the TACH signal of the fan, and use a monostable multivibrator to determine whether the fan is in a stalled state based on the pulse interval of the TACH signal. When the fan is determined to be stalled, cut off the power supply to the fan and issue an alarm signal.

2. The automatic fan speed control method according to claim 1, characterized in that: Step S5, which uses a monostable multivibrator to determine whether the rotor is in a stalled state based on the pulse interval of the TACH signal, specifically includes: S5.1 sets the transient duration of the monostable multivibrator; S5.2 When the fan is running normally, the TACH signal generates a pulse jump during the transient duration, and the monostable multivibrator outputs the first level signal. S5.3 When the fan is stalled, the TACH signal has no pulse transition during the transient duration, and the monostable multivibrator outputs a second-level signal.

3. The automatic fan speed control method according to claim 2, characterized in that: The duration of the transient is greater than the pulse period of the TACH signal when the fan is running normally.

4. The automatic fan speed control method according to claim 2, characterized in that: When the set fan speed is below 60 r / min, it is determined to be in a stalled state, and the duration of the transient state is greater than 1 second.

5. The automatic fan speed control method according to claim 1, characterized in that: Also includes: A start-up temperature threshold is set. When the ambient temperature is lower than the start-up temperature threshold, the PWM control signal is low and the fan stops running. When the ambient temperature reaches the aforementioned activation temperature threshold, the fan starts to operate, and the speed increases as the temperature rises. When the ambient temperature reaches the full-speed temperature threshold, the PWM control signal is continuously high, and the fan runs at full speed.

6. The automatic fan speed control method according to claim 5, characterized in that: The opening temperature threshold is 45°C, and the full-speed temperature threshold is 90°C.

7. A fan speed control circuit for implementing the fan speed control method as described in any one of claims 1 to 6, characterized in that: include A square wave generator circuit is used to generate a triangular wave signal with a set frequency. Temperature detection circuit, including NTC thermistor, is used to detect ambient temperature and output a detection signal that changes with temperature. A comparison circuit is connected to the square wave generating circuit and the temperature detection circuit respectively. It is used to compare the triangular wave signal with the detection signal and output a PWM control signal according to the comparison result. The duty cycle of the PWM control signal increases with the increase of temperature. A fan drive circuit, connected to the output of the comparator circuit, is used to drive the fan to operate according to the PWM control signal. A stall detection circuit includes a monostable multivibrator, the input of which is connected to the TACH signal output of the fan, and is used to determine whether the fan is in a stall state based on the pulse interval time of the TACH signal of the fan. An alarm circuit is also included, which is connected to the output of the stall detection circuit and is used to issue an alarm signal when the stall detection circuit determines that the fan is stalled.

8. The automatic fan speed control circuit according to claim 7, characterized in that: The square wave generating circuit, the temperature detection circuit, the comparison circuit, the fan drive circuit, the stall detection circuit, and the alarm circuit are all composed of discrete components and do not contain an MCU chip.

9. The automatic fan speed control circuit according to claim 7, characterized in that: The square wave generating circuit includes a timer chip U1, resistors R1 and R2, and a capacitor C1. Resistor R1 is connected between the power supply and the discharge terminal of the timer chip U1. Resistor R2 is connected between the discharge terminal and the trigger terminal of the timer chip. Capacitor C1 is connected to the trigger terminal of the timer chip U1 and grounded. The output terminal of the timer chip outputs the triangular wave signal.

10. The automatic fan speed control circuit according to claim 9, characterized in that: The frequency of the triangular wave signal is determined by the values ​​of resistor R1, resistor R2, and capacitor C1, and the frequency calculation formula is as follows: ; Where R1 is the resistance value of resistor R1, R2 is the resistance value of resistor R2, and C1 is the capacitance value of capacitor C1.

11. The automatic fan speed control circuit according to claim 7, characterized in that: The temperature detection circuit also includes a resistor R3. The NTC thermistor is connected in series with the resistor R3 and then connected between the power supply and ground. The common terminal of the NTC thermistor and the resistor R3 serves as the output terminal of the temperature detection circuit, and the detection signal is output to the inverting input terminal of the comparison circuit.

12. The automatic fan speed control circuit according to claim 7, characterized in that: The comparison circuit includes an operational amplifier chip U2. The positive input terminal of the operational amplifier chip U2 receives the triangular wave signal output by the square wave generator circuit, the inverting input terminal of the operational amplifier chip U2 receives the detection signal output by the temperature detection circuit, and the output terminal of the operational amplifier chip U2 outputs the PWM control signal.

13. The automatic fan speed control circuit according to claim 12, characterized in that: The monostable multivibrator is a dual-channel monostable multivibrator, including a first monostable multivibrator U3A and a second monostable multivibrator U3B. The trigger input terminal of the first monostable multivibrator U3A is connected to the TACH signal output terminal of the fan, and its output terminal is connected to the source of the second NMOS transistor Q2. It is used to output a high-level signal when the fan is rotating normally and a low-level signal when the fan is stalled. The output terminal of the second monostable multivibrator U3B is connected to the fan drive circuit and the alarm circuit respectively. When the operational amplifier chip U2 outputs the PWM control signal, the second monostable multivibrator U3B outputs a high level. When the operational amplifier chip U2 outputs a high level, the second monostable multivibrator U3B outputs a low level. At this time, the high-level signal of the operational amplifier chip U2, after passing through diode D1, keeps the gate of the first NMOS transistor Q1 at a high level.

14. The automatic fan speed control circuit according to claim 13, characterized in that: The first monostable multivibrator U3A and the second monostable multivibrator U3B are respectively equipped with a timing resistor and a timing capacitor.

15. The automatic fan speed control circuit according to claim 13, characterized in that: The fan drive circuit includes the first NMOS transistor Q1, the second NMOS transistor Q2, the third NMOS transistor Q3, and the PMOS transistor Q4: The gate of the first NMOS transistor Q1 is connected to the drain of the second NMOS transistor Q2, the drain of the first NMOS transistor Q1 is connected to the negative terminal of the fan, and the source of the first NMOS transistor Q1 is grounded. The gate of the second NMOS transistor Q2 is connected to the output of the fan power enable control circuit, the drain of the second NMOS transistor Q2 is connected to the gate of the first NMOS transistor Q1, and the source of the second NMOS transistor Q2 is connected to the output of the first monostable multivibrator U3A. The gate of the third NMOS transistor Q3 is connected to the output terminal of the fan power enable control circuit, the drain of the third NMOS transistor Q3 is connected to the negative terminal of the buzzer, and the source of the third NMOS transistor Q3 is grounded. The source of the PMOS transistor Q4 is connected to the power supply, the drain of the PMOS transistor Q4 is connected to the positive terminal of the buzzer, and the gate of the PMOS transistor Q4 is connected to the drain of the second NMOS transistor Q2.

16. The automatic fan speed control circuit according to claim 15, characterized in that: The fan drive circuit also includes a capacitor C5, which is connected between the gate of the second NMOS transistor Q2 and ground, and is used to delay the conduction of the second NMOS transistor Q2 when the fan starts.

17. The automatic fan speed control circuit according to claim 15, characterized in that: The alarm circuit includes the buzzer, which is connected to the output terminal of the stall detection circuit. When the stall detection circuit determines that the fan is stalled, the buzzer sounds an alarm.

18. The automatic fan speed control circuit according to claim 7, characterized in that: The fan is a fan without PWM speed control function. The fan drive circuit includes an electronic switch. The control terminal of the electronic switch is connected to the output terminal of the comparator circuit. One end of the electronic switch is connected to the negative terminal of the fan, and the other end is grounded. The output terminal of the electronic switch is connected to the power supply terminal of the fan and is used to control the on and off of the fan power supply according to the PWM control signal to adjust the average speed of the fan.