High-frequency high-precision pwm control method and system based on general io port and storage medium
By using a high-frequency, high-precision PWM control method based on general-purpose I/O ports, the problems of large instantaneous changes in the state of controlled equipment and low control accuracy in heat pump units are solved, resulting in extended equipment life, reduced costs, and improved accuracy.
Patent Information
- Application Number
- CN202310778178.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-28
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2043-06-28
AI Technical Summary
In existing heat pump units, the state of the controlled equipment changes rapidly, which can easily damage the equipment and result in low control accuracy.
A high-frequency, high-precision PWM control method based on general-purpose I/O ports is adopted. By acquiring the status information of the fan and water pump, configuring the working mode of the timer, and outputting high-frequency PWM control signals to smoothly adjust the equipment status, the speed of the fan and water pump is controlled by general-purpose I/O ports.
It extends the service life of fans and pumps, simplifies circuit board design, reduces production costs, and improves the accuracy and anti-interference capability of the control system.
Smart Images

Figure CN116753640B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to, but is not limited to, the technical field of PWM control, and particularly relates to a high-frequency high-precision PWM control method and system based on a general IO port and a storage medium. BACKGROUND
[0002] A heat pump unit is a device for transferring heat energy of a low-temperature heat source to a high-temperature heat source, and the heat pump unit can realize refrigeration and heating.
[0003] Currently, a heat pump unit usually comprises controlled devices such as a fan and a water pump, and a complex analog circuit is usually used to control the operating states of the controlled devices respectively. When the controlled devices are adjusted, the state values of the controlled devices change instantaneously with a large amplitude, the controlled devices are easily damaged, and the control precision of the control system is low. SUMMARY
[0004] The following is a summary of the subject matter of the detailed description herein. This summary is not intended to limit the scope of the claims.
[0005] The application provides a high-frequency high-precision PWM control method and system based on a general IO port and a storage medium, which can gently adjust the operating states of a fan and a water pump, prolong the service life of the fan and the water pump, and improve the control precision of the control system.
[0006] To achieve the above object, the first aspect of the embodiment of the present application proposes a high-frequency high-precision PWM control method based on a general IO port, applied to a PWM control system, wherein the PWM control system comprises a heat pump unit, an input module and a drive board, the heat pump unit comprises a fan, a water pump, a first detection module and a second detection module, the fan comprises a first driver and a first motor, the water pump comprises a second driver and a second motor, the drive board is provided with a control module and a plurality of PWM control interfaces, the control module is in communication connection with the input module, the first detection module and the second detection module are respectively in electrical connection with the control module, the control module comprises a timer and a plurality of general IO ports, the PWM control interface is in electrical connection with the corresponding general IO port, the first driver is in electrical connection with one of the PWM control interfaces, the second driver is in electrical connection with another PWM control interface, and the method comprises the following steps: acquiring first state information detected by the first detection module and second state information detected by the second detection module, wherein the first state information is used to indicate the running state of the fan, and the second state information is used to indicate the running state of the water pump; determining heat pump state information according to the first state information and the second state information; in response to a control instruction sent by the input module, determining target state information according to the control instruction; configuring the working mode of the timer according to the heat pump state information and the target state information; based on the configured timer, controlling the general IO port corresponding to the first driver to output a first PWM control signal and controlling the general IO port corresponding to the second driver to output a second PWM control signal, wherein the first PWM control signal is used to make the first driver adjust the rotating speed of the first motor, and the second PWM control signal is used to make the second driver adjust the rotating speed of the second motor.
[0007] In some embodiments, the configuring the working mode of the timer according to the heat pump state information and the target state information comprises: determining an initial interrupt time group according to the heat pump state information, and determining a target interrupt time group according to the target state information; performing interpolation processing between the initial interrupt time group and the target interrupt time group based on a preset linear interpolation algorithm to obtain a plurality of sequentially arranged interpolation interrupt time groups; determining a plurality of sequentially connected configuration time periods of the timer according to a preset state update duration, wherein the configuration time period at the head end corresponds to the initial interrupt time group, the configuration time period at the tail end corresponds to the target interrupt time group, and the remaining configuration time periods correspond to the interpolation interrupt time groups; configuring the working mode of the timer based on the initial interrupt time group in the configuration time period corresponding to the initial interrupt time group; configuring the working mode of the timer based on the interpolation interrupt time group in the configuration time period corresponding to the interpolation interrupt time group; and configuring the working mode of the timer based on the target interrupt time group in the configuration time period corresponding to the target interrupt time group.
[0008] In some embodiments, the initial interrupt time group includes a first interrupt time and a second interrupt time, the target interrupt time group includes a third interrupt time and a fourth interrupt time, the first interrupt time and the third interrupt time are used to indicate the duration of a first level in a PWM control signal, and the second interrupt time and the fourth interrupt time are used to indicate the duration of a second level in a PWM control signal. The interpolation processing between the initial interrupt time group and the target interrupt time group to obtain a plurality of sequentially arranged interpolation interrupt time groups comprises: performing interpolation processing between the first interrupt time and the third interrupt time to obtain a plurality of sequentially arranged first interpolation interrupt times; performing interpolation processing between the second interrupt time and the fourth interrupt time to obtain a plurality of sequentially arranged second interpolation interrupt times; and determining an interpolation interrupt time group according to the first interpolation interrupt time and the corresponding second interpolation interrupt time.
[0009] The second aspect of the embodiment of the present application provides a PWM control system, comprising: a heat pump unit, comprising a fan, a water pump, a first detection module and a second detection module, the fan comprising a first driver and a first motor, the water pump comprising a second driver and a second motor; an input module; a drive board provided with a control module and a plurality of PWM control interfaces, the control module being in communication connection with the input module, the first detection module and the second detection module being respectively in electrical connection with the control module, the control module comprising a timer and a plurality of general-purpose IO ports, the PWM control interfaces being in electrical connection with corresponding general-purpose IO ports, the first driver being in electrical connection with one of the PWM control interfaces, the second driver being in electrical connection with another PWM control interface, and the control module being used for executing the high-frequency high-precision PWM control method based on the general-purpose IO port of the first aspect.
[0010] In some embodiments, the drive board is further provided with a rectifier module and a first voltage reduction module, the first voltage reduction module being connected with the rectifier module, the rectifier module being used for rectifying an alternating current input voltage into a direct current power supply voltage, and the first voltage reduction module being used for reducing the direct current power supply voltage into a first power supply voltage and a second power supply voltage.
[0011] In some embodiments, the first voltage reduction module comprises a multi-winding transformer, a power management chip, a patch diode and a second optocoupler, a first input end of the multi-winding transformer being connected with a first output end of the rectifier module, a second input end of the multi-winding transformer being connected with a drain port of the power management chip, the multi-winding transformer comprising a first secondary winding and a second secondary winding, the first secondary winding being used for outputting the first power supply voltage, the second secondary winding being used for outputting the second power supply voltage, a first output end of the first secondary winding being connected with a negative electrode of the patch diode, the negative electrode of the patch diode being connected with an anode of the second optocoupler, a cathode of the second optocoupler being grounded, a collector of the second optocoupler being connected with an under-voltage port of the power management chip, and an emitter of the second optocoupler being connected with a source port of the power management chip.
[0012] In some embodiments, the drive board is further provided with a second voltage reduction module and a third voltage reduction module, the second voltage reduction module being connected with the first secondary winding, the third voltage reduction module being connected with the second secondary winding, the second voltage reduction module being used for reducing the first power supply voltage into a third power supply voltage, the third voltage reduction module being used for reducing the second power supply voltage into a fourth power supply voltage, the alternating current input voltage being 220V, the direct current power supply voltage being 310V, the first power supply voltage being 12V, the second power supply voltage being 15V, and the third power supply voltage and the fourth power supply voltage both being 5V.
[0013] In some embodiments, the input module comprises a control panel for collecting the control instructions
[0014] To achieve the above object, a third aspect of embodiments of the present application provides an electronic device, comprising a memory and a processor, the memory stores a computer program, and the processor implements the general IO port based high-frequency high-precision PWM control method according to the first aspect when executing the computer program.
[0015] To achieve the above object, a fourth aspect of embodiments of the present application provides a storage medium, which is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the general IO port based high-frequency high-precision PWM control method according to the first aspect.
[0016] The application provides a high-frequency high-precision PWM control method and system based on a general IO port and a storage medium. The application comprises the following steps: obtaining first state information detected by a first detection module, and obtaining second state information detected by a second detection module, wherein the first state information is used for indicating the running state of the fan, and the second state information is used for indicating the running state of the water pump; determining heat pump state information according to the first state information and the second state information; determining target state information according to a control instruction sent by an input module in response to the control instruction; configuring the working mode of a timer according to the heat pump state information and the target state information; controlling the general IO port corresponding to the first driver to output a first PWM control signal and controlling the general IO port corresponding to the second driver to output a second PWM control signal based on the configured timer, wherein the first PWM control signal is used for enabling the first driver to adjust the rotating speed of the first motor, and the second PWM control signal is used for enabling the second driver to adjust the rotating speed of the second motor. According to the application, the heat pump state information is determined according to the first state information and the second state information, then the target state information is determined according to the control instruction, and then the state difference between the running states of the fan and the water pump before and after adjustment is determined according to the heat pump state information and the target state information, so that the working mode of the timer is configured, the first PWM control signal output by the general IO port can gently adjust the running state of the fan, the second PWM control signal output by the general IO port can gently adjust the running state of the water pump, the working life of the fan and the water pump is prolonged, in addition, the control module can control one general IO port to output the first PWM control signal and control another general IO port to output the second PWM control signal, so that the speed control of the fan and the water pump is realized through the general IO port of the control module, a PWM controller is not needed, the circuit board can be simplified, the number of the general IO ports of the control module is large, one control module can control multiple controlled devices of the heat pump unit at the same time, the number of the control modules can be reduced, the production cost of the control system is reduced, the control system is not easily interfered by signals, and the control precision of the control system is improved.
[0017] Other features and advantages of the present application will be set forth in the following description, and in part will be apparent from the description, or can be learned by practice of the present application. The objects and other advantages of the present application will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings. BRIEF DESCRIPTION OF DRAWINGS
[0018] The accompanying drawings are used to provide further understanding of the technical solutions of the present application, and constitute a part of the specification, and are used to explain the technical solutions of the present application together with the embodiments of the present application, and do not constitute a limitation to the technical solutions of the present application.
[0019] Figure 1 is a flow chart of a high-frequency high-precision PWM control method based on a general IO port provided by an embodiment of the present application;
[0020] Figure 2 is a flow chart of a method for configuring a working mode of a timer provided by another embodiment of the present application;
[0021] Figure 3 is a flow chart of a method for determining an interpolation interrupt time group provided by another embodiment of the present application;
[0022] Figure 4 is an optional system block diagram of a PWM control system provided by an embodiment of the present application;
[0023] Figure 5 is another optional system block diagram of a PWM control system provided by an embodiment of the present application;
[0024] Figure 6 is an optional structural schematic diagram of a driving board provided by an embodiment of the present application;
[0025] Figure 7 is an optional circuit schematic diagram of a control module provided by an embodiment of the present application;
[0026] Figure 8 is an optional circuit schematic diagram of an output isolation circuit provided by an embodiment of the present application;
[0027] Figure 9 is an optional circuit schematic diagram of a rectification module provided by an embodiment of the present application;
[0028] Figure 10 is an optional circuit schematic diagram of a first voltage reduction module provided by an embodiment of the present application;
[0029] Figure 11 is an optional circuit schematic diagram of a second voltage reduction module provided by an embodiment of the present application;
[0030] Figure 12 is an optional circuit schematic diagram of a third voltage reduction module provided by an embodiment of the present application;
[0031] Figure 13 is an optional circuit schematic diagram of an input isolation circuit provided by an embodiment of the present application;
[0032] Figure 14An optional structural diagram of the control panel provided by the embodiment of the present application is shown in the following figure.
[0033] Figure 15 Another optional system block diagram of the PWM control system provided by the embodiment of the present application is shown in the following figure.
[0034] Figure 16 A hardware structural diagram of the electronic device provided by another embodiment of the present application is shown in the following figure. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical solutions and advantages of the present application more clear, the present application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0036] In the description of the present application, the meaning of several is one or more, the meaning of multiple is more than two, greater than, less than, more than, etc. are understood as not including the number, above, below, within, etc. are understood as including the number.
[0037] It should be noted that although the functional modules are divided in the device schematic diagram, and the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order from the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims or above figures are used to distinguish similar objects, and do not necessarily describe a specific order or sequence.
[0038] At present, for a heat pump unit usually including controlled devices such as a fan and a water pump, a complex analog circuit is usually used to control the running state of each controlled device respectively. When adjusting the controlled device, the state value of the controlled device changes instantaneously with a large amplitude, which is easy to damage the controlled device, and the control precision of the control system is low.
[0039] To address the problems of large instantaneous changes in the state values of controlled equipment during adjustment, which can easily damage the controlled equipment and result in low control precision of the control system, this application provides a high-frequency, high-precision PWM control method, system, and storage medium based on general-purpose I / O ports. The method includes: acquiring first state information detected by a first detection module and acquiring second state information detected by a second detection module, wherein the first state information indicates the operating state of a fan, and the second state information indicates the operating state of a water pump; determining heat pump state information based on the first and second state information; determining target state information based on a control command sent by an input module; configuring the operating mode of a timer based on the heat pump state information and the target state information; and controlling the output of a first PWM control signal from a general-purpose I / O port corresponding to a first driver and the output of a second PWM control signal from a general-purpose I / O port corresponding to a second driver based on the configured timer, wherein the first PWM control signal is used to cause the first driver to adjust the speed of a first motor, and the second PWM control signal is used to cause the second driver to adjust the speed of a second motor. According to the solution provided in this application embodiment, the heat pump status information is determined by the first status information and the second status information, and then the target status information is determined by the control command. Furthermore, the difference in the operating states of the fan and water pump before and after adjustment is simultaneously determined by the heat pump status information and the target status information. Then, the working mode of the timer is configured so that the first PWM control signal output from the general-purpose I / O port can smoothly adjust the operating state of the fan, and the second PWM control signal output from the general-purpose I / O port can smoothly adjust the operating state of the water pump, thereby extending the service life of the fan and water pump. In addition, the control module can control one general-purpose I / O port to output the first PWM control signal and another general-purpose I / O port to output the second PWM control signal. Therefore, speed control of the fan and water pump is achieved through the general-purpose I / O ports of the control module, eliminating the need for a PWM controller, simplifying the circuit board. Moreover, the control module has a large number of general-purpose I / O ports, allowing one control module to simultaneously control multiple controlled devices of the heat pump unit, reducing the number of control modules and thus lowering the production cost of the control system. Furthermore, it is less susceptible to signal interference, improving the control accuracy of the control system.
[0040] The high-frequency, high-precision PWM control method, system, and storage medium based on general-purpose I / O ports provided in this application are specifically described through the following embodiments. First, the high-frequency, high-precision PWM control method based on general-purpose I / O ports in this application embodiment is described.
[0041] The embodiments of this application will be further described below with reference to the accompanying drawings.
[0042] like Figure 1 As shown, Figure 1A flowchart of a high-frequency high-precision PWM control method based on a general IO port is provided for an embodiment of the present application. The high-frequency high-precision PWM control method based on a general IO port can be applied to a PWM control system, which includes a heat pump unit, an input module, and a drive board. The heat pump unit includes a fan, a water pump, a first detection module, and a second detection module. The fan includes a first driver and a first motor, and the water pump includes a second driver and a second motor. The drive board is provided with a control module and a plurality of PWM control interfaces. The control module is in communication connection with the input module. The first detection module and the second detection module are respectively in electrical connection with the control module. The control module includes a timer and a plurality of general IO ports. The PWM control interfaces are in electrical connection with the corresponding general IO ports. The first driver is in electrical connection with one of the PWM control interfaces, and the second driver is in electrical connection with another PWM control interface. The high-frequency high-precision PWM control method based on a general IO port includes but is not limited to the following steps S110 to S150:
[0043] Step S110, obtaining first state information detected by the first detection module and second state information detected by the second detection module;
[0044] Step S120, determining heat pump state information according to the first state information and the second state information;
[0045] Step S130, in response to a control instruction sent by the input module, determining target state information according to the control instruction;
[0046] Step S140, configuring a working mode of the timer according to the heat pump state information and the target state information;
[0047] Step S150, controlling the general IO port corresponding to the first driver to output a first PWM control signal and controlling the general IO port corresponding to the second driver to output a second PWM control signal based on the configured timer.
[0048] Among them, the first state information is used to indicate the running state of the fan, and the second state information is used to indicate the running state of the water pump.
[0049] Among them, the first PWM control signal is used to make the first driver adjust the rotating speed of the first motor, and the second PWM control signal is used to make the second driver adjust the rotating speed of the second motor.
[0050] The first detection module can be a speed sensor, which can detect the speed of the first motor. The first state information is speed state information. The second detection module can be a speed sensor, which can detect the speed of the first motor. The second state information is speed state information. The target state information includes the first target speed state information of the first motor and the second target speed state information of the second motor. The first detection module and the second detection module can also be other types of sensors, such as temperature sensors. This embodiment of the application does not limit the types of sensors used.
[0051] It is understandable that a general-purpose input / output (GPIO) port refers to a type of I / O port in a control module. Pulse Width Modulation (PWM) is a technique used to regulate the output signal in electronic devices. PWM controls the average level of a signal by changing its pulse width. By occupying different channels of a timer, different duty cycles of the first and second PWM control signals can be generated based on the timer. Based on this, the heat pump status information is determined through the first and second status information, and then the target status information is determined through control instructions. Furthermore, by using the heat pump status information and the target status information, the state difference between the fan and water pump before and after regulation is determined, and the timer's operating mode is configured so that the first PWM control signal output from the general-purpose I / O port can smoothly regulate the fan's operating state. Furthermore, the second PWM control signal output from the general-purpose I / O port can smoothly adjust the operating state of the water pump, thereby extending the service life of the fan and water pump. In addition, the control module can control one general-purpose I / O port to output the first PWM control signal and another general-purpose I / O port to output the second PWM control signal. Therefore, speed control of the fan and water pump can be achieved through the general-purpose I / O ports of the control module without the need for a PWM controller, which simplifies the circuit board. Moreover, the control module has a large number of general-purpose I / O ports, and one control module can control multiple controlled devices of the heat pump unit at the same time, which can reduce the number of control modules, thereby reducing the production cost of the control system. It is also less susceptible to signal interference, which can improve the control accuracy of the control system.
[0052] Specifically, the fan is a direct current fan, the control module is a RYSE MCU, the MCU chip model is R7FC90, and the corresponding general IO port can output a 1000HZ PWM control signal based on the 16-bit timer of the RYSE MCU. The accuracy of the duty cycle can be accurate to 0.025%, which is relatively high. Because the period is 1ms, the oscillation of the MCU is 16MHz, the timer is 4 times of frequency division, and 100 / (1 / ((1000 / 16000000)*4))=0.025%. Moreover, by using the RYSE MCU with the chip model R7FC90, a high-frequency PWM control signal can be output, and the running state of the fan and the water pump can be effectively controlled.
[0053] In the control method provided in the embodiments of the present application, a high-frequency and high-precision PWM control signal can be output, which is mainly realized by changing the interrupt time before and after the timer in real time. For example, taking a PWM signal with a frequency of 1000Hz and a frequency of 80.025% as an example, every two adjacent interrupts are a group, the total time of each group is 1ms, the interrupt time of the first time of each group is set to 800.25ms, at the first interrupt, the output of the corresponding general IO port is flipped based on the interrupt service function, and then the interrupt time of the second time is set to 1000-800.025=199.975ms. At the second interrupt, the output of the corresponding general IO port is flipped again based on the interrupt service function, and the interrupt time of the next time is changed. As can be seen, because every two adjacent interrupts are a group, the interrupt time of the first time and the second time in each group can be changed in real time, and a high-frequency and high-precision PWM control signal can be generated.
[0054] In the control method provided in the embodiments of the present application, a high-frequency and high-precision PWM control signal can be output, which is mainly realized by changing the interrupt time before and after the timer in real time. For example, taking a PWM signal with a frequency of 1000Hz and a frequency of 80.025% as an example, every two adjacent interrupts are a group, the total time of each group is 1ms, the interrupt time of the first time of each group is set to 800.25ms, at the first interrupt, the output of the corresponding general IO port is flipped based on the interrupt service function, and then the interrupt time of the second time is set to 1000-800.025=199.975ms. At the second interrupt, the output of the corresponding general IO port is flipped again based on the interrupt service function, and the interrupt time of the next time is changed. As can be seen, because every two adjacent interrupts are a group, the interrupt time of the first time and the second time in each group can be changed in real time, and a high-frequency and high-precision PWM control signal can be generated.
[0055] In the control method provided in the embodiments of the present application, a high-frequency and high-precision PWM control signal can be output, which is mainly realized by changing the interrupt time before and after the timer in real time. For example, taking a PWM signal with a frequency of 1000Hz and a frequency of 80.025% as an example, every two adjacent interrupts are a group, the total time of each group is 1ms, the interrupt time of the first time of each group is set to 800.25ms, at the first interrupt, the output of the corresponding general IO port is flipped based on the interrupt service function, and then the interrupt time of the second time is set to 1000-800.025=199.975ms. At the second interrupt, the output of the corresponding general IO port is flipped again based on the interrupt service function, and the interrupt time of the next time is changed. As can be seen, because every two adjacent interrupts are a group, the interrupt time of the first time and the second time in each group can be changed in real time, and a high-frequency and high-precision PWM control signal can be generated.
[0056] In addition, with reference to Figure 2 In an embodiment, Figure 1Step S140 in the illustrated embodiment includes, but is not limited to, the following steps:
[0057] Step S210, determining an initial interruption time group according to the heat pump state information, and determining a target interruption time group according to the target state information;
[0058] Step S220, performing interpolation processing between the initial interruption time group and the target interruption time group based on a preset linear interpolation algorithm, to obtain a plurality of sequentially arranged interpolation interruption time groups;
[0059] Step S230, determining a plurality of sequentially connected configuration time periods of the timer according to a preset state update duration;
[0060] Step S240, configuring the working mode of the timer based on the initial interruption time group within the configuration time period corresponding to the initial interruption time group;
[0061] Step S250, configuring the working mode of the timer based on the interpolation interruption time group within the configuration time period corresponding to the interpolation interruption time group;
[0062] Step S260, configuring the working mode of the timer based on the target interruption time group within the configuration time period corresponding to the target interruption time group.
[0063] Among them, the configuration time period located at the head end corresponds to the initial interruption time group, the configuration time period located at the tail end corresponds to the target interruption time group, and the remaining configuration time periods correspond to the interpolation interruption time groups.
[0064] Among them, the state update duration refers to the time required to adjust from the current state to the target state, for example, it can be set to 1 second, which is not limited in the embodiments of the present application.
[0065] Based on this, the initial duty cycle of the PWM control signal at the current time can be determined through the heat pump state information, and the target duty cycle of the PWM control signal at the target time can be determined through the target state information. The duty cycle of the PWM control signal refers to the ratio of the high level time to the period of the square wave. For example, if the high level time is 1 second and the low level time is 1 second in one period of the PWM control signal, the duty cycle of the PWM control signal is 50%. The initial interrupt time group can be determined through the initial duty cycle, and the target interrupt time group can be adjusted through the target duty cycle. Through interpolation processing between the initial interrupt time group and the target interrupt time group, a plurality of sequentially arranged interpolation interrupt time groups can be obtained. Since each interpolation interrupt time group is linearly changed, the duty cycle of the PWM control signal corresponding to each interpolation interrupt time group is also linearly changed. Therefore, the running state of the fan can be gradually adjusted through the gradually changed first PWM control signal, and the running state of the water pump can be gradually adjusted through the gradually changed second PWM control signal, thereby prolonging the service life of the fan and the water pump.
[0066] Exemplarily, it is assumed that the state update duration is 1 second, and 5 configuration time periods are determined. The first configuration time period corresponds to 0-0.2 seconds, the second configuration time period corresponds to 0.2-0.4 seconds, the third configuration time period corresponds to 0.4-0.6 seconds, the fourth configuration time period corresponds to 0.6-0.8 seconds, and the fifth configuration time period corresponds to 0.8-1 second. The first configuration time period corresponds to the initial interrupt time group, and the fifth configuration time period corresponds to the target interrupt time group. It is assumed that 3 interpolation interrupt time groups are generated through interpolation processing. If more than 3 interpolation interrupt time groups are generated, 3 interpolation interrupt time groups are sequentially selected from all the interpolation interrupt time groups. The second configuration time period to the fourth configuration time period correspond to the above-mentioned 3 interpolation interrupt time groups, respectively.
[0067] In addition, with reference to Figure 3 In an embodiment, the initial interrupt time group includes a first interrupt time and a second interrupt time, and the target interrupt time group includes a third interrupt time and a fourth interrupt time. The first interrupt time and the third interrupt time are used to indicate the duration of a first level in the PWM control signal, and the second interrupt time and the fourth interrupt time are used to indicate the duration of a second level in the PWM control signal. Figure 2 The step S220 in the illustrated embodiment includes but is not limited to the following steps:
[0068] Step S310: Interpolation processing is performed between the first interrupt time and the third interrupt time to obtain a plurality of sequentially arranged first interpolation interrupt times.
[0069] Step S320: Interpolation processing is performed between the second interrupt time and the fourth interrupt time to obtain a plurality of sequentially arranged second interpolation interrupt times.
[0070] Step S330, determining the interpolation interrupt time group according to the first interpolation interrupt time and the corresponding second interpolation interrupt time.
[0071] It can be understood that when the first PWM control signal is generated, the first interrupt time can correspond to the duration of the high level in the first PWM control signal, and the second interrupt time can correspond to the duration of the low level in the first PWM control signal. For example, a PWM control signal with a frequency of 1000 Hz and a pulse width of 80% is needed. By setting the first interrupt time as t1 and the second interrupt time as t2, t1 / (t1+t2) = 80% can be obtained. Similarly, when the second PWM control signal is generated, the third interrupt time can correspond to the duration of the high level in the second PWM control signal, and the fourth interrupt time can correspond to the duration of the low level in the second PWM control signal, thereby obtaining reliable first PWM control signal and second PWM control signal.
[0072] With reference to Figures 4 to 7 , the embodiment of the application provides a PWM control system, comprising:
[0073] The heat pump unit 300 comprises a fan 310, a water pump 320, a first detection module 341 and a second detection module 342. The fan 310 comprises a first driver 311 and a first motor 312. The water pump 320 comprises a second driver 321 and a second motor 322.
[0074] The input module 100;
[0075] The drive board 200 is provided with a control module 210 and a plurality of PWM control interfaces 222. The control module 210 is in communication connection with the input module 100. The first detection module 341 and the second detection module 342 are respectively in electrical connection with the control module 210. The control module 210 comprises a timer 211 and a plurality of general-purpose IO ports 212. The PWM control interface 222 is in electrical connection with the corresponding general-purpose IO port 212. The first driver 311 is in electrical connection with one of the PWM control interfaces 222. The second driver 321 is in electrical connection with another PWM control interface 222. The control module 210 is used to execute the high-frequency high-precision PWM control method based on the general-purpose IO port.
[0076] It can be understood that the specific implementation of the above-mentioned PWM control system is based on the same inventive concept as the above-mentioned high-frequency high-precision PWM control method based on the general-purpose IO port. The operation state of the fan 310 and the water pump 320 can be adjusted smoothly, the service life of the fan 310 and the water pump 320 can be prolonged, and the control precision of the control system can be improved.
[0077] In addition, with reference to Figure 8In some embodiments of the present application, the drive board 200 is further provided with an output isolation circuit 230, the output isolation circuit 230 comprising a first optocoupler 231, a first isolation resistor 232 and a first isolation capacitor 233, an anode of the first optocoupler 231 being configured to be connected to a first power supply voltage, a cathode of the first optocoupler 231 being connected to the general IO port 212, a collector of the first optocoupler 231 being configured to be connected to a second power supply voltage, an emitter of the first optocoupler 231 being connected to the PWM control interface 222, one end of the first isolation resistor 232 being connected to a first output end of the first optocoupler 231, the other end of the first isolation resistor 232 being grounded, and the first isolation capacitor 233 being connected in parallel with the first isolation resistor 232.
[0078] It can be understood that, by arranging the output isolation circuit 230, the PWM control signal can be prevented from being interfered by signals, and the control accuracy of the control system can be improved.
[0079] In addition, referring to Figure 9 and Figure 10 In some embodiments of the present application, the drive board 200 is further provided with a rectification module 240 and a first voltage reduction module 250, the first voltage reduction module 250 being connected to the rectification module 240, the rectification module 240 being configured to rectify an alternating input voltage into a direct current power supply voltage, and the first voltage reduction module 250 being configured to reduce the direct current power supply voltage into the first power supply voltage and the second power supply voltage.
[0080] It can be understood that, by the rectification processing of the rectification module 240, a direct current control power supply of the motor for control can be obtained, and then by the voltage reduction processing of the first voltage reduction module 250, the first power supply voltage and the second power supply voltage can be obtained, wherein the first power supply voltage and the second power supply voltage can both be used to supply power for the first driver 311 or the second driver 321.
[0081] In addition, referring to Figure 10In some embodiments of the present application, the first voltage reduction module 250 comprises a multi-winding transformer 251, a power management chip 254, a patch diode 255, and a second optocoupler 256. The first input end of the multi-winding transformer 251 is connected with the first output end of the rectifier module 240. The second input end of the multi-winding transformer 251 is connected with the drain port of the power management chip 254. The multi-winding transformer 251 comprises a first secondary winding 252 and a second secondary winding 253. The first secondary winding 252 is used for outputting a first supply voltage. The second secondary winding 253 is used for outputting a second supply voltage. The first output end of the first secondary winding 252 is connected with the negative electrode of the patch diode 255. The negative electrode of the patch diode 255 is connected with the anode of the second optocoupler 256. The cathode of the second optocoupler 256 is grounded. The collector of the second optocoupler 256 is connected with the under-voltage port of the power management chip 254. The emitter of the second optocoupler 256 is connected with the source port of the power management chip 254.
[0082] It can be understood that, by arranging the power management chip 254, the first voltage reduction module 250 can be protected by voltage regulation. When the output voltage of the first secondary winding 252 is too high, the patch diode 255 will be broken down, and the second optocoupler 256 will be in a conducting state, so that the source and under-voltage port of the power management chip 254 are conducted, the working frequency of the power management chip 254 can be reduced, and thus the output voltage of the second secondary winding 253 can be reduced. This can effectively prevent the output voltage of the second secondary winding 253 from being too high, avoid damaging other components, and thus prolong the service life of the control system.
[0083] In addition, with reference to Figure 11 and Figure 12 In some embodiments of the present application, the drive board 200 is further provided with a second voltage reduction module 260 and a third voltage reduction module 270. The second voltage reduction module 260 is connected with the first secondary winding 252. The third voltage reduction module 270 is connected with the second secondary winding 253. The second voltage reduction module 260 is used for reducing the first supply voltage to a third supply voltage. The third voltage reduction module 270 is used for reducing the second supply voltage to a fourth supply voltage. The alternating current input voltage is 220V. The direct current supply voltage is 310V. The first supply voltage is 12V. The second supply voltage is 15V. The third supply voltage and the fourth supply voltage are both 5V.
[0084] It can be understood that, by arranging the second voltage reduction module 260, the voltage of the first supply voltage can be further reduced to obtain the third supply voltage. By arranging the third voltage reduction module 270, the voltage of the second supply voltage can be further reduced to obtain the fourth supply voltage. The third supply voltage and the fourth supply voltage can be used to supply power to the control module 210, which can meet the more power supply requirements of the control system.
[0085] The voltage values of the alternating current input voltage, the direct current supply voltage, the first supply voltage, the second supply voltage, the third supply voltage and the fourth supply voltage are defined, so that the normal operation of the control system can be ensured.
[0086] It should be noted that, before being put into use, it is necessary to test whether the direct current supply voltage, the second supply voltage, the third supply voltage and the fourth supply voltage are within the preset voltage standard range.
[0087] In addition, with reference to Figure 13 , some embodiments of the present application, the drive board 200 is further provided with an input isolation circuit 280, the input isolation circuit 280 includes a third optocoupler 281, a second isolation resistor 282 and a second isolation capacitor 283, the anode of the third optocoupler 281 is used to connect the second supply voltage, the cathode of the third optocoupler 281 is used to connect the feedback output port of the fan 310, the collector of the third optocoupler 281 is connected with the feedback input port of the control module 210, the emitter of the third optocoupler 281 is grounded, one end of the second isolation resistor 282 is used to connect the first supply voltage, the other end of the second isolation resistor 282 is connected with the collector of the third optocoupler 281, one end of the second isolation capacitor 283 is connected with the collector of the third optocoupler 281, the other end of the second isolation capacitor 283 is connected with the emitter of the third optocoupler 281.
[0088] It can be understood that the feedback output port of the fan 310 is used to output a feedback signal, by setting the input isolation circuit 280, the feedback signal can be prevented from being interfered by signals, and the reliability of the control system can be improved.
[0089] In addition, some embodiments of the present application include a plurality of drive boards 200, a plurality of fans 310 and a plurality of water pumps 320, the fan 310 is connected with the corresponding drive board 200, and the water pump 320 is connected with the corresponding drive board 200.
[0090] It can be understood that when the number of the water pump 320 or the fan 310 is too large, the number of the controlled devices of the heat pump unit 300 is large, and a single drive board 200 cannot control all the controlled devices, a plurality of drive boards 200 can be set, each drive board 200 is used to drive a certain number of controlled devices, so that each controlled device can be effectively controlled, for example, one of the drive boards 200 can be configured to control the fan 310, and the other drive board 200 can be configured to control the water pump 320.
[0091] In addition, with reference to Figure 14 , some embodiments of the present application, the input module 100 includes a control panel 110, the control panel 110 is used to collect control instructions.
[0092] It can be understood that the control instruction can be accurately input in the operation panel 110, the accuracy of the rotating speed control is effectively improved, and the convenience is improved.
[0093] It should be noted that the input module 100 can include the operation panel 110 and the dot matrix line control panel, the operation panel 110 is arranged on the dot matrix line control panel, the driving board 200 and the dot matrix line control panel can be provided with an RS485 communication module, the driving board 200 is provided with a first communication port, the control module 210 is connected with the first communication port through the RS485 communication module, the dot matrix line control panel is provided with a second communication port, the operation panel 110 is connected with the second communication port through the RS485 communication module, the first communication port is electrically connected with the second communication port, so that the signal transmission between the operation panel 110 and the driving board 200 can be realized.
[0094] In addition, the wireless communication module can also be arranged on the driving board 200, the control module 210 is electrically connected with the wireless communication module, when the wireless communication module is an infrared receiving module, the control module 210 can receive the rotating speed control instruction from the infrared remote controller through the infrared receiving module, and then perform the subsequent rotating speed control operation; when the wireless communication module is a WIFI module, the control module 210 can receive the rotating speed control instruction from the terminal device such as a mobile phone, a tablet computer and the like through the WIFI module, and then perform the subsequent rotating speed control operation.
[0095] In addition, with reference to Figure 15 , in some embodiments of the present application, the driving board 200 is further provided with an auxiliary control interface 223, the control module 210 is electrically connected with the auxiliary control interface 223, the heat pump unit 300 further includes an auxiliary controlled module 330, the auxiliary control interface 223 is electrically connected with the auxiliary controlled module 330, and the auxiliary controlled module 330 at least includes one of a swing drive and a buzzer.
[0096] It can be understood that the heat pump unit 300 can also have the auxiliary controlled module 330, for example, the auxiliary controlled module 330 is a swing drive in the indoor unit for controlling the swing of the air guide blade, the auxiliary controlled module 330 can also be a buzzer in the unit for emitting an alarm sound or a prompt sound, the control module 210 can send corresponding control signals to each auxiliary controlled module 330 through the auxiliary control interface 223, so as to control the operating state of each auxiliary controlled module 330, and the reliability of the control system is improved.
[0097] In addition, with reference to Figure 16 , Figure 16 a hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0098] The processor 1601 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, and is configured to execute related programs to implement the technical solutions provided by the embodiments of the present application.
[0099] The memory 1602 can be implemented by a ROM (Read Only Memory), a static storage device, a dynamic storage device, or a RAM (Random Access Memory), and the like. The memory 1602 can store an operating system and other application programs. When the technical solutions provided by the embodiments of the present application are implemented by software or firmware, the related program codes are stored in the memory 1602 and are called and executed by the processor 1601 to implement the high-frequency high-precision PWM control method based on a general-purpose IO port provided by the embodiments of the present application. For example, the processor 1601 is configured to execute the method steps S110 to S150 in the method 100, Figure 1 the method steps S210 to S260 in the method 200, Figure 2 the method steps S310 to S330 in the method 300. Figure 3
[0100] The input / output interface 1603 is configured to realize information input and output.
[0101] The communication interface 1604 is configured to realize the communication interaction between the device and other devices. The communication can be realized by a wired manner (for example, a USB, a network cable, or the like) or a wireless manner (for example, a mobile network, WIFI, Bluetooth, or the like).
[0102] The bus 1605 is configured to transmit information between various components (for example, the processor 1601, the memory 1602, the input / output interface 1603, and the communication interface 1604) of the device.
[0103] The processor 1601, the memory 1602, the input / output interface 1603, and the communication interface 1604 are connected to each other by the bus 1605 to realize the communication connection between the devices.
[0104] The embodiments of the present application also provide a storage medium, which is a computer readable storage medium, and is configured to store computer readable information. The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the high-frequency high-precision PWM control method based on a general-purpose IO port, for example, to execute the method steps S110 to S150 in the method 100, Figure 1 the method steps S210 to S260 in the method 200,the method steps S310 to S330 in the method 300.Figure 2 the method steps S210 to S260 in the method of Figure 3 the method steps S310 to S330 in the method of
[0105] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory can include a high-speed random access memory and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory that is remotely located with respect to the processor, and these remotely located memories can be connected to the processor through a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0106] The high-frequency high-precision PWM control method and system based on the general IO port and the storage medium provided by the embodiments of the present application obtain first state information detected by a first detection module and second state information detected by a second detection module, wherein the first state information is used to indicate the running state of the fan, and the second state information is used to indicate the running state of the water pump; the heat pump state information is determined according to the first state information and the second state information; the target state information is determined according to the control instruction sent by the input module in response to the control instruction; the working mode of the timer is configured according to the heat pump state information and the target state information; the general IO port corresponding to the first driver outputs the first PWM control signal based on the configured timer, and the general IO port corresponding to the second driver outputs the second PWM control signal, wherein the first PWM control signal is used to make the first driver adjust the rotating speed of the first motor, and the second PWM control signal is used to make the second driver adjust the rotating speed of the second motor. Based on this, the heat pump state information is determined through the first state information and the second state information, and then the target state information is determined through the control instruction, and then the state difference between the running states of the fan and the water pump before and after adjustment is determined through the heat pump state information and the target state information, and then the working mode of the timer is configured, so that the first PWM control signal output by the general IO port can gently adjust the running state of the fan, and the second PWM control signal output by the general IO port can gently adjust the running state of the water pump, thereby prolonging the service life of the fan and the water pump. In addition, the control module can control one general IO port to output the first PWM control signal and control another general IO port to output the second PWM control signal, so that the speed control of the fan and the water pump is realized through the general IO port of the control module, without the need to equip a PWM controller, which can simplify the circuit board. Moreover, the number of general IO ports of the control module is large, one control module can control multiple controlled devices of the heat pump unit at the same time, the number of control modules can be reduced, thereby reducing the production cost of the control system, and the control system is not easy to be interfered by signals, and the control accuracy of the control system can be improved.
[0107] The embodiments described in the embodiments of the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
[0108] Those skilled in the art can understand that, Figures 1 to 3 The technical solutions shown in the foregoing embodiments do not constitute a limitation on the embodiments of the present application, and can include more or fewer steps, or combine certain steps, or different steps.
[0109] The apparatus embodiments described above are merely exemplary, and the units described as separate units can or can not be physically separate, i.e., can be located in one place, or can be distributed over multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment.
[0110] Those skilled in the art can understand that all or some of the steps in the method disclosed above, the functional modules / units in the system and the device can be implemented as software, firmware, hardware and appropriate combinations thereof.
[0111] The terms "first", "second", "third", "fourth" and the like in the description of the application and in the claims of the foregoing drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of the terms so construed can be interchanged, such that, for example, without departing from the scope of the application, the embodiments described herein can be carried out in a different order than the one illustrated or described herein. In addition, the terms "comprising", "having" and any variations thereof are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or apparatus that comprises a list of steps or units not necessarily limited to those explicitly listed, but can include other not expressly listed or inherent to such processes, methods, products or apparatus.
[0112] It should be understood that in the present application, "at least one" means one or more, and "multiple" means two or more. "And / or" is used to describe the relationship between the associated objects, which means that there can be three relationships, for example, "A and / or B" can mean that there are three cases: only A, only B, and A and B at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0113] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented by other manners. For example, the apparatus embodiments described above are merely illustrative, for example, the division of the above units is merely a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some interfaces, apparatuses or units, and can be electrical, mechanical or other forms.
[0114] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they can be located in one place or 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 embodiment.
[0115] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0116] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part of the prior art that makes a contribution or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method of each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program storage media.
[0117] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, but this does not limit the scope of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the embodiments of the present application.
Claims
1. A general IO port-based high-frequency high-precision PWM control method, characterized in that, The application is applied to a PWM control system, the PWM control system comprises a heat pump unit, an input module and a drive board, the heat pump unit comprises a fan, a water pump, a first detection module and a second detection module, the fan comprises a first driver and a first motor, the water pump comprises a second driver and a second motor, the drive board is provided with a control module and a plurality of PWM control interfaces, the control module is in communication connection with the input module, the first detection module and the second detection module are respectively in electrical connection with the control module, the control module comprises a timer and a plurality of general IO ports, the PWM control interface is in electrical connection with the corresponding general IO port, the first driver is in electrical connection with one of the PWM control interfaces, the second driver is in electrical connection with another PWM control interface, and the method comprises: obtaining first state information detected by the first detection module and second state information detected by the second detection module, wherein the first state information is used to indicate the running state of the fan, and the second state information is used to indicate the running state of the water pump; determining heat pump state information according to the first state information and the second state information; determining target state information according to the control instruction sent by the input module in response to the control instruction; configuring the working mode of the timer according to the heat pump state information and the target state information; controlling the general IO port corresponding to the first driver to output a first PWM control signal and controlling the general IO port corresponding to the second driver to output a second PWM control signal based on the configured timer, wherein the first PWM control signal is used to make the first driver adjust the rotating speed of the first motor, and the second PWM control signal is used to make the second driver adjust the rotating speed of the second motor; wherein, according to the heat pump state information and the target state information, configuring the working mode of the timer comprises: determining an initial interrupt time group according to the heat pump state information, and determining a target interrupt time group according to the target state information; based on a preset linear interpolation algorithm, performing interpolation processing between the initial interrupt time group and the target interrupt time group to obtain a plurality of sequentially arranged interpolation interrupt time groups; determining a plurality of sequentially connected configuration time periods of the timer according to a preset state update time length, wherein the configuration time period at the head end corresponds to the initial interrupt time group, the configuration time period at the tail end corresponds to the target interrupt time group, and the remaining configuration time periods correspond to the interpolation interrupt time groups; in the configuration time period corresponding to the initial interrupt time group, configuring the working mode of the timer based on the initial interrupt time group; in the configuration time period corresponding to the interpolation interrupt time group, configuring the working mode of the timer based on the interpolation interrupt time group; in the configuration time period corresponding to the target interrupt time group, configuring the working mode of the timer based on the target interrupt time group.
2. The method of claim 1, wherein, The initial interruption time group includes a first interruption time and a second interruption time, and the target interruption time group includes a third interruption time and a fourth interruption time, the first interruption time and the third interruption time are used to indicate the duration of a first level in a PWM control signal, and the second interruption time and the fourth interruption time are used to indicate the duration of a second level in the PWM control signal, and the interpolation processing is performed between the initial interruption time group and the target interruption time group to obtain a plurality of sequentially arranged interpolation interruption time groups, including: interpolation processing between the first interruption time and the third interruption time to obtain a plurality of sequentially arranged first interpolation interruption times; interpolation processing between the second interruption time and the fourth interruption time to obtain a plurality of sequentially arranged second interpolation interruption times; determining an interpolation interruption time group according to the first interpolation interruption time and the corresponding second interpolation interruption time.
3. A PWM control system characterized by comprising: The heat pump unit includes a fan, a water pump, a first detection module and a second detection module, the fan includes a first driver and a first motor, and the water pump includes a second driver and a second motor; an input module; a drive board provided with a control module and a plurality of PWM control interfaces, the control module is in communication connection with the input module, the first detection module and the second detection module are respectively in electrical connection with the control module, the control module includes a timer and a plurality of general-purpose IO ports, the PWM control interface is in electrical connection with the corresponding general-purpose IO port, the first driver is in electrical connection with one of the PWM control interfaces, and the second driver is in electrical connection with another PWM control interface, and the control module is used to execute the high-frequency high-precision PWM control method based on the general-purpose IO port in any one of claims 1-2. The drive board is further provided with a rectifier module and a first voltage reduction module, the first voltage reduction module is connected with the rectifier module, the rectifier module is used to rectify alternating current input voltage into direct current power supply voltage, and the first voltage reduction module is used to reduce the direct current power supply voltage into first power supply voltage and second power supply voltage.
4. The PWM control system of claim 3, wherein, The first voltage reduction module includes a multi-winding transformer, a power management chip, a patch diode and a second optocoupler, a first input end of the multi-winding transformer is connected with a first output end of the rectifier module, a second input end of the multi-winding transformer is connected with a drain port of the power management chip, the multi-winding transformer includes a first secondary winding and a second secondary winding, the first secondary winding is used to output the first power supply voltage, and the second secondary winding is used to output the second power supply voltage, a first output end of the first secondary winding is connected with a negative electrode of the patch diode, the negative electrode of the patch diode is connected with an anode of the second optocoupler, a cathode of the second optocoupler is grounded, a collector of the second optocoupler is connected with an under-voltage port of the power management chip, and an emitter of the second optocoupler is connected with a source port of the power management chip.
5. The PWM control system of claim 4, wherein, 6. The PWM control system of claim 5, wherein, The driving board is further provided with a second voltage reduction module and a third voltage reduction module, the second voltage reduction module is connected with the first auxiliary winding, the third voltage reduction module is connected with the second auxiliary winding, the second voltage reduction module is used for reducing the first power supply voltage to a third power supply voltage, the third voltage reduction module is used for reducing the second power supply voltage to a fourth power supply voltage, the alternating current input voltage is 220V, the direct current power supply voltage is 310V, the first power supply voltage is 12V, the second power supply voltage is 15V, and the third power supply voltage and the fourth power supply voltage are both 5V.
7. The PWM control system of claim 3, wherein, The input module comprises a control panel, and the control panel is used for collecting the control instruction.
8. An electronic device, comprising: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the general IO port-based high-frequency high-precision PWM control method in any one of claims 1 to 2 when executing the computer program.
9. A storage medium storing a computer program, characterized by The computer program is executed by the processor to implement the general IO port-based high-frequency high-precision PWM control method in any one of claims 1 to 2.
Citation Information
Patent Citations
Freezing and refrigerating storage / box with cloud function
CN102759251A
Refrigerator, home appliance, and method of operating the same
CN103913042A