A dual-mode powered desktop circulating fan control circuit and a control method thereof

By working together with the protocol detection module and the voltage conversion module, stable power supply for the desktop circulating fan under different Type-C power adapters was achieved, solving compatibility issues and improving user experience and efficiency.

CN123184481APending Publication Date: 2026-11-27DONGGUAN EXCEL IND
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611018111.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-09
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing desktop circulating fans are incompatible with PD high-voltage and ordinary low-voltage Type-C power adapters, resulting in unstable and inefficient power supply. Furthermore, ordinary boost solutions are inefficient or can damage the circuitry.

Method used

The adapter type is identified by a protocol detection module, and the control module automatically switches between direct supply and boost mode. The voltage conversion module provides 12V power supply, and the microcontroller control and drive module and execution module ensure the fan works normally.

Benefits of technology

It achieves full compatibility with both PD high-voltage and ordinary low-voltage adapters, ensuring that the fan operates stably and efficiently with any power supply, thus improving the product's versatility and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123184481A_ABST
    Figure CN123184481A_ABST
Patent Text Reader

Abstract

The application discloses a dual-mode power supply control circuit of a desktop circulating fan and a control method thereof. The control circuit comprises a Type-C interface, a protocol detection module, a voltage conversion module, a control module, a driving module and an execution module. The protocol detection module identifies the type of an adapter. If the adapter is a PD high-voltage adapter, the control module turns off the voltage conversion module, and the adapter directly outputs 12V power supply. If the adapter is a common 5V adapter, the voltage conversion module is started to boost 5V to 12V power supply. The application is compatible with PD fast charging and common 5V adapters, and can be used as soon as plugged in. The efficiency is high, and the intelligent limiting of the voltage in the low-voltage mode prevents overload, thereby improving the product universality and user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of desktop circulating fan technology, and in particular to a dual-mode power supply control circuit and control method for a desktop circulating fan. Background Technology

[0002] With the widespread adoption of USB Type-C interfaces in small home appliances such as desktop circulating fans, Type-C power adapters on the market are mainly divided into two categories: high-voltage adapters that support the PD protocol (capable of outputting 12V voltage) and ordinary 5V adapters that do not support the PD protocol. However, existing desktop circulating fans that use 12V DC motors and stepper motors cannot be powered by ordinary 5V adapters if they are only compatible with PD high-voltage adapters. Simply adding a boost circuit will not effectively boost the voltage when the PD high-voltage adapter is connected, resulting in reduced efficiency or even circuit damage. Some low-cost solutions force the adapter to output 5V through pure hardware resistors, but this cannot meet the power supply requirements of 12V loads.

[0003] Therefore, there is an urgent need for a power supply solution that can intelligently identify the adapter type and automatically switch between direct power supply and boost mode based on the identification result, so as to be compatible with PD high voltage adapters and ordinary low voltage adapters, and ensure that the 12V desktop circulating fan can work stably and efficiently when connected to any conventional Type-C power supply. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of the prior art and provide a desktop circulating fan control circuit and its control method with dual-mode power supply.

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

[0006] In a first aspect, embodiments of the present invention provide a desktop circulating fan control circuit with dual-mode power supply, comprising:

[0007] The Type-C interface is used to connect an external power adapter;

[0008] A protocol detection module, connected to the Type-C interface, is used to identify the protocol type of the connected external power adapter;

[0009] A voltage conversion module is used to boost the input voltage;

[0010] A control module is connected to both the protocol detection module and the voltage conversion module, and is used to selectively control the operating state of the voltage conversion module based on the identification results.

[0011] A drive module, connected to the control module, is used to generate a drive current according to a control signal;

[0012] An execution module, connected to the drive module, is used to execute fan actions according to the drive current;

[0013] Specifically, when the protocol detection module identifies the external power adapter as a high-voltage adapter that supports the PD protocol, the control module shuts down the voltage conversion module, and the high-voltage adapter directly outputs the first DC power to power the system; when the protocol detection module identifies the external power adapter as a low-voltage adapter that does not support the PD protocol, the control module activates the voltage conversion module to boost the second DC power input from the low-voltage adapter into the first DC power and power the system.

[0014] Secondly, embodiments of the present invention provide a desktop circulating fan control method with dual-mode power supply, comprising the following steps:

[0015] Connect an external power adapter via a Type-C interface;

[0016] The protocol type of the external power adapter is identified by the protocol detection module;

[0017] Select the power supply mode based on the recognition result:

[0018] If the external power adapter is identified as a high-voltage adapter that supports the PD protocol, the voltage conversion module is turned off, and the high-voltage adapter directly outputs the first DC power to power the system.

[0019] If the external power adapter is identified as a low-voltage adapter that does not support the PD protocol, the voltage conversion module is activated to boost the second DC power input from the low-voltage adapter into the first DC power and supply power to the system.

[0020] The control module is powered on and initialized, and waits to receive external operation commands;

[0021] When an external operation command is received, the control module generates a corresponding control signal;

[0022] The drive module receives the control signal and amplifies its drive current;

[0023] The execution module performs the corresponding fan action based on the amplified drive current.

[0024] The dual-mode power supply desktop circulating fan control circuit and its control method of this invention have the following advantages compared with the prior art: The protocol detection module intelligently identifies the type of the connected Type-C adapter. When it is identified as a PD high-voltage adapter, the voltage conversion module is turned off, and the adapter directly outputs 12V power, resulting in high efficiency and low loss. When it is identified as a regular 5V low-voltage adapter, the boost circuit is automatically activated to boost the 5V to 12V, ensuring the fan operates normally. Simultaneously, the microcontroller limits the highest fan speed in low-voltage adapter mode to prevent overload of the low-power adapter. This solution achieves full compatibility with both PD fast charging adapters and regular 5V adapters, eliminating the need for users to select a dedicated power supply; it is plug-and-play, improving product versatility and user experience.

[0025] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. Attached Figure Description

[0026] Figure 1 A circuit block diagram of a desktop circulating fan control circuit with dual-mode power supply provided by the present invention.

[0027] Figure 2 A circuit diagram of a desktop circulating fan control circuit with dual-mode power supply provided by the present invention;

[0028] Figure 3 A flowchart illustrating the dual-mode power supply desktop circulating fan control method provided by the present invention. Attached Figure Description

[0029] Type-C interface 10, protocol detection module 20, voltage conversion module 30, control module 40, drive module 50, execution module 60, fan rotation positioning detection module 70, infrared receiver module 80, key input module 90, and indicator module 100. Detailed Implementation

[0030] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0031] See Figures 1 to 2As shown, this invention discloses a specific embodiment of a desktop circulating fan control circuit with dual-mode power supply. The control circuit mainly includes: a Type-C interface 10 (USB1), a protocol detection module 20 (including a PD protocol detection chip U4), a voltage conversion module 30 (including a boost chip U2, a chip U3 and related peripheral circuits), a control module 40 (a microcontroller U6, model BF8212BM32-QKBX), a drive module 50 (a Darlington array drive chip U5, model ULN2803ADW), an execution module 60 (a 12V DC fan motor, a left and right oscillating stepper motor, and a up and down oscillating stepper motor), a fan rotation positioning detection module 70 (U1), an infrared receiving module 80, a key input module 90 (keys S1-S7), and an indicator module 100 (a buzzer BZ1 and an LED indicator).

[0032] See Figure 2 As shown, the USB1 pin of the Type-C interface 10 uses a standard Type-C female connector. Its VBUS pin is used to receive the DC voltage input from the external power adapter, the GND pin is grounded, and the CC1 and CC2 pins are configuration channel pins used for protocol communication with the external power adapter. This interface supports reversible insertion and is compatible with all standard Type-C adapters on the market. The interface is also equipped with filter capacitors C13 and C14 and an electrostatic discharge (ESD) protection device R18 to suppress power ripple, resist electromagnetic interference, and provide ESD protection, ensuring the stability of the input power supply.

[0033] The core of the protocol detection module 20 is chip U4 (hereinafter referred to as U4), model FS311B, which is packaged in SOT-23-5 and is a dedicated PD protocol detection and voltage identification chip. The CC detection pin of U4 is directly connected to the CC1 and CC2 pins of the Type-C interface 10.

[0034] When the user plugs the external power adapter into the Type-C interface 10, U4 immediately powers on and begins communication handshake with the external power adapter via the CC pin. Specifically, U4 sends specific level signals or data packets on the CC line according to the USB PD protocol specification and detects the adapter's response.

[0035] If the connected external power adapter supports PD3.2 or higher protocols, U4 can successfully complete the protocol handshake, identify the external power adapter as a PD fast charging adapter, and further read its maximum supported output voltage and power information. Subsequently, U4 sends a request command to the external power adapter via protocol interaction, requesting it to output 12V. Upon receiving the request, the external power adapter adjusts its VBUS output voltage to 12V according to the PD protocol instructions and regulates the output. Simultaneously, U4 sends a high-level identification signal to the microcontroller U6 via its output pin (such as INT or GPIO), indicating that "the PD adapter has been identified and a 12V output has been requested."

[0036] If the external power adapter connected is a standard Type-C adapter that does not support the PD protocol (such as a traditional 5V / 2A charger), U4 will be unable to complete the PD protocol handshake within a predetermined time (e.g., 200-500 milliseconds). Simultaneously, the voltage detection circuit inside U4 detects that the VBUS voltage is approximately 5V. At this point, U4 determines that a standard low-voltage adapter is connected and sends a low-level identification signal to the microcontroller U6 through its output pin, indicating that "a non-PD 5V adapter is connected."

[0037] In other words, by setting up a dedicated PD protocol detection chip U4, it is possible to accurately and quickly identify the type of external power adapter without requiring manual selection or intervention from the user. It is plug-and-play and highly intelligent. At the same time, U4 can actively request 12V output in PD mode to ensure that the subsequent 12V motor obtains the rated operating voltage.

[0038] The voltage conversion module 30 is a complete DC-DC boost circuit, mainly composed of boost chips U2 (PW2609A) and U3 (SY7208), power inductor L1 (10μH), input filter capacitors C3 (100nF) and C4 (10μF / 25V), and feedback sampling resistor R8 (1% precision resistor). The input terminal of the voltage conversion module 30 is connected to the VBUS pin of the Type-C interface 10, and the output terminal is connected to the system's 12V power supply bus. The enable terminal (EN) of the voltage conversion module 30 is connected to an I / O pin of the microcontroller U6 (hereinafter referred to as U6).

[0039] When U6 receives a "PD adapter" identification signal (high level) from the protocol detection module 20: U6 outputs a low level on its I / O pin, turning off the enable of the voltage conversion module 30. At this time, the boost chips U2 and U3 enter standby shutdown mode, and the static power consumption of the chips is maintained at the microamp level. The 12V voltage directly output by the external power adapter supplies power to the system 12V bus through the VBUS pin of the Type-C interface 10 via a bypass path.

[0040] When U6 receives a "non-PD 5V adapter" identification signal (low level) from the protocol detection module 20: U6 outputs a high level on its I / O pin, activating the voltage conversion module 30. Boost chips U2 and U3 begin operation, with their internal switching transistors switching on and off at high frequencies (e.g., hundreds of kHz), working in conjunction with the energy storage and release of power inductor L1 to boost the 5V input voltage to 12V. Feedback resistor R8 samples the output voltage in real time and sends it to the chip's internal error amplifier. After comparing it with a reference voltage, the switching duty cycle is adjusted to form a closed-loop voltage regulation control, ensuring a precise and stable 12V output voltage. Input filter capacitors C3 and C4 are used to filter out low-frequency ripple and high-frequency spikes in the power supply, while the output filter capacitor further smooths the output voltage, resulting in low ripple and low noise in the 12V power supply supplied to subsequent stages.

[0041] In other words, the core function of dual-mode power supply is achieved through the coordinated operation of the voltage conversion module 30, protocol detection module 20, and control module 40. In PD adapter mode, the boost circuit is completely shut off, avoiding unnecessary power loss and additional heat generation, and extending circuit life. In ordinary 5V adapter mode, the boost circuit is automatically activated, raising the voltage from 5V to 12V to ensure the fan can operate normally, solving the technical problem that ordinary adapters cannot drive 12V fans. The entire switching process is fully automatic, has no delay, and requires no user intervention.

[0042] The control module 40 uses a single-chip microcontroller U6, model BF8212BM32-QKBX (its operating voltage is stepped down to 3.3V via an LDO to ensure compatibility with touch button sensitivity). U6 connects to the output of U4, the enable terminal of voltage conversion module 30, the output of fan rotation positioning detection module 70, button input module 90, infrared receiver module 80, indicator module 100, and the input of drive module 50 via its I / O pins.

[0043] U6 reads the identification signal level sent by U4 in real time. When the level is high, U6 identifies it as a PD adapter, and as mentioned before, shuts down the voltage conversion module 30 and enables all functions (such as 8-speed fan and full-angle oscillation). When the level is low, U6 identifies it as a regular 5V adapter, starts the voltage conversion module 30, and executes the power management strategy.

[0044] When U6 determines that a standard 5V / 2A adapter (maximum output power approximately 10W) ​​is connected, to prevent adapter overload leading to voltage drops or damage, U6's internal program limits the maximum duty cycle of the PWM signal output to the driver module 50. Specifically, U6 limits the maximum selectable fan speed to 5 levels (out of 8). Even if the user presses the "Fan Speed ​​+" button repeatedly, the speed can only increase from level 1 to level 5, and cannot reach levels 6, 7, or 8. This limitation is implemented through a software algorithm: U6 internally stores a speed-duty cycle mapping table. When 5V mode is detected, the maximum available speed variable is preset to 5. If the current speed is already 5, the "Fan Speed ​​+" command will not be responded to. This design effectively prevents low-power adapters from overheating, experiencing voltage drops, or even burning out due to overload when driving the fan at high speed, ensuring system safety.

[0045] The U6's internal timer is configured in PWM mode, outputting a square wave signal (FAN_PWM) with a fixed frequency (e.g., 20kHz) and adjustable duty cycle from a designated I / O pin. The duty cycle range is 0%-100%, corresponding to the DC motor shutting down to full speed operation. The U6 dynamically adjusts the PWM duty cycle based on the user's wind speed adjustment commands (button or remote control) or the natural wind mode algorithm.

[0046] The U6 outputs direction signals (high / low levels control forward and reverse rotation) and step pulse signals (square wave pulse trains of a specific frequency) through general-purpose I / O pins to control the rotation direction, angle, and speed of the left and right yaw stepper motors and the up and down yaw stepper motors.

[0047] The U6 reads the feedback signal from the fan rotation positioning detection module 70 (such as a Hall sensor) to determine whether the fan blades are rotating normally and whether the oscillation mechanism has reached its limit position. When an abnormality is detected (such as fan blade stall or oscillation jamming), the U6 can promptly cut off the motor drive signal to prevent the motor from burning out. This function improves the safety and reliability of the product.

[0048] The U6 continuously scans the level changes of the button input pins to detect valid buttons (with a 20ms software debouncing algorithm); it captures the remote control code stream demodulated by the infrared receiver module 80 through the external interrupt pin and decodes and identifies the remote control commands; based on the operation results, it drives the buzzer to emit a prompt tone and controls the LED indicator to turn on and off to display the current status (such as wind speed, oscillation mode, natural wind mode, etc.).

[0049] In other words, the U6 microcontroller, as the control core, integrates all functions including signal acquisition, decision execution, drive output, power management, safety detection, and human-machine interaction. In particular, the intelligent speed limit function for 5V adapters ensures both basic fan operation with ordinary adapters and the safety of the power supply system, demonstrating the advantages of hardware-software co-design. Employing PWM speed control, it achieves an efficiency of over 90%, providing smooth and seamless speed adjustment, and can simulate complex natural wind curves. Furthermore, the fan rotation positioning detection function further enhances the product's reliability and safety.

[0050] The driver module 50 uses a Darlington array driver chip U5 (referred to as U5), model ULN2803ADW. This chip integrates 8 Darlington pairs, each with a freewheeling diode, and its COM pin is connected to a 12V power supply.

[0051] The input terminals IN1-IN8 of U5 are connected to various control signals output by U6 (PWM signal, stepper motor pulse signal, direction signal, etc.); the output terminals OUT1-OUT8 of U5 are connected to the drive terminals of each load in the execution module 60 (DC motor negative terminal, drive terminals of each phase coil of the stepper motor).

[0052] When U6 outputs a high level (approximately 3.3V or 5V, with a current of only a few milliamps) to one of the input terminals of U5, the corresponding Darlington pair inside U5 saturates and conducts, pulling its output low to near GND, thus forming a current path: 12V power supply → positive terminal of the load → load coil → U5 output terminal → conducting pair inside U5 → GND pin of U5 → ground. At this time, the load (motor coil) receives sufficient drive current (up to several hundred milliamps). When U6 outputs a low level, the internal pair of U5 is cut off, the output terminal is in a high-impedance state, and the load current is turned off.

[0053] The PWM signal output by U6 controls the on / off state of the corresponding channel of U5 at a frequency of 20kHz, thereby controlling the average current of the DC motor and achieving stepless speed regulation. For stepper motor control: the stepping pulse sequence output by U6 sequentially turns on different channels of U5, exciting the coils of each phase of the stepper motor in sequence, generating a rotating magnetic field, and driving the rotor to rotate precisely.

[0054] In other words, by using the ULN2803ADW Darlington array driver chip U5, the weak signal (mA level) from the microcontroller can drive the strong current (hundreds of mA level) of the motor, thus completing the power amplification of the signal link. This chip integrates eight driver channels and freewheeling diodes, allowing one chip to drive one DC motor and two four-phase stepper motors, greatly simplifying the PCB layout and reducing the number of external components, thereby lowering the BOM cost. Furthermore, the built-in freewheeling diodes effectively absorb the reverse induced electromotive force generated by the motor coils at the moment of turn-off, protecting the driver chip and the microcontroller, and improving the system's electromagnetic compatibility and long-term operational reliability.

[0055] The execution module 60 includes a DC motor with a rated voltage of 12V (for driving the fan blades to rotate), a 12V left-right oscillating stepper motor (PH-5AWD), and a 12V up-down oscillating stepper motor (PH-5AWD).

[0056] The positive terminal of the DC motor is connected to a 12V power supply, and the negative terminal is connected to an output terminal of U5 (corresponding to the FAN_PWM signal) via a ferrite bead L2 (600Ω / 1A, used to suppress high-frequency electromagnetic interference generated by PWM switching). When the PWM duty cycle increases, the average motor current increases, the speed increases, and the airflow increases; when the duty cycle decreases, the speed decreases, and the airflow decreases. In natural wind mode, U6 periodically changes the PWM duty cycle according to a pre-stored wind speed change curve (e.g., the duty cycle changes randomly between 30% and 80% within 4 seconds, and then drops to 10%-20% within 2 seconds) to simulate the effect of a natural gust of wind, avoiding the mechanical feeling brought by the constant wind speed of a traditional fan.

[0057] The coils of each phase of the left-right oscillating stepper motor and the up-down oscillating stepper motor are connected to a 12V power supply and the other four output terminals of U5, respectively. U6 outputs a direction signal and a stepping pulse sequence. For each input pulse, the stepper motor rotor rotates precisely by one step angle (e.g., 1.8°). Precise angle control can be achieved by controlling the total number of pulses. For example, sending 100 pulses causes the motor to rotate 180°, driving the oscillating mechanism to swing from one end to the other. U6 typically uses cyclic forward and reverse control: first, a forward pulse sequence (e.g., 200 pulses) is sent, delayed, and then a reverse pulse sequence is sent, repeating this process to achieve continuous left-right or up-down oscillation. In this embodiment, the left-right oscillation angle can reach 355°, and the up-down oscillation angle can reach 60°.

[0058] In other words, the DC motor using PWM speed control offers a wide speed range, high efficiency, and low noise, and can achieve a variety of wind modes (regular wind, natural wind, sleep wind, etc.) through software algorithms. The use of a stepper motor in conjunction with a drive array for oscillation allows for precise control of the oscillation angle and speed, enabling multi-angle (e.g., 60°, 90°, 120°, 355°) and multi-mode (left / right, up / down, left / right + up / down) airflow experiences, achieving full-space airflow without dead zones and significantly improving user comfort.

[0059] U1 is a fan rotation positioning detection device, preferably a Hall sensor or photoelectric sensor, which is mounted around the fan blades or at the limit position of the oscillation mechanism to detect the rotation state of the fan blades and the limit position of the oscillation mechanism in real time. The output signal of U1 is connected to the I / O pin of the microcontroller U6.

[0060] When the fan rotates normally, U1 detects the periodically changing magnetic field or light signal and outputs a corresponding pulse signal to U6. If the fan stops rotating due to obstruction or other reasons, the output level of U1 will no longer change, and if U6 does not detect a signal change within a set time, it is determined to be a stall fault, and the output of U5 will be immediately cut off to protect the motor and circuit. Similarly, during the oscillation process, when the oscillation mechanism reaches the limit position, U1 generates a trigger signal, and U6 stops outputting step pulses or changes the direction of rotation accordingly to avoid overshoot damage to the mechanism.

[0061] In other words, by setting up the fan rotation positioning detection module 70, real-time monitoring and fault protection of the fan's operating status are achieved, effectively preventing motor burnout or mechanical damage caused by abnormal conditions such as stalling or jamming, thus improving product safety and service life. Simultaneously, this detection signal can be used to implement more intelligent control strategies, such as automatic shutdown and fault alarms.

[0062] Infrared receiver module 80: Includes infrared receiver head IRM1 (model IRM_HS0038B, abbreviated as IRM1). IRM1's power supply is connected to 3.3V or 5V, and its output is connected to the external interrupt pin of U6. When the remote control emits a 38kHz carrier-modulated infrared signal, IRM1 receives, amplifies, and demodulates it, outputting inverted TTL level serial data from its output pin. U6 uses external interrupt and timer functions to capture this data frame and compares it with a preset remote control code value library to parse the remote control operation commands (such as power on / off, speed adjustment, timer, oscillation, natural wind, etc.). The remote control distance can reach over 10 meters and has good anti-light interference capability.

[0063] The button input module 90 includes seven buttons S1-S7, corresponding to power on / off, fan speed +, fan speed -, left / right oscillation, natural wind, timer, and up / down oscillation functions, respectively. One end of each button is grounded, and the other end is connected to VCC via a 4.7kΩ pull-up resistor and then to the I / O pin of U6. U6 determines valid button operations by detecting level changes (the pin is pulled low when a button is pressed) and using a 20ms software debouncing algorithm. The pull-up resistor ensures a stable pin level when the button is not pressed, preventing false readings due to floating.

[0064] Indicator module 100 includes buzzer BZ1 and multiple LED indicators. After receiving a valid operation command, U6 outputs a high level through the I / O pin to drive the buzzer to emit a short "beep" sound, indicating that the user's operation has taken effect; at the same time, it pulls down the negative terminal of the corresponding LED through the I / O pin (the positive terminal of the LED is connected to VCC through a current-limiting resistor), lighting up the corresponding LED to display the current working status (such as fan speed, oscillation status, natural wind mode, etc.).

[0065] In other words, the dual input scheme of buttons and infrared meets the user's operational needs in both short-range and long-range scenarios. A 4.7kΩ pull-up resistor ensures the stability of the button signal and prevents misreading due to floating input. The dedicated design of the infrared receiver guarantees a remote control distance of over 10 meters and excellent resistance to light interference. The audible and visual feedback from the buzzer and LEDs provides clear confirmation for each operation, enhancing the user-friendliness of the human-computer interaction.

[0066] The dual-mode power supply desktop circulating fan control circuit also includes an MCU programming interface for programming and debugging.

[0067] like Figure 3 As shown, the present invention also provides a dual-mode power supply desktop circulating fan control method, comprising the following steps:

[0068] S110, Connect an external power adapter via a Type-C interface;

[0069] Specifically, the user uses any external power adapter with a Type-C output interface, including fast charging adapters that support the PD protocol (such as mobile phone fast chargers and laptop power adapters) or ordinary 5V adapters that do not support the PD protocol (such as traditional 5V / 2A chargers and power banks). The user inserts the Type-C male connector of the adapter into the Type-C female USB1 port on the desktop fan housing. After insertion, a physical connection is established between the adapter and the fan: key signal lines such as VBUS (positive power), GND (ground), and CC1 / CC2 (configuration channels) are turned on. At this time, the filter capacitors C13 and C14 and the electrostatic discharge protection device R18 at the interface immediately start working, suppressing the surge current and voltage spikes at the moment of power-on, and providing preliminary filtered power to the downstream circuitry. The PD controller inside the adapter (if present) detects a level change on the CC pin, determines that a device has been connected, and prepares to negotiate the power supply capability.

[0070] In other words, this step standardizes and universalizes the power supply interface. Users no longer need to find a dedicated power adapter for the fan; any commercially available Type-C adapter can be directly plugged in and unplugged, supporting reversible insertion and avoiding power supply issues caused by incorrect insertion. Simultaneously, the filtering and protection circuitry effectively protects sensitive downstream components, improves the overall anti-static and surge protection capabilities of the device, and enhances product reliability and user experience.

[0071] S120. Identify the protocol type of the external power adapter through the protocol detection module;

[0072] Specifically, after the Type-C interface establishes a connection, the core of the protocol detection module—the PD protocol detection chip U4—immediately powers on and begins operation. U4 communicates with the adapter via the CC1 and CC2 pins, the process of which is as follows: U4 sends specific handshake signals (such as Source Capabilities broadcast detection) on the CC line according to the USB PD protocol specification. If the adapter supports the PD protocol, its internal PD controller responds and sends information about its supported voltage levels (such as 5V, 9V, 12V, 15V, 20V, etc.). Upon successfully receiving a response, U4 determines it to be a "high-voltage adapter supporting the PD protocol" and sends a high-level identification signal to U6 through its output pin. If U4 does not receive any PD protocol response within a predetermined time (e.g., 200-500 milliseconds), and its built-in voltage detection circuit detects a VBUS voltage of approximately 5V, it determines it to be a "normal low-voltage adapter that does not support the PD protocol" and sends a low-level identification signal to U6. The entire identification process is completely automatic and requires no user intervention.

[0073] In other words, the dedicated PD protocol detection chip U4 enables rapid (millisecond-level) and accurate identification of the external power adapter type, seamlessly integrated into the user experience. This step provides an accurate basis for subsequent intelligent selection of the power supply mode, avoiding power supply errors caused by misjudgment (such as mistaking a 5V adapter for a PD adapter, resulting in the boost converter failing to start, or vice versa). Simultaneously, the identification results can be further used for power management, preventing overload of low-power adapters, demonstrating the intelligent design of hardware and software collaboration.

[0074] S130. Select the power supply mode based on the identification result:

[0075] Specifically, U6 reads the identification signal level sent by U4 in real time. Based on the two states of this level, the system automatically enters two different power supply path branches (corresponding to subsequent S140 and S150). This step is essentially a software decision branch: U6 uses a conditional statement (such as if(PD_detect == HIGH)) to determine which power supply logic to execute. This decision is executed once after each power-on and can be re-executed during system operation based on adapter re-plugging (such as a hot-plug event triggering an interrupt) to handle adapter replacement scenarios. The decision result is stored in U6's RAM as the basis for subsequent power management (such as level limiting).

[0076] In other words, this step enables intelligent decision-making regarding the power supply mode. The system can automatically select the optimal power supply path based on the identification results, without requiring manual switching or settings by the user. This design avoids the hassle of requiring users to identify adapter types or use dedicated power supplies, as is common in traditional solutions, truly achieving "plug and play, automatic adaptation." Furthermore, the judgment logic is simple and reliable, without increasing software complexity or system response latency.

[0077] S140. If the external power adapter is identified as a high-voltage adapter that supports the PD protocol, the voltage conversion module is turned off, and the high-voltage adapter directly outputs the first DC power to power the system.

[0078] Specifically, when the identification result indicates a high-voltage adapter supporting the PD protocol, U6 receives a high-level identification signal. U6 immediately outputs a low-level signal through its I / O pin to the enable pin of the voltage conversion module (a DC-DC boost circuit composed of boost chips U2 and U3), turning off the voltage conversion module. At this time, boost chips U2 and U3 are in standby or high-impedance state, and their static power consumption drops to the microamp level (typically less than 10μA). Simultaneously, U4 continues to interact with the adapter via the CC pin using the PD protocol, actively sending a "Request" command to the adapter, requesting the adapter to output the first DC power (12V in this embodiment). Upon receiving the request, the adapter adjusts its internal DC-DC circuit, switching the VBUS output voltage from the default 5V (or other voltages) to 12V and stabilizing the output. This 12V voltage, via the VBUS pin of the Type-C interface, directly powers the system's 12V power supply bus through a through-path on the circuit board (or via the bypass diode of the voltage conversion module), thereby providing operating power to the control module, drive module, and execution module. Since the voltage conversion module is turned off, the input voltage is directly connected, and there is no additional power conversion loss.

[0079] In other words, in PD adapter mode, shutting down the boost circuit avoids unnecessary power loss and additional heat generation, helping to extend circuit life and reduce overall temperature rise. Simultaneously, by actively requesting 12V output via the PD protocol, it ensures that the downstream 12V motor receives its rated operating voltage, allowing the motor's performance to be fully utilized (e.g., full-speed fan operation, high-torque oscillation). This mode fully leverages the high-voltage output capability of the PD adapter, achieving efficient and high-performance power supply.

[0080] S150. If the external power adapter is identified as a low-voltage adapter that does not support the PD protocol, the voltage conversion module is activated to boost the second DC power input from the low-voltage adapter into the first DC power and supply power to the system.

[0081] Specifically, when the identification result is a common low-voltage adapter that does not support the PD protocol, U6 receives a low-level identification signal. U6 immediately outputs a high level to the enable terminal of the voltage conversion module through its I / O pin, starting the voltage conversion module. Boost chips U2 (PW2609A) and U3 (SY7208) begin to operate: their internal switching transistors switch on and off at a high frequency (e.g., 500kHz), cooperating with the energy storage and release of power inductor L1 (10μH) and the freewheeling current of Schottky freewheeling diode D1 to boost the input 5V voltage to 12V. Feedback resistor R8 samples the output voltage in real time and sends it to the error amplifier inside the chip. After comparing it with the reference voltage, the switching duty cycle is adjusted to form a closed-loop voltage regulation control, ensuring a precise and stable 12V output voltage. Input filter capacitors C3 (100nF) and C4 (10μF / 25V) are used to filter out low-frequency ripple and high-frequency spikes in the power supply, and the output filter capacitor further smooths the voltage waveform. The boosted 12V voltage supplies power to the system's 12V power bus, thus providing operating power to the control module, drive module, and execution module. The entire boosting process is completed automatically, requiring no user intervention.

[0082] In other words, in standard 5V adapter mode, the boost circuit activates to raise the 5V to 12V, enabling even ordinary chargers that wouldn't normally drive a 12V fan to function properly. This eliminates the product's dependence on specific voltage adapters and significantly expands its power compatibility. Furthermore, closed-loop voltage regulation ensures the accuracy and stability of the output voltage, with low ripple and noise, preventing voltage drops due to load changes and guaranteeing smooth motor operation. This mode allows users to operate the fan even with only a standard 5V charger, enhancing product usability and user satisfaction.

[0083] S160: The control module is powered on and initialized, and waits to receive external operation commands.

[0084] Specifically, after the system obtains a stable 12V power supply (whether directly supplied by the S140 or boosted by the S150), this 12V voltage is stepped down to 3.3V by an LDO (low dropout linear regulator) to provide the operating voltage for the microcontroller U6. When U6 detects the rise in power supply voltage, it triggers the power-on reset (POR) circuit, clears the internal program counter, initializes all special function registers to their default values, and configures the I / O pins to high-impedance input mode. Subsequently, the internal crystal oscillator (or RC oscillator, e.g., 16MHz) of U6 starts oscillating and stabilizes, and the program executes sequentially starting from the beginning address of the internal Flash memory. The initialization subroutine performs the following operations: configures I / O port directions (e.g., sets button input to pull-up input, LED output to push-pull output, PWM pin to multiplexed push-pull output, and stepper motor control pin to output); initializes timers (sets Timer 0 as a 1ms interrupt source for system timing and button debouncing; sets Timer 1 to PWM mode to generate a 20kHz carrier wave); initializes external interrupts (for capturing infrared remote control signals); initializes the watchdog timer; clears all interrupt flags and enables global interrupts. After initialization, U6 enters the main loop program, first turning off all LEDs, setting the PWM output duty cycle to 0% (fan motor stops), and setting all stepper motor drive pins to inactive (motors do not rotate). Finally, the program enters an infinite loop, in which U6 repeatedly performs tasks such as button scanning, infrared receiver flag query, and LED status refresh. At this time, the system is in a low-power standby state, waiting for user operation.

[0085] In other words, the fan is automatically off upon power-up to prevent accidental power-up from causing the fan to suddenly start and creating a safety hazard (such as injury or damage to the fan blades). Hardware resources such as I / O ports, timers, and interrupts are correctly configured, ensuring everything is ready for receiving and processing user commands. In standby mode, the microcontroller can enter idle mode or operate at a reduced frequency. The overall standby power consumption is typically below 0.3W, meeting energy-saving and emission-reduction requirements and extending the product's lifespan.

[0086] S170. When an external operation command is received, the control module generates a corresponding control signal.

[0087] Specifically, external operation commands can originate from the button input module (buttons S1-S7) or the infrared receiver module (remote control). Taking the "Wind Speed ​​+" button as an example: When the user presses button S2, one end of the button is grounded, and the other end is connected to VCC via a 4.7kΩ pull-up resistor and then to the I / O pin of U6. When the button is not pressed, the pin is at a high level (3.3V or 5V); when pressed, the pin is pulled low to 0V. U6 calls the button scanning function in its main loop, which reads the pin level at a period of 20ms. When a low level is read twice consecutively, it is considered a valid button press (software debouncing). U6 recognizes that the key value is "Wind Speed ​​+" and immediately executes the wind speed adjustment subroutine: it reads the current wind speed level variable (stored in RAM, initially 0 indicating power off), increments it by 1 (changing it to level 1), and then determines the highest allowed level based on the power supply mode stored in S130 (e.g., level 5 in 5V mode and level 8 in PD mode). If the current gear is within the limit, a new duty cycle value is calculated based on the gear-PWM duty cycle mapping table (stored in Flash, e.g., gear 1 corresponds to 20%, gear 2 to 40%, gear 3 to 60%, gear 4 to 80%, and gear 5 to 100%), and this value is written to the PWM timer's compare register, thereby changing the PWM output. Simultaneously, U6 pulls the corresponding gear's LED indicator pin low (lights the LED) and drives the buzzer pin to output a 50ms high level (which, after amplification, causes the buzzer to emit a short "beep" sound). For infrared remote control commands, U6 captures the serial data demodulated by the infrared receiver (e.g., NEC protocol format) via an external interrupt, compares it with a preset remote control code value library, parses the specific operation (e.g., power on / off, speed adjustment, timer, oscillation, natural wind, etc.), and then executes the corresponding control logic.

[0088] In other words, by simultaneously supporting both button and infrared remote control, it satisfies the dual needs of precise close-range operation (buttons) and convenient long-range control (remote control), resulting in an excellent user experience. The software debounce algorithm (20ms delay reread) eliminates repeated triggering or misjudgment caused by mechanical contact bounce, ensuring that each button action is responded to only once. The PWM duty cycle mapping table enables smooth, stepless adjustment of the fan speed, avoiding abrupt changes in fan speed. Audible and visual feedback (buzzer + LED) provides users with clear confirmation for every operation, enhancing the user-friendliness of the human-computer interaction.

[0089] S180. The drive module receives the control signal and amplifies its drive current.

[0090] Specifically, the control signals generated by the control module U6 (such as PWM square waves, stepper motor pulses, and direction levels) are standard 3.3V or 5V logic levels, and their output current capability is typically less than 10mA, which cannot directly drive the motor coil (requiring hundreds of mA). These signals are sent to the input terminal of the drive module U5. Taking the PWM signal as an example: the PWM output pin of U6 is connected to the IN1 pin of U5. When the PWM signal is high, the base of the first Darlington pair transistor inside U5 receives a forward bias current. This current is amplified step by step by two NPN transistors, making the OUT1 pin of U5 conduct to ground, with a typical saturation voltage drop of 0.7-1.1V. At this time, the external load circuit is formed as follows: 12V power supply → DC motor positive terminal → DC motor coil → ferrite bead L2 (600Ω / 1A, used to suppress high-frequency EMI) → OUT1 pin of U5 → Darlington transistor conducting inside U5 → GND pin of U5 → circuit board ground. The conduction current can reach 500mA (absolute maximum rated value), which is sufficient to drive a DC motor to generate rated torque. When the PWM signal is low, the Darlington transistor inside U5 is cut off, the OUT1 pin is in a high-impedance state, and the motor current is turned off. The PWM signal output by U6 switches between high and low frequencies at 20kHz, and U5 correspondingly switches the motor current on and off at the same frequency, thereby controlling the average current and speed of the motor. For stepper motors, the stepping pulse sequence output by U6 sequentially turns on different channels of U5, exciting the coils of each phase of the stepper motor in sequence to form a rotating magnetic field. The COM pin of U5 is connected to 12V to provide a freewheeling circuit for its internal freewheeling diode. At the moment the motor coil is turned off, the reverse induced electromotive force flows to the power supply through the freewheeling diode, preventing high voltage from damaging the driver chip.

[0091] In other words, this step amplifies the weak signal (mA level) from the microcontroller to drive the strong current (hundreds of mA level) of the motor, completing the power matching of the signal link. The U5 integrates an array of eight Darlington transistors and freewheeling diodes, allowing a single chip to drive one DC motor and two (or more) four-phase stepper motors, greatly simplifying PCB layout and reducing the number of external components, thus lowering BOM cost and board area. The built-in freewheeling diodes effectively absorb the reverse induced electromotive force (up to tens of volts), preventing high-voltage backlash from damaging the microcontroller or other sensitive circuits, improving the system's electromagnetic compatibility (EMC) and long-term operational reliability.

[0092] S190, the execution module performs the corresponding fan action based on the amplified drive current.

[0093] Specifically, the drive current, amplified by the drive module U5, is applied to each load of the execution module, and is converted into specific mechanical motion or acoustic and optical feedback.

[0094] Wind speed adjustment: When the user executes the "Wind speed +" command, the duty cycle of the PWM wave at the U5 output terminal switches from the current value (e.g., 20%) to a new value (e.g., 50%). Within each PWM cycle (50μs), the DC motor's conduction time increases from 10μs to 25μs, the average motor current increases, the electromagnetic torque increases, and the fan blade speed increases from approximately 800 rpm to approximately 1500 rpm, resulting in a noticeable increase in airflow for the user. In natural wind mode, the U6 periodically changes the PWM duty cycle according to a pre-stored natural wind curve (e.g., the duty cycle randomly jumps between 30% and 80% within 4 seconds, then drops to 10%-20% within 2 seconds), driving the motor to alternate between fast and slow speeds to simulate the effect of a natural gust of wind.

[0095] Head-shaking motion: When the user presses the left or right head-shaking button, U6 outputs a continuous sequence of stepping pulses (e.g., 500Hz frequency, one pulse every 2ms) and a constant directional level (high level indicates forward rotation). U5 amplifies the pulse sequence and sequentially excites the four-phase coils (A, B, C, D phases) of the left and right head-shaking stepper motors. Each input pulse causes the stepper motor rotor to rotate precisely by one step angle (e.g., 1.8°). Precise angle control is achieved by controlling the total number of pulses: sending 200 pulses results in one full rotation (360°). U6 typically uses cyclic forward and reverse control: first, a forward pulse train (e.g., 100 pulses, corresponding to 180°) is sent, causing the head-shaking mechanism to swing from left to right; after a short delay, a reverse pulse train (100 pulses) is sent, causing the mechanism to return from right to left, and so on, achieving continuous left and right oscillation. The up and down head-shaking control principle is the same, and is accomplished by another stepper motor.

[0096] Feedback Action: While performing the operation, U6 also drives the indicator module. For example, upon receiving a valid command, U6 outputs a 50ms high level on the buzzer control pin, which is amplified by U5 and drives the buzzer to emit a "beep" sound; at the same time, it pulls the corresponding LED pin low, lighting up the LED to display the current gear or status.

[0097] In other words, compared to traditional series resistor speed control or transformer-based speed control, PWM speed regulation is over 90% more efficient, offering smooth and seamless speed adjustment. Users can obtain any comfortable wind speed, and stepless adjustment avoids wear and tear on mechanical switches. Furthermore, the natural wind mode, implemented through software algorithms, eliminates the mechanical feel of constant wind speed, providing a more natural blowing experience that is beneficial to human health (avoiding discomfort caused by prolonged direct airflow). Utilizing the precise stepping characteristics of a stepper motor (1.8° step angle) combined with U6's pulse counting control, it can achieve multi-angle (e.g., 60°, 90°, 120°, 355°) and multiple modes (left / right, up / down, up / down + left / right) oscillation, achieving full-space airflow without dead zones and improving user comfort. In addition, dual audible and visual feedback provides clear confirmation for each user operation, enhancing the user-friendliness of the human-computer interaction. Moreover, the L2 ferrite bead effectively suppresses electromagnetic interference generated by the high-frequency PWM switch, preventing interference with infrared reception and microcontroller operation, and ensuring the system's electromagnetic compatibility.

[0098] Specifically, when the external power adapter is detected to be a low-voltage adapter that does not support the PD protocol, the control module limits the strength of the control signal output to the drive module to limit the highest operating level of the execution module.

[0099] Specifically, when the control module U6 determines that a standard 5V / 2A adapter (maximum output power approximately 10W) ​​is connected, in addition to activating the voltage conversion module to boost the voltage, the U6's internal program also activates a power management strategy. Specifically, U6 sets a variable "max_fan_speed" in RAM, assigning a value based on the identification result—if it's a PD adapter mode, then max_fan_speed = 8 (all speeds); if it's a standard 5V adapter mode, then max_fan_speed = 5 (limited to speed 5). Each time the user presses the "Fan Speed ​​+" button, U6 first reads the current speed cur_speed. If cur_speed < max_fan_speed, then cur_speed is incremented by 1 and the PWM duty cycle is updated; if cur_speed >= max_fan_speed, the "Fan Speed ​​+" command is ignored, and optionally, two short beeps are emitted to indicate that the highest permissible speed has been reached. Simultaneously, in the PWM duty cycle mapping table, the duty cycles corresponding to speeds 6, 7, and 8 (e.g., 80%, 90%, 100%) are not used in 5V mode. This restriction takes effect after each power-on identification, without requiring user intervention.

[0100] In other words, this power management effectively prevents low-power adapters from overheating, experiencing voltage drops, or even burning out due to overload when driving the fan at high speed, ensuring the safety of the power adapter and fan circuitry. Simultaneously, it retains the fan's basic blowing function (speeds 1-5) as with a standard adapter, allowing users to continue using the fan normally without being completely rendered unusable due to power limitations, demonstrating the rationality and user-friendliness of the product design. This strategy is entirely implemented in software, requiring no additional hardware costs, showcasing the advantages of hardware-software co-design.

[0101] In summary, this dual-mode power supply desktop circulating fan control circuit and its control method intelligently identify the type of the connected Type-C adapter through a protocol detection module. When a PD high-voltage adapter is identified, the voltage conversion module is turned off, and the adapter directly outputs 12V power, resulting in high efficiency and low loss. When a regular 5V low-voltage adapter is identified, the boost circuit is automatically activated to boost the 5V to 12V, ensuring normal fan operation. At the same time, the microcontroller limits the highest fan speed in low-voltage adapter mode to prevent overload of low-power adapters. This solution achieves full compatibility with PD fast charging adapters and regular 5V adapters, eliminating the need for users to select a dedicated power supply; it is plug-and-play, improving product versatility and user experience.

[0102] The above embodiments are preferred implementations of the present invention. In addition, the present invention can be implemented in other ways. Any obvious substitutions without departing from the concept of the present technical solution are within the protection scope of the present invention.

Claims

1. A desktop circulating fan control circuit with dual-mode power supply, characterized in that, include: The Type-C interface is used to connect an external power adapter; A protocol detection module, connected to the Type-C interface, is used to identify the protocol type of the connected external power adapter; A voltage conversion module is used to boost the input voltage; A control module is connected to both the protocol detection module and the voltage conversion module, and is used to selectively control the operating state of the voltage conversion module based on the identification results. A drive module, connected to the control module, is used to generate a drive current according to a control signal; An execution module, connected to the drive module, is used to execute fan actions according to the drive current; When the protocol detection module identifies the external power adapter as a high-voltage adapter that supports the PD protocol, the control module shuts down the voltage conversion module, and the high-voltage adapter directly outputs the first DC power to power the system. When the protocol detection module identifies that the external power adapter is a low-voltage adapter that does not support the PD protocol, the control module activates the voltage conversion module to boost the second DC power input from the low-voltage adapter into the first DC power and supply power to the system.

2. The desktop circulating fan control circuit with dual-mode power supply according to claim 1, characterized in that, The protocol detection module includes a PD protocol detection chip. The PD protocol detection chip communicates with the external power adapter through the CC pin of the Type-C interface to identify whether the external power adapter supports the PD protocol.

3. The desktop circulating fan control circuit with dual-mode power supply according to claim 2, characterized in that, The first DC power is 12V, and the second DC power is 5V; after the PD protocol detection chip identifies an external power adapter that supports the PD protocol, it requests the external power adapter to output 12V voltage through protocol interaction.

4. The desktop circulating fan control circuit with dual-mode power supply according to claim 1, characterized in that, The voltage conversion module is a DC-DC boost circuit, including a boost chip, a power inductor, and a filter capacitor, used to boost the second DC power to the same voltage level as the first DC power.

5. The desktop circulating fan control circuit with dual-mode power supply according to claim 1, characterized in that, The control module is a microcontroller. The microcontroller is also used to limit the strength of the control signal output to the drive module when it is detected that the external power adapter is a low-voltage adapter that does not support the PD protocol, so as to limit the highest operating level of the execution module.

6. The desktop circulating fan control circuit with dual-mode power supply according to claim 1, characterized in that, The driving module is a Darlington array driving chip; the execution module includes a DC motor and a stepper motor with the operating voltage of the first DC power. The DC motor is used to drive the fan blades to rotate, and the stepper motor is used to drive the fan's oscillation mechanism.

7. The desktop circulating fan control circuit with dual-mode power supply according to claim 6, characterized in that, The control module outputs a pulse width modulation signal with a variable duty cycle to the drive module according to the received wind speed adjustment command. The drive module amplifies the pulse width modulation signal to control the speed of the DC motor.

8. The desktop circulating fan control circuit with dual-mode power supply according to claim 1, characterized in that, Also includes: An infrared receiving module, connected to the control module, is used to receive remote control signals and transmit them to the control module; A key input module, connected to the control module, is used to generate key signals in response to user presses; An indicator module, connected to the control module, is used to provide status feedback in response to instructions from the control module.

9. A method for controlling a desktop circulating fan with dual-mode power supply, characterized in that, Includes the following steps: Connect an external power adapter via a Type-C interface; The protocol type of the external power adapter is identified by the protocol detection module; Select the power supply mode based on the recognition result: If the external power adapter is identified as a high-voltage adapter that supports the PD protocol, the voltage conversion module is turned off, and the high-voltage adapter directly outputs the first DC power to power the system. If the external power adapter is identified as a low-voltage adapter that does not support the PD protocol, the voltage conversion module is activated to boost the second DC power input from the low-voltage adapter into the first DC power and supply power to the system. The control module is powered on and initialized, and waits to receive external operation commands; When an external operation command is received, the control module generates a corresponding control signal; The drive module receives the control signal and amplifies its drive current; The execution module performs the corresponding fan action based on the amplified drive current.

10. The desktop circulating fan control method with dual-mode power supply according to claim 9, characterized in that, When the external power adapter is identified as a low-voltage adapter that does not support the PD protocol, the system further includes: the control module limiting the strength of the control signal output to the drive module to limit the highest operating level of the execution module.