Battery control circuit, method and system of equipment
By designing a battery control circuit with multiple transistors and resistors in the device circuit, the problems of reverse power supply and shutdown leakage current are solved, hardware protection is achieved, battery damage and equipment safety hazards are avoided, and user experience and battery life are improved.
Patent Information
- Application Number
- CN202410860945.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-09-27
AI Technical Summary
The existing technology fails to effectively prevent power reverse connection and shutdown leakage current in device circuit design, resulting in battery damage and equipment safety hazards, and it is impossible to implement a low-cost pure hardware solution.
Design a battery control circuit that includes multiple transistors and resistors. By setting the on and off states of the transistors, the isolation between the power supply and the battery terminal is achieved to prevent reverse connection and leakage current, and the power-on button signal leakage is prevented through the diode.
It realizes hardware protection when the power supply is reversed and the battery is reversed, avoiding damage to the device and battery, reducing battery power consumption, extending battery storage time, and improving device safety and user experience.
Smart Images

Figure CN118713255A
Abstract
Description
Technical Field
[0001] The present invention mainly relates to the technical field of control circuits, and in particular to a battery control circuit, method and system for a device. Background Art
[0002] In the circuit design of battery-powered devices, shutdown leakage current is a factor that needs to be considered. The traditional solution is to use external control of MOS (Metal Oxide Semiconductor Field Effect Transistor) tubes to turn on or off the power supply to avoid leakage current after the device is shut down. However, this design does not fully consider the shutdown leakage current problem of the system-side chip in some devices. As long as the chip is powered, whether it is working or not, the chip itself may have current leakage. Especially when the device is stored or transported for a long time, the battery may be over-discharged for a long time, affecting its life, thereby affecting the use of the device.
[0003] In order to prevent shutdown leakage current, some devices use charging chips with SHIPMODE mode. SHIPMODE mode reduces unnecessary power consumption of the battery in standby mode by disconnecting the battery from the subsequent circuit. However, this solution is costly and requires software cooperation, and cannot achieve a low-cost pure hardware solution.
[0004] On the other hand, in the design of battery reverse connection protection, most current devices mainly consider the reverse connection of the positive and negative poles of the battery body when plugging and unplugging, but ignore the possibility of reverse connection of the positive and negative poles of the power supply that charges the battery. Current designs often only use labels to indicate the positive and negative pole directions of the battery, and there is no reverse connection protection circuit in the system of the entire device. This may cause damage to the device when the battery is reversed, especially when the external power supply is used for testing or charging at the system end. Once the positive and negative poles of the external power supply are reversed, the reverse voltage may be connected to the battery, thereby damaging the battery.
[0005] When considering battery reverse connection protection, existing solutions do not fully consider the situation where the battery is reversely connected while the system is plugged into a charging power source. In this case, the charging power source may directly enter the battery, causing a large current to damage the battery, or even cause dangerous situations such as fire and smoke, endangering the user's personal safety.
[0006] Currently, the circuit design of devices with batteries does not take into account the protection against reverse power connection and shutdown leakage current. If the user does not operate properly, the device and battery may be damaged, resulting in a poor user experience of the device. Summary of the invention
[0007] The technical problem to be solved by the present application is to provide a battery control circuit, method and system for a device, which can realize a hardware protection circuit and will not damage the device and battery when the power supply is reversed or the battery is reversed, and there will be no shutdown leakage current, thereby improving the safety of the device and the user experience.
[0008] The technical solution adopted by the present application to solve the above-mentioned technical problems is a battery control circuit of a device, comprising: a first transistor, the source of the first transistor is respectively connected to the system-end power supply and the first end of the first resistor; a second transistor, the source of the second transistor is respectively connected to the battery-end power supply and the first end of the second resistor, and the drain of the second transistor is connected to the drain of the first transistor; a third transistor, the drain of the third transistor is respectively connected to the gate of the first transistor and the second end of the first resistor, the gate of the third transistor is connected to the battery-end power supply, and the source of the third transistor is connected to the ground terminal; a fourth transistor, the drain of the fourth transistor is respectively connected to the gate of the second transistor and the second end of the second resistor, the gate of the fourth transistor is respectively connected to the first end of the third resistor and the input / output pin, and the source of the fourth transistor is respectively connected to the ground terminal and the second end of the third resistor.
[0009] In one embodiment of the present application, the battery control circuit also includes a power button of the device and a diode. The power button is used to control the power on or off of the device. The first end of the diode is connected to the power button, and the second end of the diode is connected to the gate of the second transistor.
[0010] In an embodiment of the present application, the first transistor and the second transistor are PMOS transistors, and the third transistor and the fourth transistor are NMOS transistors.
[0011] In one embodiment of the present application, the battery control circuit is configured as follows: the power button is controlled not to be closed so that the device is in a shutdown state, the battery-end power supply has power so that the third transistor and the first transistor are turned on; the input and output pins are at a low level so that the fourth transistor is turned off; the second resistor makes the voltage difference Vgs=0V of the second transistor so that the second transistor is turned off; so that there is no leakage current between the battery-end power supply and the system-end power supply.
[0012] In one embodiment of the present application, the battery control circuit is configured as follows: controlling the power button to close so that the device is in the power-on state, the battery-end power supply has power so that the third transistor and the first transistor are turned on; the second resistor makes the voltage difference Vgs of the second transistor less than 0V so that the second transistor is turned on; the input and output pins are pulled to a high level so that the fourth transistor is turned on and the second transistor is kept turned on; after the power button is restored to the floating state, the battery-end power supply and the system-end power supply are continuously turned on.
[0013] In one embodiment of the present application, the battery control circuit is configured to: control the battery-end power supply to be reversely connected so that the ground end is the battery voltage, the drain of the fourth transistor and the gate of the second transistor are pulled up so that the voltage difference Vgs of the second transistor is greater than 0V, thereby turning off the second transistor; there is no conduction between the battery-end power supply and the system-end power supply.
[0014] In one embodiment of the present application, the battery control circuit is configured as follows: the power supply at the system end is reversely controlled so that the ground end is the power supply voltage, the drain of the third transistor and the gate of the first transistor are pulled up so that the voltage difference Vgs of the first transistor is greater than 0V, thereby turning off the first transistor; there is no conduction between the battery end power supply and the system end power supply.
[0015] In one embodiment of the present application, the battery control circuit is configured as follows: controlling the battery-end power supply to be reversely connected and forwardly connected to the system-end power supply for charging, the ground terminal is the battery voltage, the drain of the fourth transistor and the gate of the second transistor are pulled up so that the voltage difference Vgs of the second transistor is greater than 0V, thereby turning off the second transistor; the voltage difference Vgs of the third transistor is less than 0V, thereby turning off the third transistor; the system-end power supply is the power supply voltage so that the voltage difference Vgs of the first transistor is equal to 0V, thereby turning off the first transistor; there is no conduction between the battery-end power supply and the system-end power supply.
[0016] In order to solve the above-mentioned technical problems, the present application also proposes a battery control method for a device, using the above battery control circuit, including: if it is necessary to detect the shutdown leakage current, control the power button not to be closed so that the device is in the shutdown state; if it is necessary to detect the power-on conduction condition, control the power button to be closed so that the device is in the power-on state; if it is necessary to detect the damage to the system when the battery-end power supply is reversed, control the battery-end power supply to be reversed so that the ground end is the battery voltage; if it is necessary to detect the damage to the battery when the system-end power supply is reversed, control the system-end power supply to be reversed so that the ground end is the power supply voltage; if it is necessary to detect the damage to the battery when the battery-end power supply is reversed and the system-end power supply is connected for charging, control the battery-end power supply to be reversed and the system-end power supply is connected for charging, so that the ground end is the battery voltage and the system-end power supply is the power supply voltage.
[0017] In order to solve the above technical problems, the present application also proposes a battery control system for a device, comprising: a memory for storing instructions executable by a processor; and a processor for executing the instructions to implement the above battery control method.
[0018] The technical solution of the present application can control the conduction or closing of the power path by setting the first transistor and the second transistor; the conduction or closing of the first transistor and the second transistor can be controlled by setting the third transistor and the fourth transistor; by setting the first resistor and the second resistor, the first transistor and the second transistor can be turned off when the circuit is not turned on; by setting the third resistor, the gate of the fourth transistor can be kept in a steady state and at a low level when the input and output pins are not powered. The present application will not damage the system circuit after the power supply is reversed or the battery is reversed; when charging with a reverse power supply, the battery can be isolated so that there will be no reverse current, and then there will be no large current and damage to the battery; the present application will disconnect the power supply of the chip when the device is turned off, and there will be no current leakage of the chip, so as to reduce the battery power consumption and extend the battery storage time. The present application is equivalent to a control circuit to prevent power reverse connection and shutdown leakage current, which can realize a hardware protection circuit, and will not damage the device and battery when the power supply is reversed or the battery is reversed, and there will be no shutdown leakage current, which improves the safety of the device and the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are described in detail below with reference to the accompanying drawings, wherein:
[0020] Figure 1 is a schematic diagram of a battery control circuit of a device according to an embodiment of the present application;
[0021] Figure 2 is an exemplary flow chart of detecting the shutdown leakage current and the startup conduction condition of a device in one embodiment of the present application;
[0022] Figure 3 is an exemplary flow chart for detecting damage to the system when the battery terminal power is reversely connected in one embodiment of the present application;
[0023] Figure 4 is an exemplary flow chart for detecting damage to a battery when a system-side power supply is reversely connected in one embodiment of the present application;
[0024] Figure 5 is an exemplary flow chart of detecting damage to a battery when the battery-side power supply is reversely connected and the system-side power supply is connected for charging in one embodiment of the present application;
[0025] Figure 6 It is a system block diagram of a battery control system of a device according to an embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are described in detail below with reference to the accompanying drawings.
[0027] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein, and therefore the present application is not limited to the specific embodiments disclosed below.
[0028] As shown in this application and claims, unless the context clearly indicates an exception, the words "a", "an", "an" and / or "the" do not refer to the singular and may also include the plural. Generally speaking, the terms "include" and "comprise" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements.
[0029] Flowcharts are used in the present application to illustrate the operations performed by the system according to the embodiments of the present application. It should be understood that the preceding or following operations are not necessarily performed accurately in order. On the contrary, various steps may be processed in reverse order or simultaneously. At the same time, other operations may be added to these processes, or one or more operations may be removed from these processes.
[0030] The present application proposes a battery control circuit for a device, which can be applied to devices with batteries such as printers. The present application can prevent the battery and system power from being reversely connected, and avoid shutdown leakage current.
[0031] Figure 1 is a schematic diagram of a battery control circuit of a device according to an embodiment of the present application, with reference to Figure 1 As shown, the battery control circuit of the device of this embodiment includes: a first transistor Q1, a source S of the first transistor Q1 is respectively connected to the system-end power supply VCC_SYS and the first end of the first resistor R1; a second transistor Q2, a source S of the second transistor Q2 is respectively connected to the battery-end power supply VBAT+ and the first end of the second resistor R2, and a drain D of the second transistor Q2 is connected to the drain D of the first transistor Q1; a third transistor Q3, a drain D of the third transistor Q3 is respectively connected to the gate G of the first transistor Q1 and the second end of the first resistor R1, a gate G of the third transistor Q3 is connected to the battery-end power supply VBAT+, and a source S of the third transistor Q3 is connected to the ground terminal GND; a fourth transistor Q4, a drain D of the fourth transistor Q4 is respectively connected to the gate G of the second transistor Q2 and the second end of the second resistor R2, a gate G of the fourth transistor Q4 is respectively connected to the first end of the third resistor R3 and the input / output pin GPIO, and a source S of the fourth transistor Q4 is respectively connected to the ground terminal GND and the second end of the third resistor R3.
[0032] Exemplarily, the input and output pins GPIO (General-Purpose Input / Output) of the present application can be general digital signal pins, which can be configured by the user as input (Input) or output (Output) mode, for example, set as the control pin of the main control CPU (Central Processing Unit), which can be pulled high or low to control the external circuit after power-on. The first transistor Q1 and the second transistor Q2 of the present application are used to turn on or off the power path. For example, when the first transistor Q1 or the second transistor Q2 is turned off, there is no conduction between the battery-side power supply VBAT+ and the system-side power supply VCC_SYS. The third transistor Q3 is used to control the conduction or shutdown of the first transistor Q1; the fourth transistor Q4 is used to control the conduction or shutdown of the second transistor Q2.
[0033] Exemplarily, the first resistor R1 and the second resistor R2 are used to make the voltage difference Vgs of the transistor = 0V when the circuit is not turned on, so that the transistor is in a closed state. Vgs represents the potential of the gate G of the transistor minus the potential of the source S, that is, Vgs = VG-VS, that is, the voltage difference between the source S and the gate G of the transistor. The third resistor R3 is used to make the gate G of the fourth transistor Q4 stable and at a low level when the input and output pin GPIO is not powered.
[0034] The technical solution of the present application can control the on or off of the power path by setting the first transistor Q1 and the second transistor Q2; by setting the third transistor Q3 and the fourth transistor Q4, the on or off of the first transistor Q1 and the second transistor Q2 can be controlled; by setting the first resistor R1 and the second resistor R2, the first transistor Q1 and the second transistor Q2 can be turned off when the circuit is not turned on; by setting the third resistor R3, the gate G of the fourth transistor Q4 can be maintained in a steady state and at a low level when the input and output pin GPIO is not powered on.
[0035] This application will not damage the system circuit after the power supply is reversed or the battery is reversed; when charging with a reverse power supply, the battery can be isolated so that there will be no reverse current, and thus no large current or damage to the battery; this application will disconnect the power supply of the chip when the device is turned off, and there will be no current leakage of the chip, which can reduce battery power consumption, and can prolong the time the battery enters the over-discharge state, extending the battery storage time. This application is equivalent to a control circuit to prevent power reverse connection and shutdown leakage current, and can implement a hardware protection circuit. It will not damage the device and battery when the power supply is reversed or the battery is reversed, and there will be no shutdown leakage current, which improves the safety of the device and user experience.
[0036] In some embodiments, the first transistor Q1 and the second transistor Q2 are PMOS tubes, and the third transistor Q3 and the fourth transistor Q4 are NMOS tubes. Exemplarily, the PMOS tube is a P-channel Metal-Oxide-Semiconductor Field-Effect Transistor; the NMOS tube is an N-channel Metal-Oxide-Semiconductor Field-Effect Transistor. The present application sets the first transistor Q1 and the second transistor Q2 as PMOS tubes, which can be used for the battery power supply path and the battery charging path; by setting the third transistor Q3 and the fourth transistor Q4 as NMOS tubes, the voltage difference between the source S and the gate G of the PMOS tube can be controlled to control the conduction or closing of the PMOS tube.
[0037] Continue to refer Figure 1 As shown, in some embodiments, the battery control circuit further includes a power button POWER_KEY of the device and a diode D1. The power button POWER_KEY is used to control the device to turn on or off. The first end 1 of the diode D1 is connected to the power button POWER_KEY, and the second end 2 of the diode D1 is connected to the gate G of the second transistor Q2. Exemplarily, the present application sets the diode D1 to prevent the power button POWER_KEY signal from leaking. For example, if the current flows into the key circuit from an unexpected direction, due to the unidirectional conductivity of the diode D1, this part of the current will be blocked, thereby preventing leakage from interfering with and damaging the device. The diode D1 enables the power button POWER_KEY to pull down the path of the control circuit, but this circuit will not be affected when the power button POWER_KEY is at a high level.
[0038] The following describes the process of using the battery control circuit of the present application to detect shutdown leakage current, thereby verifying that the present application can avoid shutdown leakage current.
[0039] Figure 2 is an exemplary flow chart of detecting the shutdown leakage current and startup conduction status of a device in an embodiment of the present application. Figure 1 and Figure 2 As shown, in some embodiments, the battery control circuit is configured to: control the power button POWER_KEY not to be closed (for example, the button is not pressed) so that the device is in a shutdown state; the battery terminal power supply VBAT+ is powered so that the third transistor Q3 is turned on and the first transistor Q1 is turned on (corresponding to Figure 2 Step S210); the input / output pin GPIO is at a low level so that the fourth transistor Q4 is turned off (corresponding to Figure 2Steps S231, S232); the second resistor R2 makes the voltage difference Vgs of the second transistor Q2 = 0V so that the second transistor Q2 is turned off (corresponding to Figure 2 Step S233); so that there is no leakage current between the battery-side power supply VBAT+ and the system-side power supply VCC_SYS (corresponding to Figure 2 Step S234). Figure 1 As shown, the power from the battery cannot reach the system, so there is no shutdown leakage current.
[0040] The following describes the process of using the battery control circuit of the present application to detect power-on conduction, thereby verifying that the present application can enable the device to start up and work normally.
[0041] refer to Figure 1 and Figure 2 As shown, in some embodiments, the battery control circuit is configured to: control the power button POWER_KEY to be closed (for example, using a robot to automatically press the button) so that the device is in a power-on state, and the battery terminal power supply VBAT+ is energized so that the third transistor Q3 is turned on and the first transistor Q1 is turned on (corresponding to Figure 2 Step S210); the second resistor R2 makes the voltage difference Vgs of the second transistor Q2 less than 0V so that the second transistor Q2 is turned on (corresponding to Figure 2 Step S241); the system is turned on, the input and output pin GPIO is pulled to a high level so that the fourth transistor Q4 is turned on and the second transistor Q2 is kept turned on (corresponding to Figure 2 Steps S242 and S243); after the power button POWER_KEY is suspended again, the battery power VBAT+ and the system power VCC_SYS are continuously connected, and the device can be powered on normally (corresponding to Figure 2 In step S244), the electricity at the battery end can reach the system end through the second transistor Q2 and the first transistor Q1.
[0042] The following describes a process for using the battery control circuit of the present application to detect damage to the system when the battery-end power supply is reversely connected, thereby verifying that the present application will not damage the system.
[0043] Figure 3 This is an exemplary flow chart for detecting damage to the system when the battery power supply is reversely connected in one embodiment of the present application. Figure 1 and Figure 3 As shown, in some embodiments, the battery control circuit is configured to: control the battery terminal power supply VBAT+ to be reversely connected, the battery terminal power supply VBAT+ is 0V, so that the ground terminal GND is the battery voltage (corresponding to Figure 3Step S310); the drain electrode D of the fourth transistor Q4 and the gate electrode G of the second transistor Q2 are pulled high so that the voltage difference Vgs of the second transistor Q2 is greater than 0V, thereby turning off the second transistor Q2 (corresponding to Figure 3 Steps S320 and S330); no loop can be generated between the battery power supply VBAT+ and the system power supply VCC_SYS, and no conduction occurs. Even if the ground terminal GND is at the battery voltage, the system will not be damaged (corresponding to Figure 3 Step S340). For example, a robot can be used to automatically reverse the battery. In steps S320 and S330, the parasitic diode of the fourth transistor Q4 can pull up the drain D of the fourth transistor Q4 and the gate G of the second transistor Q2, so that the voltage difference Vgs of the second transistor Q2 is greater than 0V.
[0044] The following describes a process for using the battery control circuit of the present application to detect damage to the battery when the system-side power supply is reversely connected, thereby verifying that the present application will not damage the battery.
[0045] Figure 4 is an exemplary flow chart for detecting damage to the battery when the system-side power supply is reversely connected in an embodiment of the present application. Figure 1 and Figure 4 As shown, in some embodiments, the battery control circuit is configured to: control the system end power supply VCC_SYS to be reversely connected, the system end power supply VCC_SYS is 0V, so that the ground terminal GND is the power supply voltage (corresponding to Figure 4 Step S410); the drain electrode D of the third transistor Q3 and the gate electrode G of the first transistor Q1 are pulled high so that the voltage difference Vgs of the first transistor Q1 is greater than 0V, thereby turning off the first transistor Q1 (corresponding to Figure 3 Steps S420 and S430); no loop can be generated between the battery-side power supply VBAT+ and the system-side power supply VCC_SYS, and no conduction occurs, so that the battery will not be damaged even if the ground terminal GND is the power supply voltage. Exemplarily, in steps S420 and S430, the parasitic diode of the third transistor Q3 can pull up the drain D of the third transistor Q3 and the gate G of the first transistor Q1, so that the voltage difference Vgs of the first transistor Q1 is greater than 0V.
[0046] The following describes a process for using the battery control circuit of the present application to detect damage to the battery when the battery-end power supply is reversely connected and the system-end power supply is connected for charging, thereby verifying that the present application will not damage the battery.
[0047] Figure 5 This is an exemplary flow chart of detecting damage to the battery when the battery-side power supply is reversely connected and the system-side power supply is connected for charging in an embodiment of the present application. Figure 1 and Figure 5As shown, in some embodiments, the battery control circuit is configured to: control the battery terminal power VBAT+ reverse connection (corresponding to Figure 5 Step S510) and positively connected to the system power supply VCC_SYS for charging (corresponding to Figure 5 In step S530), the battery terminal power supply VBAT+ is 0V, the ground terminal GND is the battery voltage, the drain D of the fourth transistor Q4 and the gate G of the second transistor Q2 are pulled high so that the voltage difference Vgs of the second transistor Q2 is greater than 0V, thereby turning off the second transistor Q2 (corresponding to Figure 5 Steps S511 and S512); the voltage difference Vgs of the third transistor Q3 is less than 0V, so that the third transistor Q3 is turned off (corresponding to Figure 5 Step S520); the system power supply VCC_SYS is the power supply voltage so that the voltage difference Vgs of the first transistor Q1 is 0V, thereby turning off the first transistor Q1 (corresponding to Figure 5 The transistor is turned off, the battery power supply VBAT+ and the system power supply VCC_SYS are not connected, and the battery will not be charged (corresponding to Figure 5 Step S540).
[0048] Exemplarily, the closing of the third transistor Q3 will affect the voltage difference Vgs of the first transistor Q1. The present application can isolate the battery when charging with a reverse power source to prevent reverse current, thereby preventing high current and damage to the battery.
[0049] The present application also proposes a battery control method for a device, which can be run in a controller of the device. The battery control method for the device uses the battery control circuit as described above, including:
[0050] If it is necessary to detect the shutdown leakage current, the power button POWER_KEY is controlled not to be closed so that the device is in the shutdown state;
[0051] If it is necessary to detect the power-on status, the power button POWER_KEY is controlled to be closed so that the device is in the power-on state;
[0052] If it is necessary to detect the damage to the system when the battery power supply VBAT+ is reversely connected, the battery power supply VBAT+ is reversely connected so that the ground terminal GND is the battery voltage;
[0053] If it is necessary to detect the damage to the battery when the system power supply VCC_SYS is reversely connected, control the system power supply VCC_SYS to be reversely connected so that the ground terminal GND is the power supply voltage;
[0054] If it is necessary to detect the damage to the battery when the battery-side power supply VBAT+ is reversed and the system-side power supply VCC_SYS is connected for charging, the battery-side power supply VBAT+ is controlled to be reversed and the system-side power supply VCC_SYS is connected to charge, so that the ground terminal GND is the battery voltage and the system-side power supply VCC_SYS is the power supply voltage.
[0055] The present application also includes a battery control system for a device, including a memory and a processor, wherein the memory is used to store instructions executable by the processor; and the processor is used to execute the instructions to implement the battery control method for the device described above.
[0056] Figure 6 is a system block diagram of a battery control system of a device according to an embodiment of the present application. Figure 6 As shown, the battery control system 600 of the device may include an internal communication bus 601, a processor 602, a read-only memory (ROM) 603, a random access memory (RAM) 604, and a communication port 605. The battery control system 600 of the device may also include a hard disk 606. The internal communication bus 601 can realize data communication between the components of the battery control system 600 of the device. The processor 602 can make judgments and issue prompts. In some embodiments, the processor 602 can be composed of one or more processors. The communication port 605 can realize data communication between the battery control system 600 of the device and the outside. In some embodiments, the battery control system 600 of the device can send and receive information and data from the network through the communication port 605. The battery control system 600 of the device may also include different forms of program storage units and data storage units, such as a hard disk 606, a read-only memory (ROM) 603 and a random access memory (RAM) 604, which can store various data files used for computer processing and / or communication, and possible program instructions executed by the processor 602. The processor executes these instructions to implement the main part of the method. The processing result of the processor is transmitted to the user device through the communication port and displayed on the user interface.
[0057] The battery control method of the above-mentioned device can be implemented as a computer program, stored in the hard disk 606, and loaded into the processor 602 for execution to implement the battery control method of the device of the present application.
[0058] The present application also includes a computer-readable medium storing a computer program code, which, when executed by a processor, implements the battery control method of the device described above.
[0059] When the battery control method of the device is implemented as a computer program, it can also be stored in a computer-readable storage medium as a product. For example, a computer-readable storage medium may include, but is not limited to, a magnetic storage device (e.g., a hard disk, a floppy disk, a magnetic strip), an optical disk (e.g., a compact disk (CD), a digital versatile disk (DVD)), a smart card, and a flash memory device (e.g., an electrically erasable programmable read-only memory (EPROM), a card, a stick, a key drive). In addition, the various storage media described herein can represent one or more devices and / or other machine-readable media for storing information. The term "machine-readable medium" may include, but is not limited to, wireless channels and various other media (and / or storage media) that can store, contain and / or carry code and / or instructions and / or data.
[0060] It should be understood that the embodiments described above are only illustrative. The embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For hardware implementation, the processor may be implemented in one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, and / or other electronic units designed to perform the functions described herein, or a combination thereof.
[0061] Some aspects of the present application may be performed entirely by hardware, entirely by software (including firmware, resident software, microcode, etc.), or by a combination of hardware and software. The above hardware or software may be referred to as "data blocks", "modules", "engines", "units", "components" or "systems". The processor may be one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DAPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, or combinations thereof. In addition, various aspects of the present application may be expressed as computer products located in one or more computer-readable media, which include computer-readable program codes. For example, computer-readable media may include, but are not limited to, magnetic storage devices (e.g., hard disks, floppy disks, tapes ...), optical disks (e.g., compact disks CDs, digital versatile disks DVDs ...), smart cards, and flash memory devices (e.g., cards, sticks, key drives ...).
[0062] A computer-readable medium may include a propagated data signal containing computer program code, such as in baseband or as part of a carrier wave. The propagated signal may have a variety of manifestations, including electromagnetic, optical, etc., or a suitable combination. A computer-readable medium may be any computer-readable medium other than a computer-readable storage medium, which may be connected to an instruction execution system, device or apparatus to communicate, propagate or transmit a program for use. The program code on the computer-readable medium may be propagated via any suitable medium, including radio, cable, fiber optic cable, radio frequency signal, or similar medium, or any combination of the above mediums.
[0063] The basic concepts have been described above. Obviously, for those skilled in the art, the above application disclosure is only an example and does not constitute a limitation of the present application. Although not explicitly stated herein, those skilled in the art may make various modifications, improvements and amendments to the present application. Such modifications, improvements and amendments are suggested in the present application, so such modifications, improvements and amendments still belong to the spirit and scope of the exemplary embodiments of the present application.
[0064] At the same time, the present application uses specific words to describe the embodiments of the present application. For example, "one embodiment", "an embodiment", and / or "some embodiments" refer to a certain feature, structure or characteristic related to at least one embodiment of the present application. Therefore, it should be emphasized and noted that "one embodiment" or "an embodiment" or "an alternative embodiment" mentioned twice or more in different positions in this specification does not necessarily refer to the same embodiment. In addition, some features, structures or characteristics in one or more embodiments of the present application can be appropriately combined.
[0065] In some embodiments, numbers describing the number of components and attributes are used. It should be understood that such numbers used in the description of the embodiments are modified by the modifiers "about", "approximately" or "substantially" in some examples. Unless otherwise specified, "about", "approximately" or "substantially" indicate that the numbers are allowed to vary by ±20%. Accordingly, in some embodiments, the numerical parameters used in the specification and claims are approximate values, which may change according to the required features of individual embodiments. In some embodiments, the numerical parameters should take into account the specified significant digits and adopt the general method of retaining digits. Although the numerical domains and parameters used to confirm the breadth of their range in some embodiments of the present application are approximate values, in specific embodiments, the setting of such numerical values is as accurate as possible within the feasible range.
Claims
1. A battery control circuit for a device, characterized in that: include: A first transistor, wherein a source of the first transistor is respectively connected to a system-end power supply and a first end of a first resistor; a second transistor, wherein a source of the second transistor is connected to a battery-end power source and a first end of a second resistor respectively, and a drain of the second transistor is connected to a drain of the first transistor; a third transistor, wherein the drain of the third transistor is respectively connected to the gate of the first transistor and the second end of the first resistor, the gate of the third transistor is connected to the battery-end power supply, and the source of the third transistor is connected to the ground end; A fourth transistor, wherein the drain of the fourth transistor is respectively connected to the gate of the second transistor and the second end of the second resistor, the gate of the fourth transistor is respectively connected to the first end of the third resistor and an input / output pin, and the source of the fourth transistor is respectively connected to the ground terminal and the second end of the third resistor.
2. The battery control circuit of the device according to claim 1, characterized in that It also includes a power button and a diode of the device, wherein the power button is used to control the power on or off of the device, the first end of the diode is connected to the power button, and the second end of the diode is connected to the gate of the second transistor.
3. The battery control circuit of the device according to claim 1, characterized in that The first transistor and the second transistor are PMOS transistors, and the third transistor and the fourth transistor are NMOS transistors.
4. The battery control circuit of the device according to claim 2, characterized in that The battery control circuit is configured as follows: controlling the power button not to be closed so that the device is in a shutdown state; the battery-end power supply has power so that the third transistor is turned on and the first transistor is turned on; the input and output pins are at a low level so that the fourth transistor is turned off; the second resistor makes the voltage difference Vgs of the second transistor = 0V so that the second transistor is turned off; so that there is no leakage current between the battery-end power supply and the system-end power supply.
5. The battery control circuit of the device according to claim 2, characterized in that The battery control circuit is configured to: control the power button to be closed so that the device is in the power-on state, the battery-end power supply has power so that the third transistor is turned on and the first transistor is turned on; the second resistor makes the voltage difference Vgs of the second transistor less than 0V so that the second transistor is turned on; the input and output pins are pulled to a high level so that the fourth transistor is turned on and the second transistor is kept turned on; after the power button is suspended again, the battery-end power supply and the system-end power supply are continuously turned on.
6. The battery control circuit of the device according to claim 1, characterized in that The battery control circuit is configured to: control the battery-end power supply to be reversely connected so that the ground end is the battery voltage, the drain of the fourth transistor and the gate of the second transistor are pulled up so that the voltage difference Vgs of the second transistor is greater than 0V, thereby turning off the second transistor; and there is no conduction between the battery-end power supply and the system-end power supply.
7. The battery control circuit of the device according to claim 1, characterized in that The battery control circuit is configured to: control the system-end power supply to be reversely connected so that the ground end is the power supply voltage, the drain of the third transistor and the gate of the first transistor are pulled up so that the voltage difference Vgs of the first transistor is greater than 0V, thereby turning off the first transistor; and there is no conduction between the battery-end power supply and the system-end power supply.
8. The battery control circuit of the device according to claim 1, characterized in that The battery control circuit is configured to: control the battery-end power supply to be reversely connected and forwardly connected to the system-end power supply for charging, the ground terminal is the battery voltage, the drain of the fourth transistor and the gate of the second transistor are pulled up so that the voltage difference Vgs of the second transistor is greater than 0V, thereby turning off the second transistor; the voltage difference Vgs of the third transistor is less than 0V, thereby turning off the third transistor; the system-end power supply is the power supply voltage so that the voltage difference Vgs of the first transistor is equal to 0V, thereby turning off the first transistor; there is no conduction between the battery-end power supply and the system-end power supply.
9. A battery control method for a device, characterized in that: Using the battery control circuit as described in any one of claims 1 to 8, comprising: If it is necessary to detect the shutdown leakage current, the power button is controlled not to be closed so that the device is in the shutdown state; If it is necessary to detect the power-on status, the power button is controlled to be closed so that the device is in the power-on state; If it is necessary to detect the damage to the system when the battery power is reversely connected, the battery power is reversely connected so that the ground terminal is at the battery voltage; If it is necessary to detect the damage to the battery when the system-side power supply is reversely connected, the system-side power supply is reversely connected so that the ground terminal is the power supply voltage; If it is necessary to detect the damage to the battery when the battery-end power supply is reversed and the system-end power supply is connected for charging, the battery-end power supply is controlled to be reversed and the system-end power supply is connected forwardly for charging, so that the ground terminal is the battery voltage and the system-end power supply is the power supply voltage.
10. A battery control system for a device, characterized in that: include: a memory for storing instructions executable by a processor; A processor is used to execute the instructions to implement the battery control method as claimed in claim 9.
