WO2021063274A1 - 充电控制方法及其装置、电子设备、计算机存储介质 - Google Patents

充电控制方法及其装置、电子设备、计算机存储介质 Download PDF

Info

Publication number
WO2021063274A1
WO2021063274A1 PCT/CN2020/117935 CN2020117935W WO2021063274A1 WO 2021063274 A1 WO2021063274 A1 WO 2021063274A1 CN 2020117935 W CN2020117935 W CN 2020117935W WO 2021063274 A1 WO2021063274 A1 WO 2021063274A1
Authority
WO
WIPO (PCT)
Prior art keywords
charging
adapter
parameter
circuit
electronic device
Prior art date
Application number
PCT/CN2020/117935
Other languages
English (en)
French (fr)
Inventor
李志杰
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2021063274A1 publication Critical patent/WO2021063274A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/007Regulation of charging or discharging current or voltage
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01MPROCESSES OR MEANS, e.g. BATTERIES, FOR THE DIRECT CONVERSION OF CHEMICAL ENERGY INTO ELECTRICAL ENERGY
    • H01M10/00Secondary cells; Manufacture thereof
    • H01M10/42Methods or arrangements for servicing or maintenance of secondary cells or secondary half-cells
    • H01M10/44Methods for charging or discharging
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Definitions

  • the present disclosure relates to the field of electronics, and in particular to a charging control method and device, electronic equipment, and computer storage medium.
  • USB-IF organization The PD power transmission protocol announced by the USB-IF organization can make the current 5V2A typeC theoretical transmission power reach 100w, and at the same time, to standardize the fast charging market and achieve the effect of "multiple charging with one device", Google stipulates that the version above android7.0 must Support PD charging protocol. At present, USB-PD has released version 3.0, and many electronic equipment manufacturers have integrated and supported PD charging solutions on the ap side.
  • a charging control method for charging an electronic device comprising: obtaining a port type of an adapter for charging the electronic device; setting according to the port type of the adapter Circuit parameters of the charging circuit in the electronic device, using the circuit parameters of the charging circuit to charge the electronic device; detecting whether the adapter is a PD adapter; when the adapter is a PD adapter, acquiring the current battery of the electronic device Voltage; according to the current battery voltage, run the PD charging control script to charge the electronic device; wherein, when the current battery voltage is less than or equal to the first voltage threshold, the PD charging control script running includes the following Step: Set a first PD charging parameter according to the charging parameter supported by the PD adapter and the charging parameter supported by the electronic device, and use the first PD charging parameter to charge the electronic device.
  • a charging control device which includes: a port type acquisition module for acquiring the port type of an adapter for charging the electronic device; and a charging circuit parameter adjustment module for acquiring
  • the port type sets the circuit parameters of the charging circuit in the electronic device;
  • the PD adapter judgment module is used to detect whether the adapter is a PD adapter;
  • the voltage acquisition module is used to obtain the current electronic device when the adapter is a PD adapter.
  • the PD charging control script processing module is used to run the PD charging control script according to the current battery voltage;
  • the PD charging parameter setting module is used to perform the charging parameters supported by the PD adapter and the electronic device For the supported charging parameters, a first PD charging parameter is set, and the electronic device is charged with the first PD charging parameter.
  • an electronic device includes: a storage unit storing a charging control program; and a processing unit configured to execute the steps of the charging control method when the charging control program is running.
  • a computer storage medium stores a charging control program, and the charging control program is executed by at least one processor to implement the steps of the charging control method.
  • Figure 1a is a schematic structural diagram of an embodiment of an electronic device of the present disclosure
  • Figure 1b is a block diagram of a circuit structure of the electronic device of the present disclosure
  • Figure 2 is a schematic diagram of USB PD communication when charging electronic devices
  • FIG. 3 is a flowchart of an embodiment of the charging control method of the present disclosure
  • FIG. 5 is a partial flowchart of another embodiment of the charging control method of the present disclosure.
  • FIG. 6 is a partial flowchart of another embodiment of the charging control method of the present disclosure.
  • FIG. 7 is a schematic diagram of functional modules of the charging control device of the present disclosure.
  • Fig. 8 is a system architecture diagram of the electronic device of the present disclosure.
  • the direction indications (such as up, down, left, right, front and back) are used to explain the structure and movement of various elements of the present disclosure not absolute but relative. These descriptions are appropriate when these elements are in the positions shown in the drawings. If the descriptions of the positions of these elements change, the directions of these directions also change accordingly.
  • the embodiment of the present disclosure proposes a method for detecting battery leakage current, which can be applied to smart terminals and mobile terminal devices equipped with a battery power supply system.
  • the device to be charged may be, for example, a terminal or a communication terminal.
  • the terminal or communication terminal includes but is not limited to being set to be connected via a wired line, such as via a public switched telephone network (PSTN) or digital subscriber line , DSL), digital cable, direct cable connection, and/or another data connection/network and/or via, for example, cellular network, wireless local area network (WLAN), such as handheld digital video broadcasting (digital video broadcasting) Handheld, DVB-H) network digital TV network, satellite network, amplitude modulation-frequency modulation (AM-FM) broadcast transmitter, and/or a device for receiving/sending communication signals on the wireless interface of another communication terminal .
  • PSTN public switched telephone network
  • DSL digital subscriber line
  • WLAN wireless local area network
  • AM-FM amplitude modulation-frequency modulation
  • a communication terminal set to communicate through a wireless interface may be referred to as a "wireless communication terminal", a “wireless terminal” and/or a “smart terminal”.
  • smart terminals include, but are not limited to satellite or cellular phones; personal communication system (PCS) terminals that can combine cellular radio phones with data processing, fax, and data communication capabilities; can include radio phones, pagers, and the Internet/ Personal Digital Assistant (PDA) with intranet access, Web browser, notebook, calendar, and/or global positioning system (GPS) receiver; and conventional laptop and/or palmtop Receiver or other electronic device including a radio telephone transceiver.
  • the terminal can also include, but is not limited to, electronic book readers, smart wearable devices, mobile power sources (such as power banks, travel chargers), electronic cigarettes, wireless mice, wireless keyboards, wireless headsets, Bluetooth speakers, etc. Rechargeable electronic equipment.
  • the electronic device may include a rear case 11, a display screen 12, a circuit board, and a battery. It should be noted that the electronic device is not limited to include the above content.
  • the rear shell 11 may form the outer contour of the electronic device.
  • the rear shell 11 may be a metal rear shell, such as magnesium alloy, stainless steel and other metals.
  • the material of the rear shell 11 in the embodiment of the present application is not limited to this, and other methods may also be used.
  • the rear shell 11 may be a plastic rear shell, a ceramic rear shell, a glass rear shell, and the like.
  • the display screen 12 is installed in the rear shell 11.
  • the display screen 12 is electrically connected to the circuit board to form the display surface of the electronic device.
  • the display surface of the electronic device may be provided with a non-display area.
  • the top or/and bottom of the electronic device may form a non-display area, that is, the electronic device forms a non-display area on the upper or/and lower part of the display screen 12.
  • Area, electronic equipment can install cameras, receivers and other devices in non-display areas.
  • the display surface of the electronic device may not be provided with a non-display area, that is, the display screen 12 may be a full screen.
  • the display screen can be laid on the entire display surface of the electronic device, so that the display screen can perform full-screen display on the display surface of the electronic device.
  • the display screen 12 may be one or a combination of a liquid crystal display, an organic light emitting diode display, an electronic ink display, a plasma display, and a display using other display technologies.
  • the display screen 12 may include a touch sensor array (ie, the display screen 12 may be a touch display screen).
  • the touch sensor can be a capacitive touch sensor formed by an array of transparent touch sensor electrodes (such as indium tin oxide (ITO) electrodes), or it can be a touch sensor formed using other touch technologies, such as sonic touch, pressure-sensitive touch, and resistance. Touch, optical touch, etc., are not limited in the embodiment of the present application.
  • a cover plate may be provided on the display screen 12, and the cover plate may cover the display screen 12 to protect the display screen 12.
  • the cover plate may be a transparent glass cover plate, so that the display screen 12 can display through the cover plate.
  • the cover plate may be a glass cover plate made of materials such as sapphire.
  • a storage space is formed between the rear case 11 and the display screen 12, and the storage space can accommodate electronic equipment components, such as circuit boards, batteries, and the like.
  • the circuit board is installed in the back shell 11, the circuit board can be the main board of the electronic device, and the circuit board can be integrated with a motor, a microphone, a speaker, a headphone interface, a universal serial bus interface, a camera, a distance sensor, an ambient light sensor, One, two or more of functional devices such as receivers and processing units.
  • the circuit board may be fixed in the rear case 11.
  • the circuit board may be screwed to the rear shell 11 by screws, or may be snap-fitted to the rear shell 11 in a snap-fit manner.
  • the specific method of fixing the circuit board to the rear housing 11 in the embodiment of the present application is not limited to this, and other methods, such as a method of joint fixing by a buckle and a screw, may also be used.
  • the battery is installed in the rear case 11, and the battery 11 is electrically connected to the circuit board to provide power to the electronic device.
  • the rear case 11 can serve as a battery cover for the battery.
  • the rear shell 11 covers the battery to protect the battery and reduce damage to the battery due to collisions, drops, and the like of electronic devices.
  • FIG. 2 is a structural block diagram of an electronic device provided by an embodiment of the application.
  • the electronic device may include a storage and processing circuit 131, and the storage and processing circuit 131 may be integrated on a circuit board.
  • the storage and processing circuit 131 may include storage units, such as hard disk drive storage units, non-volatile storage units (such as flash memory or other electronic programmable read-only storage units used to form solid-state drives, etc.), and volatile storage units (such as Static or dynamic random access storage units, etc.), etc., are not limited in the embodiment of the present application.
  • the processing circuit in the storage and processing circuit 131 can be used to control the operation of the electronic device.
  • the processing circuit can be implemented based on one or more micro processing units, microcontrollers, digital signal processing units, baseband processing units, power management units, audio codec chips, application specific integrated circuits, display driver integrated circuits, etc.
  • the storage and processing circuit 131 can be used to run software in electronic devices, such as Internet browsing applications, Voice over Internet Protocol (VOIP) phone call applications, email applications, media playback applications, operating system functions, etc. .
  • VOIP Voice over Internet Protocol
  • the electronic device may include an input-output circuit 132, and the input-output circuit 132 may be provided on a circuit board.
  • the input-output circuit 132 can be used to enable the electronic device to implement data input and output, that is, allow the electronic device to receive data from the external device and also allow the electronic device to output data from the electronic device to the external device.
  • the input-output circuit 132 may further include a sensor 1321.
  • the sensor 1321 may include an ambient light sensor, a proximity sensor based on light and capacitance, and a touch sensor (for example, a light-based touch sensor and/or a capacitive touch sensor, where the touch sensor may be a part of a touch screen or as a The touch sensor structure is used independently), acceleration sensor, temperature sensor, and other sensors.
  • the electronic device may include a power management circuit and other input-output units 1322.
  • the input-output unit may include buttons, joysticks, click wheels, scroll wheels, touch pads, keypads, keyboards, cameras, light-emitting diodes, and other status indicators.
  • the user can input commands through the input-output circuit 132 to control the operation of the electronic device, and can use the output data of the input-output circuit 132 to realize receiving status information and other output from the electronic device.
  • the electronic device also includes a charging circuit 133.
  • the charging circuit 133 can charge the battery cell 14 of the electronic device.
  • the charging circuit 133 may be used to further adjust the charging voltage and/or charging current input from the adapter to meet the charging requirements of the battery.
  • the electronic device is equipped with a charging interface
  • the charging interface 123 may be, for example, a USB 2.0 interface, a Micro USB interface, or a USB TYPE-C interface.
  • the charging interface may also be a lightning interface, or any other type of parallel port or serial port that can be used for charging.
  • the charging interface 400 is connected to an adapter through a data line. The adapter obtains electrical energy from the mains. After voltage conversion, it is transmitted through the data line and the charging interface 400 to the charging circuit. Therefore, the electrical energy can be charged into the battery cell to be charged through the charging circuit.
  • the battery 14 in the present disclosure is composed of a shell, a battery cell, a battery protection board, etc. wrapped in the shell.
  • the battery protection board is an integrated circuit board that protects the battery cells.
  • the battery protection board generally has a sampling circuit and a protection circuit.
  • the battery 14 may include a single cell or multiple cells. When the battery 14 includes multiple cells, the multiple cells may be connected in series. In this way, the charging voltage that the battery 14 can withstand is the sum of the charging voltages that the multiple cells can withstand, which can increase the charging speed and reduce charging heat.
  • the voltage of the internal single cell is generally between 3.0V and 4.35V.
  • the total voltage of the two battery cells connected in series is 6.0V-8.7V. Therefore, compared with a single cell, when multiple cells are connected in series, the output voltage of the charging circuit 133 can be increased. Compared with a single-cell battery, it achieves the same charging speed, and the charging current required by a multi-cell battery is about 1/N of the charging current required by a single-cell battery (N is the series-connected battery in the electronic device 10). The number of cores).
  • adopting a solution with multiple battery cells can reduce the size of the charging current, thereby reducing the amount of heat generated by the electronic device 10 during the charging process.
  • the use of the multiple-cell series solution can increase the charging voltage, thereby increasing the charging speed.
  • the following describes the related adapter for charging the electronic device 10 in the related art.
  • the adapter can work in a constant voltage mode, and the output voltage thereof is basically maintained constant, such as 5V, 9V, 12V, or 20V.
  • the output current can be a pulsating DC current (direction and amplitude change with time), AC current (direction and amplitude change with time) or constant DC current (direction and amplitude do not change with time).
  • the voltage output by the relevant adapter is not suitable for being directly applied to both ends of the battery, but needs to be transformed by the transformation circuit in the electronic device 10 first to obtain the expected charging voltage and/or charging current of the battery in the electronic device 10.
  • the adapter can also work in a voltage-following manner. That is, the adapter and the electronic device 10 to be charged perform two-way communication.
  • the adapter adjusts its output voltage and current according to the required charging voltage and charging current of the electronic device 10, so that the output voltage and current can be directly loaded to the electronic device 10. For charging the battery, the electronic device 10 does not need to adjust the charging voltage and charging current again.
  • the conversion circuit can control the charging voltage and/or charging current of the battery in different charging stages. For example, in the constant current charging stage, the conversion circuit can use a current feedback loop to make the current entering the battery meet the expected first charging current of the battery. In the constant voltage charging stage, the conversion circuit can use a voltage feedback loop to make the voltage applied to both ends of the battery meet the expected charging voltage of the battery. In the trickle charging phase, the conversion circuit can use the current feedback loop to make the current entering the battery meet the second charging current expected by the battery (the second charging current is less than the first charging current).
  • the conversion circuit is used to perform a step-down conversion process on the voltage output by the relevant adapter, so that the size of the charging voltage obtained after the step-down conversion meets the expected charging voltage of the battery The size of the charging voltage.
  • the normal charging mode means that the adapter outputs a relatively small current value (usually less than 2.5A) or uses a relatively small power (usually less than 15W) to charge the battery in the charging device. In the normal charging mode, it usually takes several hours to fully charge a large capacity battery (such as a 3000 mAh capacity battery).
  • Fast charging mode means that the adapter can output relatively large current (usually greater than 2.5A, such as 4.5A, 5A or even higher) or relatively large power (usually greater than or equal to 15W) to treat the battery in the charging device Recharge.
  • the charging speed of the adapter in the fast charging mode is faster, and the charging time required to fully charge the battery of the same capacity can be significantly shortened.
  • the PD charging scheme for charging the electronic device 10 according to the PD charging protocol is described below.
  • USB-Power Delivery is one of the current mainstream fast charging protocols. It is a fast charging specification formulated by the USB-IF organization. USBPD increases power transmission through USB cables and connectors, expanding the power supply capability of the cable bus in USB applications. This specification can achieve higher voltage and current, and can deliver up to 100 watts of power, and can freely change the direction of power delivery.
  • USBPD communication is a process of modulating the message of the protocol layer into a 24MHZ FSK signal and coupling it to the VBUS or obtaining the FSK signal from the VBUS to realize the communication between the mobile phone and the adapter.
  • the 24MHz FSK is coupled to the DC level on the VBUS through the cAC-Coupling coupling capacitor, and in order to prevent the 24MHz FSK from affecting the Power Supply or the VBUS DC voltage of the USBHost ,
  • a low-pass filter composed of zIsolation inductors is also added to filter out the FSK signal.
  • the charging interface of the PD adapter supporting the PD charging protocol generally includes a voltage pin VBUS, a ground pin GND, data pins USB_D+ (D+) and USB_D- (D-), a first pin CC1 and a second pin CC2.
  • the Type-C interface has 12 pins on both sides.
  • TX1+, TX1-, RX1+, RX1-, TX2+, TX2-, RX2+, RX2- are four pairs of differential signal pins
  • GND is the ground pin
  • D+, D- are USB differential signal pins compatible with USB2.0
  • VBUS is the power supply pin
  • CC1 and CC2 are the pins used to detect positive and negative insertion, distinguish between master and slave, configure VBUS voltage, etc.
  • SBU1 and SBU2 are bus pins.
  • USB-PD fast charging refers to the process of requesting the adapter to adjust the output voltage and current by coupling the FSK signal on the VBUS DC level, which specifically includes the following steps:
  • Step 1 The electronic device 10 recognizes whether the inserted adapter is a PD adapter that supports fast charging, and if so, it switches, that is, the differential signal pins of Type-C are changed to transmit DP signals (including PD commands and data, etc.).
  • the SBU1 and SUB2 bus pins of TypeC are changed to transmit AUX auxiliary signals.
  • Step 2 Start the USB-PD device policy manager.
  • the policy manager monitors the FSK (Frequency-shift keying) signal coupled on the DC level of the VBUS, and decodes it to obtain the Capabilities Source message, and then according to the USB-PD specification Parse the message to get a list of all voltage and current pairs supported by the PD adapter;
  • FSK Frequency-shift keying
  • Step 3 The electronic device 10 selects a voltage and current pair from the Capabilities Source message according to the user's configuration, and loads the voltage and current pair into the payload part of the request message. Then, the policy manager sends the FSK The signal is coupled to the VBUS DC level.
  • Step 4 The adapter decodes the FSK signal and sends an Accept message to the electronic device 10, while adjusting the output voltage and current of the adapter.
  • Step 5 After receiving the Accept message, the electronic device 10 adjusts the charging voltage and current of the charging IC.
  • an interface for calling PD charging control scripts is set in the main charging thread suitable for various electronic device hardware environments, so that specific PD charging can be specifically set in advance according to the specificity of the electronic device's own hardware environment.
  • Control script for the call of the main charging thread when it is detected that the PD adapter is a power supply device, by calling the PD charging control script, the PD charging control script can be called so that the electronic device can be quickly charged based on the PD charging protocol.
  • the present disclosure separates the charging steps applicable to various electronic device hardware environments from the specific PD charging steps, so that whether the electronic device supports PD charging or whether the supported PD charging parameters are the same, it can be charged using the present disclosure Control method for charging. Therefore, this method can basically be applied to electronic devices in various hardware environments, and thus has good versatility.
  • FIG. 3 shows a flowchart of the charging control method of the present disclosure.
  • the charging control method first enters the main charging thread.
  • the main charging thread is applicable to electronic devices 10 with different hardware environments.
  • the charging control method specifically includes:
  • Step S20 Obtain the port type of the adapter.
  • the charging control module in the electronic device 10 when the charging interface of the electronic device 10 is connected to the adapter, the charging control module in the electronic device 10 will detect the port type according to the BC1.2 charging protocol.
  • the port types of the adapter include SDP (Standard Downstream Port), CDP (Charging Downstream Port), and DCP (Dedicated Charging Port).
  • step S21 the circuit parameters of the charging circuit in the electronic device 10 are set according to the port type of the adapter, and the electronic device 10 is charged with the circuit parameters of the charging circuit.
  • the charging control module if the charging control module detects that the adapter is of the SDP type, the first charging current is obtained from the adapter to charge the electronic device, and if the charging control module detects that the adapter is of the CDP type , The second charging current is obtained from the adapter to charge the electronic device.
  • the adapter type as DCP as an example, when it is detected that the charging interface type of the electronic device 10 is DCP, it will receive the 5V, 2A charging power input by the adapter.
  • the charging control module controls the circuit parameters of the charging circuit through the logic circuit inside the hardware system to adapt to the current output by the adapter.
  • the charging circuit in the electronic device 10 is connected to the adapter to form a path, so the output of the adapter can be adjusted by adjusting the circuit parameters of the charging circuit.
  • a series of expected charging currents and/or charging voltages such as charging input current, charging current, cut-off current, etc., are set, and then the logic control circuit inside the hardware system adjusts the charging circuit according to these parameters. Circuit parameters.
  • step S22 it is detected whether the adapter is a PD adapter.
  • Step S23 when the adapter is a PD adapter, obtain the current battery voltage of the electronic device 10;
  • the current battery voltage can be obtained by reading the measurement value of the voltage measurement circuit on the battery protection board.
  • Step S24 Run the PD charging control script according to the current battery voltage.
  • a specific PD charging thread is entered. Then, according to the steps in the PD charging thread, the specific PD charging parameter PD parameter is sent to the adapter to obtain the corresponding charging power from the PD adapter.
  • a function pointer can be used to jump to the charging chip file stored in the application processor in the electronic device 10.
  • the file includes a PD charging function unique to the electronic device 10.
  • the PD charging control script may be preset in the electronic device 10 according to the charging parameters supported by the hardware system of the electronic device 10. It may also be set by the manufacturer or the user after the electronic device 10 leaves the factory.
  • the charging parameters supported by different hardware systems are different. Therefore, the specific charging control parameters in the PD charging control script corresponding to each electronic device 10 will be correspondingly different.
  • the PD charging control script includes the following steps when running:
  • Step S241 according to the charging parameters supported by the PD adapter and the charging parameters supported by the electronic device 10, a first PD charging parameter is set, and the electronic device 10 is charged with the first PD charging parameter.
  • the charging process between the adapter and the electronic device 10 will be carried out according to the PD charging protocol.
  • the PD adapter will send a list of all voltage and current pairs supported by it to one end of the electronic device 10. Therefore, one end of the electronic device 10 will select a specific voltage and current pair from the list.
  • the selection principle is based on the premise that the hardware system of the electronic device 10 must support the charging voltage and charging current, and which set of voltage and current pairs is specifically selected It can be based on the configuration of fast charging for users, or it can be the highest charging power that can be obtained.
  • the first voltage threshold is set to ensure safety during the charging process.
  • the first PD charging parameter is set, and the first PD charging parameter is sent to the adapter for obtaining the charging power configured with the first PD charging parameter from the adapter.
  • the adapter type when it is detected in the main charging thread that the charging interface type of the electronic device 10 is DCP, it will receive the 5V, 2A charging power input by the adapter. In the main charging thread, further check whether the adapter is a PD adapter. When the adapter is a PD adapter and the voltage is less than the preset 9V, it will jump to a specific PD charging thread and execute the relevant steps in the PD charging thread.
  • the operation of the PD charging control script is generally based on the PD charging protocol, so the information exchange process between the electronic device 10 and the PD adapter can refer to the above PD charging scheme part.
  • the PD adapter In the PD charging thread, when the PD adapter responds to the charging parameters sent by the electronic device 10, it adjusts the output voltage and output current to power the battery of the electronic device 10. However, it takes a certain time for the PD adapter to adjust its charging voltage and charging current to the first charging parameter. In the course of this time, the electronic device 10 cannot know when the PD adapter can complete the switching of the charging voltage and the charging current, and thus cannot adjust the circuit parameters of the charging circuit to adapt to the charging current output by the PD adapter, which easily causes the charging circuit to fail. The circuit parameters do not match the electrical energy output by the PD adapter, which causes the electronic device 10 to draw excessive current from the PD adapter, causing the charging current output by the PD adapter to exceed its rated value and initiate overcurrent protection.
  • the PD adapter does not fully perform the charging voltage and/or charging parameters according to the first charging parameter sent by the electronic device 10.
  • the charging current is output, so that the circuit parameters of the charging circuit adjusted by the charging circuit according to the first charging parameter do not match the actual output voltage and charging current of the PD adapter, resulting in too slow charging or a threat to charging safety.
  • the first PD charging parameter is set to obtain the first PD charging parameter from the PD adapter.
  • Step S242 monitoring the output voltage of the PD adapter
  • Step S25 When the output voltage of the PD adapter is adjusted to a voltage value matching the first PD charging parameter, the circuit parameters of the charging circuit are adjusted to match the charging current configured according to the first PD charging parameter.
  • a separate thread is created to detect the jump of the output voltage of the PD adapter.
  • the electronic device 10 requests the PD adapter with the first charging parameter to the adapter, and monitors the time when the output voltage of the PD adapter jumps by monitoring the current voltage on the charging bus Vbus.
  • the charging parameter set by the electronic device 10 in the main charging thread starts at 5V, 2A, and after entering the PD charging thread, the electronic device 10 sets the first charging parameter to 9V, 2A to apply to the PD adapter. The electronic device 10 then monitors the time point when the output voltage of the PD adapter jumps from 5V to 9V.
  • the circuit parameters of the charging circuit will be adjusted to the charging circuit parameters in the electronic device 10 for adaptive charging configured with the first PD charging parameter. Power to ensure the stable and safe charging process.
  • the output voltage of the PD adapter not only is the output voltage of the PD adapter the same as the charging voltage in the first PD charging parameter, it also includes the automatic selection of a certain charging parameter because the PD adapter cannot output the charging voltage and charging current corresponding to the first PD charging parameter To replace the first PD charging parameter to output charging power.
  • this embodiment realizes that the circuit parameters of the charging circuit can be flexibly adjusted according to the actual output voltage and charging current of the PD adapter, and the circuit parameters of the charging circuit can be adjusted in time when the output voltage of the PD adapter jumps. , So as to ensure that the circuit parameters of the charging circuit and the output voltage of the PD adapter can be well matched to ensure the stable and safe charging process;
  • the circuit parameters of the charging circuit can be adjusted according to the output voltage of the PD adapter, so as to avoid the situation that the charging circuit adapts to the wrong current gear.
  • thread polling can be used to monitor the output voltage of the adapter.
  • the method in this embodiment further includes: When the voltage is adjusted to a voltage value matching the first PD charging parameter, trigger generation of a first interrupt signal;
  • Monitoring the output voltage of the PD adapter includes: monitoring the occurrence of the first interrupt signal; when the output voltage of the PD adapter is adjusted to a voltage value matching the first PD charging parameter, triggering the generation of the first interrupt signal; when the first interrupt signal is monitored When adjusting the circuit parameters of the charging circuit to match the charging current configured according to the first PD charging parameter.
  • the first interrupt signal is automatically triggered. Then it will jump to the step: adjusting the circuit parameters of the charging circuit for self-adapting the charging current configured with the first PD charging parameter.
  • the PD charging thread is executed only once when the battery voltage meets the condition. Specifically, it is only executed when the charging control method is run for the first time in this charging process.
  • after running the PD charging control script to charge the electronic device according to the current battery voltage it further includes: after the PD charging control script has been executed once, charging the electronic device with the first PD charging parameter; The preset duration monitors the reception of the charging circuit parameter adjustment command; when the charging circuit parameter adjustment command is received, the circuit parameters of the charging circuit are adjusted according to the charging parameter adjustment command.
  • the adapter After the electronic device 10 applies for the charging power configured with the first PD charging parameter, the adapter will supply power to the electronic device 10 according to the charging power.
  • the PD charging control script After the PD charging control script has been executed once, a corresponding mark will be made, so that when the charging control method is run next time, the PD charging control script will not be executed again.
  • the charging current adjustment is set every time. At the same time, the circuit parameters of the charging circuit will be adjusted accordingly.
  • the electronic device 10 can adjust the charging current by itself. Therefore, when the electronic device 10 is in some special scenarios and the charging current is adjusted, it will generate a charging circuit parameter adjustment instruction.
  • the steps of the PD charging control script are described when the current battery voltage is less than or equal to the first voltage threshold.
  • the PD charging control script includes the following steps when running:
  • Step S242 according to the charging parameters supported by the PD adapter and the charging parameters supported by the electronic device 10, a second PD charging parameter is set, and the second PD charging parameter is used to charge the electronic device.
  • the output voltage of the adapter configured with the second PD charging parameter is lower than the output voltage of the adapter configured with the first PD charging parameter.
  • the electronic device 10 sends the second PD charging parameter with a smaller charging power to the PD adapter, so that the PD adapter outputs a smaller charging power, so as to avoid the phenomenon that the battery voltage is falsely high and cannot be fully charged.
  • the electronic device 10 sends the second PD charging parameter to the PD adapter
  • the electronic device 10 cannot know when the PD adapter is It can complete the switching of charging voltage and charging current, so that the circuit parameters of the charging circuit cannot be adjusted to adapt to the charging current output by the PD adapter, which may easily cause the circuit parameters of the charging circuit and the power output by the PD adapter to be mismatched, which may cause the electronic device 10 to fail
  • the PD adapter draws too much current, causing the charging current output by the PD adapter to exceed its rated value and start over-current protection.
  • the second PD charging parameter is set, and the step of charging the electronic device 10 with the second PD charging parameter
  • the step of charging the electronic device 10 with the second PD charging parameter After that, it also includes: monitoring the output voltage of the PD adapter; according to the result of the output voltage of the PD adapter, it will jump to the main charging thread.
  • the PD charging control script after obtaining the charging power from the PD adapter, it also includes: when the output voltage of the PD adapter is output When the voltage value is adjusted to match the second PD charging parameter, the circuit parameter of the charging circuit is adjusted to match the charging current configured according to the second PD charging parameter.
  • the first PD charging parameter is 9V, 2A
  • the second PD charging parameter is 5V, 2A. Therefore, after the electronic device 10 sends the second charging parameter to the PD adapter, the electronic device 10 then monitors the output voltage of the PD adapter The time point of transition from 9V to 5V.
  • the circuit parameters of the charging circuit are adjusted to the charging circuit parameters in the electronic device 10 for adaptive charging power configured with the first PD charging parameters, To ensure the stability and safety of the charging process.
  • Step S26 when the adapter is not a PD adapter, monitor the reception of the charging circuit parameter adjustment command every preset time period;
  • step S27 when the charging circuit parameter adjustment command is received, the circuit parameters of the charging circuit are adjusted according to the charging parameter adjustment command.
  • the charging control method continues to execute according to the steps in the main charging thread at this time. Considering that when the electronic device 10 is in some special scenarios, the charging current will be adjusted. When the electronic device 10 adjusts the charging current, it will generate a charging circuit parameter adjustment command.
  • an interface of a PD charging control script for calling is set in the main charging thread suitable for the hardware environment of various electronic devices 10, and the PD charging control script is specific to the hardware environment of the electronic device 10 itself. Therefore, when it is detected that the PD adapter is a power supply device, the PD charging control script is called to enable the electronic device 10 to be quickly charged based on the PD charging protocol.
  • the charging control method of the present disclosure separates the charging steps applicable to the hardware environment of various electronic devices 10 from the specific PD charging steps, so that the method can be applied to electronic devices 10 in various hardware environments.
  • the disclosed charging control method has good versatility.
  • the present disclosure also proposes a charging control device 30 for charging the battery of an electronic device.
  • the specific charging control device 30 includes: a port type acquisition module 31 for acquiring the port type of an adapter for charging the electronic device; a charging circuit parameter adjustment module 32 for setting the electronic device according to the port type of the adapter Circuit parameters of the charging circuit; PD adapter judgment module 34, used to detect whether the adapter is a PD adapter; voltage acquisition module 35, used to obtain the current battery voltage of the electronic device 10 when the adapter is a PD adapter; PD charging control script processing
  • the module 36 is used to obtain and run the PD charging control script according to the current battery voltage;
  • the charging power determination module 33 is used to obtain the charging power from the PD adapter according to the PD charging control script;
  • the PD charging parameter setting module 37 is used to The charging parameters supported by the PD adapter and the charging parameters supported by the electronic device are set, the first
  • the charging control device 30 further includes:
  • Monitoring module used to monitor the output voltage of the PD adapter
  • the charging circuit parameter adjustment module 32 is used for adjusting the circuit parameters of the charging circuit when the output voltage output by the PD adapter is adjusted to a voltage value matching the first PD charging parameter, for matching the charging current configured according to the first PD charging parameter .
  • the monitoring module is used to monitor the occurrence of the first interrupt signal
  • the charging circuit parameter adjustment module 32 is configured to adjust the circuit parameters of the charging circuit when the first interrupt signal is monitored to match the charging current configured according to the first PD charging parameter.
  • the charging control device 30 further includes:
  • the parameter adjustment command monitoring module is used to monitor the reception of the charging circuit parameter adjustment command every preset time period
  • the charging circuit parameter adjustment module 32 is configured to adjust the circuit parameters of the charging circuit according to the charging parameter adjustment command when the charging circuit parameter adjustment command is received.
  • the PD charging parameter setting module 37 is configured to set the second PD charging parameters according to the charging parameters supported by the PD adapter and the charging parameters supported by the electronic device, and use the second PD charging parameters to charge the electronic device;
  • the charging power configured with the second PD charging parameter is less than the charging power configured with the first PD charging parameter.
  • the monitoring module is used to monitor the output voltage of the PD adapter
  • the charging circuit parameter adjustment module 32 is used to adjust the circuit parameters of the charging circuit when the output voltage output by the PD adapter is adjusted to a voltage value matching the second PD charging parameter, for matching the charging current configured according to the second PD charging parameter .
  • the monitoring module is used to monitor the occurrence of the second interrupt signal
  • the charging circuit parameter adjustment module 32 is configured to adjust the circuit parameters of the charging circuit when the second interrupt signal is monitored to match the charging current configured according to the second PD charging parameter.
  • the parameter adjustment instruction monitoring module is configured to monitor the reception of the charging circuit parameter adjustment instruction every preset time when the adapter is not a PD adapter;
  • the charging circuit parameter adjustment module 32 is configured to adjust the circuit parameters of the charging circuit according to the charging parameter adjustment command when the charging circuit parameter adjustment command is received.
  • This embodiment also proposes an electronic device 10, including a battery, a charging circuit, a storage unit, and a processing unit; the storage unit stores a charging control program; the processing unit is used to execute the steps of the charging control method when the charging control program is running .
  • the electronic device 10 may also be configured in the form of an electronic device 4, which is represented in the form of a general-purpose computing device.
  • the components of the electronic device 4 may include, but are not limited to: the aforementioned at least one processing unit 42, the aforementioned at least one storage unit 41, and a bus 43 connecting different system components (including storage units and processing units), wherein the storage unit 41 stores program codes
  • the program code may be executed by the processing unit 42 so that the processing unit 42 executes the steps according to various exemplary embodiments of the present disclosure described in the foregoing embodiment section of this specification.
  • the storage unit 41 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 411 and/or a cache storage unit 412, and may further include a read-only storage unit (ROM) 413.
  • RAM random access storage unit
  • ROM read-only storage unit
  • the storage unit 41 may also include a program/utility tool 414 having a set (at least one) program module 415.
  • program module 415 includes but is not limited to: an operating system, one or more application programs, other program modules, and program data. Each of these examples or some combination may include the implementation of a network environment.
  • the bus 43 may represent one or more of several types of bus structures, including a storage unit bus or a storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local area using any bus structure among multiple bus structures. bus.
  • the electronic device 4 may also communicate with one or more external devices 50 (such as keyboards, pointing devices, Bluetooth devices, etc.), and may also communicate with one or more devices that enable the user to interact with the electronic device 4, and/or communicate with Any device (such as a router, a modem, a display unit 44, etc.) that enables the electronic device 4 of the robot to communicate with one or more other computing devices. This communication can be performed through an input/output (I/O) interface 45.
  • the electronic device 4 of the robot may also communicate with one or more networks (for example, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 46. As shown in FIG.
  • the network adapter 46 communicates with other modules of the electronic device 4 of the robot through the bus 43. It should be understood that although not shown in FIG. 8, other hardware and/or software modules can be used in conjunction with the electronic device 4 of the robot, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems , Tape drives and data backup storage systems.
  • the example embodiments described here can be implemented by software, or can be implemented by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network , Including several instructions to make a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) execute the method according to the embodiment of the present disclosure.
  • a computing device which may be a personal computer, a server, a terminal device, or a network device, etc.
  • a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of this specification is stored.
  • various aspects of the present disclosure can also be implemented in the form of a program product, which includes program code.
  • the program product runs on a terminal device, the program code is used to make the terminal device execute the above-mentioned instructions in this specification. The steps according to various exemplary embodiments of the present disclosure are described in the example section.

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Manufacturing & Machinery (AREA)
  • Chemical & Material Sciences (AREA)
  • Chemical Kinetics & Catalysis (AREA)
  • Electrochemistry (AREA)
  • General Chemical & Material Sciences (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

本公开提供了一种充电控制方法及其装置、电子设备、计算机存储介质。所述充电控制方法包括:获取为所述电子设备充电的适配器的端口类型;根据所述适配器的端口类型设置电子设备内充电电路的电路参数;检测所述适配器是否为PD适配器;当所述适配器为PD适配器时,获取当前的电池电压;根据所述当前的电池电压,获取并运行PD充电控制脚本;根据所述PD充电控制脚本,从所述PD适配器获取充电功率。本公开的充电控制方法具有较好的通用性。 (图3)

Description

充电控制方法及其装置、电子设备、计算机存储介质
相关申请的交叉引用
本公开要求于2019年09月30日提交的申请号为201910945056.7名称均为“充电控制方法及其装置、电子设备、计算机存储介质”的中国专利申请的优先权,该中国专利申请的全部内容通过引用全部并入本文。
技术领域
本公开涉及电子领域,特别涉及一种充电控制方法及其装置、电子设备、计算机存储介质。
背景技术
USB-IF组织公布的PD功率传输协议可使现行的5V2A的typeC的理论传输功率达到100w,同时为规范化快充市场,达到“一器多充”的效果,google规定android7.0以上的版本必须支持PD充电协议。目前USB-PD已经发布了3.0版本,目前众多的电子设备厂商在ap端已集成支持PD充电方案。
然而,某些手机能够识别到PD适配器但是由于硬件不支持5V以上的充电电压,所以无法支持PD充电协议。另一种情况是,由于不同类型的电子设备,以及同种电子设备但是由于型号不同,所造成在硬件上也有所区别。这种硬件上的区别,造成所支持的PD的充电参数具有很大的特异性。
如此,就对软件设计造成了很大的困扰,厂商需要针对这些硬件不同的电子设备单独设计一套充电控制方法,从而造成大量人力物力的耗费。
发明内容
根据本公开的第一方面,提供一种充电控制方法,用于为电子设备充电,所述充电控制方法包括:获取为所述电子设备充电的适配器的端口类型;根据所述适配器的端口类型设置电子设备内充电电路的电路参数,以所述充电电路的电路参数为所述电子设备充电;检测所述适配器是否为PD适配器;当所述适配器为PD适配器时,获取所述电子设备当前的电池电压;根据所述当前的电池电压,运行PD充电控制脚本为所述电子设备充电;其中,在所述当前的电池电压小于或等于第一电压阈值时,所述PD充电控制脚本运行时包括以下步骤:根据所述PD适配器所支持的充电参数以及所述电子设备所支持的充电参数,设置第一PD充电参数,以所述第一PD充电参数为所述电子设备充电。
根据本公开的第二方面,提出一种充电控制装置,包括:端口类型获取模块,用于获取为所述电子设备充电的适配器的端口类型;充电电路参数调整模块,用于根据所述适配器的端口类型设置电子设备内充电电路的电路参数;PD适配器判断模块,用于检测所述适配器是否为PD适配器;电压获取模块,用于在当所述适配器为PD适配器时,获取所述电子设备当前的电池电压;PD充电控制脚本处理模块,用于根据所述当前的电池电压,运行PD充电控制脚本;PD充电参数设置模块,用于根据所述PD适配器所支持的充电参数以及所述电子设备所支持的充电参数,设置第一PD充电参数,以所述第一PD充电参数为所述电子设备充电。
根据本公开的第三方面,提出一种电子设备,电子设备包括:存储单元,存储有充电控制程序;处理单元,用于在运行所述充电控制程序时,执行所述充电控制方法的步骤。
根据本公开的第四方面,提出一种计算机存储介质,所述计算机存储介质存储有充电控制程序,所述充电控制程序被至少一个处理器执行时实现所述充电控制方法的步骤。
附图说明
图1a是本公开电子设备一实施例的结构示意图;
图1b是本公开电子设备一电路结构框图;
图2是USB PD在对电子设备充电时的通讯示意图;
图3是本公开充电控制方法的一实施例流程图;
图4是本公开充电控制方法的另一实施例流程图;
图5是本公开充电控制方法的另一实施例的部分流程图;
图6是本公开充电控制方法的另一实施例的部分流程图;
图7是本公开充电控制装置的功能模块示意图;
图8是本公开电子设备的系统架构图。
具体实施方式
尽管本公开可以容易地表现为不同形式的实施方式,但在附图中示出并且在本说明书中将详细说明的仅仅是其中一些具体实施方式,同时可以理解的是本说明书应视为是本公开原理的示范性说明,而并非旨在将本公开限制到在此所说明的那样。
由此,本说明书中所指出的一个特征将用于说明本公开的一个实施方式的其中一个特征,而不是暗示本公开的每个实施方式必须具有所说明的特征。此外,应当注意的是本说明书描述了许多特征。尽管某些特征可以组合在一起以示出可能的系统设计,但是这些特征也可用于其他的未明确说明的组合。由此,除非另有说明,所说明的组合并非旨在限制。
在附图所示的实施方式中,方向的指示(诸如上、下、左、右、前和后)用于解释本公开的各种元件的结构和运动不是绝对的而是相对的。当这些元件处于附图所示的位置时,这些说明是合适的。如果这些元件的位置的说明发生改变时,则这些方向的指示也相应地改变。
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些示例实施方式使得本公开的描述将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。附图仅为本公开的示意性图解,并非一定是按比例绘制。图中相同的附图标记表示相同或类似的部分,因而将省略对它们的重复描述。
以下结合本说明书的附图,对本公开的较佳实施方式予以进一步地详尽阐述。
本公开实施例提出一种电池漏电流的检测方法,可应用于配置有电池供电系统的智能终端、移动终端设备中。待充电设备例如可以是终端或通信终端,该终端或通信终端包括但不限于被设置成经由有线线路连接,如经由公共交换电话网络(public switched telephone network,PSTN)、数字用户线路(digital subscriber line,DSL)、数字电缆、直接电缆连接,以及/或另一数据连接/网络和/或经由例如,针对蜂窝网络、无线局域网(wireless local area network,WLAN)、诸如手持数字视频广播(digital video broadcasting handheld,DVB-H)网络的数字电视网络、卫星网络、调幅-调频(amplitu demodulation-frequency modulation,AM-FM)广播发送器,以及/或另一通信终端的无线接口接收/发送通信信号的装置。被设置成通过无线接口通信的通信终端可以被称为“无线通信终端”、“无线终端”以及/或“智能终端”。智能终端的示例包括,但不限于卫星或蜂窝电话;可以组合蜂窝无线电电话与数据处理、传真以及数据通信能力的个人通信系统(personal communication system,PCS)终端;可以包括无线电电话、寻呼机、因特网/内联网接入、Web浏览器、记事簿、日历以及/或全球定位系统(global positioning system,GPS)接收器的个人数字助理(Personal Digital Assistant,PDA);以及常规膝上型和/或掌上型接收器或包括无线电电话收发器的其它电子装置。此外,该终端还可以包括但不限于诸如电子书阅读器、智能穿戴设备、移动电源(如充电宝、旅充)、电子烟、无线鼠标、无线键盘、无线耳机、蓝牙音箱等具有 充电功能的可充电电子设备。
请参阅图1a和图1b。电子设备可以包括后壳11、显示屏12、电路板、电池。需要说明的是,电子设备并不限于包括以上内容。其中,后壳11可以形成电子设备的外部轮廓。在一些实施例中,后壳11可以为金属后壳,比如镁合金、不锈钢等金属。需要说明的是,本申请实施例后壳11的材料并不限于此,还可以采用其它方式,比如:后壳11可以为塑胶后壳、陶瓷后壳、玻璃后壳等。
其中,显示屏12安装在后壳11中。显示屏12电连接至电路板上,以形成电子设备的显示面。在一些实施例中,电子设备的显示面可以设置非显示区域,比如:电子设备的顶端或/和底端可以形成非显示区域,即电子设备在显示屏12的上部或/和下部形成非显示区域,电子设备可以在非显示区域安装摄像头、受话器等器件。需要说明的是,电子设备的显示面也可以不设置非显示区域,即显示屏12可以为全面屏。可以将显示屏铺设在电子设备的整个显示面,以使得显示屏可以在电子设备的显示面进行全屏显示。
其中,显示屏12可以为液晶显示器,有机发光二极管显示器,电子墨水显示器,等离子显示器,使用其它显示技术的显示器中一种或者几种的组合。显示屏12可以包括触摸传感器阵列(即,显示屏12可以是触控显示屏)。触摸传感器可以是由透明的触摸传感器电极(例如氧化铟锡(ITO)电极)阵列形成的电容式触摸传感器,或者可以是使用其它触摸技术形成的触摸传感器,例如音波触控,压敏触摸,电阻触摸,光学触摸等,本申请实施例不作限制。
需要说明的是,在一些实施例中,可以在显示屏12上盖设一盖板,盖板可以覆盖在显示屏12上,对显示屏12进行保护。盖板可以为透明玻璃盖板,以便显示屏12透过盖板进行显示。在一些实施例中,盖板可以是用诸如蓝宝石等材料制成的玻璃盖板。在一些实施例中,显示屏12安装在后壳11上后,后壳11和显示屏12之间形成收纳空间,收纳空间可以收纳电子设备的器件,比如电路板、电池等。其中,电路板安装在后壳11中,电路板可以为电子设备的主板,电路板上可以集成有马达、麦克风、扬声器、耳机接口、通用串行总线接口、摄像头、距离传感器、环境光传感器、受话器以及处理单元等功能器件中的一个、两个或多个。
在一些实施例中,电路板可以固定在后壳11内。具体的,电路板可以通过螺钉螺接到后壳11上,也可以采用卡扣的方式卡配到后壳11上。需要说明的是,本申请实施例电路板具体固定到后壳11上的方式并不限于此,还可以其它方式,比如通过卡扣和螺钉共同固定的方式。其中,电池安装在后壳11中,电池11与电路板进行电连接,以向电子设备提供电源。后壳11可以作为电池的电池盖。后壳11覆盖电池以保护电池,减少电池由于电子设备的碰撞、跌落等而受到的损坏。
请参阅图2,图2为本申请实施例提供的电子设备的结构框图。电子设备可以包括存储和处理电路131,存储和处理电路131可以集成在电路板上。存储和处理电路131可以包括存储单元,例如硬盘驱动存储单元,非易失性存储单元(例如闪存或用于形成固态驱动器的其它电子可编程只读存储单元等),易失性存储单元(例如静态或动态随机存取存储单元等)等,本申请实施例不作限制。存储和处理电路131中的处理电路可以用于控制电子设备的运转。处理电路可以基于一个或多个微处理单元,微控制器,数字信号处理单元,基带处理单元,功率管理单元,音频编解码器芯片,专用集成电路,显示驱动器集成电路等来实现。
存储和处理电路131可用于运行电子设备中的软件,例如互联网浏览应用程序,互联网协议语音(Voice over Internet Protocol,VOIP)电话呼叫应用程序,电子邮件应用程序,媒体播放应用程序,操作系统功能等。
电子设备可以包括输入-输出电路132,输入-输出电路132可以设置在电路板上。输入-输出电路132可用于使电子设备实现数据的输入和输出,即允许电子设备从外部设备 接收数据和也允许电子设备将数据从电子设备输出至外部设备。输入-输出电路132可以进一步包括传感器1321。传感器1321可以包括环境光传感器,基于光和电容的接近传感器,触摸传感器(例如,基于光触摸传感器和/或电容式触摸传感器,其中,触摸传感器可以是触控显示屏的一部分,也可以作为一个触摸传感器结构独立使用),加速度传感器,温度传感器,和其它传感器等。
电子设备可以包括电力管理电路和其它输入-输出单元1322。输入-输出单元可以包括按钮,操纵杆,点击轮,滚动轮,触摸板,小键盘,键盘,照相机,发光二极管和其它状态指示器等。
用户可以通过输入-输出电路132输入命令来控制电子设备的操作,并且可以使用输入-输出电路132的输出数据以实现接收来自电子设备的状态信息和其它输出。
电子设备还包括充电电路133。充电电路133可以为电子设备的电芯14充电。充电电路133可以用于进一步的调节自适配器输入的充电电压和/或充电电流,以满足电池的充电需求。
电子设备配置有充电接口,充电接口123例如可以为USB 2.0接口、Micro USB接口或USB TYPE-C接口。在一些实施例中,充电接口还可以为lightning接口,或者其他任意类型的能够用于充电的并口或串口。该充电接口400通过数据线与适配器连接,适配器从市电获取电能,经过电压变换后,通过数据线传、充电接口400传输至充电电路,因此电能通过充电电路得以充入待充电电芯中。
本公开中的电池14包括外壳以及包裹在外壳内的电芯、电池保护板等组成。电池保护板是对电芯起保护作用的集成电路板。电池保护板上一般具有采样电路以及保护电路。电池14可包括单电芯或多电芯。电池14包括多电芯时,该多个电芯之间可为串联关系。由此,电池14可承受的充电电压为多个电芯可承受的充电电压之和,可提高充电速度,减少充电发热。
例如,以电子设备10为手机为例,当电子设备10的电池14包括单电芯时,内部的单节电芯的电压一般在3.0V~4.35V之间。而当电子设备10的电池14包括两节串联的电芯时,串联的两节电芯的总电压为6.0V-8.7V。由此,相比于单电芯,采用多节电芯串联时,充电电路133的输出电压可以提高。与单节电芯相比,达到同等的充电速度,多节电芯所需的充电电流约为单节电芯所需的充电电流的1/N(N为电子设备10内的相互串联的电芯的数目)。换句话说,在保证同等充电速度(充电电流相同)的前提下,采用多节电芯的方案,可以降低充电电流的大小,从而减少电子设备10在充电过程的发热量。另一方面,与单电芯方案相比,在充电电流保持相同的情况下,采用多电芯串联方案,可提高充电电压,从而提高充电速度。
下面描述一下相关技术中为电子设备10充电的相关适配器。
相关技术中,适配器可以以恒压模式工作,其输出的电压基本维持恒定,比如5V、9V、12V或20V等。输出的电流可以为脉动直流电流(方向不变、幅值大小随时间变化)、交流电流(方向和幅值大小均随时间变化)或恒定直流电流(方向和幅值均不随时间变化)。相关适配器输出的电压并不适合直接加载到电池的两端,而是需要先经过电子设备10内的变换电路进行变换,以得到电子设备10内的电池所预期的充电电压和/或充电电流。
适配器还可以采用电压跟随的方式工作。即适配器和待充电的电子设备10进行双向通信,适配器根据电子设备10反馈所需的充电电压和充电电流,从而调整自身输出的电压和电流,使得输出的电压和电流可以直接加载到电子设备10的电池上,为电池充电,电子设备10无需再次再调整充电电压和充电电流。
变换电路可在不同的充电阶段控制电池的充电电压和/或充电电流。例如,在恒流充电阶段,变换电路可以利用电流反馈环使得进入到电池的电流大小满足电池所预期的第一充电电流的大小。在恒压充电阶段,变换电路可以利用电压反馈环使得加载到电池两端的 电压的大小满足电池所预期的充电电压的大小。在涓流充电阶段,变换电路可以利用电流反馈环使得进入到电池的电流大小满足电池所预期的第二充电电流的大小(第二充电电流小于第一充电电流)。
比如,当相关适配器输出的电压大于电池所预期的充电电压时,变换电路用于对相关适配器输出的电压进行降压变换处理,以使经降压转换后得到的充电电压的大小满足电池所预期的充电电压的大小。
对电子设备10的电池的充电模式大致有“普通充电模式”、“快速充电模式”。普通充电模式是指适配器输出相对较小的电流值(通常小于2.5A)或者以相对较小的功率(通常小于15W)来对待充电设备中的电池进行充电。在普通充电模式下想要完全充满一较大容量电池(如3000毫安时容量的电池),通常需要花费数个小时的时间。快速充电模式则是指适配器能够输出相对较大的电流(通常大于2.5A,比如4.5A,5A甚至更高)或者以相对较大的功率(通常大于等于15W)来对待充电设备中的电池进行充电。相较于普通充电模式而言,适配器在快速充电模式下的充电速度更快,完全充满相同容量电池所需要的充电时间能够明显缩短。
下面描述一下根据PD充电协议对电子设备10充电的PD充电方案。
USB-Power Delivery(USBPD)是目前主流的快充协议之一。是由USB-IF组织制定的一种快速充电规范。USBPD透过USB电缆和连接器增加电力输送,扩展USB应用中的电缆总线供电能力。该规范可实现更高的电压和电流,输送的功率最高可达100瓦,并可以自由的改变电力的输送方向。
请参阅图2,USBPD的通信是将协议层的消息调制成24MHZ的FSK信号并耦合到VBUS上或者从VBUS上获得FSK信号来实现手机和适配器通信的过程。
如图2所示,在USB PD通信中,是将24MHz的FSK通过cAC-Coupling耦合电容耦合到VBUS上的直流电平上的,而为了使24MHz的FSK不对Power Supply或者USBHost的VBUS直流电压产生影响,在回路中同时添加了zIsolation电感组成的低通滤波器过滤掉FSK信号。
支持PD充电协议的PD适配器的充电接口一般包括电压引脚VBUS、接地引脚GND、数据引脚USB_D+(D+)及USB_D-(D-)、第一引脚CC1及第二引脚CC2。当某电子设备10支持PD适配器的充电时,其USB PD协议接口芯片会通过
以电子设备10上的Type-C接口为例说明,Type-C接口的两面各具有12个针脚。其中,TX1+、TX1-,RX1+、RX1-,TX2+、TX2-,RX2+、RX2-为四对差分信号针脚,GND为接地针脚,D+、D-为用于兼容USB2.0的USB差分信号针脚,VBUS为电源针脚,CC1、CC2为用于探测正反插、区分主从、配置VBUS电压等的针脚,SBU1、SBU2为总线针脚。
由于Type-C接口具有四个电源针脚和四个接地针脚,因此,Type-C接口理论上能够支持100W的电源输出,这也是Type-C接口能够实现USB-PD快速充电的原因。在此基础上,USB-PD快速充电是指通过VBUS直流电平上耦合FSK信号来请求适配器调整输出电压和电流的过程,具体包括如下步骤:
步骤1:电子设备10识别插入的适配器是否为支持快速充电的PD适配器,如是,则进行切换,即将Type-C的差分信号针脚改为用于传输DP信号(包括PD命令和数据等),将TypeC的SBU1、SUB2总线针脚改为用于传输AUX辅助信号。
步骤2:启动USB-PD设备策略管理器,策略管理器监控VBUS的直流电平上耦合的FSK(Frequency-shift keying)信号,并从中解码得到能力资源(Capabilities Source)消息,再根据USB-PD规范解析该消息得出PD适配器支持的所有电压和电流对列表;
步骤3:电子设备10根据用户的配置从Capabilities Source消息中选择一个电压和电流对,并将电压和电流对加载至充电请求(Request)消息的载荷(payload)部分,然后,策略 管理器将FSK信号耦合到VBUS直流电平上。
步骤4:适配器解码FSK信号并发出接收(Accept)消息给电子设备10,同时调整适配器的输出电压和电流。
步骤5:电子设备10接收到Accept消息后,调整充电IC的充电电压和电流。
本公开实施例通过在适用于各种电子设备硬件环境的主充电线程内设置可供调用的PD充电控制脚本的接口,因而可以预先根据电子设备自身硬件环境的特异性来具体设置特定的PD充电控制脚本,以供主充电线程的调用。因此在检测到PD适配器为供电设备时,通过调用PD充电控制脚本,均能够通过调用PD充电控制脚本,以使电子设备能够基于PD充电协议被快速充电。本公开通过将适用于各种电子设备硬件环境的充电步骤与具有特异性的PD充电步骤分离开来,使得无论电子设备是否支持PD充电或所支持PD充电参数是否相同,均能够利用本公开充电控制方法进行充电。因此本方法均基本上可以应用于各种硬件环境的电子设备内,因而具有较好的通用性。
请参阅图3,图3示出了本公开的充电控制方法的流程图。具体的,充电控制方法首先进入主充电线程,主充电线程对具有不同硬件环境的电子设备10均适用,充电控制方法具体包括:
步骤S20,获取适配器的端口类型。
在一实施例中,当电子设备10的充电接口与适配器连接时,电子设备10内的充电控制模块会根据BC1.2充电协议对端口类型进行检测。适配器的端口类型包括SDP(Standard Downstream Port,标准下行端口)、CDP(Charging Downstream Port,充电下行端口)以及DCP(Dedicated Charging Port,专用充电端口)。
步骤S21,根据适配器的端口类型设置电子设备10内充电电路的电路参数,以充电电路的电路参数为电子设备10充电。
在一实施例中,根据所检测到的端口类型不同,如果充电控制模块检测到适配器为SDP类型,则从适配器获取第一充电电流对电子装置进行充电,如果充电控制模块检测到适配器为CDP类型,则从适配器获取第二充电电流对电子装置进行充电。在此以适配器类型为DCP为例说明,当检测到电子设备10充电接口类型为DCP时,会接收适配器输入的5V、2A的充电功率。
同时,本实施例中,充电控制模块通过硬件系统内部的逻辑电路控制充电电路的电路参数,以适配于适配器所输出的电流。由于在充电开始后,电子设备10内的充电电路与适配器连接形成通路,所以通过调节充电电路的电路参数能够调节适配器的输出。
具体的,本实施例中是通过设置充电输入电流、充电电流、截止电流等一系列所期望达到的充电电流和/或充电电压,进而硬件系统内部的逻辑控制电路根据这些参数以调节充电电路的电路参数。
在下一步骤中,步骤S22,检测适配器是否为PD适配器。
请参阅上PD充电方案部分中关于检测适配器是否为PD适配器的方法。根据适配器是否为PD适配器的检测结果有两种。以下实施例中,先阐述第一种情况:
步骤S23,当适配器为PD适配器时,获取电子设备10当前的电池电压;
具体的,可以通过读取电池保护板上的电压测量电路的测量值以获取当前的电池电压。
步骤S24,根据当前的电池电压,运行PD充电控制脚本。
在本实施例中,当运行PD充电控制脚本时,即进入了特定的PD充电线程。进而根据PD充电线程内的步骤,发送特定的PD充电参数PD参数至适配器,以从PD适配器获取相应的充电功率。
当检测到适配器为特定的PD适配器时,可以通过函数指针的方式跳转到该电子设备10内保存在应用处理器内的充电芯片文件。在该文件内包括写入有电子设备10所特有的PD充电函数。
PD充电控制脚本可以是根据电子设备10硬件系统所支持的充电参数预设在该电子设备10内的。也可以是在电子设备10出厂后通过厂家或用户自行设置的。
不同的硬件系统所支持的充电参数时不同的,因此对应于每个电子设备10内的PD充电控制脚本内的具体充电控制参数会有相应的不同。
具体的,在该PD充电控制脚本运行时,至少进行以下步骤:
在当前的电池电压小于或等于第一电压阈值时,PD充电控制脚本运行时包括以下步骤:
步骤S241,根据PD适配器所支持的充电参数以及电子设备10所支持的充电参数,设置第一PD充电参数,以第一PD充电参数为电子设备10充电。
当检测到适配器为PD适配器时,适配器与电子设备10之间的充电流程会按照PD充电协议进行,按照PD协议,PD适配器会将其支持的所有电压和电流对列表发送至电子设备10一端,因此,电子设备10一端将从该列表中选择具体的一个电压和电流对,选择原则前提是电子设备10的硬件系统必须支持该充电电压和充电电流,而具体选择的哪一组电压和电流对,可以是根据对用户快速充电的配置,也可以是所能获得的最高充电功率。
在此,若电子设备10内电池在开始充电时,已经具有较高的电压,因此在利用根据PD充电方式充电时,会造成电压上升较快,容易造成电池发热量较大。因此本实施例中,通过设置第一电压阈值以保证在充电过程中的安全性。在当前的充电电压小于或等于第一电压阈值时,设置第一PD充电参数,并将第一PD充电参数发送至适配器,用于从适配器获取以第一PD充电参数配置的充电功率。
在此以适配器类型为DCP为例说明,在充电主线程内检测到电子设备10充电接口类型为DCP时,会接收适配器输入的5V、2A的充电功率。在主充电线程中再进一步适配器是否为PD适配器,当适配器为PD适配器时,且电压小于预设的9V时,会跳转到特定的PD充电线程中,执行PD充电线程中的相关步骤。
可以理解的是,PD充电控制脚本的运行大体是基于PD充电协议的,因此关于电子设备10与PD适配器之间的信息交互过程可以参考上述PD充电方案部分。
在PD充电线程中,当PD适配器响应电子设备10所发出的充电参数时,会调节输出电压、输出电流,以为电子设备10的电池供电。然而PD适配器调节其充电电压、充电电流至第一充电参数需要一定的时间。而在这个时间过程中,电子设备10无法获知PD适配器何时能够完成充电电压、充电电流的切换,从而无法调节充电电路的电路参数,以适应PD适配器输出的充电电流,从而容易造成充电电路的电路参数与PD适配器输出的电能不匹配而造成电子设备10从PD适配器吸取过大电流,造成PD适配器输出的充电电流超过其额定值而出发过流保护。
并且,当若是使用的是非正规PD适配器,或是PD适配器对电子设备10请求的充电参数具有较大的兼容性,造成PD适配器没有完全按照电子设备10所发送的第一充电参数进行充电电压、充电电流进行输出,因此导致充电电路根据第一充电参数所调节的充电电路的电路参数与PD适配器实际的输出电压、充电电流不匹配,从而导致充电速度过慢或充电安全性威胁。
因此请参阅图4,本实施例中,在PD充电线程内,根据PD适配器所支持的充电参数以及电子设备10所支持的充电参数,设置第一PD充电参数,用于从PD适配器获取以第一PD充电参数配置的充电功率的步骤之后还包括:
步骤S242,监控PD适配器的输出电压;
步骤S25,当PD适配器的输出电压调整至与第一PD充电参数匹配的电压值时,调整充电电路的电路参数,用于匹配根据第一PD充电参数配置的充电电流。
在本实施例中,单独开辟了一条线程用于检测PD适配器的输出电压的跳变。例如电 子设备10向PD适配器以第一充电参数向适配器请求,通过监控当前的充电总线Vbus上的电压,以监控PD适配器的输出电压发生跳变的时刻。
例如电子设备10在主充电线程内设置的充电参数开始为5V,2A,在进入到PD充电线程内后,电子设备10设置第一充电参数为9V,2A向PD适配器申请。之后电子设备10便监控PD适配器的输出电压从5V跳变到9V的时间点。
一旦监控到PD适配器的输出电压从5V跳变到9V的时间点后,便会调整充电电路的电路参电子设备10内的充电电路参数,以用于自适应以第一PD充电参数配置的充电功率,以保障充电过程的稳定、安全的进行。
在此需要说明的是,在“当前的充电电压调整至与第一PD充电参数匹配的电压值时”PD适配器响应于第一PD充电参数的请求所做的充电电压、充电电流的调整。不仅仅是PD适配器的输出电压与第一PD充电参数中的充电电压相同的情况,还包括由于PD适配器无法输出与第一PD充电参数对应的充电电压、充电电流,而自动选择某一充电参数以替代第一PD充电参数,以输出充电功率的情况。
由此本实施例实现了能够灵活的根据PD适配器实际的输出电压、充电电流调节充电电路的电路参数,并且能够在PD适配器的输出电压发生跳变时,及时的进行充电电路的电路参数的调整,从而保证充电电路的电路参数与PD适配器的输出电压能够很好的配合,保证充电过程的稳定、安全的进行;
并且,通过本实施例的自适应机制,能够根据PD适配器输出电压的调整充电电路的电路参数,以避免发生充电电路自适应到错误的电流档位上的情况。
在一实施例中,可以通过线程轮询以监控适配器的输出电压,在本实施例中,为了节约内存的消耗量和所占用的CPU资源,本实施例中方法还包括:当PD适配器的输出电压调整至与第一PD充电参数匹配的电压值时,触发产生第一中断信号;
监控PD适配器的输出电压包括:监控第一中断信号的出现;当PD适配器的输出电压调整至与第一PD充电参数匹配的电压值时,触发产生第一中断信号;当监控到第一中断信号时,调整充电电路的电路参数,用于匹配根据第一PD充电参数配置的充电电流。
例如,当适配器的输出电压从5V调整至9V时,会自动触发第一中断信号。进而会跳转到步骤:调整充电电路的电路参数,用于自适应以第一PD充电参数配置的充电电流进行。
在本实施例中,为了节约内存的消耗量和所占用的CPU资源,设置在电池电压满足条件下,PD充电线程只执行一次。具体的,仅在本次充电过程中的首次运行充电控制方法时执行。本实施例中设置,根据当前的电池电压,运行PD充电控制脚本为电子设备充电之后还包括:当已执行过一次PD充电控制脚本后,则以第一PD充电参数为电子设备充电;每隔预设时长监视充电电路参数调整指令的接收情况;当接收到充电电路参数调整指令时,根据充电参数调整指令,调整充电电路的电路参数。
当电子设备10向申请到以第一PD充电参数配置的充电功率后,适配器便会按照该充电功率向电子设备10供电。在一具体示例中,当已执行过一次PD充电控制脚本后,会作相应的标记,从而在下一次运行该充电控制方法时,不会再执行PD充电控制脚本。
本实施例中,当电子设备10在某些情况下需要调整充电电流时,为了使充电电路的电路参数能够与当前的充电电流随时保持匹配状态,因此本实施例中,设置每次充电电流调整时,均会对充电电路的电路参数做相应的调整。
具体的,当PD充电控制脚本被标记时,表示PD充电控制脚本已经执行过一次,此时适配器已经是按照第一PD充电参数配置的充电功率输出。然而电子设备10能够自行调节充电电流的大小。所以当电子设备10处于某些特殊的场景下,调节了充电电流后,便会生成充电电路参数调整指令。
可以理解的是,有多种场景可以触发充电电路参数调整指令的生成,例如电子设备 10屏幕点亮、熄灭、打电话等操作时,这些操作均会影响充电电流的大小。
在上述实施例中,阐述了在当前的电池电压小于或等于第一电压阈值,PD充电控制脚本所运行的步骤。而随着充电的进行,当电池电压接近额定电压时,会发生电压虚高而无法被完全充满的情况。因此请参阅图5,在本实施例中,设置在当前的电池电压大于第一电压阈值时,PD充电控制脚本运行时包括以下步骤:
步骤S242,根据PD适配器所支持的充电参数以及电子设备10所支持的充电参数,设置第二PD充电参数,以第二PD充电参数为电子设备充电。
其中,以第二PD充电参数配置的适配器的输出电压小于以第一PD充电参数配置的适配器的输出电压。
在PD充电线程内,在获取到的当前电池电压大于第一电压阈值时,表明电池的电压已经较高,需要使用小电流、小电压进行充电。因此此时电子设备10以具有较小充电功率的第二PD充电参数发送给PD适配器,以使PD适配器输出较小的充电功率,以避免电池电压虚高而无法被充满的现象。
同样的,在电子设备10向PD适配器发出第二PD充电参数后,PD适配器在调节充电功率以第一PD充电参数输出调节到第二PD充电参数输出时,电子设备10无法获知PD适配器何时能够完成充电电压、充电电流的切换,从而无法调节充电电路的电路参数,以适应PD适配器输出的充电电流,从而容易造成充电电路的电路参数与PD适配器输出的电能不匹配而造成电子设备10从PD适配器吸取过大电流,造成PD适配器输出的充电电流超过其额定值而出发过流保护。
因此本实施例中设置在PD充电线程内,根据PD适配器所支持的充电参数以及电子设备10所支持的充电参数,设置第二PD充电参数,以第二PD充电参数为电子设备10充电的步骤之后还包括:监控PD适配器的输出电压;根据PD适配器输出电压的结果会跳转到主充电线程内,根据PD充电控制脚本,从PD适配器获取充电功率之后还包括:当PD适配器输出的输出电压调整至与第二PD充电参数匹配的电压值时,调整充电电路的电路参数,用于匹配根据第二PD充电参数配置的充电电流。
具体的,例如第一PD充电参数为9V,2A,第二PD充电参数为5V,2A,因此当电子设备10发送第二充电参数给PD适配器后,之后电子设备10便监控PD适配器的输出电压从9V跳变到5V的时间点。
一旦监控到PD适配器的输出电压从9V跳变到5V的时间点后,调整充电电路的电路参电子设备10内的充电电路参数,以用于自适应以第一PD充电参数配置的充电功率,以保障充电过程的稳定、安全的进行。
请参阅图6,在上述实施例中,阐述了当适配器为PD适配器时的情况,在此将阐述当适配器不是PD适配器的情况。具体的,检测适配器是否为PD适配器之后还包括以下步骤:
步骤S26,当适配器为不是PD适配器时,每隔预设时长监测充电电路参数调整指令的接收情况;
步骤S27,当接收到充电电路参数调整指令时,根据充电参数调整指令,调整充电电路的电路参数。
具体的,当适配器不是PD适配器时,此时充电控制方法继续按照主充电线程中的步骤继续执行。考虑到当电子设备10处于某些特殊的场景下,会对充电电流进行调节,当电子设备10调节了充电电流时便会生成充电电路参数调整指令。
可以理解的是,有多种场景可以触发充电电路参数调整指令的生成,例如电子设备10屏幕点亮、熄灭、打电话等操作时,这些操作均会影响充电电流的大小。
本公开实施例通过在适用于各种电子设备10硬件环境的主充电线程内设置供调用的PD充电控制脚本的接口,且该PD充电控制脚本具有针对电子设备10自身硬件环境的特 异性。因此在检测到PD适配器为供电设备时,通过调用PD充电控制脚本,以使电子设备10能够基于PD充电协议被快速充电。本公开充电控制方法通过将适用于各种电子设备10硬件环境的充电步骤与具有特异性的PD充电步骤分离开来,使得本方法均可以应用于各种硬件环境的电子设备10内,因此本公开的充电控制方法具有较好的通用性。
本公开还提出一种充电控制装置30,用于为电子设备的电池充电,充电控制装置30的具体实施例请参照上述充电控制方法。请参阅图7,具体的充电控制装置30包括:端口类型获取模块31,用于获取为电子设备充电的适配器的端口类型;充电电路参数调整模块32,用于根据适配器的端口类型设置电子设备内充电电路的电路参数;PD适配器判断模块34,用于检测适配器是否为PD适配器;电压获取模块35,用于在当适配器为PD适配器时,获取电子设备10当前的电池电压;PD充电控制脚本处理模块36,用于根据当前的电池电压,获取并运行PD充电控制脚本;充电功率确定模块33,用于根据PD充电控制脚本,从PD适配器获取充电功率;PD充电参数设置模块37,用于根据PD适配器所支持的充电参数以及电子设备所支持的充电参数,设置第一PD充电参数,以第一PD充电参数为电子设备充电。
在一实施例中,充电控制装置30还包括:
监控模块,用于监控PD适配器的输出电压;
充电电路参数调整模块32,用于当PD适配器输出的输出电压调整至与第一PD充电参数匹配的电压值时,调整充电电路的电路参数,用于匹配根据第一PD充电参数配置的充电电流。
在一实施例中,监控模块,用于监控第一中断信号的出现;
充电电路参数调整模块32,用于当监控到第一中断信号时,调整充电电路的电路参数,用于匹配根据第一PD充电参数配置的充电电流。
在一实施例中,充电控制装置30还包括:
参数调整指令监控模块,用于每隔预设时长监视充电电路参数调整指令的接收情况;
充电电路参数调整模块32,用于当接收到充电电路参数调整指令时,根据充电参数调整指令,调整充电电路的电路参数。
在一实施例中,PD充电参数设置模块37,用于根据PD适配器所支持的充电参数以及电子设备所支持的充电参数,设置第二PD充电参数,以第二PD充电参数为电子设备充电;
其中,以第二PD充电参数配置的充电功率小于以第一PD充电参数配置的充电功率。
在一实施例中,监控模块,用于监控PD适配器的输出电压;
充电电路参数调整模块32,用于当PD适配器输出的输出电压调整至与第二PD充电参数匹配的电压值时,调整充电电路的电路参数,用于匹配根据第二PD充电参数配置的充电电流。
在一实施例中,监控模块,用于监控第二中断信号的出现;
充电电路参数调整模块32,用于当监控到第二中断信号时,调整充电电路的电路参数,用于匹配根据第二PD充电参数配置的充电电流。
在一实施例中,参数调整指令监控模块,用于当适配器为不是PD适配器时,每隔预设时长监测充电电路参数调整指令的接收情况;
充电电路参数调整模块32,用于当接收到充电电路参数调整指令时,根据充电参数调整指令,调整充电电路的电路参数。
本实施例还提出一种电子设备10,包括电池、充电电路、存储单元、处理单元;存储单元,存储有充电控制程序;处理单元用于在运行充电控制程序时,执行上述充电控制方法的步骤。
请参阅图8,电子设备10还可以被配置为电子设备4的形式,电子设备4以通用计 算设备的形式表现。电子设备4的组件可以包括但不限于:上述至少一个处理单元42、上述至少一个存储单元41、连接不同系统组件(包括存储单元和处理单元)的总线43,其中,存储单元41存储有程序代码,程序代码可以被处理单元42执行,使得处理单元42执行本说明书上述实施例部分中描述的根据本公开各种示例性实施方式的步骤。
存储单元41可以包括易失性存储单元形式的可读介质,例如随机存取存储单元(RAM)411和/或高速缓存存储单元412,还可以进一步包括只读存储单元(ROM)413。
存储单元41还可以包括具有一组(至少一个)程序模块415的程序/实用工具414,这样的程序模块415包括但不限于:操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。
总线43可以为表示几类总线结构中的一种或多种,包括存储单元总线或者存储单元控制器、外围总线、图形加速端口、处理单元或者使用多种总线结构中的任意总线结构的局域总线。
电子设备4也可以与一个或多个外部设备50(例如键盘、指向设备、蓝牙设备等)通信,还可与一个或者多个使得用户能与该电子设备4交互的设备通信,和/或与使得该机器人的电子设备4能与一个或多个其它计算设备进行通信的任何设备(例如路由器、调制解调器、显示单元44等等)通信。这种通信可以通过输入/输出(I/O)接口45进行。并且,机器人的电子设备4还可以通过网络适配器46与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图7所示,网络适配器46通过总线43与机器人的电子设备4的其它模块通信。应当明白,尽管图8中未示出,可以结合机器人的电子设备4使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本公开实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、终端装置、或者网络设备等)执行根据本公开实施方式的方法。
在本公开的示例性实施例中,还提供了一种计算机可读存储介质,其上存储有能够实现本说明书上述方法的程序产品。在一些可能的实施方式中,本公开的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当程序产品在终端设备上运行时,程序代码用于使终端设备执行本说明书上述实施例部分中描述的根据本公开各种示例性实施方式的步骤。
虽然已参照几个典型实施方式描述了本公开,但应当理解,所用的术语是说明和示例性、而非限制性的术语。由于本公开能够以多种形式具体实施而不脱离发明的精神或实质,所以应当理解,上述实施方式不限于任何前述的细节,而应在随附权利要求所限定的精神和范围内广泛地解释,因此落入权利要求或其等效范围内的全部变化和改型都应为随附权利要求所涵盖。

Claims (20)

  1. 一种充电控制方法,用于为电子设备充电,所述充电控制方法包括:
    获取为所述电子设备充电的适配器的端口类型;
    根据所述适配器的端口类型设置电子设备内充电电路的电路参数,以所述充电电路的电路参数为所述电子设备充电;
    检测所述适配器是否为PD适配器;
    当所述适配器为PD适配器时,获取所述电子设备当前的电池电压;
    根据所述当前的电池电压,运行PD充电控制脚本为所述电子设备充电;
    其中,在所述当前的电池电压小于或等于第一电压阈值时,所述PD充电控制脚本运行时包括以下步骤:
    根据所述PD适配器所支持的充电参数以及所述电子设备所支持的充电参数,设置第一PD充电参数,以所述第一PD充电参数为所述电子设备充电。
  2. 根据权利要求1所述的充电控制方法,其中,所述根据所述PD适配器所支持的充电参数以及所述电子设备所支持的充电参数,设置第一PD充电参数,以所述第一PD充电参数为所述电子设备充电的步骤之后还包括:
    监控所述PD适配器的输出电压;
    当所述PD适配器的输出电压调整至与所述第一PD充电参数匹配的电压值时,调整所述充电电路的电路参数,用于匹配根据所述第一PD充电参数配置的充电电流。
  3. 根据权利要求2所述的充电控制方法,其中,所述方法还包括:当所述PD适配器的输出电压调整至与所述第一PD充电参数匹配的电压值时,触发产生第一中断信号;
    所述监控所述PD适配器的输出电压,包括:
    监控所述第一中断信号的出现;
    所述调整所述充电电路的电路参数,用于匹配根据所述第一PD充电参数配置的充电电流,包括:
    当监控到所述第一中断信号时,调整所述充电电路的电路参数,用于匹配根据所述第一PD充电参数配置的充电电流。
  4. 根据权利要求1所述的充电控制方法,其中,所述根据所述当前的电池电压,运行PD充电控制脚本为所述电子设备充电之后还包括:
    当已执行过一次所述PD充电控制脚本后,以所述第一PD充电参数为所述电子设备充电;
    每隔预设时长监视充电电路参数调整指令的接收情况;
    当接收到所述充电电路参数调整指令时,根据所述充电参数调整指令,调整所述充电电路的电路参数。
  5. 根据权利要求1所述的充电控制方法,其中,在所述当前的电池电压大于所述第一电压阈值时,所述PD充电控制脚本运行时包括以下步骤:
    根据所述PD适配器所支持的充电参数以及所述电子设备所支持的充电参数,设置第二PD充电参数,以所述第二PD充电参数为所述电子设备充电。
  6. 根据权利要求5所述的充电控制方法,其中,所述根据所述PD适配器所支持的充电参数以及所述电子设备所支持的充电参数,设置第二PD充电参数,以所述第二PD充电参数为所述电子设备充电的步骤之后还包括:
    监控所述PD适配器的输出电压;
    当所述PD适配器输出的输出电压调整至与所述第二PD充电参数匹配的电压值时,调整所述充电电路的电路参数,用于匹配根据所述第二PD充电参数配置的充电电流。
  7. 根据权利要求6所述的充电控制方法,其中,所述方法还包括:当所述PD适配 器输出的输出电压调整至与所述第二PD充电参数匹配的电压值时,触发产生第二中断信号;
    所述监控所述PD适配器的输出电压,包括:
    监控所述第二中断信号的出现;
    所述调整所述充电电路的电路参数,用于匹配根据所述第二PD充电参数配置的充电电流,包括:
    当监控到所述第二中断信号时,调整所述充电电路的电路参数,用于匹配根据所述第二PD充电参数配置的充电电流。
  8. 根据权利要求7所述的充电控制方法,其中,所述控制方法还包括:
    根据所述PD充电控制脚本,从所述PD适配器获取充电功率;
    其中,以所述第二PD充电参数配置的充电功率小于以所述第一PD充电参数配置的充电功率。
  9. 根据权利要求1至8任意一项所述的充电控制方法,其中,所述检测所述适配器是否为PD适配器之后还包括以下步骤:
    当所述适配器为不是PD适配器时,每隔预设时长监测充电电路参数调整指令的接收情况;
    当接收到所述充电电路参数调整指令时,根据所述充电参数调整指令,调整所述充电电路的电路参数。
  10. 一种充电控制装置,包括:
    端口类型获取模块,用于获取为电子设备充电的适配器的端口类型;
    充电电路参数调整模块,用于根据所述适配器的端口类型设置电子设备内充电电路的电路参数;
    PD适配器判断模块,用于检测所述适配器是否为PD适配器;
    电压获取模块,用于在当所述适配器为PD适配器时,获取所述电子设备当前的电池电压;
    PD充电控制脚本处理模块,用于根据所述当前的电池电压,运行PD充电控制脚本;
    PD充电参数设置模块,用于根据所述PD适配器所支持的充电参数以及所述电子设备所支持的充电参数,设置第一PD充电参数,以所述第一PD充电参数为所述电子设备充电。
  11. 根据权利要求10所述的充电控制装置,其中,所述充电控制装置还包括:
    充电功率确定模块,用于根据所述PD充电控制脚本,从所述PD适配器获取充电功率。
  12. 根据权利要求10所述的充电控制装置,其中,所述充电控制装置还包括:
    监控模块,用于监控所述PD适配器的输出电压;
    其中,所述充电电路参数调整模块还用于当所述PD适配器输出的输出电压调整至与所述第一PD充电参数匹配的电压值时,调整所述充电电路的电路参数,用于匹配根据所述第一PD充电参数配置的充电电流。
  13. 根据权利要求12所述的充电控制装置,其中,所述监控模块还用于监控第一中断信号的出现;
    所述充电电路参数调整模块还用于当监控到第一中断信号时,调整所述充电电路的电路参数,用于匹配根据所述第一PD充电参数配置的充电电流。
  14. 根据权利要求10所述的充电控制装置,其中,所述充电控制装置还包括:
    参数调整指令监控模块,用于每隔预设时长监视充电电路参数调整指令的接收情况;
    其中,所述充电电路参数调整模块还用于当接收到所述充电电路参数调整指令时,根据所述充电参数调整指令,调整所述充电电路的电路参数。
  15. 根据权利要求12所述的充电控制装置,其中,PD充电参数设置模块还用于根据所述PD适配器所支持的充电参数以及所述电子设备所支持的充电参数,设置第二PD充电参数,以所述第二PD充电参数为所述电子设备充电;
    其中,以所述第二PD充电参数配置的充电功率小于以所述第一PD充电参数配置的充电功率。
  16. 根据权利要求15所述的充电控制装置,其中,所述监控模块还用于监控所述PD适配器的输出电压;
    所述充电电路参数调整模块还用于当所述PD适配器输出的输出电压调整至与所述第二PD充电参数匹配的电压值时,调整所述充电电路的电路参数,用于匹配根据所述第二PD充电参数配置的充电电流。
  17. 根据权利要求16所述的充电控制装置,其中,所述监控模块还用于监控第二中断信号的出现;
    所述充电电路参数调整模块还用于当监控到所述第二中断信号时,调整所述充电电路的电路参数,用于匹配根据所述第二PD充电参数配置的充电电流。
  18. 根据权利要求14至17任意一项所述的充电控制装置,其中,所述参数调整指令监控模块,用于当适配器为不是PD适配器时,每隔预设时长监测所述充电电路参数调整指令的接收情况;
    所述充电电路参数调整模块还用于当接收到所述充电电路参数调整指令时,根据所述充电参数调整指令,调整所述充电电路的电路参数。
  19. 一种电子设备,包括:
    存储单元,存储有充电控制程序;
    处理单元,用于在运行所述充电控制程序时,执行权利要求1至9任一项所述充电控制方法的步骤。
  20. 一种计算机存储介质,所述计算机存储介质存储有充电控制程序,所述充电控制程序被至少一个处理器执行时实现权利要求1至9任一项所述充电控制方法的步骤。
PCT/CN2020/117935 2019-09-30 2020-09-25 充电控制方法及其装置、电子设备、计算机存储介质 WO2021063274A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910945056.7A CN112583064B (zh) 2019-09-30 2019-09-30 充电控制方法及其装置、电子设备、计算机存储介质
CN201910945056.7 2019-09-30

Publications (1)

Publication Number Publication Date
WO2021063274A1 true WO2021063274A1 (zh) 2021-04-08

Family

ID=75117285

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/117935 WO2021063274A1 (zh) 2019-09-30 2020-09-25 充电控制方法及其装置、电子设备、计算机存储介质

Country Status (2)

Country Link
CN (1) CN112583064B (zh)
WO (1) WO2021063274A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105977563A (zh) * 2016-06-28 2016-09-28 努比亚技术有限公司 一种充电方法、充电设备及终端
CN106329655A (zh) * 2016-09-26 2017-01-11 宇龙计算机通信科技(深圳)有限公司 电子装置及其充电方法
CN106537725A (zh) * 2014-07-22 2017-03-22 罗姆股份有限公司 充电电路及使用了它的电子设备、充电器
US20190064914A1 (en) * 2017-08-24 2019-02-28 Dell Products L.P. Power storage adapter for efficient supply of power of multiple portable information handling systems

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003263245A (ja) * 2002-03-07 2003-09-19 Fuji Xerox Co Ltd Usb装置
CN103762691B (zh) * 2014-01-28 2015-12-23 广东欧珀移动通信有限公司 电池充电装置及电池充电保护控制方法
CN106532820A (zh) * 2016-11-16 2017-03-22 普联技术有限公司 一种快速充电方法及电子设备
CN107742912A (zh) * 2017-11-08 2018-02-27 深圳天珑无线科技有限公司 充电方法、快充设备及计算机可读存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106537725A (zh) * 2014-07-22 2017-03-22 罗姆股份有限公司 充电电路及使用了它的电子设备、充电器
CN105977563A (zh) * 2016-06-28 2016-09-28 努比亚技术有限公司 一种充电方法、充电设备及终端
CN106329655A (zh) * 2016-09-26 2017-01-11 宇龙计算机通信科技(深圳)有限公司 电子装置及其充电方法
US20190064914A1 (en) * 2017-08-24 2019-02-28 Dell Products L.P. Power storage adapter for efficient supply of power of multiple portable information handling systems

Also Published As

Publication number Publication date
CN112583064A (zh) 2021-03-30
CN112583064B (zh) 2024-02-23

Similar Documents

Publication Publication Date Title
CN108899952B (zh) 一种多电池充放电装置及移动终端
WO2021068769A1 (zh) 充电控制方法及装置、电子设备、计算机存储介质
CN114174844B (zh) 充电控制方法及装置、充电测试方法及系统、电子设备
EP2992583B1 (en) Battery charger integrated circuit chip
JP7121865B2 (ja) 逆方向充電装置、逆方向充電電流調整方法及び装置
CN105706291B (zh) 用于快速充电的方法及其电子装置
US20180332538A1 (en) Terminal Device
WO2021136383A1 (zh) 充电控制方法及装置、电子设备以及计算机存储介质
US7900070B2 (en) Power saving method of bi-directional communication wireless periheral device
CN111464673B (zh) 一种电子设备及其充电方法
WO2020077510A1 (zh) 一种音频业务的参数调整方法和终端
WO2015089803A1 (en) Method and apparatus for charging electronic device with usb connection
CN112688373A (zh) 一种充电方法、装置及数据线
US8463978B2 (en) Computer with ability to charge electronic device in power off state and USB interface module thereof
WO2021063273A1 (zh) 电池内短路的检测方法与装置、电子设备
US20140195827A1 (en) Electronic device with power control function
US9570922B2 (en) Charging method and electronic device
WO2021063274A1 (zh) 充电控制方法及其装置、电子设备、计算机存储介质
CN108777627B (zh) 一种供电方法和装置
KR20210033758A (ko) 전력 공급 방법 및 그 전자 장치
CN111384754B (zh) 充电方法、装置、存储介质及移动终端
CN211655786U (zh) 电子设备及移动电源
JP2008027147A (ja) 携帯端末
CN112256610B (zh) 连接控制方法、系统、存储介质及移动终端
CN111614131A (zh) 电子设备和放电控制方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20870977

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20870977

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20870977

Country of ref document: EP

Kind code of ref document: A1