Charging control method and device, electronic equipment and computer readable storage medium
Patent Information
- Application Number
- CN202210199894.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-02
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2042-03-02
AI Technical Summary
[0005]有鉴于此,本申请提供一种充电控制方法、装置、电子设备及计算机可读存储介质,以利于解决现有技术中当电池掉电时继续通过BUCK降压电路充电造成电路短路,充电设备损坏的问题
[0045] The solution provided in this application embodiment acquires a first acquisition voltage by sampling the voltage at the load terminal. It then detects whether the first acquisition voltage is less than a first voltage threshold. If the first acquisition voltage is less than the first voltage threshold, it is determined that the load terminal is in a power-off state. The charging current is then adjusted from a first current value to a second current value, and/or the duty cycle of the charging current is adjusted from a first duty cycle to a second duty cycle. Thus, in this application embodiment, when the first sampling voltage is detected to be less than the first voltage threshold, it is determined that the load terminal is in a power-off state. The charging current can be adjusted from the first current value to the second current value, and/or the duty cycle of the charging current can be adjusted from the first duty cycle to the second duty cycle. This reduces the charging current of the charging device, thereby reducing the possibility of inductor saturation in the step-down circuit, which could lead to uncontrollable charging current, and further reducing the possibility of device damage due to short circuits.
Smart Images

Figure CN114649847B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of charging technology, and more specifically to a charging control method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] Currently, rechargeable batteries are playing an increasingly important role in people's production and daily life, and proper charging equipment can ensure the lifespan of rechargeable batteries.
[0003] In existing technologies, when charging a battery via photovoltaic or mains power, the charging equipment typically includes a buck circuit. The buck circuit converts the high voltage of the photovoltaic or mains power into the low voltage required by the battery, and then charges the battery via a DC-DC circuit.
[0004] During the charging process described above, the buck converter transforms the high voltage supplied by the photovoltaic or mains power into the low voltage required by the battery. It is crucial to maintain a certain voltage difference between the high voltage input to the buck converter and the low voltage output. When the battery is de-energized, the output voltage of the buck converter becomes significantly lower. If charging continues, the voltage difference across the inductor in the buck converter will become too large, potentially causing inductor saturation, uncontrollable charging current, short circuit, and damage to the charging equipment. Summary of the Invention
[0005] In view of this, this application provides a charging control method, apparatus, electronic device, and computer-readable storage medium to solve the problem in the prior art that short circuits and damage to charging equipment are caused by continuing to charge through the BUCK step-down circuit when the battery is de-energized.
[0006] In a first aspect, embodiments of this application provide a charging control method applied to a charging device including a step-down circuit, the method comprising:
[0007] The voltage at the load terminal is collected to obtain the first collected voltage;
[0008] Detect whether the first collected voltage is less than the first voltage threshold;
[0009] If the first sampling voltage is less than the first voltage threshold, then the load is determined to be in a power-off state.
[0010] The charging current is adjusted from a first current value to a second current value, and / or the duty cycle of the charging current is adjusted from a first duty cycle to a second duty cycle; wherein the first current value is greater than the second current value, and the first duty cycle is greater than the second duty cycle;
[0011] The load is charged according to the adjusted charging current and its corresponding duty cycle.
[0012] Preferably, the step of determining that the load terminal is in a power-off state when the first acquisition voltage is less than the first voltage threshold, adjusting the charging current from the first current value to the second current value, and / or adjusting the duty cycle of the charging current from the first duty cycle to the second duty cycle includes:
[0013] When the first collected voltage is less than the first voltage threshold, the first cumulative count is updated;
[0014] Detect whether the first cumulative count has reached the first preset threshold;
[0015] If the first accumulated count reaches the first preset threshold, then the load is determined to be in a power-off state, the first accumulated count is cleared, the charging current is adjusted from the first current value to the second current value, and / or the duty cycle of the charging current is adjusted from the first duty cycle to the second duty cycle;
[0016] If the first cumulative count does not reach the first preset threshold, the step of collecting the voltage at the load end is repeated to obtain the first collected voltage until the step of detecting whether the first collected voltage is less than the first voltage threshold is executed, until the first cumulative count reaches the first preset threshold.
[0017] Preferably, the method further includes:
[0018] When the first acquisition voltage is not less than the first voltage threshold, the first cumulative count is reset to zero.
[0019] Preferably, when the first acquisition voltage is less than the first voltage threshold, it is determined that the load terminal is in a power-off state, and adjusting the charging current from the first current value to the second current value, and / or adjusting the duty cycle of the charging current from the first duty cycle to the second duty cycle includes:
[0020] When the first acquisition voltage is less than the first voltage threshold, the load is determined to be in a power-off state, the power-off flag is updated to be valid, the charging current is adjusted from the first current value to the second current value, and / or the duty cycle of the charging current is adjusted from the first duty cycle to the second duty cycle.
[0021] Preferably, before obtaining the first sampled voltage from the voltage at the sampled load terminal, the method further includes:
[0022] Check if the power-down flag is valid;
[0023] The process of acquiring the voltage at the load terminal to obtain the first acquired voltage includes:
[0024] When the power-down flag is invalid, the voltage at the load terminal is collected to obtain the first collected voltage.
[0025] Preferably, it further includes:
[0026] When the power-down flag is valid, the voltage at the load terminal is collected to obtain the second collected voltage;
[0027] Detect whether the second collected voltage is greater than a second voltage threshold, wherein the second voltage threshold is greater than the first voltage threshold;
[0028] When the second collected voltage is greater than the second voltage threshold, the power-down flag is set to invalid, and
[0029] The charging current is updated to the first current value, and the duty cycle of the charging current is updated to the first duty cycle;
[0030] The load is charged according to the updated charging current and the updated duty cycle of the charging current.
[0031] Preferably, when the second acquisition voltage is greater than the second voltage threshold, the power-down flag is set to invalid, and the charging current is adjusted to the first current value. Adjusting the duty cycle of the charging current to the first duty cycle includes:
[0032] When the second collected voltage is greater than the second voltage threshold, the second cumulative count is updated;
[0033] Detect whether the second cumulative count has reached the second preset threshold;
[0034] If the second cumulative count reaches the second preset threshold, the power-off flag is set to invalid, the second cumulative count is cleared to zero, the charging current is adjusted to the first current value, and the duty cycle of the charging current is adjusted to the first duty cycle.
[0035] If the second cumulative count does not reach the second preset threshold, the steps are repeated until the power-off flag is valid, the voltage at the load end is collected to obtain the second collected voltage, and the steps are repeated until the second cumulative count reaches the second preset threshold, or the power-off flag is invalid.
[0036] Preferably, the method further includes:
[0037] If the second acquisition voltage is not greater than the second voltage threshold, then the second cumulative count is cleared to zero.
[0038] Secondly, embodiments of this application provide a charging control device applied to a charging device including a step-down circuit, the charging control device comprising:
[0039] The acquisition unit is used to acquire the voltage at the load terminal to obtain the first acquisition voltage;
[0040] The detection unit is used to detect whether the first collected voltage is less than the first voltage threshold.
[0041] The processing unit is configured to determine that the load terminal is in a power-off state when the first acquisition voltage is less than a first voltage threshold, adjust the charging current from a first current value to a second current value, and / or adjust the duty cycle of the charging current from a first duty cycle to a second duty cycle; wherein the first current value is greater than the second current value, and the first duty cycle is greater than the second duty cycle;
[0042] The processing unit is also configured to charge the load according to the second duty cycle and the adjusted charging current.
[0043] Thirdly, embodiments of this application provide a charging device, including a step-down circuit, a memory for storing computer program instructions, and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute the method described in any of the first aspects above.
[0044] Fourthly, embodiments of this application provide a computer-readable storage medium, the computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform the method described in any of the first aspects above.
[0045] The solution provided in this application embodiment acquires a first acquisition voltage by sampling the voltage at the load terminal. It then detects whether the first acquisition voltage is less than a first voltage threshold. If the first acquisition voltage is less than the first voltage threshold, it is determined that the load terminal is in a power-off state. The charging current is then adjusted from a first current value to a second current value, and / or the duty cycle of the charging current is adjusted from a first duty cycle to a second duty cycle. Thus, in this application embodiment, when the first sampling voltage is detected to be less than the first voltage threshold, it is determined that the load terminal is in a power-off state. The charging current can be adjusted from the first current value to the second current value, and / or the duty cycle of the charging current can be adjusted from the first duty cycle to the second duty cycle. This reduces the charging current of the charging device, thereby reducing the possibility of inductor saturation in the step-down circuit, which could lead to uncontrollable charging current, and further reducing the possibility of device damage due to short circuits. Attached Figure Description
[0046] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 A schematic flowchart of a charging control method provided in an embodiment of this application;
[0048] Figure 2 A schematic flowchart illustrating another charging control method provided in an embodiment of this application;
[0049] Figure 3 A schematic flowchart illustrating another charging control method provided in an embodiment of this application;
[0050] Figure 4 This is a schematic diagram of the structure of a charging control device provided in an embodiment of this application;
[0051] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0052] To better understand the technical solution of this application, the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0053] It should be understood that the described embodiments are merely some, not all, of the embodiments in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0054] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0055] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0056] In related technologies, when charging a battery via photovoltaic or mains power, the charging equipment is usually equipped with a BUCK step-down circuit. The BUCK step-down circuit converts the high voltage of the photovoltaic or mains power into the low voltage required by the battery, and then charges the battery through a DC-DC circuit.
[0057] During the charging process described above, the buck converter transforms the high voltage supplied by the photovoltaic or mains power into the low voltage required by the battery. It is crucial to maintain a certain voltage difference between the high voltage input to the buck converter and the low voltage output. When the battery is de-energized, the output voltage of the buck converter becomes significantly lower. If charging continues, the voltage difference across the inductor in the buck converter will become too large, potentially causing inductor saturation, uncontrollable charging current, short circuit, and damage to the charging equipment.
[0058] To address the aforementioned problems, this application provides a charging control method. The method involves acquiring a first sampled voltage from the load terminal, detecting whether the first sampled voltage is less than a first voltage threshold, and determining that the load terminal is in a power-off state when the first sampled voltage is less than the first voltage threshold. The charging current is then adjusted from a first current value to a second current value, and / or the duty cycle of the charging current is adjusted from a first duty cycle to a second duty cycle. Thus, in this application embodiment, when the first sampled voltage is detected to be less than the first voltage threshold, it is determined that the load terminal is in a power-off state. The charging current can be adjusted from the first current value to the second current value, and / or the duty cycle of the charging current can be adjusted from the first duty cycle to the second duty cycle. This reduces the charging current of the charging device, thereby reducing the possibility of inductor saturation in the step-down circuit, which could lead to uncontrollable charging current, and consequently reducing the possibility of device damage due to short circuits. A detailed description follows.
[0059] See Figure 1 This is a flowchart illustrating a charging control method provided in an embodiment of this application. The method is applied to a charging device including a buck circuit. The buck circuit included in the charging device can be a BUCK buck circuit. Figure 1 As shown, the method includes:
[0060] Step S101: Collect the voltage at the load terminal to obtain the first collected voltage.
[0061] In this embodiment, when the user disconnects the load from the charging device, or when the load side is disconnected from the charging device due to protection by the protection board, the load end of the charging device can be considered as having no load connected. In this case, the charging voltage required at the load end of the charging device is relatively low. To ensure that the step-down circuit within the charging device can adjust the output charging voltage when the user disconnects the load from the charging device or when the load side is disconnected from the charging device due to protection by the protection board, it is necessary to collect the voltage at the load end in real time. The collected voltage at the load end can be determined as the first sampling voltage.
[0062] Step S102: Detect whether the first acquisition voltage is less than the first voltage threshold.
[0063] In this embodiment, the step-down circuit in the charging device reduces the high voltage Vb in the charging device to the low voltage required by the load for charging. However, the minimum output voltage Vc of this step-down circuit is preset. That is, the minimum output voltage Vc of the step-down circuit is preset. In other words, the step-down circuit can charge loads whose required charging voltage is within the voltage difference range between Vb and Vc. When the user disconnects the load from the charging device or the load side is disconnected from the charging device due to protection board, the required output voltage Va at the load end is less than Vc, causing the required charging voltage at the load end to exceed the voltage difference range between Vb and Vc. If the high voltage Vb in the charging device is converted to the required charging voltage Va at the load end using the step-down circuit, the voltage difference across the inductor in the step-down circuit will be too large, causing the inductor to saturate, resulting in uncontrollable charging current and damage to the charging device.
[0064] To avoid the above situation, the voltage at the load end can be collected in real time, which is called obtaining the first sample voltage. After obtaining the first sample voltage, it can be compared with a first voltage threshold to determine whether the voltage required by the load end exceeds the minimum voltage that the buck circuit can provide.
[0065] As one possible implementation, the first voltage threshold is the minimum voltage value that the buck circuit can allow to output.
[0066] Step S103: When the first acquisition voltage is less than the first voltage threshold, it is determined that the load is in a power-off state, and the charging current is adjusted from the first current value to the second current value, and / or the duty cycle of the charging current is adjusted from the first duty cycle to the second duty cycle.
[0067] In this configuration, the first current value is greater than the second current value, and the first duty cycle is greater than the second duty cycle. The first current value can be preset by the user according to actual charging needs, and the second current value can be a preset value that is less than the first current value. Similarly, the first duty cycle can be preset by the user according to actual charging needs, and the second duty cycle is a preset value that is less than the first duty cycle.
[0068] It should be noted that a power failure state refers to a state where the connection between the load and the charging device is disconnected, or the charging circuit between the load and the charging device is disconnected.
[0069] In this embodiment, after comparing the first sampled voltage with the first voltage threshold, if the first sampled voltage is less than the first voltage threshold, it indicates that the voltage required by the load exceeds the minimum voltage that the buck circuit can provide. At this point, it can be determined that the load is in a power-off state. The disconnection between the load and the charging device may be due to the protection board of the load causing the connection circuit between the load and the charging battery to break, or it may be due to other load devices connected to the load, whose voltage is provided by the charging device, causing the voltage at the load to be pulled down, making the first sampled voltage less than the first voltage threshold. It could also be that the user disconnects the load from the charging device. Therefore, if voltage adjustment continues through the buck circuit when the load is determined to be in a power-off state, it can easily lead to inductor saturation in the buck circuit, resulting in uncontrollable charging current. In this embodiment, the working time of the buck circuit can be adjusted by controlling the duty cycle of the charging current, and / or the charging current can be reduced, thereby reducing the possibility of inductor saturation in the buck circuit. At this time, the charging current can be adjusted from a first current value to a second current value, and / or the duty cycle of the charging current can be adjusted from a first duty cycle to a second duty cycle. For example, the charging current is adjusted from 10A to 5A. The duty cycle of the current is adjusted from the first duty cycle to the first duty cycle * 10%.
[0070] This allows the current in the inductor of the buck circuit to be controlled within a certain range, preventing inductor saturation. Furthermore, when the load protection board disconnects the connection between the load and the charging device to protect the load, slowly increasing the charging current can gradually reconnect the load protection board to the charging device.
[0071] As one possible implementation, when the first sampled voltage is less than a first voltage threshold, it is determined that the load is in a power-off state, and the charging current is adjusted from a first current value to a second current value, and / or the duty cycle of the charging current is adjusted from a first duty cycle to a second duty cycle, including:
[0072] When the first collected voltage is less than the first voltage threshold, the first accumulated count is updated; it is checked whether the first accumulated count has reached the first preset threshold; if the first accumulated count has reached the first preset threshold, it is determined that the load is in a power-off state, the first accumulated count is cleared to zero, the charging current is adjusted from the first current value to the second current value, and / or the duty cycle of the charging current is adjusted from the first duty cycle to the second duty cycle; if the first accumulated count has not reached the first preset threshold, the steps of collecting the voltage of the load are repeated until the first collected voltage is obtained, until the first collected voltage is less than the first voltage threshold is checked, until the first accumulated count reaches the first preset threshold.
[0073] In this embodiment, if the first voltage sampled is less than the first voltage threshold due to misoperation or interference, and if it is determined that the load is in a power-off state, the charging current is adjusted from the first current value to the second current value, and / or the duty cycle of the charging current is adjusted from the first duty cycle to the second duty cycle. However, the connection between the load and the charging device at the actual load end is not disconnected, resulting in a smaller charging current for the load. To prevent this from happening, since the load voltage is sampled in real time, it can be detected whether the first voltage sampled n times is less than the first voltage threshold. If the first voltage sampled n times is less than the first voltage threshold, it can be determined that the load is in a power-off state.
[0074] Based on this, when it is determined that the first sampled voltage is less than the first voltage threshold, the first cumulative count can be updated, for example, by incrementing the first cumulative count by 1. This first cumulative count is used to record the number of times the first sampled voltage is less than the first voltage threshold. It is then checked whether the first cumulative count has reached a first preset threshold. If the first cumulative count reaches the first preset threshold, it is determined that the sampled voltage being less than the first voltage threshold is not due to interference or misoperation, but rather because the load is in a power-off state. In this case, the first cumulative count needs to be reset to zero, and the charging current adjusted from the first current value to the second current value, and / or the duty cycle of the charging current adjusted from the first duty cycle to the second duty cycle. If the first cumulative count has not reached the first preset threshold, the voltage at the load end can continue to be sampled to obtain the first sampled voltage, and it can be checked whether the first sampled voltage is less than the first voltage threshold. That is, if the first cumulative count has not reached the first preset threshold, steps S101-S102 are repeated until the first cumulative count is detected to have reached the first preset threshold.
[0075] Furthermore, when the connection between the load and the charging device is disconnected, the first voltage samples continuously collected from the load end will all be less than the first voltage threshold. If, due to interference or misoperation, the first voltage sampled at that time is less than the first voltage threshold, but the load and the charging device are not actually disconnected, then the subsequent first voltage samples should not be less than the first voltage threshold. Therefore, it is necessary to detect whether the first voltage sampled n times consecutively is less than the first voltage threshold. Since the first cumulative count needs to be updated each time it is determined that the first voltage sampled is less than the first voltage threshold, it is possible to detect whether the first voltage sampled n times consecutively is less than the first voltage threshold by checking whether the value of the first cumulative count reaches the first preset threshold. At this time, the value of the first cumulative count is the number of times the first cumulative count has been updated. In order to ensure the accuracy of the value of the first cumulative count in representing the number of times the first voltage sampled is continuously less than the first voltage threshold, the first cumulative count needs to be cleared to zero in a timely manner. At this point, when it is determined that the load is in a power-off state, the first cumulative count can be cleared to zero. In this way, when the load is reconnected to the charging device, the first cumulative count can be updated according to whether the newly acquired first sampled voltage is less than the first voltage threshold. The value of the first cumulative count at this time can represent the number of times the continuously acquired first sampled voltage is less than the first voltage threshold.
[0076] As one possible implementation, the above method, such as Figure 2 As shown, it also includes:
[0077] Step S105: When the first acquisition voltage is not less than the first voltage threshold, the first cumulative count is cleared to zero.
[0078] In this embodiment, when the first cumulative count represents the number of times the continuously acquired first sampling voltage is less than the first voltage threshold, the first cumulative count may be updated due to interference or misoperation. If the determination of whether the first preset threshold has been reached continues based on the first cumulative count, the result will be inaccurate. To eliminate this situation, the first cumulative count can be reset to zero when the first sampling voltage is detected to be not less than the first preset threshold. Since the first sampling voltage is less than the first voltage threshold due to interference or misoperation, but the load and charging device are not actually disconnected, the subsequently acquired first sampling voltage should not be less than the first voltage threshold. Therefore, resetting the first cumulative count to zero when the first sampling voltage is detected to be not less than the first voltage threshold can eliminate the situation where the first cumulative count is updated due to interference or misoperation.
[0079] Furthermore, if the first cumulative count does not reach the first preset threshold and the first collected voltage is not less than the first voltage threshold in subsequent collections, the first cumulative count can be cleared to zero. This allows for the re-recording of the number of consecutively collected first collected voltages that are all less than the first voltage threshold during subsequent collections of the first collected voltage.
[0080] As a first possible implementation, when the first sampled voltage is less than a first voltage threshold, it is determined that the load is in a power-off state, and the charging current is adjusted from a first current value to a second current value, and / or the duty cycle of the charging current is adjusted from a first duty cycle to a second duty cycle, including:
[0081] When the first sampling voltage is less than the first voltage threshold, it is determined that the load is in a power-off state, the power-off flag is updated to be valid, the charging current is adjusted from the first current value to the second current value, and / or the duty cycle of the charging current is adjusted from the first duty cycle to the second duty cycle.
[0082] The power-off flag indicates whether the connection between the load and the charging device is broken. When the power-off flag is valid, it indicates that the connection between the load and the charging device is broken; when the power-off flag is invalid, it indicates that the load and the charging device are connected.
[0083] In this embodiment of the application, when the first collected voltage is less than the first voltage threshold, it can be determined that the load is in a power-off state. At this time, it is necessary to set the power-off flag to be valid, adjust the charging current from the first current value to the second current value, and / or adjust the duty cycle of the charging current from the first duty cycle to the second duty cycle.
[0084] Step S104: Charge the load according to the adjusted charging current and its corresponding duty cycle.
[0085] In this embodiment, when the voltage at the load terminal is determined to be less than a first voltage threshold, the charging device can adjust the charging current to a second current value and / or adjust the duty cycle of the charging current to a second duty cycle. That is, it can reduce the charging current and / or reduce the duty cycle of the charging current, thereby controlling the charging current within a preset range. Within this range, the charging current is smaller and its duty cycle is smaller, thus preventing inductor saturation in the step-down circuit and ensuring uncontrollable charging current. After adjusting the charging current and / or the duty cycle accordingly, the load can be charged based on the updated charging current and its corresponding duty cycle.
[0086] refer to Figure 3 The diagram shown is a schematic flowchart of another charging control method provided in an embodiment of this application. This embodiment is similar to the one described above. Figure 1 and Figure 2The difference between the illustrated embodiments is that this embodiment adds a process for restoring load charging. For example... Figure 3 As shown, the method includes:
[0087] Step S301: Check if the power-off flag is valid.
[0088] In this embodiment, since the power-down flag is used to indicate whether the connection between the load and the charging device is broken, when the charging device and the load are charging normally, the connection between the charging device and the load is established, and the power-down flag is set to invalid. When the connection between the load and the charging device is broken, the power-down flag is set to valid. The following steps differ depending on the power-down flag. When the power-down flag is detected as invalid, it indicates that the connection between the load and the charging device is normal. At this time, it is necessary to detect in real time whether the connection between the load and the charging device is broken. When the power-down flag is detected as valid, it indicates that the connection between the load and the charging device has been broken. The charging current is adjusted from the first current value to the second current value, and / or the duty cycle of the charging current is adjusted from the first duty cycle to the second duty cycle. The load is charged using the updated charging current and the corresponding duty cycle. At this time, it is necessary to detect whether the charging device can resume charging the load.
[0089] Therefore, the following steps will differ depending on the detection result. If the power-down flag is detected as invalid, steps S302a-S305a will be executed. If the power-down flag is detected as valid, steps S302b-S305b will be executed, as detailed below.
[0090] One possible implementation is to detect the flag symbol of the power-down flag. For example, if the power-down flag is detected as true, it indicates that the power-down flag is valid; if it is detected as false, it indicates that the power-down flag is invalid. Alternatively, the electrical signal of the power-down flag can be detected. If the power-down flag is high, it indicates that the power-down flag is valid; if it is low, it indicates that the power-down flag is invalid. Of course, other methods can also be used to detect whether the power-down flag is valid, and this application does not limit this approach.
[0091] Step S302a: When the power-off flag is invalid, the voltage at the load terminal is collected to obtain the first collected voltage.
[0092] In this embodiment, if the power-off flag is detected as invalid, it indicates that the current load and charging device are normally connected, and it is necessary to detect in real time whether a disconnection has occurred between the load and the charging device. Therefore, the voltage at the load end can be collected in real time to obtain the first collected voltage.
[0093] For details, please refer to step S101, which will not be repeated here.
[0094] Step S302b: When the power-down flag is valid, the voltage at the load terminal is collected to obtain the second collected voltage.
[0095] In this embodiment, when the power-down flag is detected to be valid, it indicates that the connection between the current load and the charging device is broken. This could be because the user disconnected the load from the charging device, meaning there is no load connected to the load end of the charging device. Alternatively, it could be due to the load's protection board disconnecting the charging circuit between the load and the charging device, even though a load is still connected to the load end of the charging device. In this case, it is necessary to collect the voltage at the load end to detect whether the connection between the load and the charging device has been restored. Therefore, when the power-down flag is detected to be valid, it is also necessary to collect the voltage at the load end in real time to obtain the second collected voltage.
[0096] Step S303a: Detect whether the first acquisition voltage is less than the first voltage threshold.
[0097] For details, please refer to step S102, which will not be repeated here.
[0098] Step S303b: Detect whether the second acquisition voltage is greater than the second voltage threshold.
[0099] The second voltage threshold is greater than the first voltage threshold. This avoids oscillations caused by the first voltage threshold and the second voltage threshold being too close, which would cause the connection between the load and the charging device to be broken.
[0100] In this embodiment, after the second voltage is acquired, it is compared with a second voltage threshold to detect whether the second voltage is greater than the second voltage threshold. If the second voltage is detected to be greater than the second voltage threshold, it indicates that there is a load at the load end and the connection between the load and the charging device is normal. If the second voltage is detected to be less than the second voltage threshold, it indicates that the connection between the load and the charging device is still disconnected, meaning the load is still in a power-off state.
[0101] As one possible implementation, the second voltage threshold is less than the minimum voltage value that the buck circuit can output.
[0102] Step S304a: When the first collected voltage is less than the first voltage threshold, it is determined that the load is in a power-off state, and the charging current is adjusted from the first current value to the second current value, and / or the duty cycle of the charging current is adjusted from the first duty cycle to the second duty cycle.
[0103] For details, please refer to step S103, which will not be repeated here.
[0104] Step S304b: When the second acquisition voltage is greater than the second voltage threshold, the power-down flag is set to invalid, the charging current is updated to the first current value, and the duty cycle of the charging current is updated to the first duty cycle.
[0105] In this embodiment of the application, when the second collected voltage is greater than the second voltage threshold, it indicates that there is a load at the load end and the connection between the load and the charging device is normal. At this time, it is necessary to re-charge the load normally, that is, set the power failure flag to invalid, update the charging current to the first current value, update the duty cycle of the charging current to the first duty cycle, that is, re-execute the relevant charging program for normal charging of the load.
[0106] As one possible implementation, when the second acquisition voltage is greater than the second voltage threshold, the power-down flag is set to invalid, and the charging current is updated to the first current value. Updating the duty cycle of the charging current to the first duty cycle includes:
[0107] When the second collected voltage is greater than the second voltage threshold, update the second cumulative count; check whether the second cumulative count has reached the second preset threshold; if the second cumulative count has reached the second preset threshold, set the power-off flag to invalid, clear the second cumulative count to zero, update the charging current to the first current value, and update the duty cycle of the charging current to the first duty cycle; if the second cumulative count has not reached the second preset threshold, repeat the steps of collecting the voltage at the load end when the power-off flag is valid to obtain the second collected voltage until the second collected voltage is greater than the second voltage threshold, until the second cumulative count reaches the second preset threshold, or the power-off flag is invalid.
[0108] In this embodiment, if the second voltage sampled due to misoperation or interference exceeds the second voltage threshold, and it is determined that the connection between the load and the charging device has been restored to normal, the charging current is updated to the first current value, and the duty cycle of the charging current is updated to the first duty cycle for charging the external load. However, if the actual load is in a power-off state, this can cause the inductor in the step-down circuit to saturate and short-circuit, burning out the charging device. To prevent this from happening, since the voltage at the load end is sampled in real time, it can be detected whether the second voltage sampled m times is greater than the second voltage threshold. If the second voltage sampled m times is greater than the second voltage threshold, it can be determined that the connection between the load and the charging device has been restored to normal.
[0109] Based on this, when it is determined that the second sampled voltage is greater than the second voltage threshold, the second cumulative count can be updated, for example, by incrementing the second cumulative count by 1. This second cumulative count is used to record the number of times the second sampled voltage is greater than the second voltage threshold. It is then checked whether the second cumulative count has reached the second preset threshold. If the second cumulative count has reached the second preset threshold, it is determined that the sampled voltage being greater than the second voltage threshold is not due to interference or misoperation, but rather that the connection between the load and the charging device has been restored, allowing normal charging of the load. In this case, the second cumulative count needs to be reset to zero, and the charging current updated to the first current value, and the duty cycle of the charging current updated to the first duty cycle for charging the load. If the second cumulative count has not reached the second preset threshold, the voltage at the load end can continue to be sampled to obtain the second sampled voltage, and it can be checked whether the second sampled voltage is greater than the second voltage threshold. That is, if the second cumulative count has not reached the second preset threshold, steps S302b-S303b are re-executed until the second cumulative count is detected to have reached the second preset threshold, or the power-off flag is invalid.
[0110] Furthermore, when the connection between the load and the charging device is restored, the second voltage sampled at the load end will be greater than the second voltage threshold. If, due to interference or misoperation, the second voltage sampled at that time was greater than the second voltage threshold, but the connection between the load and the charging device has not actually been restored, the second voltage sampled subsequently should not be greater than the second voltage threshold. Therefore, it is necessary to detect whether the second voltage sampled for m consecutive times is greater than the second voltage threshold. Since the second cumulative count needs to be updated each time the second voltage sampled is determined to be greater than the second voltage threshold, the detection of whether the second voltage sampled for m consecutive times is greater than the second voltage threshold can be achieved by checking whether the value of the second cumulative count reaches the second preset threshold. The value of the second cumulative count at this time is the number of times the second cumulative count has been updated. To ensure the accuracy of the value of the second cumulative count in representing the number of times the second voltage sampled is greater than the second voltage threshold, the second cumulative count needs to be reset to zero in a timely manner. At this point, when it is determined that the load charging device has resumed normal connection, the second cumulative count can be cleared to zero. In this way, when the power failure flag becomes valid again, the second cumulative count can be updated according to whether the newly acquired second sampling voltage is greater than the second voltage threshold. The value of the second count at this time can represent the number of times the continuously acquired second sampling voltage is greater than the second voltage threshold.
[0111] Step S305a: When the first acquisition voltage is not less than the first voltage threshold, the first cumulative count is cleared to zero.
[0112] For details, please refer to step S105, which will not be repeated here.
[0113] Step S305b: If the second acquisition voltage is not greater than the second voltage threshold, then the second cumulative count is cleared to zero.
[0114] In this embodiment, when the second cumulative count represents the number of times the continuously acquired second sampling voltage is greater than the second voltage threshold, the second cumulative count may be updated due to interference or misoperation. If the second cumulative count is used to determine whether the second preset threshold has been reached, the result will be inaccurate. To eliminate this situation, the second cumulative count can be reset to zero when the second sampling voltage is detected to be less than the second preset threshold. Since the second sampling voltage is greater than the second voltage threshold due to interference or misoperation, but the load and charging device have not actually reconnected, the subsequently acquired second sampling voltage should not be greater than the second voltage threshold. Therefore, resetting the second cumulative count to zero when the second sampling voltage is detected to be less than the second voltage threshold can eliminate the situation where the second cumulative count is updated due to interference or misoperation.
[0115] Furthermore, if the second cumulative count does not reach the second preset threshold and the second collected voltage is not greater than the second voltage threshold in subsequent collections, the second cumulative count can be cleared to zero. This allows for the re-recording of the number of consecutive second collected voltages that are greater than the second voltage threshold during subsequent collections of the second collected voltage.
[0116] Step S306a: Charge the load according to the adjusted charging current and its corresponding duty cycle.
[0117] For details, please refer to step S104, which will not be repeated here.
[0118] Step S306b: Charge the load according to the updated charging current and the updated charging current duty cycle.
[0119] In this embodiment, when the connection between the load end of the charging device and the load is normal, the load can be charged normally. At this time, the charging current can be updated to a first current value, and the duty cycle of the charging current can be updated to a first duty cycle, which means updating the charging current value and duty cycle to those used during normal charging. The load is then charged using the first current value and the first duty cycle.
[0120] In this embodiment of the application, when the first sampling voltage is detected to be less than the first voltage threshold, it is determined that the load is in a power-off state. The charging current can be adjusted from the first current value to the second current value, and / or the duty cycle of the charging current can be adjusted from the first duty cycle to the second duty cycle. At this time, the charging current of the charging device can be reduced, thereby reducing the possibility of inductor saturation in the step-down circuit and causing the charging current to become uncontrollable, thereby reducing the possibility of damage to the charging device due to a short circuit.
[0121] refer to Figure 4 The diagram shown is a structural schematic of a charging control device according to an embodiment of this application. This charging control device is applied in a charging equipment that includes a step-down circuit. Figure 4 As shown, the charging control device includes:
[0122] The acquisition unit 401 is used to acquire the voltage at the load end to obtain the first acquisition voltage.
[0123] The detection unit 402 is used to detect whether the first acquisition voltage is less than the first voltage threshold.
[0124] The processing unit 403 is configured to determine that the load is in a power-off state when the first sampled voltage is less than the first voltage threshold, and to stop adjusting the charging current from the first current value to the second current value, and / or adjust the duty cycle of the charging current from the first duty cycle to the second duty cycle.
[0125] Among them, the first current value is greater than the second current value, and the first duty cycle is greater than the second duty cycle.
[0126] As one possible implementation, the processing unit 403 is specifically used to update the first cumulative count when the first sampled voltage is less than the first voltage threshold; detect whether the first cumulative count has reached the first preset threshold; if the first cumulative count has reached the first preset threshold, determine that the load is in a power-off state, clear the first cumulative count to zero, adjust the charging current from the first current value to the second current value, and / or adjust the duty cycle of the charging current from the first duty cycle to the second duty cycle; if the first cumulative count has not reached the first preset threshold, re-execute the step of sampled voltage at the load end to obtain the first sampled voltage until the step of detecting whether the first sampled voltage is less than the first voltage threshold is executed, until the first cumulative count reaches the first preset threshold.
[0127] As one possible implementation, the processing unit 403 is specifically used to determine that the load is in a power-off state when the first acquisition voltage is less than the first voltage threshold, update the power-off flag to be valid, adjust the charging current from the first current value to the second current value, and / or adjust the duty cycle of the charging current from the first duty cycle to the second duty cycle.
[0128] As one possible implementation, the processing unit 403 is also used to clear the first cumulative count to zero when the first acquisition voltage is not less than the first voltage threshold.
[0129] The processing unit 403 is also used to charge the load according to the adjusted charging current and its corresponding duty cycle.
[0130] As one possible implementation, the detection unit 402 is also used to detect whether the power-down flag is valid.
[0131] At this time, the acquisition unit 401 is specifically used to acquire the voltage at the load end when the power-off flag is invalid, and obtain the first acquisition voltage.
[0132] The acquisition unit 401 is also used to acquire the voltage at the load terminal when the power-off flag is valid, and obtain the second acquisition voltage.
[0133] The detection unit 402 is also used to detect whether the second acquisition voltage is greater than the second voltage threshold.
[0134] The second voltage threshold is greater than the first voltage threshold.
[0135] The processing unit 403 is further configured to, when the second acquisition voltage is greater than the second voltage threshold, set the power-down flag to invalid, update the charging current to the first current value, and update the duty cycle of the charging current to the first duty cycle.
[0136] The processing unit 403 is specifically used to update the second cumulative count when the second collected voltage is greater than the second voltage threshold; detect whether the second cumulative count has reached the second preset threshold; if the second cumulative count has reached the second preset threshold, set the power-off flag to invalid, clear the second cumulative count to zero, update the charging current to the first current value, and update the duty cycle of the charging current to the first duty cycle for charging the load; if the second cumulative count has not reached the second preset threshold, re-execute the steps of collecting the voltage at the load end when the power-off flag is valid to obtain the second collected voltage until the second collected voltage is greater than the second voltage threshold, until the second cumulative count reaches the second preset threshold, or the power-off flag is invalid.
[0137] As one possible implementation, the processing unit 403 is also used to clear the second cumulative count to zero when the second acquisition voltage is not greater than the second voltage threshold.
[0138] The processing unit 403 is also used to charge the load according to the updated charging current and the updated duty cycle of the charging current.
[0139] Corresponding to the above embodiments, this application also provides a charging device. Figure 5 This is a schematic diagram of a charging device 500 provided in an embodiment of the present invention. The charging device 500 may include: a processor 501, a memory 502, a communication unit 503, and a step-down circuit 504. These components communicate through one or more buses. Those skilled in the art will understand that the structure of the server shown in the figure does not constitute a limitation on the embodiment of the present invention. It may be a bus topology or a star topology, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0140] The step-down circuit 504 is used to convert the voltage of the charging power supply into the voltage required by the load.
[0141] The communication unit 503 is used to establish a communication channel, enabling the storage device to communicate with other devices. It receives user data from other devices or sends user data to other devices.
[0142] The processor 501 serves as the control center of the storage device, connecting various parts of the electronic device via various interfaces and lines. It executes software programs and / or modules stored in the memory 502, and calls data stored in the memory to perform various functions of the electronic device and / or process data. The processor can be composed of integrated circuits (ICs), such as a single packaged IC or multiple packaged ICs with the same or different functions connected together. For example, the processor 501 may consist only of a central processing unit (CPU). In this embodiment of the invention, the CPU may have a single processing core or include multiple processing cores.
[0143] The memory 502 is used to store the execution instructions of the processor 501. The memory 502 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0144] When the execution instructions in memory 502 are executed by processor 501, the charging device 500 is able to perform its functions. Figure 3 Some or all of the steps in the illustrated embodiments.
[0145] In a specific implementation, the present invention also provides a computer storage medium, wherein the computer storage medium may store a program, which, when executed, may include some or all of the steps of the charging control method provided by the present invention in various embodiments. The storage medium may be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0146] Those skilled in the art will clearly understand that the techniques in the embodiments of the present invention can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or certain parts of the embodiments of the present invention.
[0147] The same or similar parts between the various embodiments in this specification can be referred to mutually. In particular, the device embodiments and terminal embodiments are basically similar to the method embodiments, so the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.
Claims
1. A charging control method, characterized in that, The method, applied to a charging device including a BUCK step-down circuit, comprises: The voltage at the load terminal is collected to obtain the first collected voltage; Detect whether the first collected voltage is less than the first voltage threshold; When the first sampling voltage is less than the first voltage threshold, it is determined that the load is in a power-off state. The charging current is adjusted from a first current value to a second current value, and / or the duty cycle of the charging current is adjusted from a first duty cycle to a second duty cycle to reduce inductor saturation in the step-down circuit. Wherein, the first current value is greater than the second current value, and the first duty cycle is greater than the second duty cycle. The power-off state means that the connection between the load connected to the load and the charging device is disconnected, or the charging circuit between the load and the charging device is disconnected. It operates according to the adjusted charging current and its corresponding duty cycle.
2. The method according to claim 1, characterized in that, The step of determining that the load terminal is in a power-off state when the first acquisition voltage is less than the first voltage threshold, adjusting the charging current from the first current value to the second current value, and / or adjusting the duty cycle of the charging current from the first duty cycle to the second duty cycle includes: When the first collected voltage is less than the first voltage threshold, the first cumulative count is updated; Detect whether the first cumulative count has reached the first preset threshold; If the first accumulated count reaches the first preset threshold, then the load is determined to be in a power-off state, the first accumulated count is cleared, the charging current is adjusted from the first current value to the second current value, and / or the duty cycle of the charging current is adjusted from the first duty cycle to the second duty cycle; If the first cumulative count does not reach the first preset threshold, the step of collecting the voltage at the load end is repeated to obtain the first collected voltage until the step of detecting whether the first collected voltage is less than the first voltage threshold is executed, until the first cumulative count reaches the first preset threshold.
3. The method according to claim 2, characterized in that, The method further includes: When the first acquisition voltage is not less than the first voltage threshold, the first cumulative count is reset to zero.
4. The method according to claim 1, characterized in that, When the first acquisition voltage is less than the first voltage threshold, it is determined that the load terminal is in a power-off state, and the charging current is adjusted from the first current value to the second current value, and / or the duty cycle of the charging current is adjusted from the first duty cycle to the second duty cycle, including: When the first acquisition voltage is less than the first voltage threshold, the load is determined to be in a power-off state, the power-off flag is updated to be valid, the charging current is adjusted from the first current value to the second current value, and / or the duty cycle of the charging current is adjusted from the first duty cycle to the second duty cycle.
5. The method according to claim 4, characterized in that, Before obtaining the first sampled voltage from the voltage at the load terminal, the process further includes: Check if the power-down flag is valid; The process of acquiring the voltage at the load terminal to obtain the first acquired voltage includes: When the power-down flag is invalid, the voltage at the load terminal is collected to obtain the first collected voltage.
6. The method according to claim 5, characterized in that, Also includes: When the power-down flag is valid, the voltage at the load terminal is collected to obtain the second collected voltage; Detect whether the second collected voltage is greater than a second voltage threshold, wherein the second voltage threshold is greater than the first voltage threshold; When the second acquisition voltage is greater than the second voltage threshold, the power-down flag is set to invalid, the charging current is updated to the first current value, and the duty cycle of the charging current is updated to the first duty cycle. The load is charged according to the updated charging current and the updated duty cycle of the charging current.
7. The method according to claim 6, characterized in that, When the second acquisition voltage is greater than the second voltage threshold, the power-down flag is set to invalid, and the charging current is adjusted to the first current value. Adjusting the duty cycle of the charging current to the first duty cycle includes: When the second collected voltage is greater than the second voltage threshold, the second cumulative count is updated; Detect whether the second cumulative count has reached the second preset threshold; If the second cumulative count reaches the second preset threshold, the power-off flag is set to invalid, the second cumulative count is cleared to zero, the charging current is adjusted to the first current value, and the duty cycle of the charging current is adjusted to the first duty cycle. If the second cumulative count does not reach the second preset threshold, the steps are repeated until the power-off flag is valid, the voltage at the load terminal is collected to obtain the second collected voltage, and the steps are repeated until the second cumulative count reaches the second preset threshold.
8. The method according to claim 7, characterized in that, The method further includes: If the second acquisition voltage is not greater than the second voltage threshold, then the second cumulative count is reset to zero.
9. A charging control device, characterized in that, The charging control device, applicable to charging equipment containing a BUCK step-down circuit, includes: The acquisition unit is used to acquire the voltage at the load terminal to obtain the first acquisition voltage; The detection unit is used to detect whether the first collected voltage is less than the first voltage threshold. The processing unit is configured to determine that the load is in a power-off state when the first collected voltage is less than a first voltage threshold, adjust the charging current from a first current value to a second current value, and / or adjust the duty cycle of the charging current from a first duty cycle to a second duty cycle to reduce inductor saturation in the step-down circuit; wherein the first current value is greater than the second current value, and the first duty cycle is greater than the second duty cycle; the power-off state refers to the connection between the load connected to the load and the charging device being disconnected, or the charging circuit between the load and the charging device being disconnected; The processing unit is also configured to enable the charging device to operate according to the second duty cycle and the adjusted charging current.
10. A charging device, characterized in that, The device includes a step-down circuit, a memory for storing computer program instructions, and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the charging device is triggered to perform the method according to any one of claims 1-8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform the method according to any one of claims 1-8.
Citation Information
Patent Citations
Method for detecting power failure of power grid for three-phase uninterruptable power supply
CN102116822A
A power failure protection circuit test method and system
CN107462822A
Charging control method, charging control device and power adapter
CN109888897A
Switching power supply adjusting method and device and terminal
CN113315352A
Charging device
CN206894304U