Software adaptation circuit, method and device based on voltage detection

By matching and storing flag parameters when the device is powered on and storing the marking parameters, the equipment adaptation problem at different mains voltages is solved, production efficiency and flexibility are improved, and the production process is simplified.

CN119253970APending Publication Date: 2025-01-03SHENZHEN WATER WORLD INFORMATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411012042.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

In the prior art, the difference in the mains voltage of the same product in different countries and regions leads to multiple links of batch processing, resulting in low production efficiency, and the equipment needs to adapt to different mains voltages, with different functional requirements and operating logic, resulting in production. Complex management.

Method used

By setting the correspondence between the bus voltage and the flag parameters, match and store the flag parameters when the device is powered on and off, read the flag parameters when it is powered on to adapt to the software program, realize automatic adaptation under different mains voltages, and reduce points Basket production demand.

Benefits of technology

Improve equipment production efficiency and work flexibility, avoid batch production for different mains voltages, and simplify the software setting and production process of the equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119253970A_ABST
    Figure CN119253970A_ABST
Patent Text Reader

Abstract

The invention provides a software adaptation circuit, method and device based on voltage detection, and the method comprises the steps: detecting the bus voltage of target equipment when the target equipment is connected to a first target power supply and is in a shutdown state; determining a corresponding target mark parameter according to the bus voltage, wherein the bus voltage and the mark parameter have a corresponding relationship; performing storage processing on the target mark parameter; when the target device is connected to a second target power supply, a corresponding target software program is determined based on the target flag parameter, the flag parameter and the software program have a corresponding relation, and the voltage of the first target power supply is the same as that of the second target power supply; and executing the target software program to drive the target equipment to work under the second target power supply. According to the method, the corresponding relation between the bus voltage and the mark parameter and the corresponding relation between the mark parameter and the software program are set, the mark parameter is matched and stored through the bus voltage, batch production for different mains supply voltages is not needed, and the equipment production efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of equipment control, and in particular to a software adaptation circuit, method and device based on voltage detection. Background Art

[0002] There are differences in the mains voltage and product operating systems in different countries and regions. For example, some mains voltages are 220V, while others are 120V. This requires different under-voltage and over-voltage protections, different operating logics and operating sequences, and different usage functions to be set at the software level. Therefore, the same product from the same manufacturer shipped to different countries and regions often requires different batches of product production and software settings to adapt to different mains voltage requirements, product operating system habits, functional requirements, version requirements, etc. However, batch processing and management of multiple links are obviously not conducive to the requirements of efficient production. Summary of the invention

[0003] The embodiment of the present invention provides a software adaptation method based on voltage detection, aiming to solve the problem that the existing multiple software products need to be processed in batches in multiple links, resulting in low production efficiency. By setting the corresponding relationship between the bus voltage and the flag parameter, and setting the corresponding relationship between the flag parameter and the software program, when the device is powered on but not turned on, the flag parameter is matched and stored through the bus voltage, and then when the device is powered on, the stored flag parameter can be directly read, and the corresponding software program can be adapted to work through the read flag parameter, so there is no need to produce in batches for different mains voltages, thereby improving the production efficiency of the equipment. At the same time, the equipment can also adapt the corresponding software program to work under different mains voltages, thereby improving the working flexibility of the equipment.

[0004] In a first aspect, an embodiment of the present invention provides a software adaptation circuit based on voltage detection, wherein the software adaptation circuit based on voltage detection includes a power input module, a main control module, a bus voltage dividing module, a motor driving module and a zero-crossing detection module;

[0005] The input end of the power input module is electrically connected to the mains power supply through a bus, the first output end of the power input module is electrically connected to the input end of the bus voltage divider module, the output end of the bus voltage divider module is electrically connected to the first input end of the main control module, the second output end of the power input module is electrically connected to the second input end of the main control module, the third output end of the power input module is electrically connected to the first input end of the zero-crossing detection module, the second input end of the zero-crossing detection module is electrically connected to the mains power supply, the output end of the zero-crossing detection module is electrically connected to the third input end of the main control module, and the output end of the main control module is electrically connected to the input end of the motor drive module;

[0006] The main control module stores a plurality of software programs, wherein the software programs correspond to flag parameters, and the flag parameters correspond to the bus voltage divider voltage. The main control module is configured to determine the target flag parameters by the bus voltage divider voltage on the bus voltage divider module when the machine is not powered on, and store and process the target flag parameters; and to control the motor drive module to operate by the target software program corresponding to the target flag parameters when the machine is powered on.

[0007] Furthermore, the busbar voltage-dividing module includes a voltage-dividing capacitor, a first voltage-dividing resistor and a second voltage-dividing resistor arranged in series, and a third voltage-dividing resistor and a fourth voltage-dividing resistor arranged in parallel, wherein one end of the first voltage-dividing resistor is configured as the input end of the busbar voltage-dividing module, the other end of the first voltage-dividing resistor is connected to one end of the second voltage-dividing resistor, the other end of the second voltage-dividing resistor is electrically connected to one end of the third voltage-dividing resistor and one end of the fourth voltage-dividing resistor at a first node respectively, the other end of the fourth voltage-dividing resistor is electrically connected to one end of the voltage-dividing capacitor, the other end of the voltage-dividing capacitor is electrically connected to the other end of the third voltage-dividing resistor at a second node, and the second node is configured as the output end of the busbar voltage-dividing module.

[0008] Furthermore, the power input module includes a voltage stabilizing circuit, a rectifier circuit and a power supply circuit, the input end of the voltage stabilizing circuit is electrically connected to the AC power supply, the first output end of the voltage stabilizing circuit is electrically connected to the input end of the rectifier circuit, the second output end of the voltage stabilizing circuit is configured as the third output end of the power input module, the first output end of the rectifier circuit is electrically connected to the input end of the power supply circuit, the second output end of the rectifier circuit is configured as the first output end of the power input module, and the output end of the power supply circuit is configured as the second output end of the power input module.

[0009] Further, the zero-crossing detection module includes a first current limiting resistor, a second current limiting resistor, an optocoupler, a diode, a first detection resistor, a second detection resistor and a grounding capacitor, wherein one end of the first current limiting resistor and the second current limiting resistor are electrically connected at a third node, the third node is configured as the first input end of the zero-crossing detection module, the other end of the first current limiting resistor and the second current limiting resistor are electrically connected to the optocoupler input end, the cathode of the diode is configured as the second input end of the zero-crossing detection module, the anode of the diode is electrically connected to the optocoupler input end, one end of the first detection resistor is electrically connected to a reference voltage source, the other end of the first detection resistor is electrically connected to the output end of the optocoupler and one end of the second detection resistor, one end of the grounding capacitor is equipotentially grounded, the other end of the grounding capacitor is electrically connected to the other end of the second detection resistor at a fourth node, and the fourth node is configured as the output end of the zero-crossing detection module.

[0010] Furthermore, the main control module includes a first input port, a second input port, a third input port and an output port, wherein the first input port is configured as the first input end of the main control module, the second input port is configured as the second input end of the main control module, the third input port is configured as the third input end of the main control module, and the output port is configured as the output end of the main control module to be electrically connected to the input end of the motor drive module.

[0011] In a second aspect, an embodiment of the present invention provides a software adaptation method based on voltage detection, the method comprising:

[0012] When the target device is connected to the first target power supply and is in a shutdown state, detecting the bus voltage of the target device;

[0013] Determine a corresponding target mark parameter according to the bus voltage, and there is a corresponding relationship between the bus voltage and the mark parameter;

[0014] The target flag parameter is stored and processed;

[0015] When the target device is connected to a second target power source, a corresponding target software program is determined based on the target flag parameter, the flag parameter and the software program have a corresponding relationship, and the voltage of the first target power source is the same as that of the second target power source;

[0016] The target software program is executed to drive the target device to operate under the second target power supply.

[0017] Furthermore, the step of detecting the bus voltage of the target device includes:

[0018] Detecting the bus divided voltage of the target device;

[0019] Based on the bus divided voltage, a bus voltage of the target device is determined.

[0020] Furthermore, the step of storing the target flag parameter includes:

[0021] Temporarily storing the target flag parameter;

[0022] After detecting that the target device disconnects the first target power supply, the target flag parameter is written.

[0023] Further, after the step of executing the target software program to drive the target device to work under the second target power supply, the method further includes:

[0024] After detecting that the target device is disconnected from the second target power supply, acquiring the last device operating parameters of the target device;

[0025] Temporarily storing the device operating parameters;

[0026] When the target device is connected to the second target power supply and is in the power-on state next time, reading the device operating parameters;

[0027] The target device is controlled to operate with the device operating parameters in an initial stage.

[0028] In a third aspect, an embodiment of the present invention further provides a software adaptation device based on voltage detection, the software adaptation device comprising:

[0029] A first detection module, used for detecting the bus voltage of the target device when the target device is connected to the first target power supply and is in a shutdown state;

[0030] A first processing module, used for determining a corresponding target mark parameter according to the bus voltage, wherein there is a corresponding relationship between the bus voltage and the mark parameter;

[0031] A first temporary storage module, used for storing and processing the target flag parameter;

[0032] a second processing module, configured to determine a corresponding target software program based on the target flag parameter when the target device is connected to a second target power supply, wherein the flag parameter and the software program have a corresponding relationship, and the voltage of the first target power supply is the same as that of the second target power supply;

[0033] An execution module is used to execute the target software program to drive the target device to work under the second target power supply.

[0034] In the embodiment of the present invention, by setting the correspondence between the bus voltage and the flag parameters, and setting the correspondence between the flag parameters and the software program, when the equipment is powered on but not turned on, the flag parameters are matched and stored through the bus voltage, and then when the equipment is powered on, the stored flag parameters can be directly read, and the corresponding software program can be adapted to work through the read flag parameters, which eliminates the need for batch production for different AC voltages, thereby improving the production efficiency of the equipment. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0036] Figure 1 It is a structural schematic diagram of a software adaptation circuit based on voltage detection provided by an embodiment of the present invention;

[0037] Figure 2 It is a structural schematic diagram of a busbar voltage dividing module provided by an embodiment of the present invention;

[0038] Figure 3 is a schematic structural diagram of a power input module provided by an embodiment of the present invention;

[0039] Figure 4 is a structural schematic diagram of a zero-crossing detection module provided by an embodiment of the present invention;

[0040] Figure 5 is a structural diagram of a main control module provided by an embodiment of the present invention;

[0041] Figure 6 is a structural schematic diagram of a motor drive module provided by an embodiment of the present invention;

[0042] Figure 7 is a flowchart of a software adaptation method based on voltage detection provided by an embodiment of the present invention;

[0043] Figure 8 The present invention provides a schematic diagram of the structure of a software adaptation device based on voltage detection. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0045] like Figure 1 As shown, Figure 1 It is a structural diagram of a software adaptation circuit based on voltage detection provided by an embodiment of the present invention. The software adaptation circuit based on voltage detection includes a power input module, a main control module, a bus voltage dividing module, a motor drive module and a zero-crossing detection module; the input end of the power input module is electrically connected to the mains power supply through the bus, the first output end of the power input module is electrically connected to the input end of the bus voltage dividing module, the output end of the bus voltage dividing module is electrically connected to the first input end of the main control module, the second output end of the power input module is electrically connected to the second input end of the main control module, the third output end of the power input module is electrically connected to the first input end of the zero-crossing detection module, the second input end of the zero-crossing detection module is electrically connected to the mains power supply, the output end of the zero-crossing detection module is electrically connected to the third input end of the main control module, and the output end of the main control module is electrically connected to the input end of the motor drive module.

[0046] In the embodiment of the present invention, the power input module is used to connect to the mains power supply and provide the operating voltage to the main control module after step-down.

[0047] The bus voltage divider module is used to divide the bus voltage according to a certain voltage divider ratio, so that the main control module can indirectly detect the bus voltage by collecting the bus voltage divider voltage. The bus voltage is the mains voltage, which can be 220V, 120V, 100V, etc.

[0048] The zero-crossing detection module is used to detect the zero-crossing voltage, and then perform power-off detection based on the zero-crossing voltage.

[0049] The motor drive module is used to control the rotation of the motor according to the duty cycle signal output by the main control module.

[0050] The above-mentioned main control module is a single-chip microcomputer MCU. A plurality of software programs are stored in the main control module, and there is a corresponding relationship between the software programs and the flag parameters, and the corresponding relationship is a one-to-one corresponding relationship, that is, one software program corresponds to one flag parameter, and there is a corresponding relationship between the flag parameter and the bus voltage divider voltage, and the corresponding relationship is also a one-to-one corresponding relationship, that is, one bus voltage divider voltage corresponds to one flag parameter. In a possible embodiment, since the bus voltage divider voltage may be unstable, a corresponding relationship between the flag parameter and the bus voltage divider voltage interval is adopted, that is, one bus voltage divider voltage area corresponds to one flag parameter. The main control module is configured to determine the target flag parameter by the bus voltage divider on the bus voltage divider module when the machine is not powered on, and temporarily store the target flag parameter. When the machine is powered on, the motor drive module is controlled to work by matching the corresponding target software program with the target flag parameter.

[0051] For example, when the voltage of the AC power supply is 220V, the flag parameter of the software program is VFlag=1, when the voltage of the AC power supply is 120V, the flag parameter of the software program is VFlag=2, and when the voltage of the AC power supply is 100V, the flag parameter of the software program is VFlag=3. Generally speaking, the bus voltage of the target device is the voltage of the AC power supply. Therefore, the corresponding flag parameter can be matched according to the bus voltage.

[0052] The working principle of the above software adaptation is: before the target device leaves the factory, the software programs corresponding to different mains voltages are prepared / imported in advance, the corresponding relationship between the bus voltage (which can be the bus voltage divider) and the flag parameter is set, and the corresponding relationship between the flag parameter and the software program is set. Before the target device leaves the factory, the software programs corresponding to each flag parameter can be written into the main control module. When the target device is powered on but not turned on, the bus voltage inside the target device is determined by detecting the bus voltage divider of the bus voltage divider module. There is a set conversion relationship between the bus voltage and the bus voltage divider. The flag parameters are matched according to the bus voltage, and the matched flag parameters are temporarily stored as the target flag parameters. When the target device is detected to be disconnected from the mains power supply by the zero-crossing detection module, the temporarily stored target flag parameters are written, and then when the device is powered on, the written target flag parameters can be directly read to adapt the corresponding target software program, and the motor drive module can be controlled to work through the target software program, thereby driving the motor to rotate. There is no need to produce in batches according to the mains voltage in different regions, which improves the production efficiency of the equipment.

[0053] In a possible embodiment, the software programs corresponding to each flag parameter may not be written into the main control module first. When the target device is powered on but not turned on, the bus voltage inside the target device is determined by detecting the bus voltage divider voltage of the bus voltage divider module. There is a set conversion relationship between the bus voltage and the bus voltage divider voltage. The flag parameters are matched according to the bus voltage, and the matched flag parameters are temporarily stored as target flag parameters. When the target device is disconnected from the mains power supply, the temporarily stored target flag parameters can be read to adapt the corresponding software program, and the target software program corresponding to the target flag parameter is written into the main control module. After leaving the factory, when the user connects the target device to the mains power supply, the main control module will control the motor drive module to work according to the corresponding target software program, and then drive the motor to rotate. There is no need to carry out batch production according to the mains voltage in different regions, which improves the production efficiency of the equipment.

[0054] The software adaptation circuit based on voltage detection in the embodiment of the present invention can adapt to electronic devices connected to a mains power supply, such as hair dryers, electric drills, electric fans and other devices.

[0055] Further, such as Figure 2 As shown, Figure 2 is a structural diagram of a busbar voltage dividing module provided by an embodiment of the present invention, Figure 2 In the embodiment, the busbar voltage-dividing module includes a first voltage-dividing resistor R42 (2M / ±5%, indicating that the resistance is 2M ohms and the resistance error is ±5%) and a second voltage-dividing resistor R41 (2M / ±5%) arranged in series, a third voltage-dividing resistor R17 (1K / ±5%) and a fourth voltage-dividing resistor R43 (24K / ±1%) arranged in parallel, and a voltage-dividing capacitor C45, wherein one end of the first voltage-dividing resistor R42 is configured as the input end of the busbar voltage-dividing module, the other end of the first voltage-dividing resistor R42 is connected to one end of the second voltage-dividing resistor R41, the other end of the second voltage-dividing resistor R41 is respectively electrically connected to one end of the third voltage-dividing resistor R17 and one end of the fourth voltage-dividing resistor R43 at a first node, the other end of the fourth voltage-dividing resistor R43 is electrically connected to one end of the voltage-dividing capacitor C45, the other end of the voltage-dividing capacitor C45 is electrically connected to the other end of the third voltage-dividing resistor R17 at a second node, and the second node is configured as the output end of the busbar voltage-dividing module.

[0056] The bus voltage is collected by the main control module at a smaller voltage through the bus voltage divider module. The main control module converts the collected bus voltage divider voltage into the actual bus voltage, and then matches the corresponding mark parameters according to the bus voltage.

[0057] Specifically, when the device is powered on but not turned on, the bus voltage inside the target device is determined by detecting the bus voltage divider voltage of the bus voltage divider module. There is a set conversion relationship between the bus voltage and the bus voltage divider voltage, and the mark parameters are matched according to the bus voltage.

[0058] The main control module includes an analog-to-digital conversion unit. After the target device is powered on, the main control module converts the voltage signal of the target device's bus voltage into a digital signal through the analog-to-digital conversion unit, thereby obtaining the digital value of the bus voltage. The digital value of the bus voltage is then transmitted to the main control module for adaptation. The conversion formula is: AD = (V 母线分压电压 / VCC)*4096; where VCC=5V, which is the reference voltage.

[0059] The voltage after bus voltage division: V 母线分压电压 =((220V or 120V or 100V···)*certain proportion). The certain proportion refers to the circuit voltage division ratio. The bus voltage is generally high, and the detection range of the main control module is not that high. The circuit voltage division is used to meet the certain proportion to measure the bus voltage change trend. Figure 2 The specific structure of the busbar voltage divider module, V 母线分压电压 =OVP voltage, OVP voltage is the collection voltage of the first input terminal of the main control module, the bus voltage division ratio of the above bus voltage division module is: R43 / (R42+R41+R43), assuming that the resistance of the above first voltage division resistor R42 is 470K / ±1%, the resistance of the above second voltage division resistor R41 is 470K / ±1%, the resistance of the above third voltage division resistor R17 is 1K / ±5%, and the resistance of the above fourth voltage division resistor R43 is 5.6K / ±1%, that is, the bus voltage division ratio is: 5.6K / (470K+470K+5.6K)=0.005922, then when the voltage of the mains power supply is 220V, V 母线分压电压 =220V*0.0059=1.298V.

[0060] It is understandable that the bus voltage division detection reduces the performance and working requirements for the main control module, which is beneficial to the cost control of the main control module. On the other hand, it can also protect the main control module and other hardware modules by reducing the voltage to a more appropriate voltage to extend the service life.

[0061] For example, the bus voltage is divided into V 母线分压电压 =1V (between bus voltage and bus voltage divider, there is actually the following relationship: V 母线分压电压 =120V*0.0059=1.298V. For the convenience of explanation and calculation, the bus voltage is taken as an integer 1V). After analog-to-digital conversion, the digital signal AD=819. The bus voltage is divided into V 母线分压电压=3V, the digital signal after analog-to-digital conversion is AD=2458. The digital signal is the signal required for the main control module to process, and different bus voltage divisions can be converted into different data signals through analog-to-digital conversion.

[0062] Before the target device leaves the factory, the target device is turned off and connected to the AC power supply to which the software program is to be adapted. The main control module receives the digital signal for processing. The digital signal represents different bus voltages. Then the main control module can adapt the target flag parameter corresponding to the bus voltage according to the correspondence between the digital signal and the flag parameter, and then adapt the software program corresponding to the bus voltage according to the correspondence between the flag parameter and the software program, and burn the software program into the main control module. When the user is in use, connect the AC power supply, and after turning on the device, the main control module runs the software program to control the motor drive module to work.

[0063] In a possible embodiment, all software programs can be burned into the main control module before detecting the bus voltage. When the corresponding flag parameters are confirmed through the bus voltage or the bus voltage divider, the flag parameters are stored. When the user uses it, the AC power supply is connected, and the program start is triggered after the power is turned on, and the program corresponding to the stored flag parameters is automatically called for execution.

[0064] Further, such as Figure 3 As shown, Figure 3 A structural diagram of a power input module provided by an embodiment of the present invention, Figure 3 In the embodiment, the power input module includes a voltage stabilizing circuit, a rectifier circuit and a power supply circuit. The input end of the voltage stabilizing circuit is electrically connected to the AC power supply, the first output end of the voltage stabilizing circuit is electrically connected to the input end of the rectifier circuit, the second output end of the voltage stabilizing circuit is configured as the third output end of the power input module, the first output end of the rectifier circuit is electrically connected to the input end of the power supply circuit, the second output end of the rectifier circuit is configured as the first output end of the power input module, and the output end of the power supply circuit is configured as the second output end of the power input module.

[0065] Specifically, the voltage stabilizing circuit includes a bus bar, the bus bar includes a neutral line access terminal ACN and a live line access terminal ACL, and the neutral line access terminal ACN and the live line access terminal ACL are configured as input terminals of the voltage stabilizing circuit.

[0066] The busbar is provided with an interface HN for a mains load. The mains load can be understood as a load that directly uses the mains to work, such as a heating wire, a heating rod, and the like.

[0067] The voltage stabilizing circuit includes a fuse resistor FR1 (3.15A / 250V, indicating that the rated current is 3.15A and the rated voltage is 250V) arranged on the live wire, a thermistor NTC1 (model 5D-09) arranged on the neutral wire, a voltage stabilizing diode RV1 arranged between the live wire and the neutral wire, a first voltage stabilizing resistor R2 (1M / ±5%), a second voltage stabilizing resistor R6 (1M / ±5%) and a voltage stabilizing capacitor C2 (0.47uF / ×2, indicating that the capacitance of the capacitor is 0.47 microfarads, and ×2 indicates the number of parallel connections), wherein one end of the fuse resistor FR1 is electrically connected to the live wire access terminal ACL; the fuse capacitor The other end of the resistor FR1 is electrically connected to the positive electrode of the voltage-stabilizing diode RV1, the first voltage-stabilizing resistor R2, and one end of the voltage-stabilizing capacitor C2. One end of the first voltage-stabilizing resistor R2 is electrically connected to the second voltage-stabilizing resistor R6. One end of the thermistor NTC is electrically connected to the zero-line access terminal ACN. The other end of the thermistor NTC is electrically connected to the negative electrode of the voltage-stabilizing diode RV1, the second voltage-stabilizing resistor R4, and the other end of the voltage-stabilizing capacitor C2. The other end of the voltage-stabilizing capacitor C2 is also provided with a zero-line interface ACN1. The other end of the voltage-stabilizing capacitor C2 is also provided with a live wire interface ACL1, which is configured as the second output end of the voltage-stabilizing circuit. The live wire interface ACL1 is electrically connected to the first input end of the zero-crossing detection module, so that the zero-crossing detection module can detect whether the mains power supply is disconnected.

[0068] A load interface is also provided on the neutral line, and the load interface can be connected to loads such as negative ion generators and laser transmitters. The output end of the rectifier circuit includes a first output line and a second output line. An inductor L1 (47uH, indicating that the inductance of the inductor is 47 microhenries) is provided on the first output line. A capacitor EC1 (47uF / 400V, indicating that the capacitance of the capacitor is 47 microfarads, and the rated voltage is 400V), a capacitor EC2 (47uF / 400V) and a capacitor C3 (0.1uF / 630V) are also provided in parallel between the first output line and the second output line. Among them, one end of the capacitor EC1, the capacitor EC2 and the capacitor C3 is electrically connected to the first output line, and the other end of the capacitor EC1, the capacitor EC2 and the capacitor C3 is electrically connected to the second output line. On the first output line, an interface terminal HV is provided between the capacitor EC2 and the capacitor C3, and the interface terminal HV is configured as the second output end of the rectifier circuit, and the interface terminal HV is electrically connected to the input end of the busbar voltage divider module. On the second output line, capacitor EC2 and capacitor C3 are connected to the load via a capacitor C6 (0.1nF / 1KV), and the interface terminal HV is configured as the second output terminal of the rectifier circuit, and the interface terminal HV is electrically connected to the input terminal of the busbar voltage divider module. The other end of capacitor C3 is also equipotentially grounded on the second output line.

[0069] The power supply circuit includes an inductor L2 (0.12Ω 1.5A) arranged on the first output line and a power supply chip U1 (KP15051). One end of the inductor L2 is connected to one end of the capacitor C3. The other end of the inductor L2 is divided into four branches and coupled with four pins D of the power supply chip U1. The output of the power supply chip U1 includes a VDD pin, a GND pin, an FB pin and a CS pin. The VDD pin is electrically connected to one end of a resistor R1 (22K / ±1%), the resistor R1 is connected in series with a resistor R4 (3K / ±1%), and the FB pin is connected to a resistor R 1 and the common end of the resistor R4 are electrically connected, the CS pin is electrically connected to one end of the resistor R3 (1.2K / ±1%), the other end of the resistor R3 is connected to the GND pin and one end of the resistor R4, the other end of the resistor R3 is electrically connected to one end of a capacitor C1 (1uF / 50V), one end of the resistor R1 is connected to the other end of the capacitor C1, the cathode of the diode D3 (ES1J) is electrically connected to the second output line, the other end of the diode D3 is connected to one end of the capacitor C1, the other end of the capacitor C1 is connected to the anode of the diode D1, and the cathode of the capacitor C1 is electrically connected to the second output line. One end of the inductor L3 (0.47mH) is electrically connected, the other end of the inductor L3 (0.47mH) is electrically connected to the cathode of the diode D1 at the fifth node, the fifth node is electrically connected to one end of the capacitor EC3 (100uF / 35V) and the resistor R7 (10K / ±1%), the other end of the capacitor EC3 and the resistor R7 (10K / ±1%) are electrically connected to the second output line, the fifth node is connected to one end of the resistor R5, the other end of the resistor R5 is connected to one end of the capacitor C4 (100uF / 50V) and the power supply chip U2 (LP399- 50×3), the other end of capacitor C4 is electrically connected to the second output line, the ground pin GND of the power supply chip U2 is electrically connected to the second output line, the output pin VOUT of the power supply chip U2 is electrically connected to one end of capacitor EC4 (47uF / 6.3V) and capacitor C5 (100nF / 10V), the other ends of capacitor EC4 and capacitor C5 are electrically connected to the second output line, the other end of capacitor C5 is equipotentially grounded, one end of capacitor C5 is a 5V power supply end, and the 5V power supply end is configured as the output end of the power supply circuit.

[0070] Further, such as Figure 4 As shown, Figure 4 A structural diagram of a zero-crossing detection module provided by an embodiment of the present invention, Figure 4In the invention, the zero-crossing detection module includes a first current limiting resistor R16 (470K / ±5%), a second current limiting resistor R40 (470K / ±5%), an optical coupler U3 (OR-357), a diode D2 (1N4007W), a first detection resistor R15 (10K / ±1%), a second detection resistor R10 (1K / ±1%) and a grounding capacitor C1 (100pF / 50V), wherein one end of the first current limiting resistor R16 and the second current limiting resistor R40 are electrically connected at a third node, and the third node is configured as a first input end of the zero-crossing detection module, and the first current limiting resistor R16 and the second current limiting resistor R40 are electrically connected at a third node. The other end of the current limiting resistor R40 is electrically connected to the input end of the optocoupler, the cathode of the diode D2 is configured as the second input end of the zero-crossing detection module, the anode of the diode D2 is electrically connected to the input end of the optocoupler U3, one end of the first detection resistor R15 is electrically connected to the reference voltage source (5V), the other end of the first detection resistor R15 is electrically connected to the output end of the optocoupler U3 and one end of the second detection resistor R10, one end of the grounding capacitor C1 is equipotentially grounded, the other end of the grounding capacitor C1 is electrically connected to the other end of the second detection resistor R10 at a fourth node, and the fourth node is configured as the output end of the zero-crossing detection module.

[0071] Furthermore, the main control module includes a first input port, a second input port, a third input port and an output port, wherein the first input port is configured as the first input end of the main control module, the second input port is configured as the second input end of the main control module, the third input port is configured as the third input end of the main control module, and the output port is configured as the output end of the main control module.

[0072] like Figure 5 As shown, Figure 5 A structural diagram of a main control module provided by an embodiment of the present invention, Figure 5 In the example, the main control module is a single-chip microcomputer control circuit, model CS32ME108C6DBN.

[0073] Specifically, when plugged in, the ACL and ACN ports of the power input module are connected to the live wire and the neutral wire of the mains respectively.

[0074] The formation of the electrical path: the current and voltage are connected from the ACL and ACN ports of the power input module, and then pass through the voltage stabilizing circuit, the rectifier bridge, and the multi-stage step-down circuit, and finally the voltage is reduced to 5V, and then connected from the 5V port of the power input module to the 5V pin port of the MCU control circuit (pin 40 VDDD and pin 37 DVDD, see the two 5V ports on the right side of the MCU control circuit, both connected); at the same time, the HV pin of the power input module is connected to the HV port of the bus voltage divider module, and after the resistor voltage divider in the bus voltage divider module, it is connected from the OVP port of the bus voltage divider module to the OVP pin of the MCU control circuit (pin 3 of the MCU control circuit). Thus, the MCU control circuit forms a power path and obtains V through the OVP port. 母线分压电压 When the MCU control circuit is powered on for the first time, the flag parameter corresponding to the bus voltage is temporarily stored in the RAM of the MCU control circuit.

[0075] The circuit connection of the motor drive circuit: There are PWM-INLW, PWM-INLV, PWM-INLU, PWM-INHW, PWM-INHV, and PWM-INHU pins on the right side of the MCU control circuit, which are connected to the three groups of pins of the motor drive circuit (PWM-INHU, PWM-INLU; PWM-INHV, PWM-INLV; PWM-INHW, PWM-INLW). The motor drive circuit drives the motor to rotate through the three pins U, V, and W on the right side. The motor drive circuit is as follows Figure 6 shown.

[0076] Power-off detection: The access terminals of the zero-crossing detection module are ACN and ACL1 (in parallel with ACN and ACL1 of the power input module). The ZERO-DET of the zero-crossing detection circuit is connected to the ZERO-DET pin of the MCU control circuit. When the power is off, the ZERO-DET inputs a power-off signal to the MCU control circuit. At this time, the EEPROM inside the MCU will write the flag parameters temporarily stored in the RAM, and then call the corresponding software program through the written confirmed flag parameters.

[0077] When the power is turned on again: the MCU control circuit reads the flag parameters stored in the internal EEPROM and calls the corresponding software logic (especially including the over-voltage and under-voltage range data corresponding to the mains voltage).

[0078] Other functions: MCU control circuit also includes:

[0079] LED function (connected to the LED module through 7 LED pins, the LED module is not shown);

[0080] Key function (connected to an external key module through the A1, A2, A3 pins, the external key module is not shown).

[0081] More specifically, the target device in the embodiment of the present invention includes factory configuration and normal operation.

[0082] Factory configuration: After the target device is plugged in, the bus voltage of the MCU-related circuit will be detected, and then the software will do the flag parameter assignment processing, which takes about 5 seconds to complete, and wait for the power to be unplugged to perform the parameter memory operation. Once the power is unplugged, the configuration process ends, and the next time the power is plugged in, the memorized parameters are read and enabled if they are within the range. If the factory forgets to configure, the default parameters are used to ensure that the device can be powered on, but the logical function may be abnormal.

[0083] Normal operation: After the target device is plugged in, the power input module will work first, and the zero-crossing detection module will detect whether the power-on signal is normal. If it is abnormal, it will not start up and will continue to detect. After starting up, the bus voltage of the MCU-related circuit will continue to detect and monitor over-voltage and under-voltage. The user's key control signal is input to the MCU for selective logic processing based on the memory parameters. If it is a motor control, the MCU will output the signal to the motor drive module for further signal processing, and then output it to the U, V, and W ports. This port is connected to the motor to rotate and work.

[0084] like Figure 7 As shown, Figure 7 1 is a flow chart of a software adaptation method based on voltage detection provided by an embodiment of the present invention, the software adaptation method comprising the following steps:

[0085] 101. When a target device is connected to a first target power supply and is in a shutdown state, detect a bus voltage of the target device.

[0086] In the embodiment of the present invention, the target device may be a device having the software adaptation circuit based on voltage detection, or a device having a mains power detection circuit, such as a hair dryer, an electric drill, or an electric fan.

[0087] In a possible embodiment, the above-mentioned software adaptation method based on voltage detection can be applied to the software adaptation circuit based on voltage detection in the above-mentioned embodiment, and specifically applied to the main control module in the software adaptation circuit based on voltage detection.

[0088] The first target power supply can be a power supply of the same value as the mains voltage that the staff needs to configure for the target device before leaving the factory. If the target device wants to be set with 220V, it can be connected to the 220V mains power supply before leaving the factory. If the target device wants to be set with 120V, it can be connected to the 120V mains power supply before leaving the factory. If the target device wants to be set with 100V, it can be connected to the 100V mains power supply before leaving the factory.

[0089] After the target device is powered on for a period of time, the bus voltage of the machine can be detected by digital signal, and then a digital quantity can be obtained. The above digital quantity can represent the corresponding bus voltage value.

[0090] It is worth mentioning that, in one embodiment, "the target device is connected to the first target power supply" includes two situations: "connected for the first time" and "connected for the first time after the flag parameters have been written but erased". In other words, it can be understood as "the target device is connected to the first target power supply for the first time, where the first time refers to the state when the flag parameters do not yet exist inside the machine".

[0091] In a possible embodiment, the target device has not been connected to the first target power supply before leaving the factory, and the first target power supply can be understood as the mains power supply when used by the user. At this time, the user can connect the target device to the first target power supply according to the target device manual and turn off the target device, so that the bus voltage can be automatically detected inside the target device.

[0092] 102. Determine corresponding target mark parameters according to the bus voltage.

[0093] In the embodiment of the present invention, different marking parameters can be memorized according to different bus voltages, and different marking parameters correspond to different software programs. There is a corresponding relationship between the bus voltage and the marking parameter.

[0094] 103. Store and process the target flag parameters.

[0095] In an embodiment of the present invention, the above storage process includes temporary storage process and writing process. The temporary storage process is to temporarily store the target flag parameter in RAM, and the writing process is to write the target flag parameter into EEPROM. Specifically, the target flag parameter can be written into EEPROM after the target device disconnects the first target power supply, and the software program corresponding to the target flag parameter can be written into EEPROM. Of course, all software programs can also be written into EEPROM before detecting the bus voltage of the target device. The software program may include different under-voltage and over-voltage protection mechanisms, different system operation logics, operation sequences, different usage functions, etc.

[0096] 104. When the target device is connected to a second target power source, a corresponding target software program is determined based on the target identification parameter.

[0097] In the embodiment of the present invention, the second target power source can be understood as the AC power source connected when the target device reaches the user and is powered on again. The target device will automatically read the flag parameter A and read the corresponding target software program based on the flag parameter to implement the software logic function through the target software program. The flag parameter and the software program are in a one-to-one correspondence.

[0098] 105. Execute the target software program to drive the target device to work under the second target power supply.

[0099] In the embodiment of the present invention, after the target software program is read, the target software program is executed, thereby driving the target device to work under the mains power supply used by the user.

[0100] For example, once the MCU control circuit of the target device is powered on, it will obtain the flag parameter A from the EEPROM through software read operation. After the power button is pressed to turn on the device, the software will execute different if statements (i.e. different software logic) according to parameter A. If the flag parameters are different, different over-voltage and under-voltage parameter threshold comparisons will be executed.

[0101] In the embodiment of the present invention, by setting the correspondence between the bus voltage and the flag parameters, and setting the correspondence between the flag parameters and the software program, when the equipment is powered on but not turned on, the flag parameters are matched and stored through the bus voltage, and then when the equipment is powered on, the stored flag parameters can be directly read, and the corresponding software program can be adapted to work through the read flag parameters, which eliminates the need for batch production for different AC voltages, thereby improving the production efficiency of the equipment.

[0102] Optionally, in the step of detecting the bus voltage of the target device, the bus divided voltage of the target device may be detected; and the bus voltage of the target device may be determined based on the bus divided voltage.

[0103] In an embodiment of the present invention, specifically, when the device is powered on but not turned on, the bus voltage inside the target device is determined by detecting the bus voltage divider voltage of the bus voltage divider module. There is a specific conversion relationship between the bus voltage and the bus voltage divider voltage, and the mark parameters are matched according to the bus voltage.

[0104] The main control module includes an analog-to-digital conversion unit. After the target device is powered on, the main control module converts the voltage signal of the target device's bus voltage into a digital signal through the analog-to-digital conversion unit, thereby obtaining the digital value of the bus voltage. The digital value of the bus voltage is then transmitted to the main control module for adaptation. The conversion formula is: AD = (V 母线分压电压 / VCC)*4096; where VCC=5V, which is the reference voltage.

[0105] The voltage after bus voltage division: V 母线分压电压 =((220V or 120V or 100V···)*certain proportion). The certain proportion refers to the circuit voltage division ratio. The bus voltage is generally high, and the detection range of the main control module is not that high. Therefore, the circuit voltage division is used to meet the certain proportion to measure the bus voltage change trend.

[0106] Using bus voltage division to detect bus voltage reduces the performance and working requirements for the main control module, which is beneficial to the cost control of the main control module. On the other hand, it can also protect the main control module and other hardware modules by reducing the voltage to a more appropriate voltage to extend the service life.

[0107] Before the target device leaves the factory, the AC power supply (first target power supply) to which the software program is to be adapted is connected when the target device is turned off. The main control module receives the digital signal for processing. The above digital signal represents different bus voltages. Then, the main control module can adapt the target flag parameters corresponding to the bus voltage according to the correspondence between the digital signal and the flag parameters, and temporarily store the target flag parameters in the RAM of the main control module. Then, according to the correspondence between the flag parameters and the software program, the software program corresponding to the bus voltage is adapted. After the AC power supply is disconnected, the software program is burned into the EEPROM of the main control module.

[0108] Of course, all software programs can also be burned into the EEPROM of the main control module before the target device is powered off and connected to the main power supply to which the software program is to be adapted. When the target device is powered off and connected to the main power supply (first target power supply) to which the software program is to be adapted, the main control module receives the digital signal for processing, and the digital signal represents different bus voltages. Then, the main control module can adapt the target flag parameter corresponding to the bus voltage according to the corresponding relationship between the digital signal and the flag parameter, and temporarily store the target flag parameter in the RAM of the main control module. After the main power supply is disconnected, the target flag parameter is burned into the EEPROM of the main control module.

[0109] When the user is in use, he connects to the mains power supply (the second target power supply), and after turning on the machine, the main control module runs the software program to control the motor drive module to work.

[0110] In a possible embodiment, when the user is in use, if the target flag parameter is not pre-burned in the EEPROM, or the target flag parameter pre-burned in the EEPROM is erased, or the voltage of the second target power supply is different from that of the first target power supply (i.e., the mains power supply is different), the user can enter the model of the software program re-adaptation, operate according to the instruction manual of the target device, connect the target device to the second target power supply, and make the target device in a shutdown state. At this time, the target device will automatically execute the above-mentioned software adaptation method based on voltage detection. After completing the software adaptation, when the user is in use, connect the mains power supply (second target power supply), after turning on the machine, the main control module matches the corresponding target software program according to the target flag parameter written in the EEPROM, and runs the target software program to control the motor drive module to work. It should be noted that all software programs need to be burned into the EEPROM of the main control module in advance.

[0111] Optionally, in the step of storing the target flag parameters, the target flag parameters may be temporarily stored; after detecting that the target device is disconnected from the first target power supply, the target flag parameters are written.

[0112] In an embodiment of the present invention, the above-mentioned storage processing includes temporary storage processing and writing processing. After the target device is not turned on and connected to the first target power supply, before the first target power supply is disconnected, the target flag parameter is temporarily stored. The zero-crossing detection module can be used to detect whether the target device is disconnected from the first target power supply. If it is detected that the target device is disconnected from the first target power supply, the target flag parameter is written and the software program corresponding to the target flag parameter is written.

[0113] It can be understood that in the embodiment of the present invention, the corresponding flag parameter A is obtained according to the voltage value, when the target device is not turned on (i.e., in standby, the target device is not running). Because if it is turned on, it means that the target device already has software logic such as under-voltage and over-voltage protection range (B-B') + system operation logic. At this time, it can only operate normally under the AC voltage (B-B') of the corresponding area, otherwise the target device will report an error due to over-voltage and under-voltage problems and cannot operate normally. Therefore, only when the flag parameter has not been written (including the first time it has not been written, and the flag parameter has been written but manually erased), that is, before the machine is turned on and operated, can the corresponding flag parameter be matched according to the current input voltage, and then the corresponding software program can be written.

[0114] Optionally, after executing the target software program to drive the target device to work under the second target power supply, it is also possible to detect that the target device is disconnected from the second target power supply, and obtain the last device working parameters of the target device; store and process the device working parameters; when the target device is connected to the second target power supply next time and is in the power-on state, read the device working parameters; and control the target device to work with the device working parameters in the initial stage.

[0115] In an embodiment of the present invention, when a user uses a target device, after connecting to a second target power supply, a zero-crossing detection module is used to detect whether the target device is disconnected from the second target power supply. If it is detected that the second target power supply is disconnected, the last device operating parameters are stored and processed, and when the second target power supply is connected next time, the device operates according to the stored device operating parameters. The above device operating parameters are stored in the EEPROM of the main control module.

[0116] The above-mentioned equipment working parameters are different from software programs. The above-mentioned working parameters are the business logic memory preferred by users during use. They are product specification requirements and have nothing to do with software programs.

[0117] It is understandable that the last device operating parameter W during the power-on process will be automatically memorized only when the power is off, and when the target device is powered on, the parameter W will be directly referenced to meet the first power-on function requirements of different customers. For example, taking a hair dryer as an example, the hair dryer is in the second wind speed parameter when the power is off. When the power is on + turned on again, the hair dryer is operated at the second wind speed for the first time. The device operating parameter W is a one-time use. When it is operated for the second time, the parameter is overwritten and memorized again according to the device operating parameter at the time of the last power off. Among them, the solution of triggering parameter memory only when the target device is powered off can reduce the loss caused by multiple adjustments and multiple memories of parameters in the process, which helps to extend the life of the data storage module (EEPROM).

[0118] It is understandable that in the specific implementation of this application, software data, voltage data and other related data are involved. When the embodiments in this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0119] like Figure 8 As shown, an embodiment of the present invention provides a software adaptation device based on voltage detection, and the software adaptation device includes:

[0120] A first detection module 201, configured to detect a bus voltage of a target device when the target device is connected to a first target power supply and is in a shutdown state;

[0121] A first processing module 202 is used to determine a corresponding target marker parameter according to the bus voltage, and there is a corresponding relationship between the bus voltage and the marker parameter;

[0122] A first temporary storage module 203, used for storing and processing the target flag parameter;

[0123] A second processing module 204 is used to determine a corresponding target software program based on the target flag parameter when the target device is connected to a second target power supply, the flag parameter and the software program have a corresponding relationship, and the voltage of the first target power supply is the same as that of the second target power supply;

[0124] The execution module 205 is used to execute the target software program to drive the target device to work under the second target power supply.

[0125] Optionally, the detection module 201 is further used to detect the bus divided voltage of the target device; and determine the bus voltage of the target device based on the bus divided voltage.

[0126] Optionally, the first temporary storage module 203 is further used to temporarily store the target flag parameter; after detecting that the target device is disconnected from the first target power supply, the target flag parameter is written.

[0127] Optionally, the device further comprises:

[0128] A second detection module, configured to obtain the last device operating parameters of the target device after detecting that the target device is disconnected from the second target power supply;

[0129] A second temporary storage module, used for storing and processing the device operating parameters;

[0130] A reading module, used for reading the device operating parameters when the target device is connected to the second target power supply and is in a powered-on state next time;

[0131] The control module is used to control the target device to operate with the device operating parameters in an initial stage.

[0132] The software adaptation device based on voltage detection provided in the embodiment of the present invention can implement each process implemented by the software adaptation method based on voltage detection in the above method embodiment, and can achieve the same beneficial effect. To avoid repetition, it will not be described here.

[0133] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The computer-readable storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0134] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims

1. A software adaptation circuit based on voltage detection, characterized in that: The software adaptation circuit based on voltage detection includes a power input module, a main control module, a bus voltage dividing module, a motor driving module and a zero-crossing detection module; The input end of the power input module is electrically connected to the mains power supply through a bus, the first output end of the power input module is electrically connected to the input end of the bus voltage divider module, the output end of the bus voltage divider module is electrically connected to the first input end of the main control module, the second output end of the power input module is electrically connected to the second input end of the main control module, the third output end of the power input module is electrically connected to the first input end of the zero-crossing detection module, the second input end of the zero-crossing detection module is electrically connected to the mains power supply, the output end of the zero-crossing detection module is electrically connected to the third input end of the main control module, and the output end of the main control module is electrically connected to the input end of the motor drive module; The main control module stores a plurality of software programs, wherein the software programs correspond to flag parameters, and the flag parameters correspond to the bus voltage divider voltage. The main control module is configured to determine the target flag parameters by the bus voltage divider voltage on the bus voltage divider module when the machine is not powered on, and store and process the target flag parameters; and to control the motor drive module to operate by the target software program corresponding to the target flag parameters when the machine is powered on.

2. The software adaptation circuit based on voltage detection according to claim 1, characterized in that: The busbar voltage-dividing module includes a voltage-dividing capacitor, a first voltage-dividing resistor and a second voltage-dividing resistor arranged in series, and a third voltage-dividing resistor and a fourth voltage-dividing resistor arranged in parallel, wherein one end of the first voltage-dividing resistor is configured as the input end of the busbar voltage-dividing module, the other end of the first voltage-dividing resistor is connected to one end of the second voltage-dividing resistor, the other end of the second voltage-dividing resistor is electrically connected to one end of the third voltage-dividing resistor and one end of the fourth voltage-dividing resistor at a first node respectively, the other end of the fourth voltage-dividing resistor is electrically connected to one end of the voltage-dividing capacitor, the other end of the voltage-dividing capacitor is electrically connected to the other end of the third voltage-dividing resistor at a second node, and the second node is configured as the output end of the busbar voltage-dividing module.

3. The software adaptation circuit based on voltage detection as claimed in claim 1, characterized in that: The power input module includes a voltage stabilizing circuit, a rectifier circuit and a power supply circuit. The input end of the voltage stabilizing circuit is electrically connected to the AC power supply, the first output end of the voltage stabilizing circuit is electrically connected to the input end of the rectifier circuit, the second output end of the voltage stabilizing circuit is configured as the third output end of the power input module, the first output end of the rectifier circuit is electrically connected to the input end of the power supply circuit, the second output end of the rectifier circuit is configured as the first output end of the power input module, and the output end of the power supply circuit is configured as the second output end of the power input module.

4. The software adaptation circuit based on voltage detection as claimed in claim 1, characterized in that: The zero-crossing detection module includes a first current limiting resistor, a second current limiting resistor, an optocoupler, a diode, a first detection resistor, a second detection resistor and a grounding capacitor, wherein one end of the first current limiting resistor and the second current limiting resistor are electrically connected at a third node, the third node is configured as the first input end of the zero-crossing detection module, the other end of the first current limiting resistor and the second current limiting resistor are electrically connected to the optocoupler input end, the cathode of the diode is configured as the second input end of the zero-crossing detection module, the anode of the diode is electrically connected to the optocoupler input end, one end of the first detection resistor is electrically connected to a reference voltage source, the other end of the first detection resistor is electrically connected to the output end of the optocoupler and one end of the second detection resistor, one end of the grounding capacitor is equipotentially grounded, the other end of the grounding capacitor is electrically connected to the other end of the second detection resistor at a fourth node, and the fourth node is configured as the output end of the zero-crossing detection module.

5. The software adaptation circuit based on voltage detection according to claim 1, characterized in that: The main control module includes a first input port, a second input port, a third input port and an output port, wherein the first input port is configured as the first input end of the main control module, the second input port is configured as the second input end of the main control module, the third input port is configured as the third input end of the main control module, and the output port is configured as the output end of the main control module to be electrically connected to the input end of the motor drive module.

6. A software adaptation method based on voltage detection, characterized in that: The method comprises the following steps: When the target device is connected to the first target power supply and is in a shutdown state, detecting the bus voltage of the target device; Determine a corresponding target mark parameter according to the bus voltage, and there is a corresponding relationship between the bus voltage and the mark parameter; The target flag parameter is stored and processed; When the target device is connected to a second target power source, a corresponding target software program is determined based on the target flag parameter, the flag parameter and the software program have a corresponding relationship, and the voltage of the first target power source is the same as that of the second target power source; The target software program is executed to drive the target device to operate under the second target power supply.

7. The software adaptation method based on voltage detection according to claim 6, characterized in that: The step of detecting the bus voltage of the target device comprises: Detecting the bus divided voltage of the target device; Based on the bus divided voltage, a bus voltage of the target device is determined.

8. The software adaptation method based on voltage detection according to claim 6, characterized in that: The step of storing the target flag parameters comprises: Temporarily storing the target flag parameter; After detecting that the target device disconnects the first target power supply, the target flag parameter is written.

9. The software adaptation method based on voltage detection according to claim 6, characterized in that: After the step of executing the target software program to drive the target device to work under the second target power supply, the method further includes: After detecting that the target device is disconnected from the second target power supply, acquiring the last device operating parameters of the target device; storing and processing the working parameters of the device; When the target device is connected to the second target power supply and is in the power-on state next time, reading the device operating parameters; The target device is controlled to operate with the device operating parameters in an initial stage.

10. A software adaptation device based on voltage detection, characterized in that: The hair dryer software adapter comprises: A first detection module, used for detecting the bus voltage of the target device when the target device is connected to the first target power supply and is in a shutdown state; A first processing module, used for determining a corresponding target mark parameter according to the bus voltage, wherein there is a corresponding relationship between the bus voltage and the mark parameter; A first temporary storage module, used for storing and processing the target flag parameter; a second processing module, configured to determine a corresponding target software program based on the target flag parameter when the target device is connected to a second target power supply, wherein there is a corresponding relationship between the flag parameter and the software program, and the voltage of the first target power supply is the same as that of the second target power supply; An execution module is used to execute the target software program to drive the target device to work under the second target power supply.