Fan control system, method and server wherein PWM pin and TACH pin are utilized to control a fan based on a mode control instruction
View Patent ↗A system for controlling a fan is provided, which includes a processor, a driver, a power supply module, an instruction output module and a level control module. The power supply module is configured to supply power to the level control module when the server is started up and when the server is shut down. The instruction output module is configured to output a mode control instruction. The level control module is configured to output a first level to the PWM pin and output a second level to the TACH pin based on the mode control instruction and then control the power supply module to supply power to the processor and the driver. The processor is configured to determine a mode of the fan based on the first level and the second level and control a rotation speed of the fan based on the mode of the fan.
1. A system for controlling a fan, wherein the system is applied to a server, and comprises a processor, a driver, a power supply module, an instruction output module and a level control module, wherein
the power supply module is configured to supply power to the level control module when the server is started up and when the server is shut down;
the instruction output module is configured to output a mode control instruction, wherein the mode control instruction comprises a start-up mode instruction and a shut-down mode instruction;
the level control module is connected with the instruction output module, the power supply module, a Pulse Width Modulation (PWM) pin and a Tachometer (TACH) pin of the processor and is configured to, on reception of the mode control instruction, output a first level to the PWM pin and output a second level to the TACH pin based on the mode control instruction and then control the power supply module to supply power to the processor and the driver; and
the processor is configured to, after being powered on, determine a mode of the fan based on the first level and the second level and control a rotation speed of the fan through the driver and based on the mode of the fan, wherein
the level control module is configured to, on reception of the start-up mode instruction or the shut-down mode instruction, output the first level with a first predetermined duration to the PWM pin, output the second level with the first predetermined duration to the TACH pin, and control the power supply module to supply power to the processor and the driver in a process of outputting the first level and the second level.
2. The system for controlling a fan according to claim 1 , wherein the mode of the fan comprises a start-up normal rotation mode, a first shut-down rotation mode corresponding to a first rotation speed, a second shut-down rotation mode corresponding to a second rotation speed and a third shut-down rotation mode corresponding to a third rotation speed.
3. The system for controlling a fan according to claim 2 , wherein the instruction output module comprises a power key corresponding to the start-up normal rotation mode and keys respectively corresponding to the first shut-down rotation mode, the second shut-down rotation mode, and the third shut-down rotation mode.
4. The system for controlling a fan according to claim 2 , wherein the level control module is a Complex Programmable Logic Device (CPLD).
5. The system for controlling a fan according to claim 4 , further comprising a first switch, a pull-up resistor, a second switch, and a pull-down resistor, wherein:
a control terminal of the first switch is connected with a pin of the CPLD for outputting the first level, a first terminal of the first switch is connected with a first terminal of the pull-up resistor and the PWM pin, a second terminal of the first switch is grounded;
a second terminal of the pull-up resistor is connected with the power supply module;
a control terminal of the second switch is connected with a pin of the CPLD for outputting the second level, a first terminal of the second switch is connected with the power supply module, a second terminal of the second switch is connected with the TACH pin and a first terminal of the pull-down resistor; and
a second terminal of the pull-down resistor is grounded.
6. A method for controlling a fan, applied to a system for controlling a fan, wherein
the system is applied to a server, and comprises a processor, a driver, a power supply module, an instruction output module and a level control module,
the power supply module is configured to supply power to the level control module when the server is started up and when the server is shut down, and
the level control module is connected with the instruction output module, the power supply module, a Pulse Width Modulation (PWM) pin and a Tachometer (TACH) pin of the processor, and
the method comprises:
outputting, by the instruction output module, a mode control instruction, wherein the mode control instruction comprises a start-up mode instruction and a shut-down mode instruction;
outputting, by the level control module on reception of the mode control instruction, a first level and a second level to the PWM pin and the TACH pin respectively based on the mode control instruction and then controlling, by the level control module, the power supply module to supply power to the processor and the driver, comprising: outputting, by the level control module on reception of the start-up mode instruction or the shut-down mode instruction, the first level with a first predetermined duration and the second level with the first predetermined duration to the PWM pin and the TACH pin respectively, and controlling, by the level control module, the power supply module to supply power to the processor and the driver in a process of outputting the first level and the second level; and
determining, by the processor after being powered on, a mode of the fan based on the first level and the second level and controlling, by the processor, a rotation speed of the fan based on the mode of the fan.
7. A server, comprising a fan and the system for controlling a fan according to claim 1 .
8. The method for controlling a fan according to claim 6 , wherein the mode of the fan comprises a start-up normal rotation mode, a first shut-down rotation mode corresponding to a first rotation speed, a second shut-down rotation mode corresponding to a second rotation speed and a third shut-down rotation mode corresponding to a third rotation speed.
9. The method for controlling a fan according to claim 8 , wherein the instruction output module comprises a power key corresponding to the start-up normal rotation mode and keys respectively corresponding to the first shut-down rotation mode, the second shut-down rotation mode, and the third shut-down rotation mode.
10. The method for controlling a fan according to claim 8 , wherein the level control module is a Complex Programmable Logic Device (CPLD).
11. The method for controlling a fan according to claim 10 , wherein the server further comprises a first switch, a pull-up resistor, a second switch, and a pull-down resistor, wherein:
a control terminal of the first switch is connected with a pin of the CPLD for outputting the first level, a first terminal of the first switch is connected with a first terminal of the pull-up resistor and the PWM pin, a second terminal of the first switch is grounded;
a second terminal of the pull-up resistor is connected with the power supply module;
a control terminal of the second switch is connected with a pin of the CPLD for outputting the second level, a first terminal of the second switch is connected with the power supply module, a second terminal of the second switch is connected with the TACH pin and a first terminal of the pull-down resistor; and
a second terminal of the pull-down resistor is grounded.