Summary of the invention
Technical problem to be solved by this invention is to provide a kind of power supply to switch and the method and the device of battery protection; be used to solve the protection battery electric quantity being arranged under the situation of external power supply and preventing to overcharge, can uninterruptedly switch to battery powered problem when losing external power supply.
To achieve these goals; the invention provides the method for a kind of power supply switching and battery protection; be applicable to and move or handhold device system; wherein; increase by a cell switch on the battery power branch road, the on/off by the control cell switch is implemented in the switching between external power supply and the battery supply and controls the charging and discharging state of described battery supply.
The method of described power supply switching and battery protection wherein, when adopting field effect transistor as cell switch, specifically comprises:
Step 21, the grid of described field effect transistor is connected with described external power supply or its control signal by a resistance that is used to detect described external power supply property working properly, and by switch triode control, this switch triode is again by the microprocessor control of being in charge of power supply;
Step 22 when no external power supply inserts, is opened described field effect transistor, by described battery supply supply system work; When having external power supply to insert, by described external power supply supply system work, and whether described battery supply is charged by the voltage decision that detects described battery supply, if described battery supply electric weight deficiency, then opening described field effect transistor charges to described battery supply, and after described battery supply charging finishes, close described field effect transistor.
The method of described power supply switching and battery protection wherein, detects the voltage of described battery supply by comparator or analog/digital converter.
The method of described power supply switching and battery protection, wherein, when described external power supply was working properly, described resistance was pulled to high level with the grid of described field effect transistor, and described field effect transistor is closed; When described external power supply disconnected, described resistance was pulled down to low level with the grid of described field effect transistor, and described field effect transistor is opened.
The method of described power supply switching and battery protection, wherein, described field effect transistor is the P-channel metal-oxide-semiconductor field effect transistor.
To achieve these goals; the present invention also provides the device of a kind of power supply switching and battery protection; be applicable to and move or handhold device system; comprise external power supply, battery supply, power management chip and connected voltage stabilization and current stabilization circuit; described power management chip is used for providing power supply and supervisory control system operating state to system; described voltage stabilization and current stabilization circuit is used for providing normal power to reach to system described battery supply is charged when electric weight is not enough, and wherein, this device also comprises:
One cell switch, it is connected to described external power supply by a resistance that is used to detect described external power supply property working properly, is used for switching between external power supply and battery supply;
One control and treatment circuit connects described power management chip, is used for controlling the unlatching of described cell switch or closing according to working state of system.
The device of described power supply switching and battery protection, wherein, when adopting field effect transistor as cell switch, when no external power supply inserted, described control and treatment circuit was opened described field effect transistor, by described battery supply supply system work; When having external power supply to insert, by described external power supply supply system work, and whether described battery supply is charged by the voltage decision that detects described battery supply, if described battery supply electric weight deficiency, then described control and treatment circuit is opened described field effect transistor, described voltage stabilization and current stabilization circuit charges to described battery supply, and after described battery supply charging finished, described control and treatment circuit was closed described field effect transistor.
The device of described power supply switching and battery protection wherein, detects the voltage of described battery supply by comparator or analog/digital converter.
The device of described power supply switching and battery protection, wherein, when described external power supply was working properly, described resistance was pulled to high level with the grid of described field effect transistor, and described control and treatment circuit is closed described field effect transistor; When described external power supply disconnected, described resistance was pulled down to low level with the grid of described field effect transistor, and described control and treatment circuit is opened described field effect transistor.
The device of described power supply switching and battery protection, wherein, described field effect transistor is the P-channel metal-oxide-semiconductor field effect transistor.
Technique effect of the present invention is:
Method and device that battery protection that the present invention proposes and external power supply and powered battery are switched are implemented between external power supply and the battery by the control cell switch and switch, with the different operating state of adaptive system.Simultaneously discharging and recharging of battery protected, prevented that on the one hand being full of the back at battery continues charging to damage battery, has prevented that on the other hand battery influences the time that battery works alone also to system's power supply during the external power supply power supply.In addition, battery useful life and battery-powered operation time have been prolonged.
Describe the present invention below in conjunction with the drawings and specific embodiments, but not as a limitation of the invention.
Embodiment
Technical problem to be solved by this invention provides a kind ofly to be switched between external power supply power supply and powered battery; and battery prevented method and the device putting and overcharge; solution can uninterruptedly switch to battery powered problem the protection battery electric quantity being arranged under the situation of external power supply and preventing to overcharge when losing external power supply.
For achieving the above object, the invention provides a kind of method of cell switch, comprise the steps:
Step 1 increases a FET (Field Effect Transistor, field effect transistor) pipe on the powered battery branch road.The grid of FET pipe is connected with external power supply (or signal of this power supply control) by resistance and controls by switch triode, the switch triode base stage is responsible for MCU (the Microcontroller Uint of power management by system, microprocessor) control (if power supply managing then can produce this control signal by hardware logic fully by the hardware realization).
Step 2, when no external power supply was powered, the grid control FET pipe of FET pipe was opened, by the battery supplied system works;
Step 3, when external power supply inserted, system detected cell voltage, if the electric weight deficiency is opened the FET pipe, charged to battery by Charge Management this moment.After battery is full of, close the FET pipe, to prevent over-charging of battery.Another effect of closing the FET pipe is in order to prevent that battery guarantees that also to system discharge battery always is in full state during external power work.
Further describe specific embodiments of the invention below in conjunction with accompanying drawing.
In the present invention, the concrete operation principle of power management chip is not discussed, even can not need power management chip, build the function that circuit is realized power management by discrete component fully, suppose that just power management partly finished the voltage stabilization and current stabilization function to external power supply, each road power supply of using in the output system is also not necessarily finished by processor for the control of cell switch, circuit can produce a signal as long as battery is full of the back, promptly can be used to control cell switch.
Be the installation drawing of power supply switching of the present invention and battery protection as shown in Figure 1, power management chip 101 of the present invention is connected between voltage stabilization and current stabilization circuit 102 and processor or the supervisory circuit 104, and cell switch 103 is serially connected in battery and the charging and discharging circuit.Below will be elaborated to each module.
1, power management chip 101
11), because modern comfort, especially power reguirements such as smart machine, handheld device complexity, processor core voltage, IO voltage, display part power supply have nothing in common with each other.Some design also requires to provide the voltage that still needs working portion after the shutdown, therefore adopts the power management chip 101 can simplified design, to improve reliability.
12), power management chip 101 is responsible for providing power supply to entire equipment, and each road power supply is monitored, and handles open and close machine flow process and start electric sequence etc. according to designing requirement.
13), for the comparatively perfect power management chip 101 of function, can with 104 processor part communications, 104 processors parts can be known the work at present state, and sends order to power management chip 101.
14), if system's power supply is very simple, also can not use special-purpose power management chip 101, and realize the control logic relation by simple discrete component.
2, the voltage stabilization and current stabilization circuit 102
It provides the normal power of system works, other each road power supplys are normal power acquisition thus all, because this normal power is used for battery charge, simultaneously after external power supply disconnects, powered battery also enters this road, so general design should be chosen the output area close with cell voltage.
3, cell switch 103
31), use P channel mosfet (Fetal-oxide semiconductor Field EffectTransistor among Fig. 1, metal oxide semiconductor field effect tube) pipe is as cell switch 103, and the polarity of control signal is identical with device property like this, can simplify circuit; Because MOSFET manages the effect of the parasitic diode in 103, the speed of battery incision power supply when external power supply disconnects be can accelerate simultaneously, system reliability and availability improved.
The grid of MOSFET pipe 103 is connected by resistance 105 and external power supply (or external power supply control signal), and control by switch triode 106, the base stage of switch triode 106 is responsible for MCU (the Microcontroller Uint of power management by system, microprocessor), be processor or supervisory circuit 104 controls, if power supply managing is realized by hardware fully, then can be produced this control signal by hardware logic.Wherein, the base stage current-limiting resistance when resistance 107 is switch triode 106 operate as normal, when switch triode 106 was field effect transistor, resistance 107 can omit.
32), if special requirement are arranged, also can adopt switching circuits such as other types power tube or relay as cell switch 103, require its switching speed must be enough soon to the selection of cell switch 103, can in time open powered battery can not satisfy the system works condition time to guarantee to drop at external supply voltage.Simultaneously because this cell switch 103 is serially connected in the current supply circuit during powered battery always, conducting resistance is as much as possible little in the time of must noting making cell switch 103 closures, leakage current is few as much as possible during shutoff, for guaranteeing the battery powered operating time, the circuit part that keeps cell switch 103 to open should consume electric current seldom.
Be that power supply of the present invention switches and battery protection control logic figure as shown in Figure 2, and consult Fig. 1:
Step 201, whether the resistance 105 detection external power supplys of receiving on the external power supply by MOSFET pipe 103 are normal, if external power supply just often, resistance 105 is pulled to high level with the grid of MOSFET pipe 103, MOSFET pipe 103 acquiescences are in closed condition, by the external power supply power supply, and execution in step 202; If when external power supply was undesired, then execution in step 205;
Step 202 detects cell voltage by comparator or A/D converter and judges whether battery charge finishes, if battery is in full state, the termination condition that then charges is set up, and battery charge finishes, and then execution in step 203; If battery is in underfill still, the termination condition that then charges is false, and battery charge does not finish, and then execution in step 204;
Step 203 is closed cell switch 103 with the protection battery by processor or supervisory circuit 104;
Step 204 is opened cell switch 103 by processor or supervisory circuit 104, is battery charge by voltage stabilization and current stabilization circuit 102.
After described step 203,204 is finished, change step 201, judge to carry out next round.
Step 205, when external power supply disconnected cisco unity malfunction, the resistance of MOSFET pipe 103 was equivalent to the load ground connection by voltage stabilization and current stabilization circuit 102, and the grid of MOSFET pipe 103 is pulled down to low level, open cell switch 103, finish external power supply to battery powered switching.
After being finished, described step 205 changes step 201, so that just often switch to the external power supply power supply at external power supply.
The inventive method is that a kind of effective solution has the power supply of plural service requirement to switch and to the guard method of battery; this method does not rely on distinctive power management techniques; but in the mode of cell switch; by under different conditions to the control of cell switch, realize the switching and the battery protection of power supply.This method can be in conjunction with the method based on power management chip and microprocessor control, making is not increasing under more cost and the complex circuit design condition, finish and control cell switch quickly and accurately, prolong the battery purpose in useful life to reach, can be widely used in moving and handheld device.
Certainly; the present invention also can have other various embodiments; under the situation that does not deviate from spirit of the present invention and essence thereof; those of ordinary skill in the art work as can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection range of the appended claim of the present invention.