CN115898932A - Fan, operation method thereof, electronic device and readable storage medium - Google Patents

Fan, operation method thereof, electronic device and readable storage medium Download PDF

Info

Publication number
CN115898932A
CN115898932A CN202310001390.3A CN202310001390A CN115898932A CN 115898932 A CN115898932 A CN 115898932A CN 202310001390 A CN202310001390 A CN 202310001390A CN 115898932 A CN115898932 A CN 115898932A
Authority
CN
China
Prior art keywords
controller
fan
signal
pwm
rotor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310001390.3A
Other languages
Chinese (zh)
Inventor
刘涛
孔财
曹梦华
李若飞
杨杰
莫国笙
周立志
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202310001390.3A priority Critical patent/CN115898932A/en
Publication of CN115898932A publication Critical patent/CN115898932A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B30/00Energy efficient heating, ventilation or air conditioning [HVAC]
    • Y02B30/70Efficient control or regulation technologies, e.g. for control of refrigerant flow, motor or heating

Landscapes

  • Control Of Electric Motors In General (AREA)

Abstract

The embodiment of the invention provides a fan and an operation method thereof, electronic equipment and a readable storage medium, wherein the fan comprises a driving circuit, a controller and a motor, the driving circuit drives a rotor of the motor to rotate, the controller is connected with an upper end, a fan management bus control protocol is arranged at the controller and the upper end, a working mode is arranged on the fan management bus control protocol, and the working mode comprises a PWM (pulse-width modulation) control mode and a command control mode; when the working mode of the controller and the upper end is a PWM control mode, the rotor rotating speed of the rotor is controlled by a PWM signal sent to the controller by the upper end, and the rotor rotating speed of the rotor corresponding to the controller is fed back by a TACH signal output to the upper end by the controller; and when the working mode of the controller and the upper terminal is a command control mode, the CLK signal and the DAT signal are sent to the controller through the upper terminal, so that the controller executes a control command formed by the CLK signal and the DAT signal.

Description

Fan, operation method thereof, electronic device and readable storage medium
Technical Field
Embodiments of the present invention relate to the field of communications technologies, and in particular, to a fan and an operating method thereof, an electronic device, and a computer-readable storage medium.
Background
At present, a server has a compact structure and a large heat productivity, a plurality of cooling fans are arranged in the server for active cooling, stable operation of the fans is crucial to normal operation of the server, and a common cooling fan of the server is powered by a 12V power supply of a mainboard and performs speed regulation control and rotation speed reading through a BMC (Baseboard Management Controller) or a CPLD (Complex Programmable Logic Device) on the mainboard.
With the continuous upgrade of a server management system, the monitoring of the operation state of a server is continuously refined, but most of server cooling fans used at present only have feedback of rotation speed information, and usually an upper end obtains the rotation speed information of the fan through a TACH (Tachometer) signal, so that the operation state of the fan can only be indirectly judged through the rotation speed, and the requirement of monitoring the more and more precise operation state of the server cannot be met. In addition, some fans indicate the running state of the fan by adding signal lines, for example, adding a 'fault signal' for indicating whether the fan works abnormally, and adding a 'speed regulation completion signal' for indicating that the rotating speed of the fan reaches a set value. However, the addition of signal lines requires changes to existing hardware interfaces and is not compatible with existing systems.
Disclosure of Invention
The embodiment of the invention provides a fan, an operation method thereof, electronic equipment and a computer readable storage medium, and aims to solve the problems that the working state of the fan can only be indirectly judged through the rotating speed, the requirement of more and more precise operation state monitoring of a server cannot be met, and the existing hardware interface is changed and cannot be compatible with the existing system in the prior art.
The embodiment of the invention discloses a fan, which comprises a driving circuit, a controller and a motor, wherein the driving circuit drives a rotor of the motor to rotate, the controller is connected with an upper end, a fan management bus control protocol is arranged on the controller and the upper end, a working mode is arranged on the fan management bus control protocol, and the working mode comprises a PWM (pulse-width modulation) control mode and a command control mode;
when the working mode of the controller and the upper end is the PWM control mode, the PWM signal sent to the controller by the upper end controls the rotor rotating speed of the rotor, and the TACH signal output to the upper end by the controller feeds back the rotor rotating speed of the rotor corresponding to the controller;
and when the working mode of the controller and the upper end is the command control mode, the controller executes a control command formed by the CLK signal and the DAT signal through the CLK signal and the DAT signal which are sent to the controller by the upper end.
Optionally, comprising:
the upper end is connected to a PWM input detection interface of the controller and a CLK interface of the two-wire serial communication through a PWM/CLK signal line, and is connected to a TACH signal output interface of the controller and a DAT interface of the two-wire serial communication through a TACH/DAT signal line.
Optionally, comprising:
when the working mode of the controller and the upper end is the PWM control mode, receiving a PWM signal sent by the upper end through the PWM/CLK signal line through a PWM input detection interface of the controller so that the controller controls the rotor rotation speed of the rotor according to the PWM signal, and outputting a TACH signal to a TACH/DAT signal line of the upper end through a TACH signal output interface of the controller so as to feed back the rotor rotation speed of the rotor corresponding to the controller to the upper end;
when the working mode of the controller and the upper bit terminal is the command control mode, the controller receives a CLK signal transmitted by the upper bit terminal through the PWM/CLK signal line through a CLK interface of the two-wire serial communication of the controller, and the controller receives a DAT signal transmitted by the upper bit terminal through the TACH/DAT signal line through a DAT interface of the two-wire serial communication of the controller, so that the controller executes a control command formed by the CLK signal and the DAT signal.
Optionally, the controller is configured to generate a driving signal of the motor according to a rotor position of the rotor and a sampling signal, so as to control the driving circuit to drive the motor to rotate the rotor according to the driving signal; wherein the sampling signal is at least a voltage and/or current signal.
Optionally, the PWM signal comprises a PWM signal duty cycle, and the PWM signal duty cycle is used for controlling a rotor speed of the rotor.
Optionally, the sending the PWM signal to the controller through the upper end to control the rotor speed of the rotor includes:
when the working modes of the controller and the upper end are the PWM control mode, the upper end sends a PWM signal to the controller;
and controlling the rotor rotating speed of the rotor corresponding to the controller according to the PWM signal duty ratio in the PWM signal.
Optionally, the feeding back the rotor speed of the rotor corresponding to the controller by the TACH signal output by the controller to the upper end includes:
when the working modes of the controller and the upper end are the PWM control mode, the controller sends a TACH signal to the upper end;
and measuring the TACH signal frequency of the TACH signal to obtain the rotor rotating speed of the rotor.
Optionally, comprising:
when the working mode of the controller and the upper end is the PWM control mode, the upper end sends a PWM signal to the controller within a preset unit time; the PWM signal duty ratio in the plurality of PWM signals forms a PWM signal duty ratio sequence;
the controller monitors whether the PWM signal duty ratio sequence is a first preset PWM signal duty ratio sequence;
if the PWM signal duty cycle sequence is a first preset PWM signal duty cycle sequence, determining that the PWM signal contains handshake information;
the controller returns response information to the upper end aiming at the handshake information; the response information comprises verification information, and the verification information is used for verifying whether the response information is correct or not;
if the response information is verified to be correct, the upper end sends a mode switching signal to the controller;
and switching the PWM control mode to a command control mode according to the mode switching signal.
Optionally, the response information is a preset TACH signal frequency sequence, and the mode switching signal is a preset second PWM signal duty cycle sequence.
Optionally, comprising:
if the controller does not return response information aiming at the PWM signal, the upper end sends the PWM signal to the controller again;
and if the controller does not return response information to the PWM signal sent again, the controller does not support the command control mode, and the controller and the upper end maintain the PWM control mode.
Optionally, comprising:
and in a preset unit time, if the controller does not receive the PWM signal containing the handshake information, the upper end does not support the command control mode, and the controller and the upper end maintain the PWM control mode.
Optionally, after the switching the PWM control mode to the command control mode according to the mode switching signal, the method further includes:
when the working mode of the controller and the upper end is the command control mode, the upper end sends a query command to the controller at preset unit time intervals; wherein the query command is used to check whether data communication is clear;
if the response time corresponding to the response information sent to the upper end by the controller exceeds the preset response time, the upper end sends a query command to the controller again;
and if the response time of the controller for the query command exceeds the preset response time again, the upper end is switched to the PWM control mode.
Optionally, after the switching of the upper end to the PWM control mode if the response time of the controller to the query command exceeds a preset response time again, the method further includes:
if the controller is still in the command control mode, after the preset unit time is exceeded, the controller automatically switches to the PWM control mode, and adjusts the speed of the rotor corresponding to the controller according to the duty ratio of the PWM signal.
Optionally, the control command is used to obtain basic information of the fan, where the basic information of the fan at least includes: fan model, manufacturer code, fan ID, hard software version, maximum speed, minimum speed, rated voltage, rated power, rated air flow, and rated static pressure.
Optionally, the control command is further configured to obtain real-time operation data of the fan, where the real-time operation data of the fan at least includes: target rotating speed, actual rotating speed, steering, speed regulation completion mark, voltage, current, power, wind pressure and running duration.
Optionally, the control command is further configured to obtain fault information of the fan, where the fault information of the fan at least includes: hall faults, MOS faults, over-voltage, under-voltage, over-current, and locked rotor.
Optionally, the control command is further used for modifying fan parameters, the fan parameters at least including: self-defined maximum rotating speed, minimum rotating speed, maximum current, duty ratio rotating speed coefficient and default rotating speed without control signals.
The embodiment of the invention also discloses a fan operation method, wherein the fan comprises a driving circuit, a controller and a motor, the driving circuit drives a rotor of the motor to rotate, the controller is connected with an upper end, the controller and the upper end are provided with a fan management bus control protocol, the fan management bus control protocol is provided with a working mode, the working mode comprises a PWM control mode and a command control mode, and the method comprises the following steps:
when the working mode of the controller and the upper end is the PWM control mode, the PWM signal sent to the controller by the upper end is used for controlling the rotor speed of the rotor, and the controller outputs a TACH signal to the upper end to feed back the rotor speed of the rotor corresponding to the controller;
and when the working mode of the controller and the upper terminal is the command control mode, transmitting a CLK signal and a DAT signal to the controller through the upper terminal to enable the controller to execute a control command formed by the CLK signal and the DAT signal.
The embodiment of the invention also discloses electronic equipment which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory finish mutual communication through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the method according to the embodiment of the present invention when executing the program stored in the memory.
Also disclosed is a computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform a method according to an embodiment of the invention.
The embodiment of the invention has the following advantages:
in the embodiment of the invention, the fan comprises a driving circuit, a controller and a motor, wherein the driving circuit drives a rotor of the motor to rotate, and the controller is connected with an upper end; when the working mode of the controller and the upper end is a PWM control mode, the rotor rotating speed of the rotor is controlled by a PWM signal sent to the controller by the upper end, and the rotor rotating speed of the rotor corresponding to the controller is fed back by a TACH signal output to the upper end by the controller; and when the working mode of the controller and the upper terminal is a command control mode, the CLK signal and the DAT signal are sent to the controller through the upper terminal, so that the controller executes a control command formed by the CLK signal and the DAT signal. Through the fan provided by the embodiment of the invention, a hardware circuit and an interface of the existing upper end are not required to be changed, the existing signal line is multiplexed to develop a fan management bus control protocol, a communication control function between the upper end and a controller of the fan is increased, the compatibility with the existing system is ensured, in addition, the controller executes a control command formed by a CLK signal and a DAT signal, the detailed operation data of the fan can be obtained, and the operation state of the fan can be better monitored.
Drawings
FIG. 1 is a schematic diagram of a prior art fan control scheme provided in an embodiment of the present invention;
FIG. 2 is a schematic diagram of an internal structure of a conventional fan according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a fan provided in an embodiment of the present invention;
fig. 4 is a schematic view of an internal structure of a fan according to an embodiment of the present invention;
fig. 5 is a schematic flow chart illustrating a switching process of a fan control mode according to an embodiment of the present invention;
FIG. 6 is a flow chart illustrating steps of a method for operating a fan in accordance with an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a computer-readable storage medium provided in an embodiment of the present invention;
fig. 8 is a schematic diagram of a hardware structure of an electronic device implementing various embodiments of the present invention.
Reference numerals are as follows: 1. a fan; 2. a drive circuit; 3. a controller; 4. a motor; 5. And an upper end.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
In order to make those skilled in the art better understand the technical solution of the embodiments of the present invention, some technical features related to the embodiments of the present invention are explained and illustrated below:
BMC (Baseboard Management Controller), which is a dedicated microcontroller embedded on a motherboard of a computer (typically a server), is responsible for managing the interface between system Management software and platform hardware.
A CPLD (Complex Programmable Logic Device), which is a digital integrated circuit with Logic functions built by users according to their needs, and the basic design method is to generate corresponding target files by means of integrated development software platform and using methods such as schematic diagram and hardware description language, and to transmit the codes to the target chip by means of download cable, so as to implement the designed digital system.
As an example, with the continuous upgrade of a server management system, the monitoring of the operating state of a server is continuously refined, but most of server cooling fans used at present only have feedback of rotational speed information, and usually an upper end obtains the rotational speed information of the fan through a TACH (Tachometer) signal, so that the operating state of the fan can only be indirectly determined through the rotational speed, and the demand for monitoring the increasingly refined operating state of the server cannot be met. In addition, some fans indicate the running state of the fan by adding signal lines, for example, adding a 'fault signal' for indicating whether the fan works abnormally, and adding a 'speed regulation completion signal' for indicating that the rotating speed of the fan reaches a set value. However, the addition of signal lines requires changes to existing hardware interfaces and is not compatible with existing systems.
In the existing server system, the server system usually comprises a plurality of fans, and according to different heat dissipation requirements, the heat dissipation fans can be single-rotor fans or double-rotor fans, the double-rotor fans structurally comprise two single-rotor fans which are back to back, and the front rotors and the rear rotors are consistent in the working principle.
Referring to fig. 1, a schematic diagram of a conventional fan control scheme provided in an embodiment of the present invention is shown, and it can be seen from the diagram that, in the conventional scheme, a fan power supply is provided by a main board 12V power supply, and an eFuse (electronic fuse) is provided at a fan power supply interface of the main board for overcurrent protection, so that an overcurrent and short-circuit fault of the fan can be avoided, and the 12V power supply of the main board is further affected. The upper end in the figure can be represented as BMC/CPLD, the BMC/CPLD and each rotor fan can be connected through a PWM (Pulse Width Modulation) signal line and a TACH (Tachometer) signal line, wherein, for the double-rotor fan, the PWM signal lines of the front rotor and the rear rotor are connected in parallel, the TACH signal lines are respectively independent, the BMC/CPLD can control the set rotating speed of the fan by sending different PWM signal duty ratios to the fan, and the BMC/CPLD can obtain the actual rotating speed of the fan by reading the frequency of the TACH signal returned by the fan.
Specifically, taking a conventional single-rotor fan as an example, the heat dissipation fan is composed of a fan blade, a frame structure, a motor and a control circuit, the fan motor is usually a brushless dc motor, and the driving circuit is a three-phase half-bridge structure and is controlled by a controller. Referring to fig. 2, which illustrates an internal structural schematic diagram of a conventional fan provided in an embodiment of the present invention, as shown in the figure, a controller may calculate and generate a driving signal of a motor according to signals such as a measured rotor position and a sampled voltage and current, so as to control the rotation of the fan; the controller can be used for obtaining the set rotating speed of the fan through a PWM input pin of the controller, the controller can measure the duty ratio of a PWM signal of an input PWM signal, a TACH signal can be used for outputting the actual rotating speed of the fan, the frequency of the TACH signal is in direct proportion to the actual rotating speed of the fan, and the BMC/CPLD at the upper end can be converted to obtain the actual rotating speed of the fan through measuring the frequency of the TACH signal.
Therefore, in the existing fan control mode, the upper-level BMC/CPLD acquires the rotating speed information of the fan through the TACH signal, can only indirectly judge the working state of the fan through the rotating speed, and cannot meet the requirement of monitoring the increasingly precise running state of the server; in addition, some fans are not compatible with existing systems by adding signal lines and changing existing hardware interfaces.
In view of the above, one of the core invention points of the present invention is to provide a fan, including a controller and a motor, where a driving circuit drives a rotor of the motor to rotate, and the controller is connected to an upper end, where the controller and the upper end are provided with a fan management bus control protocol, the fan management bus control protocol is provided with a working mode, and the working mode includes a PWM control mode and a command control mode; when the working mode of the controller and the upper end is a PWM control mode, the rotor rotating speed of the rotor is controlled by a PWM signal sent to the controller by the upper end, and the rotor rotating speed of the rotor corresponding to the controller is fed back by a TACH signal output to the upper end by the controller; when the operation mode of the controller and the upper terminal is a command control mode, the controller executes a control command formed by the CLK signal and the DAT signal through the CLK signal and the DAT signal which are sent to the controller by the upper terminal. Through the fan provided by the embodiment of the invention, a hardware circuit and an interface of the existing upper end do not need to be changed, the existing signal line is multiplexed to develop a fan management bus control protocol, the communication control function between the upper end and the controller of the fan is increased, the compatibility with the existing system is ensured, in addition, the controller executes a control command formed by a CLK signal and a DAT signal, the detailed operation data of the fan can be obtained, and the operation state of the fan can be better monitored.
Referring to fig. 3, which shows a schematic structural diagram of a fan provided in an embodiment of the present invention, the fan includes a driving circuit, a controller, and a motor, the driving circuit drives a rotor of the motor to rotate, the controller is connected to an upper end, the controller and the upper end are provided with a fan management bus control protocol, the fan management bus control protocol is provided with a working mode, and the working mode includes a PWM control mode and a command control mode;
when the working mode of the controller and the upper end is the PWM control mode, the PWM signal sent to the controller by the upper end is used for controlling the rotor rotating speed of the rotor, and the TACH signal output to the upper end by the controller is used for feeding back the rotor rotating speed of the rotor corresponding to the controller;
and when the working mode of the controller and the upper terminal is the command control mode, transmitting a CLK signal and a DAT signal to the controller through the upper terminal to enable the controller to execute a control command formed by the CLK signal and the DAT signal.
For the command control mode of the fan management bus control protocol, the dual-wire serial communication may be used, wherein for a data transmission format used in the communication, a format defined by an I2C (Inter-Integrated Circuit) protocol may be used, and a custom format may also be used, which may be adjusted by a person skilled in the art according to an actual situation, and the embodiment of the present invention is not limited thereto.
For the driving circuit, the driving circuit can drive the motor to rotate the rotor through the driving signal; the rotor is a part in the fan and is connected with fan blades of the fan, namely the rotation of the rotor indicates that the fan starts to rotate; for rotor speed, it may be expressed as fan speed of the fan; for the rotor position, it may be obtained by a rotor position sensor, it should be noted that, for the obtaining manner of the rotor position, a person skilled in the art may select an appropriate device according to actual needs to obtain, and the embodiment of the present invention is not limited to this.
The controller of the fan is connected with an upper end, the upper end is connected to a PWM input detection interface of the controller and a CLK (clock) interface of the two-wire serial communication through a PWM/CLK signal line, and the upper end is connected to a TACH signal output interface of the controller and a DAT (data) interface of the two-wire serial communication through a TACH/DAT signal line.
For the upper end, it may be the upper end of the server, and the upper end of the server usually adopts BMC or CPLD to control the fan; it should be noted that the upper end may be an upper end of a server or an upper end of another terminal, and this is not limited in this embodiment of the present invention.
For the controller, it may be a MCU (Microcontroller Unit Microcontroller), which may calculate and generate a driving signal corresponding to the motor according to the measured rotor position and the sampling signal, and at the same time, the controller may also measure a PWM signal duty ratio of the PWM signal; wherein, the sampling signal can be a voltage and/or current signal; for the PWM signal, the PWM signal is a fan speed regulation control signal sent to a controller of the fan by an upper end, the PWM signal comprises a PWM signal duty ratio, and the PWM signal duty ratio can be used for controlling the rotor rotating speed of a rotor, namely the fan rotating speed of the fan; the duty ratio is the proportion of the electrifying time relative to the total time in one pulse cycle.
For the PWM input detection interface, it can be used to obtain the PWM signal sent by the upper end to the controller, that is, obtain the set rotation speed of the rotor, and then the controller can control the rotation speed of the rotor in the fan, that is, the fan rotation speed of the fan according to the set rotation speed.
Specifically, after a controller in the fan sends the TACH signal to an upper end, the upper end can convert the signal frequency by measuring the signal frequency of the TACH signal to obtain the actual rotating speed of the fan.
It should be noted that, for the method for scaling the signal frequency of the TACH signal, a person skilled in the art may adjust the method according to actual needs, and the embodiment of the present invention is not limited thereto.
For the CLK signal and the DAT signal, they may be signals for data communication.
It should be noted that, for the circuit design of the upper end motherboard, if the upper end is a CPLD, no hardware modification is required; if the upper end is BMC, the communication function can be realized by ensuring the pins of the upper end connected with the PWM/CLK and the TACH/DAT.
In a specific implementation, when the working mode of the controller and the upper end is a PWM control mode, the upper end in the server sends a PWM signal to a controller in the fan, and the fan can receive the PWM signal sent by the upper end through a PWM/CLK signal line through a PWM input detection interface of the controller, so that the controller can control the rotor speed of the rotor according to the PWM signal, that is, control the fan speed of the fan, and output a TACH signal to a TACH/DAT signal line of the upper end through a TACH signal output interface of the controller, so as to feed back the rotor speed of the rotor corresponding to the controller to the upper end, that is, obtain the fan speed through the TACH signal fed back by the controller; when the working mode of the controller and the upper terminal is a command control mode, a signal in a PWM/CLK signal line connected with the upper terminal is switched into a CLK signal by a PWM signal, a signal in a TACH/DAT signal line connected with the upper terminal is switched into a DAT signal by a TACH signal, so that the controller can receive the CLK signal transmitted by the upper terminal through the PWM/CLK signal line through a CLK interface of the two-wire serial communication of the controller, and receive the DAT signal transmitted by the upper terminal through the TACH/DAT signal line through a DAT interface of the two-wire serial communication of the controller, wherein the CLK signal and the DAT signal can be used for data communication to enable the controller to execute a control command formed by the CLK signal and the DAT signal. Through the fan provided by the embodiment of the invention, a hardware circuit and an interface of the existing upper end are not required to be changed, the existing signal line is multiplexed to develop a fan management bus control protocol, a communication control function between the upper end and a controller of the fan is increased, the compatibility with the existing system is ensured, in addition, the controller executes a control command formed by a CLK signal and a DAT signal, the detailed operation data of the fan can be obtained, and the operation state of the fan can be better monitored.
Referring to fig. 4, a schematic diagram of an internal structure of a fan provided in an embodiment of the present invention is shown, where the internal structure of the fan in the diagram is a fan circuit structure supporting a fan management bus control protocol, as shown in the diagram, a fan power supply is provided by a 12V power supply of a server motherboard, an upper terminal is connected to a PWM input detection interface of a controller and a CLK interface of a two-wire serial communication through a PWM/CLK signal line, and the upper terminal is connected to a TACH signal output interface of the controller and a DAT interface of the two-wire serial communication through a TACH/DAT signal line. In the PWM control mode, the two signal lines can be PWM input and TACH output respectively, that is, the PWM/CLK signal line inputs a PWM signal and the TACH/DAT signal line outputs a TACH signal, which is the same as the conventional fan operating principle; however, the operating mode in the embodiment of the present invention further includes a command control mode, when the fan operates in the command control mode, the two signal lines are used for data communication, the controller receives a DAT signal sent by the upper end through a TACH/DAT signal line through a DAT interface of the two-line serial communication of the controller, and a control command formed by a CLK signal and the DAT signal can be executed by the controller, so that detailed operating data of the fan can be acquired, and an operating state of the fan can be better monitored.
In one example, assuming that a server system is connected with a dual-rotor fan, and an upper end is a BMC/CPLD, in a PWM control mode, the upper end BMC/CPLD may send a path of PWM signal to a controller, and may collect two TACH signals of front and rear rotors fed back by the controller, where the front and rear rotors of the fan may share one PWM signal, and may control the rotation speed of the rotor by a duty ratio in the PWM signal, that is, control the rotation speed of the fan, but the TACH signals of the front and rear rotors of the fan need to be fed back to the upper end separately, that is, the rotation speed of the fan may be obtained by the TACH signal fed back by the controller; when the fan is switched to a command control mode, the PWM signal and the TACH signal are switched to a CLK signal and a DAT signal, communication addresses of front and rear rotors can be defined to be 1 and 2 respectively, the front and rear rotors share one CLK signal, two TACH signal lines are switched to two DAT signals, an upper end can send a command to the front and rear rotors simultaneously through the CLK signal, wherein the command contains address information, a corresponding controller of the fan responds, data is returned to the upper end through the DAT signal, the upper end monitors the two DAT signals while receiving the data, and the returned data is read.
In the dual-rotor fan, since the DAT signals are independent, there may be a case where data is not synchronized, and therefore, when only the controller of the fan transmits data to the upper end of the server, the communication interface at the upper end needs to simultaneously read the DAT signals of the DAT signal lines corresponding to the front and rear rotors of the dual-rotor fan, that is, detect the DAT signals, so as to ensure the source information of the DAT.
It should be noted that, according to the application requirement, the fan management bus control protocol may support multiple fans to be placed on the same bus, and in such applications, an address resolution protocol is required to be added for implementing dynamic address allocation, but the multiple fans cannot be compatible with the PWM control mode when placed on the same bus, and will be performed in the command control mode.
For the control command, it may be used to obtain basic information of the fan, where the basic information of the fan may include at least: fan model, manufacturer code, fan ID, hard software version, maximum speed, minimum speed, rated voltage, rated power, rated air volume, and rated static pressure. In addition, the control command may be further used to obtain real-time operation data of the fan, where the real-time operation data of the fan may include at least: target rotating speed, actual rotating speed, steering, speed regulation completion mark, voltage, current, power, wind pressure and running duration.
In one example, assuming that the fan model and the manufacturer code of the fan need to be acquired, a control command may be sent to the controller of the fan through the CLK signal via the upper terminal, and the controller of the fan may send a DAT signal to the upper terminal according to the control command, that is, the fan model and the manufacturer code of the fan need to be acquired by the upper terminal are returned; similarly, it can be obtained that, assuming that the target rotation speed and the actual rotation speed of the fan need to be obtained, a control command can be sent to the controller of the fan through the CLK signal via the upper end, and the controller of the fan can send a DAT signal to the upper end according to the control command, that is, the target rotation speed and the actual rotation speed of the fan need to be obtained by returning to the upper end.
In the embodiment of the invention, after the controller executes a control command formed by a CLK signal and a DAT signal to obtain the basic information of the fan corresponding to the rotor and the real-time operation data of the fan, the upper end can return the basic information of the fan corresponding to the rotor and the real-time operation data of the fan, the data communication can be realized under the combined action of the CLK signal and the DAT signal, the upper end can judge the operation state of the fan through the obtained basic information of the fan and the real-time operation data of the fan, and the basic information of the fan and the real-time operation data function of the fan can be realized based on the communication control function by adding the communication control function between the upper end BMC/CPLD and the fan controller, so that the real-time operation state of the fan can be better judged.
For control commands, it can also be used to modify fan parameters, including at least: self-defined maximum rotating speed, minimum rotating speed, maximum current, duty ratio rotating speed coefficient and default rotating speed without control signals.
In one example, assuming that the maximum current of the fan needs to be obtained and modified, a control command can be sent to the controller of the fan through the CLK signal and the DAT signal through the upper terminal, and the controller of the fan sets or modifies the maximum current of the fan according to the control command.
In the embodiment of the invention, after the controller executes the control command formed by the CLK signal and the DAT signal, the parameter setting can be carried out on the fan corresponding to the rotor, the communication control function between the upper-level end BMC/CPLD and the fan controller is added by multiplexing the existing signal line development control protocol, the function of parameter setting debugging can be provided based on the communication control function, and the upper-level end can be modified as required to adapt to the heat dissipation requirements of different servers.
For the control command, it may also be used to obtain fault information of the fan, where the fault information of the fan may include at least: hall faults, MOS faults, over-voltage, under-voltage, over-current, and locked rotor.
The historical operation data of the fan, namely the real-time operation data before the fan is in failure, can be stored in a charged erasable programmable read-only memory integrated in the controller.
In one example, assuming that a hall fault occurs currently, the fan can collect the fault information and feed the fault information back to the upper end through a DAT signal, and the upper end can read historical operating data of the fan in the electrically erasable programmable read only memory to analyze the fault reason of the fan according to the historical operating data of the fan, so as to make an effective solution.
In the specific implementation, when the working modes of the controller and the upper end are a command control mode, if the fan fails, the controller collects fault information during the operation of the fan, obtains alarm information according to the fault information, and sends the fault information and the alarm information to the upper end, and the upper end can analyze the fault reason of the fan according to historical operation data of the fan by reading the historical operation data of the fan in the electrified erasable programmable read-only memory, so that an effective solution is formulated.
In the embodiment of the invention, the fan comprises a driving circuit, a controller and a motor, wherein the driving circuit drives a rotor of the motor to rotate, and the controller is connected with an upper end, wherein the upper end is connected to a PWM input detection interface of the controller and a CLK interface of the two-wire serial communication through a PWM/CLK signal line, and is connected to a TACH signal output interface of the controller and a DAT interface of the two-wire serial communication through a TACH/DAT signal line; the controller and the upper end are provided with a fan management bus control protocol, the fan management bus control protocol is provided with working modes, and the working modes comprise a PWM (pulse-width modulation) control mode and a command control mode; when the working mode of the controller and the upper end is a PWM control mode, receiving a PWM signal sent by the upper end through a PWM/CLK signal line through a PWM input detection interface of the controller so that the controller controls the rotor rotating speed of the rotor according to the PWM signal, and outputting a TACH signal to a TACH/DAT signal line of the upper end through a TACH signal output interface of the controller so as to feed back the rotor rotating speed of the rotor corresponding to the controller to the upper end; when the working mode of the controller and the upper terminal is a command control mode, the controller receives a CLK signal transmitted by the upper terminal through a PWM/CLK signal line through a CLK interface of the two-wire serial communication of the controller, and receives a DAT signal transmitted by the upper terminal through a TACH/DAT signal line through a DAT interface of the two-wire serial communication of the controller, so that the controller executes a control command formed by the CLK signal and the DAT signal. Through the fan provided by the embodiment of the invention, a hardware circuit and an interface of the existing upper end do not need to be changed, the existing signal line is multiplexed to develop a fan management bus control protocol, the communication control function between the upper end and the controller of the fan is increased, the compatibility with the existing system is ensured, in addition, the controller executes a control command formed by a CLK signal and a DAT signal, the detailed operation data of the fan can be obtained, and the operation state of the fan can be better monitored.
Specifically, based on the communication control function between the controllers of the upper end and the fan, the upper end can read basic information such as fan specification parameters and the like, real-time operation data and fault warning information, and can modify and debug fan parameters, the power consumption of the fan obtained by reading the operation data through the fan can be more accurate than that of the existing scheme, server power consumption control is facilitated, the service life of the fan can be managed by reading the operation time of the fan, fault diagnosis and prejudgment are performed through analysis of the operation data, early warning can be achieved, and the heat dissipation requirements of different servers can be adapted by modifying parameters such as the maximum rotating speed, the minimum rotating speed and the maximum current of the fan.
In an optional embodiment of the present invention, the sending the PWM signal to the controller through the upper terminal to control the rotor speed of the rotor includes:
when the working modes of the controller and the upper end are the PWM control mode, the upper end sends a PWM signal to the controller;
and controlling the rotor rotating speed of the rotor corresponding to the controller according to the PWM signal duty ratio in the PWM signal.
In specific implementation, when the working mode of the controller and the upper end is the PWM control mode, the upper end in the server sends a PWM signal to the controller in the fan, the fan can receive the PWM signal sent by the upper end through the PWM/CLK signal line through the PWM input detection interface of the controller, and according to the duty ratio of the PWM signal in the PWM signal, the controller can control the rotor speed of the rotor according to the PWM signal, that is, control the fan speed of the fan.
In one example, assuming that the duty ratio of 0% -100% corresponds to the lowest rotation speed to the highest rotation speed of the fan, the controller in the fan may adjust the rotation speed of the fan according to the measured duty ratio of the PWM signal, if the duty ratio of the received PWM signal is 70%. The controller may adjust the set fan speed according to the preset duty cycle.
In an optional embodiment of the present invention, the outputting, by the controller, a TACH signal to the upper end to feed back a rotor speed of the rotor corresponding to the controller includes:
when the working modes of the controller and the upper end are the PWM control mode, the controller sends a TACH signal to the upper end;
and measuring the TACH signal frequency of the TACH signal to obtain the rotor rotating speed of the rotor.
In a specific implementation, after a controller of the fan receives a PWM signal sent by an upper end and adjusts the rotation speed of the rotor, the controller outputs a TACH signal to a TACH/DAT signal line of the upper end through a TACH signal output interface to feed back the rotor rotation speed of the rotor corresponding to the controller to the upper end, that is, the rotation speed of the fan can be obtained through the TACH signal fed back by the controller.
In an alternative embodiment of the invention, the method comprises the following steps:
when the working mode of the controller and the upper end is the PWM control mode, the upper end sends a PWM signal to the controller within a preset unit time; the PWM signal duty ratios in the plurality of PWM signals form a PWM signal duty ratio sequence;
the controller monitors whether the PWM signal duty cycle sequence is a first preset PWM signal duty cycle sequence;
if the PWM signal duty cycle sequence is a first preset PWM signal duty cycle sequence, determining that the PWM signal contains handshake information;
the controller returns response information to the upper end aiming at the handshake information; the response information comprises verification information, and the verification information is used for verifying whether the response information is correct or not;
if the response information is verified to be correct, the upper end sends a mode switching signal to the controller;
and switching the PWM control mode to a command control mode according to the mode switching signal.
For the handshake information, the handshake information is a first preset PWM signal duty cycle sequence; the PWM signal duty ratio sequence is composed of PWM signal duty ratios in a plurality of PWM signals; for the response message, the response message is a preset TACH signal frequency sequence; for the mode switching signal, it is a preset second PWM signal duty cycle sequence. It should be noted that the first preset PWM signal duty cycle sequence and the second PWM signal duty cycle sequence have different values.
It is worth mentioning that, for the case of replacing the fan by hot plug, the upper end may send the handshake information to the fan within a predetermined time period after detecting the in-place signal of the fan, and may monitor the handshake information of the fan within the predetermined time period after the fan is powered on.
Referring to fig. 5, a schematic diagram of a switching flow of a fan control mode provided in an embodiment of the present invention is shown, as shown in the diagram, when an operating mode of a controller and an upper terminal is a PWM control mode, the upper terminal sends a PWM signal to the controller within a preset unit time, where a PWM signal duty ratio of a plurality of PWM signals forms a PWM signal duty ratio sequence, at this time, the controller of the fan needs to monitor whether the PWM signal duty ratio sequence is a first preset PWM signal duty ratio sequence, assuming that handshake information is [30%,10%,50% ], a handshake signal identification interval is 100ms, when the fan receives 30% of the PWM signal duty ratio, the fan needs to wait 100ms, if 10% of the PWM signal duty ratio is detected within 100ms, the fan waits 100ms again, if 50% of the PWM signal duty ratio is received, the fan can consider that the PWM signal sent by the upper terminal contains handshake information, it needs to be stated that if any one time waiting exceeds 100ms, the fan can be considered as a normal signal, the fan does not contain handshake information, the PWM signal sequence and the first PWM signal sequence and the upper terminal can verify that the handshake information is contained in the handshake information, and the handshake information can be sent to the upper terminal can be used for verifying that the handshake information can be sent by the handshake information is contained in the handshake information, and the handshake information can be sent by the upper terminal, so that the PWM signal can be sent when the PWM signal can be correctly switched control mode, the handshake information can be sent by the handshake control mode, the handshake information can be verified, and the upper terminal can be verified, and the handshake information can be verified, the upper terminal can be sent, and the upper terminal can be verified, and the handshake information can be sent.
In the embodiment of the invention, when the working modes of the controller and the upper end are the PWM control modes, the upper end sends PWM signals to the controller within a preset unit time, wherein the PWM signal duty ratios in the PWM signals form a PWM signal duty ratio sequence, then the controller monitors whether the PWM signal duty ratio sequence is a first preset PWM signal duty ratio sequence, if the PWM signal duty ratio sequence is the first preset PWM signal duty ratio sequence, it is determined that the PWM signals contain handshake information, then, the controller returns response information to the upper end aiming at the handshake information, wherein the response information contains verification information, the verification information is used for verifying whether the response information is correct, if the current response information is verified to be correct according to the verification information, the upper end sends mode switching signals to the controller, and the controller switches the PWM control mode to the command control mode according to the mode switching signals.
It should be noted that, in the embodiment of the present invention, the command control mode may be entered only when both the upper end and the fan support the command control mode, and it is understood that, if either one of the upper end and the fan does not support the command control mode, the PWM control mode cannot be switched to the command control mode, that is, the PWM control mode is continuously maintained for fan control, so as to ensure compatibility with the existing scheme.
In an alternative embodiment of the invention, the method comprises the following steps:
if the controller does not return response information aiming at the PWM signal, the upper end sends the PWM signal to the controller again;
and if the controller does not return response information to the PWM signal sent again, the controller does not support the command control mode, and the controller and the upper end maintain the PWM control mode.
In a specific implementation, if the BMC/CPLD at the upper end supports the command control mode and the fan does not support the command control mode, the PWM control mode needs to be maintained at both the controller and the upper end.
In the embodiment of the invention, when the working modes of the controller and the upper end are the PWM control mode, the upper end sends the PWM signal to the controller within the preset unit time, if the controller does not return response information for the PWM signal, the upper end sends the PWM signal to the controller again, if the controller still does not return response information for the PWM signal sent again, the controller can be considered not to support the command control mode, and because the controller does not support the command control mode, the PWM control mode cannot be switched to the command control mode, namely, the controller and the upper end maintain the PWM control mode, so that the rotating speed of the fan is controlled, and the compatibility of the existing scheme is ensured.
In an alternative embodiment of the invention, the method comprises the following steps:
in a preset unit time, if the controller does not receive the PWM signal including the handshake information, the upper terminal does not support the command control mode, and the controller and the upper terminal maintain the PWM control mode.
In a specific implementation, if the fan supports the command control mode and the upper-level BMC/CPLD does not support the command control mode, both the controller and the upper-level end need to maintain the PWM control mode.
In the embodiment of the invention, when the working modes of the controller and the upper end are the PWM control mode, the upper end sends a PWM signal to the controller within a preset unit time, and if the controller does not receive the PWM signal containing handshake information within a preset response time, the upper end can be considered not to support the command control mode, and because the controller does not support the command control mode, the upper end cannot be switched to the command control mode from the PWM control mode, that is, the controller and the upper end maintain the PWM control mode, so as to control the rotation speed of the fan, thereby ensuring the compatibility of the existing schemes.
In an optional embodiment of the present invention, after the switching the PWM control mode to the command control mode according to the mode switching signal, the method further includes:
when the working mode of the controller and the upper end is the command control mode, the upper end sends a query command to the controller at preset unit time intervals; wherein the query command is used to check whether data communication is clear;
if the response time corresponding to the response information sent to the upper end by the controller exceeds the preset response time, the upper end sends a query command to the controller again;
and if the response time of the controller for the query command exceeds the preset response time again, the upper end is switched to the PWM control mode.
Wherein, for the query command, it can be used to check whether the data communication is clear; for the preset response time, a person skilled in the art may adjust the preset response time according to actual needs, which is not limited in the embodiment of the present invention.
In a specific implementation, after the PWM control mode is switched to the command control mode, when the working modes of the controller and the upper end are the command control mode, the upper end sends an inquiry command to the controller at a preset unit time interval, if the response time corresponding to the response information sent by the controller to the upper end exceeds the preset response time, the communication may be abnormal, the upper end sends the inquiry command to the controller again, and if the response time of the controller to the inquiry command exceeds the preset response time again, the upper end is switched to the PWM control mode.
In an optional embodiment of the present invention, after the switching the upper terminal to the PWM control mode if the response time of the controller to the query command exceeds a preset response time again, the method further includes:
if the controller is still in the command control mode, after the preset unit time is exceeded, the controller automatically switches to the PWM control mode, and adjusts the speed of the rotor corresponding to the controller according to the duty ratio of the PWM signal.
In a specific implementation, after the PWM control mode is switched to the command control mode, when the working mode of the controller and the upper end is the command control mode, the upper end sends an inquiry command to the controller at a preset unit time interval, if the response time corresponding to the response information sent by the controller to the upper end exceeds the preset response time, the communication may be abnormal, the upper end sends the inquiry command to the controller again, if the response time of the controller to the inquiry command exceeds the preset response time again, the upper end is switched to the PWM control mode, if the controller is still in the command control mode at this time, the fan can detect that the high and low levels of the PWM/CLK signal line change, but the TACH/DAT signal line does not have a level change, and after the preset time is exceeded, the fan automatically switches back to the PWM mode, and adjusts the speed of the rotor corresponding to the controller by using the duty ratio of the PWM signal, that is, to control the rotating speed of the fan.
The embodiment of the invention also provides an operation method of the fan, the fan comprises a driving circuit, a controller and a motor, the driving circuit drives a rotor of the motor to rotate, the controller is connected with an upper end, the controller and the upper end are provided with a fan management bus control protocol, the fan management bus control protocol is provided with a working mode, and the working mode comprises a PWM control mode and a command control mode; referring to fig. 6, a flowchart illustrating steps of a method for operating a fan provided in an embodiment of the present invention is shown, which may specifically include the following steps:
step 601, when the working mode of the controller and the upper end is the PWM control mode, controlling the rotor speed of the rotor by the PWM signal sent to the controller by the upper end, and feeding back the rotor speed of the rotor corresponding to the controller by the TACH signal output to the upper end by the controller;
for the driving circuit, the driving circuit can drive the motor to rotate the rotor through the driving signal; the rotor is a part in the fan and is connected with fan blades of the fan, namely the rotation of the rotor indicates that the fan starts to rotate; for rotor speed, it may be expressed as fan speed of the fan; for the rotor position, it may be obtained by a rotor position sensor, it should be noted that, for the obtaining manner of the rotor position, a person skilled in the art may select an appropriate device according to actual needs to obtain, and the embodiment of the present invention is not limited to this.
The controller of the fan is connected with an upper end, the upper end is connected to a PWM input detection interface of the controller and a CLK interface of the two-wire serial communication through a PWM/CLK signal line, and the upper end is connected to a TACH signal output interface of the controller and a DAT interface of the two-wire serial communication through a TACH/DAT signal line.
For the upper end, a BMC or a CPLD is generally adopted to control the fan; for the controller, the driving signal corresponding to the motor can be calculated and generated according to the measured rotor position and the sampling signal, and meanwhile, the controller can also measure the duty ratio of the PWM signal; wherein, the sampling signal can be a voltage and/or current signal; for the PWM signal, the PWM signal is a fan speed regulation control signal sent to a controller of the fan by an upper end, the PWM signal comprises a PWM signal duty ratio, and the PWM signal duty ratio can be used for controlling the rotor rotating speed of a rotor, namely the fan rotating speed of the fan; the duty ratio is the proportion of the electrifying time relative to the total time in one pulse cycle.
For the PWM input detection interface, it can be used to obtain the PWM signal sent by the upper end to the controller, that is, obtain the set rotation speed of the rotor, and then the controller can control the rotation speed of the rotor in the fan, that is, the fan rotation speed of the fan according to the set rotation speed.
Specifically, after a controller in the fan sends the TACH signal to an upper end, the upper end can convert the signal frequency by measuring the signal frequency of the TACH signal to obtain the actual rotating speed of the fan.
It should be noted that, for the method for scaling the signal frequency of the TACH signal, a person skilled in the art may adjust the method according to actual needs, and the embodiment of the present invention is not limited to this.
In specific implementation, when the operating mode of the controller and the upper end is a PWM control mode, the upper end in the server sends a PWM signal to the controller in the fan, and the fan can receive the PWM signal sent by the upper end through a PWM/CLK signal line through a PWM input detection interface of the controller, so that the controller can control the rotor rotation speed of the rotor according to the PWM signal, that is, control the fan rotation speed of the fan, and output a TACH signal to a TACH/DAT signal line of the upper end through a TACH signal output interface of the controller, so as to feed back the rotor rotation speed of the rotor corresponding to the controller to the upper end, that is, obtain the rotation speed of the fan through a TACH signal fed back by the controller.
Step 602, when the operating mode of the controller and the upper terminal is the command control mode, transmitting a CLK signal and a DAT signal to the controller through the upper terminal, so that the controller executes a control command formed by the CLK signal and the DAT signal.
In a specific implementation, when the operation mode of the controller and the upper terminal is a command control mode, a signal in the PWM/CLK signal line connecting the upper terminal is switched from a PWM signal to a CLK signal, and a signal in the TACH/DAT signal line connecting the upper terminal is switched from a TACH signal to a DAT signal, so that the controller can receive the CLK signal transmitted by the upper terminal through the PWM/CLK signal line via a CLK interface of the two-wire serial communication of the controller, and receive the DAT signal transmitted by the upper terminal through the TACH/DAT signal line via a DAT interface of the two-wire serial communication of the controller, wherein the CLK signal and the DAT signal can be used for data communication to enable the controller to execute a control command formed by the CLK signal and the DAT signal.
In the embodiment of the invention, when the working mode of the controller and the upper end is the PWM control mode, the PWM input detection interface of the controller receives the PWM signal sent by the upper end through the PWM/CLK signal line, so that the controller controls the rotor rotating speed of the rotor according to the PWM signal, and outputs the TACH signal to the TACH/DAT signal line of the upper end through the TACH signal output interface of the controller so as to feed back the rotor rotating speed of the rotor corresponding to the controller to the upper end; when the working mode of the controller and the upper terminal is a command control mode, the controller receives a CLK signal transmitted by the upper terminal through a PWM/CLK signal line through a CLK interface of the two-wire serial communication of the controller, and receives a DAT signal transmitted by the upper terminal through a TACH/DAT signal line through a DAT interface of the two-wire serial communication of the controller, so that the controller executes a control command formed by the CLK signal and the DAT signal. Through the fan provided by the embodiment of the invention, a hardware circuit and an interface of the existing upper end are not required to be changed, the existing signal line is multiplexed to develop a fan management bus control protocol, a communication control function between the upper end and a controller of the fan is increased, the compatibility with the existing system is ensured, in addition, the controller executes a control command formed by a CLK signal and a DAT signal, the detailed operation data of the fan can be obtained, and the operation state of the fan can be better monitored.
It should be noted that, as for the method embodiment, since it is basically similar to the above embodiment, the description is relatively simple, and for the relevant points, refer to the partial description of the above embodiment. For simplicity of explanation, the described embodiments are intended to be illustrative of a series of acts or combinations of acts, but those skilled in the art will appreciate that the embodiments are not limited by the order of acts, as some steps may occur in other orders or concurrently with other steps in accordance with the embodiments. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
In addition, an embodiment of the present invention further provides an electronic device, including: the processor, the memory, and the computer program stored in the memory and capable of running on the processor, when being executed by the processor, implement each process of the above-mentioned fan operation method embodiment, and can achieve the same technical effect, and for avoiding repetition, details are not described here.
Fig. 7 is a schematic structural diagram of a computer-readable storage medium provided in an embodiment of the present invention.
The embodiment of the present invention further provides a computer-readable storage medium 701, where the computer-readable storage medium 701 stores a computer program, and when the computer program is executed by a processor, the computer program implements each process of the embodiment of the operation method of the fan, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium 701 may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
Fig. 8 is a schematic diagram of a hardware structure of an electronic device implementing various embodiments of the present invention.
The electronic device 800 includes, but is not limited to: a radio frequency unit 801, a network module 802, an audio output unit 803, an input unit 804, a sensor 805, a display unit 806, a user input unit 807, an interface unit 808, a memory 809, a processor 810, and a power supply 811. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 8 does not constitute a limitation of electronic devices, which may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 801 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 810; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 801 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. Further, the radio frequency unit 801 can also communicate with a network and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user via the network module 802, such as to assist the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.
The audio output unit 803 may convert audio data received by the radio frequency unit 801 or the network module 802 or stored in the memory 809 into an audio signal and output as sound. Also, the audio output unit 803 may also provide audio output related to a specific function performed by the electronic apparatus 800 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 803 includes a speaker, a buzzer, a receiver, and the like.
The input unit 804 is used for receiving an audio or video signal. The input Unit 804 may include a Graphics Processing Unit (GPU) 8041 and a microphone 8042, and the Graphics processor 8041 processes image data of still pictures or video obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 806. The image frames processed by the graphics processor 8041 may be stored in the memory 809 (or other storage medium) or transmitted via the radio frequency unit 801 or the network module 802. The microphone 8042 can receive sound, and can process such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 801 in case of the phone call mode.
The electronic device 800 also includes at least one sensor 805, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 8061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 8061 and/or the backlight when the electronic device 800 moves to the ear. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of an electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 805 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 806 is used to display information input by the user or information provided to the user. The Display unit 806 may include a Display panel 8061, and the Display panel 8061 may be configured by a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 807 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic apparatus. Specifically, the user input unit 807 includes a touch panel 8071 and other input devices 8072. The touch panel 8071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 8071 (e.g., operations by a user on or near the touch panel 8071 using a finger, a stylus, or any other suitable object or accessory). The touch panel 8071 may include two portions of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 810, receives a command from the processor 810, and executes the command. In addition, the touch panel 8071 can be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 8071, the user input unit 807 can include other input devices 8072. In particular, other input devices 8072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
Further, the touch panel 8071 can be overlaid on the display panel 8061, and when the touch panel 8071 detects a touch operation on or near the touch panel 8071, the touch operation is transmitted to the processor 810 to determine the type of the touch event, and then the processor 810 provides a corresponding visual output on the display panel 8061 according to the type of the touch event. Although in fig. 8, the touch panel 8071 and the display panel 8061 are two independent components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 8071 and the display panel 8061 may be integrated to implement the input and output functions of the electronic device, and the implementation is not limited herein.
The interface unit 808 is an interface for connecting an external device to the electronic apparatus 800. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 808 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the electronic device 800 or may be used to transmit data between the electronic device 800 and external devices.
The memory 809 may be used to store software programs as well as various data. The memory 809 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 809 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 810 is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, performs various functions of the electronic device and processes data by operating or executing software programs and/or modules stored in the memory 809 and calling data stored in the memory 809, thereby integrally monitoring the electronic device. Processor 810 may include one or more processing units; preferably, the processor 810 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 810.
The electronic device 800 may also include a power supply 811 (e.g., a battery) for powering the various components, and preferably, the power supply 811 may be logically coupled to the processor 810 via a power management system to manage charging, discharging, and power consumption management functions via the power management system.
In addition, the electronic device 800 includes some functional modules that are not shown, and are not described in detail herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a component of' 8230; \8230;" does not exclude the presence of another like element in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one type of logical functional division, and other divisions may be realized in practice, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk or an optical disk, and various media capable of storing program codes.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (20)

1. A fan comprises a driving circuit, a controller and a motor, wherein the driving circuit drives a rotor of the motor to rotate, and the controller is connected with an upper end;
when the working mode of the controller and the upper end is the PWM control mode, the PWM signal sent to the controller by the upper end controls the rotor rotating speed of the rotor, and the TACH signal output to the upper end by the controller feeds back the rotor rotating speed of the rotor corresponding to the controller;
and when the working mode of the controller and the upper terminal is the command control mode, transmitting a CLK signal and a DAT signal to the controller through the upper terminal to enable the controller to execute a control command formed by the CLK signal and the DAT signal.
2. The fan as claimed in claim 1, comprising:
the upper end is connected to a PWM input detection interface of the controller and a CLK interface of the two-wire serial communication through a PWM/CLK signal line, and is connected to a TACH signal output interface of the controller and a DAT interface of the two-wire serial communication through a TACH/DAT signal line.
3. The fan as claimed in claim 2, further comprising:
when the working mode of the controller and the upper end is the PWM control mode, receiving a PWM signal sent by the upper end through the PWM/CLK signal line through a PWM input detection interface of the controller so that the controller controls the rotor rotation speed of the rotor according to the PWM signal, and outputting a TACH signal to a TACH/DAT signal line of the upper end through a TACH signal output interface of the controller so as to feed back the rotor rotation speed of the rotor corresponding to the controller to the upper end;
when the working mode of the controller and the upper bit terminal is the command control mode, the controller receives a CLK signal transmitted by the upper bit terminal through the PWM/CLK signal line through a CLK interface of the two-wire serial communication of the controller, and the controller receives a DAT signal transmitted by the upper bit terminal through the TACH/DAT signal line through a DAT interface of the two-wire serial communication of the controller, so that the controller executes a control command formed by the CLK signal and the DAT signal.
4. The fan as claimed in claim 1, wherein the controller is configured to generate a driving signal of the motor according to a rotor position of the rotor and a sampling signal, so as to control the driving circuit to drive the motor to rotate the rotor according to the driving signal; wherein the sampling signal is at least a voltage and/or current signal.
5. The fan of claim 1 wherein the PWM signal comprises a PWM signal duty cycle, the PWM signal duty cycle being used to control a rotor speed of the rotor.
6. The fan as claimed in claim 5, wherein the PWM signal transmitted to the controller through the upper terminal to control the rotor speed of the rotor comprises:
when the working mode of the controller and the upper end is the PWM control mode, the upper end sends a PWM signal to the controller;
and controlling the rotor rotating speed of the rotor corresponding to the controller according to the PWM signal duty ratio in the PWM signal.
7. The fan as claimed in claim 1, wherein the TACH signal outputted to the upper end by the controller for feeding back the rotor speed of the rotor corresponding to the controller comprises:
when the working modes of the controller and the upper end are the PWM control mode, the controller sends a TACH signal to the upper end;
and measuring the TACH signal frequency of the TACH signal to obtain the rotor rotating speed of the rotor.
8. The fan as claimed in claim 1, comprising:
when the working mode of the controller and the upper end is the PWM control mode, the upper end sends a PWM signal to the controller within a preset unit time; the PWM signal duty ratios in the plurality of PWM signals form a PWM signal duty ratio sequence;
the controller monitors whether the PWM signal duty cycle sequence is a first preset PWM signal duty cycle sequence;
if the PWM signal duty cycle sequence is a first preset PWM signal duty cycle sequence, determining that the PWM signal contains handshake information;
the controller returns response information to the upper end aiming at the handshake information; the response information comprises verification information, and the verification information is used for verifying whether the response information is correct or not;
if the response information is verified to be correct, the upper end sends a mode switching signal to the controller;
and switching the PWM control mode to a command control mode according to the mode switching signal.
9. The fan as claimed in claim 8, wherein the response message is a preset TACH signal frequency sequence, and the mode switching signal is a preset second PWM signal duty cycle sequence.
10. The fan as claimed in claim 8, comprising:
if the controller does not return response information aiming at the PWM signal, the upper end sends the PWM signal to the controller again;
and if the controller does not return response information to the PWM signal sent again, the controller does not support the command control mode, and the controller and the upper end maintain the PWM control mode.
11. The fan as claimed in claim 8, comprising:
and in a preset unit time, if the controller does not receive the PWM signal containing the handshake information, the upper end does not support the command control mode, and the controller and the upper end maintain the PWM control mode.
12. The fan as claimed in claim 8, further comprising, after the switching the PWM control mode to the command control mode according to the mode switching signal:
when the working mode of the controller and the upper end is the command control mode, the upper end sends a query command to the controller at preset unit time intervals; wherein the query command is used to check whether data communication is clear;
if the response time corresponding to the response information sent to the upper end by the controller exceeds the preset response time, the upper end sends a query command to the controller again;
and if the response time of the controller for the query command exceeds the preset response time again, the upper end is switched to the PWM control mode.
13. The fan as claimed in claim 12, further comprising, after the upper terminal switches to the PWM control mode if the response time of the controller to the query command exceeds a preset response time again, the method further comprising:
if the controller is still in the command control mode, after the preset unit time is exceeded, the controller automatically switches to the PWM control mode, and adjusts the speed of the rotor corresponding to the controller according to the duty ratio of the PWM signal.
14. The fan as claimed in claim 1, wherein the control command is used for obtaining basic information of the fan, the basic information of the fan at least comprising: fan model, manufacturer code, fan ID, hard software version, maximum speed, minimum speed, rated voltage, rated power, rated air volume, and rated static pressure.
15. The fan of claim 1, wherein the control commands are further configured to obtain real-time operating data of the fan, the real-time operating data of the fan comprising at least: target rotating speed, actual rotating speed, steering, speed regulation completion mark, voltage, current, power, wind pressure and running duration.
16. The fan as claimed in claim 1, wherein the control command is further used for obtaining fault information of the fan, the fault information of the fan at least comprising: hall faults, MOS faults, over-voltage, under-voltage, over-current, and locked rotor.
17. The fan of claim 1, wherein the control commands are further configured to modify fan parameters, the fan parameters comprising at least: self-defined maximum rotating speed, minimum rotating speed, maximum current, duty ratio rotating speed coefficient and default rotating speed without control signals.
18. An operation method of a fan, wherein the fan comprises a driving circuit, a controller and a motor, the driving circuit drives a rotor of the motor to rotate, and the controller is connected with an upper end, and is characterized in that the controller and the upper end are provided with a fan management bus control protocol, the fan management bus control protocol is provided with working modes, the working modes comprise a PWM control mode and a command control mode, and the method comprises the following steps:
when the working mode of the controller and the upper end is the PWM control mode, the PWM signal sent to the controller by the upper end is used for controlling the rotor speed of the rotor, and the controller outputs a TACH signal to the upper end to feed back the rotor speed of the rotor corresponding to the controller;
and when the working mode of the controller and the upper terminal is the command control mode, transmitting a CLK signal and a DAT signal to the controller through the upper terminal to enable the controller to execute a control command formed by the CLK signal and the DAT signal.
19. An electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
the memory is used for storing a computer program;
the processor, when executing a program stored on the memory, implementing the method of claim 18.
20. A computer-readable storage medium having stored thereon instructions, which when executed by one or more processors, cause the processors to perform the method of claim 18.
CN202310001390.3A 2023-01-03 2023-01-03 Fan, operation method thereof, electronic device and readable storage medium Pending CN115898932A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310001390.3A CN115898932A (en) 2023-01-03 2023-01-03 Fan, operation method thereof, electronic device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310001390.3A CN115898932A (en) 2023-01-03 2023-01-03 Fan, operation method thereof, electronic device and readable storage medium

Publications (1)

Publication Number Publication Date
CN115898932A true CN115898932A (en) 2023-04-04

Family

ID=86471255

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310001390.3A Pending CN115898932A (en) 2023-01-03 2023-01-03 Fan, operation method thereof, electronic device and readable storage medium

Country Status (1)

Country Link
CN (1) CN115898932A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013153551A (en) * 2012-01-24 2013-08-08 Minebea Co Ltd Drive control device for motor, and control system for motor using the same
CN103838696A (en) * 2014-03-24 2014-06-04 杭州叙简科技有限公司 Device and method for plug board management and inter-board signaling reuse
CN207835376U (en) * 2016-03-22 2018-09-07 三菱电机株式会社 Motor and air conditioner
WO2020059779A1 (en) * 2018-09-21 2020-03-26 Ntn株式会社 Motor control device
CN114138697A (en) * 2021-11-26 2022-03-04 苏州浪潮智能科技有限公司 Signal transmission system, signal transmission method, signal transmission device and medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013153551A (en) * 2012-01-24 2013-08-08 Minebea Co Ltd Drive control device for motor, and control system for motor using the same
CN103838696A (en) * 2014-03-24 2014-06-04 杭州叙简科技有限公司 Device and method for plug board management and inter-board signaling reuse
CN207835376U (en) * 2016-03-22 2018-09-07 三菱电机株式会社 Motor and air conditioner
WO2020059779A1 (en) * 2018-09-21 2020-03-26 Ntn株式会社 Motor control device
CN114138697A (en) * 2021-11-26 2022-03-04 苏州浪潮智能科技有限公司 Signal transmission system, signal transmission method, signal transmission device and medium

Similar Documents

Publication Publication Date Title
CN108988421B (en) Battery charging method, charging circuit and terminal
US20140185177A1 (en) Dampness protective apparatus and electronic device using same
US9037878B2 (en) Server rack system
CN109962514B (en) Charging method and mobile terminal
CN108810284B (en) Mode switching method of camera and electronic equipment
CN115589361A (en) Management equipment firmware updating method and device, electronic equipment and storage medium
US20230378767A1 (en) Charging control method and apparatus, electronic device, and charger
JP2788680B2 (en) Electronic device and data input / output control method thereof
CN110868683B (en) Ultrasonic module failure detection method and electronic equipment
CN115898932A (en) Fan, operation method thereof, electronic device and readable storage medium
CN108777627B (en) Power supply method and device
CN115525511A (en) Server management method, system, electronic device and storage medium
US10802451B2 (en) Systems and methods for wireless communications between components of a material processing system
CN115794524A (en) Verification method, verification device, electronic equipment and readable storage medium
CN115567395A (en) Master-slave node determination method and device, electronic equipment and storage medium
CN101686414B (en) Testing device for mobile phone
CN110854950A (en) Charging method, charger and electronic device
CN112256610B (en) Connection control method, system, storage medium and mobile terminal
CN110994052A (en) Method and device for prolonging battery endurance, storage medium and terminal equipment
CN112114649B (en) Temperature adjusting method and device, storage medium and mobile terminal
CN116643631A (en) Server heat dissipation method and device, electronic equipment and storage medium
CN117075949B (en) Voltage conversion chip upgrading method and device, electronic equipment and storage medium
CN117519334A (en) Temperature control method and device for server, electronic equipment and storage medium
CN111405544B (en) Method, apparatus and storage medium for identifying mobile terminal socket
CN111917959B (en) Camera control method and device, storage medium and smart watch

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20230404