Method for detecting impedance of charging cable, electronic device, and power supply device
AssigneeHonor Device Co., Ltd.
InventorZhifang Li
Life of this patent
Estimating the term…
Abstract
This application relates to the field of charging management, and provides a method for detecting impedance of a charging cable, an electronic device, and a power supply device, to more accurately detect impedance of a charging cable. Calculating, by the electronic device, an impedance value of the charging cable according to a first source voltage detection value, a second source voltage detection value, a first final voltage detection value, a second final voltage detection value, a first current value, and a second current value.
Claims18
A method for detecting impedance of a charging cable, applied to an electronic device in a charging system, wherein the charging system comprises a power supply device, the charging cable, and the electronic device, a first end of the charging cable is connected to the power supply device, and a second end of the charging cable is connected to the electronic device, the method comprising:
- receiving, by the electronic device, first electric energy from the power supply device through the charging cable, and obtaining a first source voltage detection value measured at the first end of the charging cable connected to the power supply device and a first final voltage detection value measured at the second end of the charging cable connected to the electronic device, wherein a first voltage of the first electric energy output by the power supply device is constant, the first source voltage detection value is different from the first voltage, and a first current of the first electric energy is a first current value;
- receiving, by the electronic device, second electric energy from the power supply device through the charging cable, and obtaining a second source voltage detection value measured at the first end of the charging cable connected to the power supply device and a second final voltage detection value measured at the second end of the charging cable connected to the electronic device, wherein the power supply device outputs the second electric energy at the first voltage, the second source voltage detection value is different from the first voltage, and a second current of the second electric energy is a second current value different from the first current value;
- and
- calculating, by the electronic device, an impedance value of the charging cable according to the first source voltage detection value, the second source voltage detection value, the first final voltage detection value, the second final voltage detection value, the first current value, and the second current value.
An electronic device, applied to a charging system, wherein the charging system comprises a power supply device, a charging cable, and the electronic device, a first end of the charging cable is connected to the power supply device, and a second end of the charging cable is connected to the electronic device,
- the electronic device comprising:
- a processor, a memory, a battery, and a charging interface,
- wherein the memory, the battery, and the charging interface are coupled to the processor, the memory stores computer program code, and the computer program code comprises computer instructions;
- and based on that the charging interface of the electronic device is connected to the charging cable, and it is detected that the power supply device supplies power to the electronic device through the charging cable, the computer instructions are executed by the processor, to cause the electronic device to perform operations including:
- receiving first electric energy from the power supply device through the charging cable, and obtaining a first source voltage detection value measured at the first end of the charging cable connected to the power supply device and a first final voltage detection value measured at the second end of the charging cable connected to the electronic device, wherein a first voltage of the first electric energy output by the power supply device is constant, the first source voltage detection value is different from the first voltage, and a first current of the first electric energy is a first current value;
- receiving second electric energy from the power supply device through the charging cable, and obtaining a second source voltage detection value measured at the first end of the charging cable connected to the power supply device and a second final voltage detection value measured at the second end of the charging cable connected to the electronic device, wherein the power supply device outputs the second electric energy at the first voltage, the second source voltage detection value is different from the first voltage, and a second current of the second electric energy is a second current value different from the first current value;
- and
- calculating an impedance value of the charging cable according to the first source voltage detection value, the second source voltage detection value, the first final voltage detection value, the second final voltage detection value, the first current value, and the second current value.
A non-transitory computer-readable storage medium, comprising computer instructions, wherein the computer instructions, when run on an electronic device, cause the electronic device to perform operations including:
- receiving first electric energy from a power supply device through a charging cable, and obtaining a first source voltage detection value measured at a first end of the charging cable connected to the power supply device and a first final voltage detection value measured at a second end of the charging cable connected to the electronic device, wherein a first voltage of the first electric energy output by the power supply device is constant, the first source voltage detection value is different from the first voltage, and a first current of the first electric energy is a first current value;
- receiving second electric energy from the power supply device through the charging cable, and obtaining a second source voltage detection value measured at the first end of the charging cable connected to the power supply device and a second final voltage detection value measured at the second end of the charging cable connected to the electronic device, wherein the power supply device outputs the second electric energy at the first voltage, the second source voltage detection value is different from the first voltage, and a second current of the second electric energy is a second current value different from the first current value;
- and
- calculating an impedance value of the charging cable according to the first source voltage detection value, the second source voltage detection value, the first final voltage detection value, the second final voltage detection value, the first current value, and the second current value.
Dependencies are inferred from the claim text.