CN115263794A - Fan rotating speed adjusting method, device, equipment and medium - Google Patents

Fan rotating speed adjusting method, device, equipment and medium Download PDF

Info

Publication number
CN115263794A
CN115263794A CN202210969167.3A CN202210969167A CN115263794A CN 115263794 A CN115263794 A CN 115263794A CN 202210969167 A CN202210969167 A CN 202210969167A CN 115263794 A CN115263794 A CN 115263794A
Authority
CN
China
Prior art keywords
fan
current
rotating speed
pulse
counting
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
CN202210969167.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.)
Inspur Shandong Computer Technology Co Ltd
Original Assignee
Inspur Shandong Computer 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 Inspur Shandong Computer Technology Co Ltd filed Critical Inspur Shandong Computer Technology Co Ltd
Priority to CN202210969167.3A priority Critical patent/CN115263794A/en
Publication of CN115263794A publication Critical patent/CN115263794A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • FMECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
    • F04POSITIVE - DISPLACEMENT MACHINES FOR LIQUIDS; PUMPS FOR LIQUIDS OR ELASTIC FLUIDS
    • F04DNON-POSITIVE-DISPLACEMENT PUMPS
    • F04D27/00Control, e.g. regulation, of pumps, pumping installations or pumping systems specially adapted for elastic fluids
    • F04D27/004Control, e.g. regulation, of pumps, pumping installations or pumping systems specially adapted for elastic fluids by varying driving speed
    • FMECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
    • F05INDEXING SCHEMES RELATING TO ENGINES OR PUMPS IN VARIOUS SUBCLASSES OF CLASSES F01-F04
    • F05DINDEXING SCHEME FOR ASPECTS RELATING TO NON-POSITIVE-DISPLACEMENT MACHINES OR ENGINES, GAS-TURBINES OR JET-PROPULSION PLANTS
    • F05D2270/00Control
    • F05D2270/01Purpose of the control system
    • F05D2270/02Purpose of the control system to control rotational speed (n)
    • 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
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Mechanical Engineering (AREA)
  • General Engineering & Computer Science (AREA)
  • Control Of Positive-Displacement Air Blowers (AREA)

Abstract

The application discloses a method, a device, equipment and a medium for adjusting the rotating speed of a fan, relates to the technical field of computers, is applied to a complex programmable logic device and comprises the following steps: acquiring current pulse data sent by a temperature sensor through a pulse counting interface; counting according to a preset counting mode based on the current pulse data to obtain the number of pulses, and then determining the current temperature value of the central processing unit based on the number of pulses; and sending a pulse width modulation signal to the fan based on the current temperature value so that the fan determines the current rotating speed according to the duty ratio in the pulse width modulation signal, and controlling the fan to rotate based on the current rotating speed. The complex programmable logic device is communicated with the temperature sensor to obtain the current temperature value of the central processing unit and send a pulse width modulation signal to the fan, the fan can determine the current rotating speed through the duty ratio of the signal and control the fan to rotate, and the automatic adjustment of the rotating speed of the fan is realized to ensure that the working temperature of the central processing unit is normal.

Description

Fan rotating speed adjusting method, device, equipment and medium
Technical Field
The invention relates to the technical field of computers, in particular to a method, a device, equipment and a medium for adjusting the rotating speed of a fan.
Background
A Central Processing Unit (CPU) generates a large amount of heat during use as a core component of a computer, and when the amount of heat generated by the CPU exceeds the amount of heat dissipated by a heat sink, the CPU will raise its temperature, and when the temperature of the CPU exceeds its rated value, the CPU will alarm and possibly stop operating. Not only does the damage caused by the over-temperature of the cpu reduce its performance, but it can cause difficulty in performing many tasks. Therefore, a complete set of heat dissipation system is very important for the cpu. At present, the most common method is to place a fan on the surface of the cpu, and in order to deal with the problem that the heat productivity of the cpu exceeds the heat dissipation capacity when the load is large, the fan needs to be able to automatically adjust the rotation speed according to the temperature of the cpu. Currently, the fan rotation speed control can be realized by a BIOS (Basic Input Output System) or by a single chip module such as STM32 and STC89C52 in combination with a temperature sensor. The former is difficult to realize the automatic adjustment of the central processing unit fan, and the latter belongs to an additional module of a computer mainboard, can increase extra cost and occupies mainboard space.
In summary, how to achieve the automatic adjustment of the fan speed according to the temperature of the cpu is a problem to be solved at present.
Disclosure of Invention
In view of this, the present invention provides a method, an apparatus, a device and a medium for adjusting a fan rotation speed, which can achieve an automatic adjustment of the fan rotation speed according to a temperature of a central processing unit. The specific scheme is as follows:
in a first aspect, the present application discloses a method for adjusting a fan speed, comprising:
acquiring current pulse data sent by a temperature sensor through a pulse counting interface;
counting according to a preset counting mode based on the current pulse data to obtain the number of pulses, and then determining the current temperature value of the central processing unit based on the number of pulses;
and sending a pulse width modulation signal to the fan based on the current temperature value so that the fan determines the current rotating speed according to the duty ratio in the pulse width modulation signal, and controlling the fan to rotate based on the current rotating speed.
Optionally, the counting based on the current pulse data and according to a preset counting manner to obtain the number of pulses includes:
and counting according to a rising edge counting mode based on the current pulse data to obtain the number of pulses.
Optionally, the sending a pulse width modulation signal to the fan based on the current temperature value so that the fan determines the current rotation speed according to the duty ratio in the pulse width modulation signal includes:
and determining a target duty ratio corresponding to the current temperature value based on a preset corresponding relation, and sending a pulse width modulation signal carrying the target duty ratio to a fan, so that the fan determines the current rotating speed according to the target duty ratio in the pulse width modulation signal.
Optionally, the method for adjusting a rotation speed of a fan further includes:
and acquiring the corresponding relation between different temperature values and duty ratios of the central processing unit written in by the user terminal through a preset interface.
Optionally, the method for adjusting a rotation speed of a fan further includes:
and acquiring a TACH signal which is sent by the fan and used for representing the current rotating speed of the fan, and displaying the current rotating speed in a preset display screen.
Optionally, the method for adjusting a rotation speed of a fan further includes:
the current temperature measurement step of switching the pulse counting interface from a low level to a high level through an external pull-up resistor to start the temperature sensor is carried out, and current pulse data are obtained after the temperature measurement is finished; the structure of the pulse counting interface is an open-circuit drain structure, and the temperature measurement mode of the temperature sensor is a single temperature measurement mode.
Optionally, after the current pulse data is acquired after the temperature measurement is finished, the method further includes:
and after a preset time interval, pulling the pulse counting interface to a low level so as to start the next temperature measurement step of the temperature sensor.
In a second aspect, the present application discloses a fan speed adjusting device, which is applied to a complex programmable logic device, and includes:
a pulse data acquisition module for acquiring the pulse data, the pulse counting device is used for acquiring current pulse data sent by the temperature sensor through the pulse counting interface;
the temperature value determining module is used for counting according to a preset counting mode based on the current pulse data to obtain the number of pulses and then determining the current temperature value of the central processing unit based on the number of pulses;
and the rotating speed determining module is used for sending a pulse width modulation signal to the fan based on the current temperature value so that the fan can determine the current rotating speed according to the duty ratio in the pulse width modulation signal and control the fan to rotate based on the current rotating speed.
In a third aspect, the present application discloses an electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the fan speed adjustment method disclosed in the foregoing.
In a fourth aspect, the present application discloses a computer readable storage medium for storing a computer program; wherein the computer program when executed by a processor implements the steps of the fan speed adjustment method disclosed in the foregoing.
Therefore, the current pulse data sent by the temperature sensor through the pulse counting interface is obtained; counting according to a preset counting mode based on the current pulse data to obtain the number of pulses, and then determining the current temperature value of the central processing unit based on the number of pulses; and sending a pulse width modulation signal to the fan based on the current temperature value so that the fan determines the current rotating speed according to the duty ratio in the pulse width modulation signal, and controlling the fan to rotate based on the current rotating speed. Therefore, the temperature sensor with the pulse counting interface is used, the complex programmable logic device is communicated with the temperature sensor to acquire the current pulse data sent by the temperature sensor through the pulse counting interface, so that the current temperature value of the central processing unit is determined according to the current pulse data, then the pulse width modulation signal is sent to the fan based on the current temperature value, and then the fan can determine the current rotating speed through the duty ratio of the signal and control the rotation of the fan based on the current rotating speed. Therefore, the technical scheme can realize the automatic regulation of the rotating speed of the fan according to the temperature of the central processing unit, ensure the normal working temperature of the central processing unit and does not need additional cost.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a method for adjusting a fan speed according to the present disclosure;
FIG. 2 is a schematic illustration of a fan speed adjustment process disclosed herein;
FIG. 3 is a flow chart of a particular fan speed adjustment method disclosed herein;
FIG. 4 is a schematic structural diagram of a fan speed adjustment apparatus according to the present disclosure;
fig. 5 is a block diagram of an electronic device disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
The central processing unit as a core part of the computer generates a large amount of heat in the using process, the temperature is increased when the heat productivity of the central processing unit exceeds the heat discharge quantity of the radiator, and the central processing unit alarms and possibly stops working when the temperature of the central processing unit exceeds the rated value of the central processing unit. The most common method at present is to place a fan on the surface of a central processing unit, and meanwhile, in order to solve the problem that the heating value of the central processing unit exceeds the heat dissipation value when the load is large, the fan is required to automatically adjust the rotating speed according to the temperature of the central processing unit. Currently, the control of the rotating speed of the fan can be realized by a BIOS (basic input output System) brushing mode or by single chip modules such as STM32, STC89C52 and the like in combination with a temperature sensor. The former is difficult to realize the automatic adjustment of the central processing unit fan, and the latter belongs to an additional module of a computer mainboard, can increase extra cost and occupies mainboard space. Therefore, the embodiment of the application discloses a method, a device, equipment and a medium for adjusting the rotating speed of a fan, which can realize the automatic adjustment of the rotating speed of the fan according to the temperature of a central processing unit.
Referring to fig. 1, an embodiment of the present application discloses a method for adjusting a fan rotation speed, which is applied to a complex programmable logic device, and the method includes:
step S11: and acquiring current pulse data sent by the temperature sensor through the pulse counting interface.
In this embodiment, the temperature sensor includes a pulse counting interface, and may monitor temperature data of the target area through the pulse counting interface, and then send the temperature data including the current pulse data to the complex programmable logic device. Namely, the temperature sensor with the pulse counting interface is used, and the complex programmable logic device is used for communicating with the temperature sensor to acquire the current pulse data sent by the temperature sensor through the pulse counting interface. It should be noted that, referring to fig. 2, the pulse counting interface is connected to a GPIO (General Purpose Input/Output Port) pin of the complex programmable logic device through the CPLD _ TR, and communication between the temperature sensor and the complex programmable logic device can be achieved without additional arrangement.
Step S12: counting according to a preset counting mode based on the current pulse data to obtain the number of pulses, and then determining the current temperature value of the central processing unit based on the number of pulses.
In this embodiment, after the complex programmable logic device acquires the current pulse data, the complex programmable logic device counts according to a preset counting manner to obtain the number of pulses, and then determines the current temperature value of the central processing unit based on the number of pulses, which can be specifically calculated by the following formula:
T=PN×0.0625-60;
wherein, T represents the current temperature value of the central processing unit, PN represents the number of pulses, specifically the number of rising edges or falling edges of the pulses. For example, when the number of pulses is 1500, the current temperature value is 33.75 degrees according to the above formula.
Step S13: and sending a pulse width modulation signal to the fan based on the current temperature value so that the fan determines the current rotating speed according to the duty ratio in the pulse width modulation signal, and controlling the fan to rotate based on the current rotating speed.
In this embodiment, as shown in fig. 2, after the complex programmable logic device obtains the current temperature value of the central processing unit, a Pulse Width Modulation (PWM) signal is sent to the fan through the CPLD _ PWM, specifically, a PWM wave, and a duty ratio of the PWM wave determines a rotation speed of the fan. Therefore, after the fan acquires the pulse width modulation signal, the current rotating speed can be determined according to the duty ratio in the pulse width modulation signal, and the fan is controlled to rotate based on the current rotating speed.
Further, the method for adjusting the rotation speed of the fan may further include: and acquiring a TACH signal which is sent by the fan and used for representing the current rotating speed of the fan, and displaying the current rotating speed in a preset display screen. That is, the complex programmable logic device can also read the rotation speed of the fan through the CPLD _ TACH and display the current rotation speed of the fan on a computer screen or other specified display screen. It will be appreciated that the PWM signal is a speed signal provided to the fan by the server system, and the TACH signal is a current speed signal fed back to the server system by the fan itself.
Therefore, the current pulse data sent by the temperature sensor through the pulse counting interface is obtained; counting according to a preset counting mode based on the current pulse data to obtain the number of pulses, and then determining the current temperature value of the central processing unit based on the number of pulses; and sending a pulse width modulation signal to the fan based on the current temperature value so that the fan can determine the current rotating speed according to the duty ratio in the pulse width modulation signal, and controlling the fan to rotate based on the current rotating speed. Therefore, the temperature sensor with the pulse counting interface is used, the complex programmable logic device is communicated with the temperature sensor to acquire the current pulse data sent by the temperature sensor through the pulse counting interface, so that the current temperature value of the central processing unit is determined according to the current pulse data, then the pulse width modulation signal is sent to the fan based on the current temperature value, and then the fan can determine the current rotating speed through the duty ratio of the signal and control the rotation of the fan based on the current rotating speed. Therefore, the technical scheme can realize the automatic regulation of the rotating speed of the fan according to the temperature of the central processing unit, ensure the normal working temperature of the central processing unit and does not need additional cost.
Referring to fig. 3, the embodiment of the present application discloses a specific method for adjusting the rotation speed of a fan, and compared with the previous embodiment, the present embodiment further describes and optimizes the technical solution. The method specifically comprises the following steps:
step S21: and acquiring current pulse data sent by the temperature sensor through the pulse counting interface.
In this example, the temperature measuring step of the temperature sensor may include: the current temperature measurement step of switching the pulse counting interface from a low level to a high level through an external pull-up resistor to start the temperature sensor is carried out, and current pulse data are obtained after the temperature measurement is finished; the pulse counting interface is of an open-circuit drain structure, and the temperature measuring mode of the temperature sensor is a single temperature measuring mode. It is understood that the temperature sensor has a pulse counting interface and the pulse counting interface is an open drain structure, the temperature measurement mode set by the temperature sensor is a single temperature measurement mode, called a frame, and as shown in fig. 2, when the 4.7K pull-up resistor pulls the pulse counting interface from low to high, the current temperature measurement step of the temperature sensor can be started. Specifically, the temperature sensor starts to work and measure temperature in three steps, the temperature sensor firstly checks configuration and sets a working mode, the time spent is set to be 2ms, then temperature measurement is carried out, the duration time of the temperature measurement is 14ms, in single-equipment application, the transmission time is 36ms, and then temperature data with pulse counting is sent to the complex programmable logic device.
It should be noted that, since the temperature sensor adopts the single-time temperature measurement mode, after a frame time, the temperature sensor enters the standby mode until the pulse counting interface is pulled low. Accordingly, the above method further comprises: and pulling the pulse counting interface to a low level after a preset time interval so as to start the next temperature measurement step of the temperature sensor. That is, after the temperature data is collected once, the pulse counting interface is pulled down after the fixed time is set in the complex programmable logic device, the control on the pulse counting interface is released after the duration time is 2ms and 2ms, and the temperature sensor starts a new round of temperature measurement, namely, the next temperature measurement step of the temperature sensor is started.
Step S22: and counting according to a rising edge counting mode based on the current pulse data to obtain the number of pulses, and then determining the current temperature value of the central processing unit based on the number of pulses.
In this embodiment, the preset counting manner is specifically a rising edge counting manner. It can be understood that the instant when the digital level changes from 0 to 1 is called a rising edge, the instant from 1 to 0 is called a falling edge, and the rising edge is a inching action collected at the instant when the potential of a certain point changes from low potential to high potential.
Step S23: and determining a target duty ratio corresponding to the current temperature value based on a preset corresponding relation, and sending a pulse width modulation signal carrying the target duty ratio to a fan, so that the fan determines the current rotating speed according to the target duty ratio in the pulse width modulation signal, and controls the fan to rotate based on the current rotating speed.
In this embodiment, a target duty ratio corresponding to the current temperature value is determined according to a preset corresponding relationship, and a pulse width modulation signal carrying the target duty ratio is sent to the fan, so that the fan determines the current rotating speed according to the target duty ratio. It should be noted that the method further includes: and acquiring the corresponding relation between different temperature values and duty ratios of the central processing unit written in by the user terminal through a preset interface. That is, the corresponding PWM duty ratios at different temperatures of the central processing unit are first obtained and written into the complex programmable logic device through the preset interface, where the upper limit is the duty ratio corresponding to the temperature when the central processing unit is fully loaded. Therefore, after the complex programmable logic device obtains the current temperature value of the central processing unit, the PWM wave with the corresponding duty ratio is output to the fan, the fan of the central processing unit can reach the corresponding rotating speed, and therefore the heat dissipation amount of the central processing unit can be guaranteed to be larger than the heat productivity no matter what load the central processing unit reaches.
In this embodiment, the temperature sensor supports multiple devices (up to 9 sensors) to be connected to the same pulse counting interface, and the heat dissipation adjustment of multiple fans on the motherboard can be realized through different address codes from 0 to 8. The pulse counting interface can monitor the temperature data of nine zones simultaneously.
For a more specific processing procedure of the step S21, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
It can be seen that in the embodiment of the present application, current pulse data sent by a temperature sensor through a pulse counting interface is obtained, counting is performed according to a rising edge counting manner based on the current pulse data to obtain a pulse number, then a current temperature value of a central processing unit is determined based on the pulse number, a target duty ratio corresponding to the current temperature value is determined based on a preset corresponding relationship, and a pulse width modulation signal carrying the target duty ratio is sent to a fan, so that the fan determines a current rotating speed according to the target duty ratio in the pulse width modulation signal, and the fan is controlled to rotate based on the current rotating speed. Therefore, in the application, the pulse number can be obtained by counting according to the current pulse data in a rising edge counting mode, and after the current temperature value is determined according to the pulse number, the PWM wave with the corresponding duty ratio is output to the fan according to the preset corresponding relation, so that the fan reaches the corresponding rotating speed and is controlled to rotate. According to the technical scheme, the rotation speed of the fan can be automatically adjusted according to the temperature of the central processing unit, the working temperature of the central processing unit is guaranteed to be normal, and extra cost is not needed.
Referring to fig. 4, an embodiment of the present application discloses a fan speed adjusting apparatus, which is applied to a complex programmable logic device, and the method includes:
the pulse data acquisition module 11 is used for acquiring current pulse data sent by the temperature sensor through the pulse counting interface;
the temperature value determining module 12 is configured to count according to a preset counting manner based on the current pulse data to obtain the number of pulses, and then determine a current temperature value of the central processing unit based on the number of pulses;
and a rotation speed determining module 13, configured to send a pulse width modulation signal to the fan based on the current temperature value, so that the fan determines a current rotation speed according to a duty ratio in the pulse width modulation signal, and controls rotation of the fan based on the current rotation speed.
Therefore, the current pulse data sent by the temperature sensor through the pulse counting interface is obtained; counting according to a preset counting mode based on the current pulse data to obtain the number of pulses, and then determining the current temperature value of the central processing unit based on the number of pulses; and sending a pulse width modulation signal to the fan based on the current temperature value so that the fan determines the current rotating speed according to the duty ratio in the pulse width modulation signal, and controlling the fan to rotate based on the current rotating speed. Therefore, the temperature sensor with the pulse counting interface is used, the complex programmable logic device is communicated with the temperature sensor to acquire the current pulse data sent by the temperature sensor through the pulse counting interface, so that the current temperature value of the central processing unit is determined according to the current pulse data, then the pulse width modulation signal is sent to the fan based on the current temperature value, and then the fan can determine the current rotating speed through the duty ratio of the signal and control the rotation of the fan based on the current rotating speed. Therefore, the technical scheme can realize the automatic regulation of the rotating speed of the fan according to the temperature of the central processing unit, ensure the normal working temperature of the central processing unit and does not need additional cost.
In some specific embodiments, the temperature value determining module 12 may specifically include:
and the pulse count determining unit is used for counting according to a rising edge counting mode based on the current pulse data to obtain the number of pulses.
In some specific embodiments, the rotation speed determining module 13 may specifically include:
and the target duty ratio determining unit is used for determining a target duty ratio corresponding to the current temperature value based on a preset corresponding relation and sending a pulse width modulation signal carrying the target duty ratio to the fan, so that the fan determines the current rotating speed according to the target duty ratio in the pulse width modulation signal.
In some embodiments, the fan speed adjusting device may further include:
and the corresponding relation acquisition unit is used for acquiring the corresponding relation between different temperature values and duty ratios of the central processing unit written in by the user terminal through a preset interface.
In some embodiments, the fan speed adjusting device may further include:
and the rotating speed display unit is used for acquiring a TACH signal which is sent by the fan and used for representing the current rotating speed of the fan, and displaying the current rotating speed in a preset display screen.
In some embodiments, the fan speed adjusting device may further include:
the temperature measurement starting unit is used for controlling the pulse counting interface to be converted from a low level to a high level through an external pull-up resistor so as to start the current temperature measurement step of the temperature sensor, and obtaining current pulse data after the temperature measurement is finished; the structure of the pulse counting interface is an open-circuit drain structure, and the temperature measurement mode of the temperature sensor is a single temperature measurement mode.
In some specific embodiments, after the temperature measurement starting unit, the method may further include:
and the next temperature measurement starting unit is used for pulling the pulse counting interface to a low level after a preset time interval so as to start the next temperature measurement step of the temperature sensor.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The method specifically comprises the following steps: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. Wherein the memory 22 is adapted to store a computer program, which is loaded and executed by the processor 21, to implement the steps of:
acquiring current pulse data sent by a temperature sensor through a pulse counting interface;
counting according to a preset counting mode based on the current pulse data to obtain the number of pulses, and then determining the current temperature value of the central processing unit based on the number of pulses;
and sending a pulse width modulation signal to the fan based on the current temperature value so that the fan determines the current rotating speed according to the duty ratio in the pulse width modulation signal, and controlling the fan to rotate based on the current rotating speed.
In some embodiments, the processor may specifically implement the following steps by executing the computer program stored in the memory:
and counting according to a rising edge counting mode based on the current pulse data to obtain the number of pulses.
In some embodiments, the processor, by executing the computer program stored in the memory, may specifically implement the following steps:
and determining a target duty ratio corresponding to the current temperature value based on a preset corresponding relation, and sending a pulse width modulation signal carrying the target duty ratio to a fan so that the fan determines the current rotating speed according to the target duty ratio in the pulse width modulation signal.
In some embodiments, the processor may specifically implement the following steps by executing the computer program stored in the memory:
and acquiring the corresponding relation between different temperature values and duty ratios of the central processing unit written in by the user terminal through a preset interface.
In some embodiments, the processor may specifically implement the following steps by executing the computer program stored in the memory:
and acquiring a TACH signal which is sent by the fan and used for representing the current rotating speed of the fan, and displaying the current rotating speed in a preset display screen.
In some embodiments, the processor, by executing the computer program stored in the memory, may specifically implement the following steps:
the current temperature measurement step of switching the pulse counting interface from a low level to a high level through an external pull-up resistor to start the temperature sensor is carried out, and current pulse data are obtained after the temperature measurement is finished; the structure of the pulse counting interface is an open-circuit drain structure, and the temperature measurement mode of the temperature sensor is a single temperature measurement mode.
In some embodiments, the processor, by executing the computer program stored in the memory, may specifically implement the following steps:
and after a preset time interval, pulling the pulse counting interface to a low level so as to start the next temperature measurement step of the temperature sensor.
In this embodiment, the power supply 23 is configured to provide a working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and a communication protocol followed by the communication interface is any communication protocol applicable to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to obtain external input data or output data to the outside, and a specific interface type thereof may be selected according to specific application requirements, which is not specifically limited herein.
The processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 21 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 21 may further include an AI (Artificial Intelligence) processor for processing a calculation operation related to machine learning.
In addition, the storage 22 is used as a carrier for storing resources, and may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., the resources stored thereon include an operating system 221, a computer program 222, data 223, etc., and the storage may be a transient storage or a permanent storage.
The operating system 221 is used for managing and controlling each hardware device on the electronic device 20 and the computer program 222, so as to implement the operation and processing of the mass data 223 in the memory 22 by the processor 21, which may be Windows, unix, linux, or the like. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the fan speed adjustment method performed by the electronic device 20 disclosed in any of the foregoing embodiments. The data 223 may include data received by the electronic device and transmitted from an external device, or may include data collected by the input/output interface 25 itself.
Further, an embodiment of the present application further discloses a computer-readable storage medium, where a computer program is stored in the storage medium, and when the computer program is loaded and executed by a processor, the method steps executed in the fan speed adjustment process disclosed in any of the foregoing embodiments are implemented.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the components and steps of the various examples have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. 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 application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, 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 phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
The above detailed description is provided for the method, apparatus, device and storage medium for adjusting the fan speed, and the specific examples are applied herein to explain the principle and the implementation of the present invention, and the description of the above embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A fan rotating speed adjusting method is applied to a complex programmable logic device and comprises the following steps:
acquiring current pulse data sent by a temperature sensor through a pulse counting interface;
counting according to a preset counting mode based on the current pulse data to obtain the number of pulses, and then determining the current temperature value of the central processing unit based on the number of pulses;
and sending a pulse width modulation signal to the fan based on the current temperature value so that the fan can determine the current rotating speed according to the duty ratio in the pulse width modulation signal, and controlling the fan to rotate based on the current rotating speed.
2. The method for adjusting the rotation speed of a fan according to claim 1, wherein the counting based on the current pulse data and according to a preset counting mode to obtain the number of pulses comprises:
and counting according to a rising edge counting mode based on the current pulse data to obtain the number of pulses.
3. The method as claimed in claim 1, wherein the step of sending a pwm signal to the fan based on the current temperature value, so that the fan determines the current rotation speed according to the duty ratio of the pwm signal comprises:
and determining a target duty ratio corresponding to the current temperature value based on a preset corresponding relation, and sending a pulse width modulation signal carrying the target duty ratio to a fan, so that the fan determines the current rotating speed according to the target duty ratio in the pulse width modulation signal.
4. The fan speed adjustment method according to claim 3, further comprising:
and acquiring the corresponding relation between different temperature values and duty ratios of the central processing unit written in by the user terminal through a preset interface.
5. The fan speed adjustment method according to claim 1, further comprising:
and acquiring a TACH signal which is sent by the fan and used for representing the current rotating speed of the fan, and displaying the current rotating speed in a preset display screen.
6. The fan speed adjustment method according to any one of claims 1 to 5, characterized by further comprising:
the current temperature measurement step of switching the pulse counting interface from a low level to a high level through an external pull-up resistor to start the temperature sensor is carried out, and current pulse data are obtained after the temperature measurement is finished; the structure of the pulse counting interface is an open-circuit drain structure, and the temperature measurement mode of the temperature sensor is a single temperature measurement mode.
7. The method according to claim 6, wherein after the current pulse data is acquired after the temperature measurement is finished, the method further comprises:
and after a preset time interval, pulling the pulse counting interface to a low level so as to start the next temperature measurement step of the temperature sensor.
8. A fan speed adjusting device is characterized in that the fan speed adjusting device is applied to a complex programmable logic device and comprises:
the pulse data acquisition module is used for acquiring current pulse data sent by the temperature sensor through the pulse counting interface;
the temperature value determining module is used for counting according to a preset counting mode based on the current pulse data to obtain the number of pulses and then determining the current temperature value of the central processing unit based on the number of pulses;
and the rotating speed determining module is used for sending a pulse width modulation signal to the fan based on the current temperature value so that the fan can determine the current rotating speed according to the duty ratio in the pulse width modulation signal and control the fan to rotate based on the current rotating speed.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to carry out the steps of the fan speed adjustment method according to any one of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program; wherein the computer program when executed by a processor performs the steps of the fan speed adjustment method as claimed in any one of claims 1 to 7.
CN202210969167.3A 2022-08-12 2022-08-12 Fan rotating speed adjusting method, device, equipment and medium Pending CN115263794A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210969167.3A CN115263794A (en) 2022-08-12 2022-08-12 Fan rotating speed adjusting method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210969167.3A CN115263794A (en) 2022-08-12 2022-08-12 Fan rotating speed adjusting method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN115263794A true CN115263794A (en) 2022-11-01

Family

ID=83751001

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210969167.3A Pending CN115263794A (en) 2022-08-12 2022-08-12 Fan rotating speed adjusting method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN115263794A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024109237A1 (en) * 2022-11-24 2024-05-30 苏州元脑智能科技有限公司 Fan rotation speed control method and apparatus, and device and non-volatile readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024109237A1 (en) * 2022-11-24 2024-05-30 苏州元脑智能科技有限公司 Fan rotation speed control method and apparatus, and device and non-volatile readable storage medium

Similar Documents

Publication Publication Date Title
US10846160B2 (en) System and method for remote system recovery
EP1734436A1 (en) Automatically controlling processor mode of multi-core processor
US20090327656A1 (en) Efficiency-based determination of operational characteristics
US20130166832A1 (en) Methods and electronic devices for adjusting the operating frequency of a memory
CN104007806A (en) Method and device for controlling CPU frequency in Android system and equipment
CN114138098B (en) Power consumption adjusting method and device, storage device and readable storage medium
CN115263794A (en) Fan rotating speed adjusting method, device, equipment and medium
CN113075982A (en) Server intelligent network card heat dissipation method, device, system and medium
CN103488532A (en) Method and equipment for adjusting processor frequency
US20070006162A1 (en) Method, terminal device and computer software for changing the appearance of a visual program representative
TWI557551B (en) Electronic apparatus and wake-up method thereof
TW201013384A (en) Server energy saving management system and method thereof
CN110611127B (en) Battery management method, device, storage medium and electronic equipment
WO2023197456A1 (en) System, method, apparatus and device for adjusting power consumption, and medium
WO2023134315A1 (en) Current value obtaining method and device, and non-volatile readable storage medium
CN111277173A (en) Motor starting control method and device, electrical equipment and storage medium
CN106940582A (en) A kind of control method and electronic equipment
CN116321995A (en) Fan rotating speed control device, method, equipment and medium of air cooling server
JP2004164530A (en) Battery condition reading method by operation system of portable computer
CN110285581A (en) Anti-overflow control method, device and system and cooker
CN110989814A (en) Server protection method, device and equipment
US20210349516A1 (en) Energy saving device and method for saving energy in data center
CN115201611B (en) Method for testing VR power supply stability of CPU and related components
CN117421186B (en) Method, device, system and storage medium for adjusting server operation parameters
CN117312100B (en) Power consumption adjustment method, system, device, equipment and computer storage medium

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