Disclosure of Invention
The purpose of the invention is as follows: the invention aims to solve the problems of various power supply voltages and non-uniform power supply interfaces of the low-power low-voltage direct-current household appliance, thereby reducing the power supply cost of the low-power low-voltage direct-current household appliance and improving the power supply safety of the low-power low-voltage direct-current household appliance.
The technical scheme is as follows: in order to achieve the purpose, the invention adopts the following technical scheme:
according to a first aspect of the invention, a household appliance power supply method based on a USB Type-C interface is provided, the method uses four pins of VBUS, GND, D + and D-in the USB Type-C interface to realize power supply, and comprises the following steps:
(S11) keeping the voltage VB of the VBUS array pin at 5V in the initial state of the power supply party, and keeping the D + and D-pins in short circuit;
(S12) the power provider detecting the D + and D-pin voltages VDA and VDB, turning off the D + and D-pins when it is detected that VDA is VDB and satisfies more than the first voltage threshold V1 and less than or equal to the second voltage threshold V2 for a time duration greater than the first time period T1, and otherwise maintaining the state until VDA is VDB is 0V;
(S13) the power supplier disconnects the D + and D-pins and detects the voltages VDA and VDB after a second time period T2, and when it is detected that VDA is VDB and satisfies a voltage greater than the first voltage threshold V1 and equal to or less than the second voltage threshold V2, it is determined that the power supplier can be supplied with power, the power supplier is supplied with a required voltage, and the voltage VB of VBUS is refreshed at every designated time interval Δ T.
Further, the power supply method further includes: when detecting that VDA-VDB-third voltage threshold V3, the voltage VB of VBUS drops to 0V and remains in state until VDA-VDB-0V.
Further, the power supply method further includes: when detecting that VDA is 0V, it is determined that the power receiver is disconnected, and the power receiver is restored to the initial state.
Further, the first voltage threshold V1 is 0.3V, the second voltage threshold V2 is 3V + δ, and the third voltage threshold V3 is 3.3V- δ, where δ is a regulation parameter, and a value of δ ranges from 0V to 0.15V.
Further, in order not to conflict with the QC protocol device and to be compatible with the QC protocol device by extension, the first time period T1 is 1.25s, and the second time period T2 is 1 s.
Further, the voltage VB of VBUS in step S13 is calculated according to the following formula:
in the formula, VB (t1) represents the voltage value of VBUS at time t1, and t0 is the time immediately before time t1, that is, t1-t0 is Δ t; acc is the control accuracy of VBUS pin voltage of the power supplier, and VD denotes the applied reference voltage of the power receiver.
According to a second aspect of the present invention, there is provided a power supply circuit for a household electrical appliance based on a USB Type-C interface, comprising: voltage control circuit, protocol chip A, switch K1 and pull-down resistor R0The PWM pin of the protocol chip A is connected with a voltage control circuit to control the output voltage between the VBUS of the voltage control circuit and a GND pin, and the GND pin is connected with the shell; the AD module pins D + and D-in the protocol chip A are connected by a controllable switch K1, the switch K1 is controlled by the protocol chip A, and the D + and D-pins are respectively connected by a pull-down resistor R0Is connected with the shell.
According to a third aspect of the present invention, there is provided a power receiving method for a household appliance based on a USB Type-C interface, comprising the following steps:
(S21) shorting the D + and D-pins and outputting a reference voltage VD, the VD value being greater than the first threshold V1 and equal to or less than the second voltage threshold V2;
(S23) when the power supply needs to be terminated, setting VD to a third voltage threshold V3.
Further, the power receiving method further includes, after step S21:
(S22) detecting VBUS voltage VB of the power supplier, decreasing VD when VB is greater than a required target voltage, and increasing VD when VB is less than the required target voltage.
Further, the VD value in step S22 is calculated according to the following formula:
in the formula, VB is the voltage of VBUS at the current time, VBR is the VBUS target voltage, and Acc2 is the voltage sampling accuracy of the receiving side.
Further, the step S22 further includes: and when the VBUS voltage value is detected to reach a preset proportion compared with the VBUS target voltage value, stopping updating the VD.
According to a fourth aspect of the present invention, there is provided a power receiving circuit of a household electrical appliance based on a USB Type-C interface, comprising: the VBUS pin is connected with the first resistor R1, the GND pin is connected with the second resistor R2, the other end of the first resistor R1 is connected with the other end of the second resistor R2, and the D + pin and the D-pin are connected to the common end of the two first resistors and the common end of the two second resistors after being in short circuit.
According to a fifth aspect of the present invention, there is provided a power receiving circuit of a household electrical appliance based on a USB Type-C interface, comprising: the device comprises a protocol chip B and a voltage sampling circuit, wherein the voltage sampling circuit is used for receiving VBUS voltage of a power supplier, the protocol chip B is used for giving reference voltage, a DA module pin D + and a D-of the protocol chip B are in short circuit, and an AD module pin of the protocol chip B is connected with a voltage sampling signal line of the VBUS voltage sampling circuit.
Has the advantages that:
1. the circuit and the method can provide self-adaptive voltage of 5V to 48V based on the USB Type-C interface, and cover the power supply voltage range of the low-voltage direct-current household appliance.
2. The reference of the VBUS output voltage can be given quickly, and the output voltage is regulated more quickly.
3. Two power receiving strategies are provided, and scenes with different power supply precision requirements are met. Under the scene of low requirement on the accuracy of the VBUS output voltage, the power receiving circuit has the characteristics of simple circuit and low cost.
4. The power supply protocol avoids conflict with main stream quick charging protocols such as QC, PD and the like, and is convenient to realize.
Detailed Description
The present invention is further illustrated by the following figures and specific examples, which are to be understood as illustrative only and not as limiting the scope of the invention, which is to be given the full breadth of the appended claims and any and all equivalent modifications thereof which may occur to those skilled in the art upon reading the present specification.
Hereinafter "power supplier" includes, but is not limited to, devices that supply power from a power source, power adapter, power port, etc. following the protocol of the present invention; the "power receiver" includes, but is not limited to, electric devices such as household appliances. VBUS, GND, D + and D-four pins in the USB Type-C interface are used in the technical scheme, wherein the VBUS and the GND pins transmit electric energy, and the D + and the D-pins are used for communication. The D + and D-array pins are respectively connected with a pull-down resistor, the voltage of the pull-down resistor is VDA and VDB, and the initial value of the voltage VB of the VBUS pin is 5V.
Referring to fig. 1, the method for supplying power to a home appliance based on a USB Type-C interface includes the steps of:
1. when the power supplier is not connected with the power receiver, the power supplier is always in short circuit with the D + and D-pins, and VB keeps 5V;
2. the power receiver and the power supplier are initially connected through a USB Type-C interface, the power receiver applies voltage VD to pins D + and D-, and the voltage VD lasts, namely VDA is equal to VDB and VD, and VD is greater than a first threshold value V1 and is less than or equal to a second threshold value V2. Under the protocol, the voltage range of VDA and VDB is between 0.3-3V under normal conditions, and the range is 0-3.3V under all operating conditions. In the present invention, the first threshold V1 is 0.3V, the second threshold V2 is 3V + δ, δ is a redundancy space left in engineering practice to prevent errors, δ is less than 0.15V, and since the voltage value with a set meaning of 3V or more is 3.3V, the redundancy is generally set to be half of the voltage values with two adjacent set meanings, so as to distinguish the two voltages with the set meanings, i.e., (3.3V-3V)/2, to be 0.15V.
3. When a power supply side detects that the voltage VDA on the D + pin and the voltage VDB on the D-pin are VDB and VD, VD is larger than 0.3V and less than or equal to 3V + delta, and lasts for 1.25s, the D + pin and the D-pin are disconnected, and the voltages VDA and VDB of the D + pin and the D-pin are continuously detected; otherwise, the VBUS initial 5V state is maintained until VDA equals VDB equals 0V;
4. when the power supplier disconnects the D + and the D-pin 1s and detects that VDA is equal to VDB and VD, the power supplier can supply the voltage required by the power supplier by determining that the power supplier supports the protocol, otherwise, the power supplier maintains the state until VDA is equal to VDB and VD is equal to 0V;
5. the voltage VB of the power supply VBUS is updated every a specified time interval Δ t, and the target value of the voltage VB at any time t1 is calculated as follows:
in the formula: the time t0 is the time immediately before the time t1, i.e., t1-t0 equals Δ t, in the embodiment, Δ t equals 10ms, and the interval may be set by itself; acc is the control accuracy of the voltage of the VBUS pin of the power supplier, VD is the reference voltage provided by the power receiver, VD is VDA or VDB, and round represents rounding.
6. If the power supplier detects that the VDA is equal to 3.3V- δ, the voltage VB of VBUS is reduced to 0V, and the state is maintained until the VDA is equal to 0V;
7. when the power transmitting side detects that VDA is equal to VDB is equal to 0V, it is determined that the power receiving side is disconnected from the power transmitting side, and the state of step 1 is restored.
The invention provides two power receiving party charging control modes, in the mode 1, the power receiving party charging control mode is suitable for the power supply requirement which is more than 20V and less than or equal to 48V, and the precision requirement is lower than 0.1V, and can also be called a scheme with low precision requirement, a protocol flow chart of the power receiving party is shown in figure 2, under the mode, the power receiving party is short-circuited with a D + pin and a D-pin and outputs a reference voltage VD, and the VD value is more than 0.3V and less than or equal to 3V + delta; in the mode 2, the method is applicable to a power supply requirement of 5V or more and 20V or less and the accuracy requirement is lower than 0.01V, which may also be referred to as a high accuracy requirement scheme, and a protocol flow chart of the power receiving side is as shown in fig. 3, and different from the mode 1, after the power receiving side outputs a reference voltage VD meeting the requirement, the size of VD is adjusted by an algorithm according to a sampled VBUS voltage value VB.
As shown in fig. 4, the protocol chip a is responsible for interacting with the power receiver through the protocol, and further determines the voltage VBUS to be output by the power receiver, and the voltage control circuit transforms the input voltage to obtain the output voltage VBUS to be supplied to the power receiver. The protocol chip A is a general or special chip comprising an AD module, a DA module and a PWM module, and two pins of the AD module of the protocol chip A are used as D + and D-pins of a power supplier. The voltage control circuit may be a controllable power supply circuit. Specifically, the power supply side circuit includes: voltage control circuit, protocol chip A, switch K1 and pull-down resistor R0The PWM pin of the protocol chip A is connected with a voltage control circuit to control the output voltage between the VBUS of the voltage control circuit and a GND pin, and the GND pin is connected with the shell; the AD module pins D + and D-in the protocol chip A are connected by a controllable switch K1, and the D + and D-pins are respectively connected by a pull-down resistor R0Is connected with the shell. The switch K1 is controlled by the protocol chip a, and the switch K1 controls the short circuit and open circuit of the power supplier D + and D-pins in the protocol handshake phase, specifically, as can be seen from the above steps, the short circuit occurs before the handshake, and the open circuit occurs after 1.25 seconds of the handshake.
For the power receiver with a voltage greater than 20V and less than or equal to 48V, the circuit diagram is shown in fig. 5. The voltage needed by the D + and D-pins is obtained from the voltage between VBUS and GND through a voltage dividing resistor. Specifically, a VBUS pin is connected with a first resistor R1, a GND pin is connected with a second resistor R2, the other end of the first resistor R1 is connected with the other end of the second resistor R2, and a D + pin and a D-pin are connected to the common end of the two first resistors and the common end of the two second resistors after being in short circuit.
For the power receiver with voltage greater than or equal to 5V and less than 20V, the circuit diagram is shown in fig. 6. D + and D-pin voltages are output through the protocol chip B, and the voltage sampling circuit is used for collecting power supply voltage so as to control the D + and D-pin voltages and realize closed-loop control of the power supply voltage. The protocol chip B is a general or special chip comprising an AD module, a DA module and a PWM module, a DA module pin D + and a D-of the protocol chip B are in short circuit, and an AD module pin of the protocol chip B is connected with a VBUS voltage sampling signal line. The voltage sampling circuit includes, but is not limited to, various voltage sampling circuits such as a resistance voltage dividing circuit, a hall voltage sampling circuit, and the like.
The following describes specific working procedures of the power supplier and the power receiver under two power receiving control strategies by specific examples as follows:
1) mode 1
The power supplier adopts the circuit scheme shown in fig. 4, the voltage sampling precision is 0.01V, the output precision of the VBUS output voltage is 0.1V, and the power receiver adopts the circuit scheme shown in fig. 5.
1. When the power supplier is not connected with the power receiver, the power supplier is always in short circuit with the D + and D-pins, and VB keeps 5V;
2. the power receiver needs VBUS output voltage of 48V, and the first resistor R in the circuit shown in FIG. 51Is 15kohm, the second resistance R2Is 1kohm, when the power receiver and the power supplier are connected initially through a USB Type-C interface, the VD of the power receiver is 0.31V, the VD is obtained through the detection of a protocol chip A, and the value calculation process is as follows: when VBUS is initially 5V, 5V/(15kohm +1kohm) × 1kohm is 0.3125V, the sampling precision is 0.01V, so VD is 0.31V;
3. after the power supplier detects that the voltage on the D + pin and the D-pin is 0.31V and lasts for 1.25s, the D + pin and the D-pin are disconnected, and the voltage of the D + pin and the voltage of the D-pin are continuously detected;
4. after disconnecting the D + pin and the D-pin for 1s and detecting that VD is still 0.31V, the power supplier judges that the power supplier supports the protocol and supplies voltage to the power supplier, and the time at this moment is 0 s;
according to the formula (1), the target value of the voltage VB of the VBUS at the time of 0.01s calculated by the power supplier is:
5. at the time of 0.01s, VB is 48.4V, VD is 3.02V, and then the output voltage of 0.02s is 48.1V calculated according to the formula (1); the VD value calculation process is as follows: since VBUS becomes 48.4V (output accuracy 0.1V), 48.4V/(15kohm +1kohm) × 1kohm ═ 3.025V, and sampling accuracy is 0.01V, resulting in 3.02V;
6. and circularly calculating the next time VB and outputting the VBUS voltage VB. And continuously calculating and updating until the power receiver is disconnected.
2) Mode 2
The power supplier adopts the circuit scheme shown in fig. 4, the voltage sampling precision is 0.001V, the VBUS output voltage output precision is 0.01V, and the power receiver adopts the circuit scheme shown in fig. 6.
1. When the power supplier is not connected with the power receiver, the power supplier is always in short circuit with the D + and D-pins, and VB keeps 5V;
2. the VBUS output voltage of the receiver is 9.01V, and in this mode, VD is not divided by VBUS, but is given by the protocol chip B, so the communication delay may cause the voltage to continuously rise, even exceeding the receiver withstand voltage. In order to reduce the influence of the communication delay on the power supply voltage, the VD voltage can be set below a certain value to ensure that the power supply and the power consumer still do not exceed the target voltage (9.01V in the embodiment) after a specified update time interval (10 ms in the embodiment). The calculation formula of VD is as follows:
in the formula, VB is the voltage of VBUS at the current time, VBR is the required VBUS target voltage, and Acc2 is the voltage sampling accuracy of the receiving side. Then, initially, VD becomes 3 x (5/9.01)0.5=2.235V。
3. After the power supplier detects that the voltage on the D + pin and the D-pin is 2.235V and lasts for 1.25s, the D + pin and the D-pin are disconnected, and the voltage of the D + pin and the voltage of the D-pin are continuously detected;
4. after the power supplier disconnects the D + pin and the D-pin for 1s and detects that VD is still 2.235V, the power supplier is judged to support the protocol and supply voltage to the power supplier, and the time at the moment is 0 s;
5. according to the formula (1), the target value of the voltage VB of the VBUS at the time of 0.01s calculated by the power supplier is:
6. at the time of 0.01s, the output voltage VB of the VBUS is 6.71V, after the power receiver detects VB, 3 x (6.71/9.01) ^0.5 is 2.589 according to the formula (2), therefore, VD is set to be 2.589V, and the power supplier calculates that the target value of the voltage VB of the VBUS at the time of 0.02s is 7.78V according to the formula (1);
7. at the time of 0.02s, the output voltage VB of the VBUS is 7.78V, after the power receiver detects VB, VD is set to 2.788V according to a formula (2), and according to the formula (1), the power receiver calculates to obtain the target value of the voltage VB of the VBUS at the time of 0.03s to be 8.37V;
8. at the time of 0.03s, the output voltage VB of the VBUS is 8.37V, after the power receiver detects VB, VD is set to 2.891V according to a formula (2), and according to the formula (1), the power receiver calculates to obtain the target value VB of the VBUS at the time of 0.04s, wherein the target value VB is 8.69V;
9. at the time of 0.04s, the output voltage VB of the VBUS is 8.69V, after the power receiver detects VB, VD is set to 2.946V according to a formula (2), and according to the formula (1), the power receiver calculates to obtain the target value of the voltage VB of the VBUS at the time of 0.05s, wherein the target value is 8.85V;
10. at the time of 0.05s, the output voltage VB of the VBUS is 8.85V, after the power receiver detects VB, VD is set to be 2.973V according to a formula (2), and the power receiver calculates to obtain a voltage VB target value of 8.93V of the VBUS at the time of 0.06s according to a formula (1);
11. at the time of 0.06s, the output voltage VB of the VBUS is 8.93V, after the power receiver detects VB, VD is set to 2.987V according to a formula (2), and the power supply receiver calculates to obtain a voltage VB target value of 8.97V of the VBUS at the time of 0.07s according to a formula (1);
12. at the time of 0.07s, the VBUS output voltage VB is 8.97V, after the power receiver detects VB, VD maintains 2.987V, and as the voltage amplification is smaller backwards, in order to accelerate the voltage approach, the voltage acceleration approach scheme is adopted: when the voltage reaches the target value, for example, 99.5% (9.01 × 99.5% ═ 8.97) of the target value is already reached, VD is not calculated according to equation 2, but the previous value is maintained, and the output of VBUS is continued. At the moment, according to the formula (1), the power supply side calculates and obtains that the voltage VB target value of the VBUS is 9.01V at the moment of 0.08 s;
13. at the time of 0.08s, the output voltage VB of the VBUS is 9.01V, after the power receiver detects VB, VD is set to be 3.000V according to a formula (2), and the power receiver calculates to obtain a voltage VB target value of 9.01V of the VBUS at the time of 0.09s according to a formula (1);
and continuously updating the calculation until the power receiver is disconnected.