CN106921192A - Terminal and electricity sharing method - Google Patents

Terminal and electricity sharing method Download PDF

Info

Publication number
CN106921192A
CN106921192A CN201710082912.1A CN201710082912A CN106921192A CN 106921192 A CN106921192 A CN 106921192A CN 201710082912 A CN201710082912 A CN 201710082912A CN 106921192 A CN106921192 A CN 106921192A
Authority
CN
China
Prior art keywords
electricity
voltage
circuit
terminal
pin
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201710082912.1A
Other languages
Chinese (zh)
Inventor
王双军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Wind Communication Technologies Co Ltd
Original Assignee
Shanghai Wind Communication Technologies Co Ltd
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 Shanghai Wind Communication Technologies Co Ltd filed Critical Shanghai Wind Communication Technologies Co Ltd
Priority to CN201710082912.1A priority Critical patent/CN106921192A/en
Publication of CN106921192A publication Critical patent/CN106921192A/en
Pending legal-status Critical Current

Links

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/34Parallel operation in networks using both storage and other dc sources, e.g. providing buffering
    • H02J7/342The other DC source being a battery actively interacting with the first one, i.e. battery to battery charging
    • 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/0029Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with safety or protection devices or circuits
    • H02J7/0031Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with safety or protection devices or circuits using battery or load disconnect circuits

Abstract

The present embodiments relate to electronic technology field, a kind of terminal and electricity sharing method are disclosed.The terminal includes switching chip, electric power management circuit, charging circuit, USB interface, control circuit and battery;Electric power management circuit, charging circuit are connected with control circuit respectively;The identification pin and temperature pin of battery are electrically connected with the test side of electric power management circuit, and the positive pole pin and grounding pin of battery are connected with the first feeder ear of charging circuit;Switching chip has control end, common port, the first connection end and the second connection end, is connected with USB interface, charging circuit, control circuit, electric power management circuit according to corresponding annexation;Control circuit is used to detect the voltage on the power supply VBUS pins of USB interface, and according to the different voltages for detecting, corresponding voltage is applied to control end.Terminal provided in an embodiment of the present invention and electricity sharing method, realize the shared of electricity between different terminals.

Description

Terminal and electricity sharing method
Technical field
The present invention relates to electronic technology field, more particularly to a kind of terminal and electricity sharing method.
Background technology
With the intellectuality and the fast development of Mobile solution business of mobile terminal, the portable terminal such as mobile phone has turned into An essential part in people's life.But mobile terminal often has that power consumption is fast, battery storage amount, with Family carries out important call or when waiting important incoming call, mobile phone probably due to not enough power supply and cannot use.For emergent, Yong Huyi As can the use of charger or portable power source be that the mobile terminals such as mobile phone are charged.
But realize it is of the invention during, inventor find there are problems that in the prior art:Using charger For mobile terminal charges, due to being limited by charging socket so that mobile terminal or battery must stay in fixed place, use Family cannot carry with, if user does not provide the place of power supply in bus, train etc., mobile terminal cannot be carried out at once Charge;Portable power source is used to be charged for mobile terminal, although can be whenever and wherever possible each mobile terminal charging of user, but Be provided with high capacity cell because portable power source is interior in itself, volume is larger and heavier-weight, carry with exist certain security and Convenience issue.
In addition, with the popularization of mobile terminal, the situation that user possesses multiple mobile terminals is commonplace.But It is, due to existing terminal inner circuit structure as shown in figure 1, terminal inner only has a kind of circuit being connected with charging circuit, And the voltage only on the VBUS pins of USB interface is more than 5V, i.e., when additional charger or portable power source, foreign current Terminal can just be entered, terminal is embodied as and is powered and for battery charges, therefore user cannot be by the sufficient terminal device of electricity Electricity supply used currently without the terminal of electricity.If user is by SIM (the Subscriber Identity in mobile phone Module, user identification module) card insertion other have the mobile phone of electricity in keep communication unimpeded, in causing other mobile phones again SIM cannot use, therefore also not enough facilitate.
The content of the invention
The purpose of embodiment of the present invention is to provide a kind of terminal and electricity sharing method, such that it is able to realize different shiftings Electricity is shared between dynamic terminal so that user is nearby without charging socket or without carrying portable power source or mobile Can be that the current terminal for there be not electricity is powered by other mobile terminals, such that it is able to multiple is mobile in the case that power supply does not have electricity The battery power resources of terminal carry out reasonable employment.
In order to solve the above technical problems, embodiments of the present invention include there is provided a kind of terminal:Switching chip, power supply pipe Reason circuit, charging circuit, USB interface, control circuit and battery;Electric power management circuit, charging circuit respectively with control circuit phase Even;The identification pin and temperature pin of battery are electrically connected with the test side of electric power management circuit, the positive pole pin of battery and ground connection Pin is connected with the first feeder ear of charging circuit;Switching chip has control end, common port, the first connection end and the second connection End, wherein, common port is connected with USB interface;First connection end middle part separates pin and is connected with the charging end of charging circuit, and other draw Pin is connected with control circuit;The part pin of the second connection end is electrically connected with the first feeder ear of charging circuit, other pins with The test side electrical connection of electric power management circuit;Wherein, when being applied in first voltage in control end, common port is connected to the second company Connect end;Controlling circuit is used to detect the voltage on the power supply VBUS pins of USB interface, and in the voltage for detecting in preset range When interior, first voltage is applied to control end;Or, control circuit is used to detect electricity shared instruction, and is total to electricity is received When enjoying instruction, first voltage is applied to control end.
Embodiments of the present invention additionally provide a kind of electricity sharing method, based in any terminal embodiment of the invention Terminal, and the supplier of electricity that terminal is shared as electricity, the electricity sharing method include:There is USB to connect in USB interface is detected Wiring is inserted, and when detecting electricity shared instruction, control circuit applies first voltage to the control end of switching chip;Switching The common port of chip is connected to the second connection end, the electrical connection between turn-on battery and USB interface.
Embodiments of the present invention additionally provide a kind of electricity sharing method, based in any terminal embodiment of the invention Terminal, and terminal as electricity share by electricity side, the electricity sharing method includes:Detect that the power supply VBUS of USB interface draws Voltage on pin;The voltage for detecting within a preset range when, to switching chip control end apply first voltage;Switching core The common port of piece is connected to first feeder ear and electric power management circuit of the second connection end, conducting USB interface and charging circuit Test side between electrical connection.
Embodiment of the present invention in terms of existing technologies, a switching chip is set by terminal inner, and will Each pin of USB interface is connected with the common port of switching chip, will be used to realize that the D+ and D- of data interaction draw in USB interface Pin is connected on control circuit by switching the first connection end of chip, and the VBUS pins and GND pin in USB interface are passed through The first connection end for switching chip is connected to the charging end of charging circuit, and the first of charging circuit is connected to by the second connection end Feeder ear, other pins are then electrically connected with the test side of electric power management circuit.By the improvement of the annexation to internal wiring, Circuit is controlled by detecting the electricity shared instruction that the voltage on VBUS pins or user operate, according to testing result to switching The control end of chip applies corresponding voltage, and the common port of control switching chip is connected to the second connection end, it is achieved thereby that eventually End can switch different circuits according to device type external in USB interface, and the electricity for reaching battery between different terminals can With the purpose shared.
In addition, control circuit includes processor and voltage checking chip;Processor have a GPIO pin, GPIO pin with Switch the control end connection of chip;Voltage checking chip is used to detect the voltage on VBUS pins, and exists in the voltage for detecting When in preset range, interrupt signal is sent to processor;Processor applies the first electricity when interrupt signal is received to control end Pressure.A kind of detection circuit of voltage on VBUS pins to USB interface is the embodiment of the invention provides, specifically using voltage detecting Chip realizes the detection to voltage, and when voltage is detected in preset range, interrupt signal is sent to processor so that Processor can apply first voltage by the control end to switching chip, be connected to the common port for switching chip so as to reach The purpose of the second connection end.
In addition, control circuit includes processor;Processor has a GPIO pin, GPIO pin and the control for switching chip End connection;Processor also has an ADC pins, and ADC pins are connected with VBUS pins;Processor detects VBUS by ADC pins Voltage on pin, and the voltage for detecting within a preset range when, to control end apply first voltage.By using existing The ADC pins of processor, in the case where hardware is not increased, realize the detection to VBUS pin voltages, and to switching chip Control, and simplify terminating circuit.
In addition, terminal also includes electronic switch array;Wherein, the control end of electronic switch array and control circuit electricity phase Even, under the control of control circuit, electronic switch array is switched on or off each pin and charging circuit or power supply of battery Connection between management circuit.By setting electronic switch array between battery and charging circuit, obtained from external terminal During electric current, the connection between the battery of this terminal and charging circuit is disconnected, make foreign current by switching the second connection of chip After end enters charging circuit, directly for terminal to be charged is powered, prevent electric current from flowing into battery so that the battery of power supply terminal can be with Support two loads of terminal.
In addition, when there is USB connecting lines to insert in detecting USB interface, providing electricity in the display interface of terminal and sharing Selection entrance;When choosing operation of entrance of selection is shared to electricity user is detected, judgement detects electricity shared instruction.It is logical Cross and provide the manipulable electricity of user shared selection entrance in display interface, such that it is able to reach between different terminals are needed When electricity is shared, user can conveniently open, and meet actual demand.
In addition, after electrical connection between turn-on battery and USB interface, closing display screen.Connect with USB in turn-on battery After electrical connection between mouthful, the display screen of supplier of electricity is automatically switched off so that supplier of electricity enters death of monks or nuns screen battery saving mode, such that it is able to Ensure that the battery of supplier of electricity is supported itself and loaded by electricity side enough.
In addition, between first feeder ear and the test side of electric power management circuit of conducting USB interface and charging circuit Electrical connection after, control circuit controling electronic switch arrays disconnect each pin and charging circuit or power management of battery Connection between circuit.Conducting USB interface and charging circuit the first feeder ear and electric power management circuit test side it Between electrical connection after, controlled circuit to pass through control by electricity side and be arranged at electronic switch array between battery and charging circuit Each pin of battery and the connection between charging circuit or electric power management circuit are disconnected, such that it is able to prevent supplier of electricity battery Discharge and flow through the USB connecting lines battery of inflow by electricity side after USB interface enters by electricity side so that the battery institute of supplier of electricity Discharge stream is directly entered charging circuit, is, by the power supply of electricity side, further to reduce the power supply pressure of supplier of electricity battery so that supplier of electricity Battery can support two loads of terminal.
In addition, between first feeder ear and the test side of electric power management circuit of conducting USB interface and charging circuit Electrical connection after, electricity sharing method also includes:There is provided in the display interface of terminal and stop the shared selection entrance of electricity;In inspection Measure user and share when choosing operation of entrance of selection to stopping electricity, processor applies the second electricity to the control end of switching chip Flat, the common port for switching chip is connected to the first connection end.Realizing that the battery of supplier of electricity is after being powered by electricity side, to pass through Stop the shared selection entrance of electricity being provided by the display interface of electricity side, and according to the testing result to the entrance, by processor Control end to switching chip applies second electrical level, and common port is connected into the first connection end, recovers existing power supply circuit, from And the side's of stopping power supply battery institute discharge stream enters interior by electricity side, facilitate user to stop the electricity between terminal at any time and share, meet Actual demand.
Brief description of the drawings
One or more embodiments are illustrative by the picture in corresponding accompanying drawing, these exemplary theorys The bright restriction not constituted to embodiment, the element with same reference numbers label is expressed as similar element in accompanying drawing, removes It is non-to have especially statement, the figure not composition limitation in accompanying drawing.
Fig. 1 is USB interface and processor, battery, the connection diagram of charging IC and PMIC in the prior art;
Fig. 2 is the structural representation of the terminal of first embodiment of the invention;
Fig. 3 be first embodiment of the invention terminal in increase electronic switch array structural representation;
Fig. 4 is the structural representation of the terminal of second embodiment of the invention;
Fig. 5 is the flow chart of the electricity sharing method of third embodiment of the invention;
Fig. 6 is the flow chart of the electricity sharing method of four embodiment of the invention
Fig. 7 is the flow chart of the electricity sharing method of fifth embodiment of the invention
Fig. 8 is the flow chart of the electricity sharing method of sixth embodiment of the invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to each reality of the invention The mode of applying is explained in detail.However, it will be understood by those skilled in the art that in each implementation method of the invention, In order that reader more fully understands the application and proposes many ins and outs.But, even if without these ins and outs and base Many variations and modification in following implementation method, it is also possible to realize the application technical scheme required for protection.
First embodiment of the invention is related to a kind of terminal, as shown in Figure 1.The terminal includes:Switching chip 101, electricity Power management circuits 102, charging circuit 103, usb 1 04, control circuit 105 and battery 106.Electric power management circuit 102, fill Circuit 103 is connected with control circuit 105 respectively;The identification pin (the ID pins in Fig. 1) and temperature pin of battery 106 and electricity The test side of power management circuits 102 is electrically connected, positive pole pin and grounding pin (GND pin in Fig. 1) and the charging of battery 106 The first feeder ear connection of circuit 103.
Wherein, switching chip 101 has control end, common port, the first connection end and the second connection end, is connect with USB respectively Mouth 104, charging circuit 103, control circuit 105 and electric power management circuit 102 are connected.Specifically, common port connects with USB respectively Each pin connection of mouth 104;First connection end middle part separates pin and be connected with the charging end of charging circuit 103, other pins and controls Circuit processed 105 is connected;The part pin of the second connection end is electrically connected with the first feeder ear of charging circuit 103, other pins with The test side electrical connection of electric power management circuit 102.
Control circuit 105 includes processor 105-1 and voltage detecting circuit 105-2, mainly for detection of the electricity of USB interface Voltage on the VBUS pins of source, and the voltage for detecting within a preset range when, to control end apply first voltage.
In addition, control circuit 105 is additionally operable to detect electricity shared instruction, and when electricity shared instruction is received, to control End processed applies first voltage.
Specifically, voltage checking chip 105-2 is used to detect the voltage on the VBUS pins of usb 1 04, and is examining The voltage for measuring within a preset range when, send interrupt signal to processor 105-1.Processor 105-1 is receiving interruption letter Number when, the GPIO pin having by it applies first voltage to the control end of switching chip 101, and switching chip 101 is being received To processor 105-1 apply first voltage when, common port is connected to the second connection end.
It should be noted that in 04 external different types of terminal device of usb 1, the voltage on VBUS pins It is different, therefore the voltage that voltage checking chip 105-2 is detected would also vary from, and report the letter of processor 105-1 Breath would also vary from, therefore, processor 105-1 can apply corresponding first voltage to switching core according to different testing results In the control end of piece 101.When first voltage is applied in the control end for switching chip 101, the common port for switching chip 101 connects It is connected to the second connection end.
Specifically, when usb 1 04 inserts other-end equipment by USB connecting lines, voltage checking chip 105- 2 voltages that can detect on the VBUS pins of now usb 1 04 are how many, detecting voltage for 5V, or more than 5V, such as 9V etc., it is possible to determine that the terminal equipment type that the usb 1 04 of present terminal is external is HOST main equipments, such as computer, mobile electricity Source, or charger etc., the magnitude of voltage 5V or other mark external equipments that now processor 105-1 will can be detected be computer, The magnitude of voltage of portable power source, charger etc. is applied in the control end of switching chip 101, and control switching chip 101 will be by public affairs The VBUS pins of the UBS interfaces 104 for terminating altogether and the connection of GND pin turn on UBS interfaces on the first connection end Connection between 104 and charging circuit 103, makes foreign current enter terminal by UBS interfaces 104, is embodied as the battery of terminal 106 functions of charging and power for terminal.
It is more than 3V, during less than 4.5V voltage is detected, it is possible to determine that the usb 1 04 of present terminal external end End equipment type is similar with present terminal, that is, be mobile terminal device, such as mobile phone, panel computer, now processor 105-1 The magnitude of voltage (being located at the magnitude of voltage between 3V~4.5V) that will can be detected, or mark external equipment is the electricity of mobile terminal device Pressure value is applied in the control end of switching chip 101, the UBS interfaces 104 that control switching chip 101 will be accessed by common port The connection of VBUS pins and GND pin on the second connection end, the company between conducting UBS interfaces 104 and charging circuit 103 Connect, foreign current is entered terminal by UBS interfaces 104, be embodied as the work(that the battery 106 of terminal charges and powers for terminal Energy.
In addition, it is noted that in actual applications, one can also be set between battery 106 and charging circuit 103 Individual electronic switch array 107, each pin and the annexation between electric power management circuit 102 and charging circuit 103 of battery 106 As shown in Figure 2.
Specifically, the control end of electronic switch array 107 is electrically connected with control circuit 105, in the control of control circuit 105 Under system, the connection between each pin of battery 106 and charging circuit 103 or electric power management circuit 102 is switched on or off.
It should be noted that when the electricity of battery 106 of present terminal can not support that this terminal is loaded, and external set During for for mobile terminal, the VBUS pins and GND pin of the UBS interfaces 104 that control switching chip 101 will be accessed by common port Connection on the second connection end, after the connection between conducting UBS interfaces 104 and charging circuit 103, electronic switch array The control command that the 107 control circuits 105 received according to control end send, disconnects each pin and the electricity that charges of battery 106 Connection between road 103 or electric power management circuit 102, so as to reduce the power supply pressure of external mobile end cell so that The electricity of external mobile end cell output can ensure two loads of terminal.
If in addition, it is noted that there is provided electronic switch array 107, this can be supported in battery 106 in terminal When terminal is loaded, or in usb 1 04 without external any equipment, also or usb 1 04 it is external be that HOST master sets During standby or charger, electronic switch array 107 is in the conduction state, i.e. each pin of battery 106 and charging circuit 103 Or the connection between electric power management circuit 102 is conducting.
In addition, the electronic switch array 107 being arranged in present embodiment between battery 106 and charging circuit 103, can be with It is triode switch, or other have each pin and charging circuit 103 or electric power management circuit of control battery 106 The device that connection between 102 is switched on or off, is not limited here.
Compared with prior art, the terminal in present embodiment, a switching chip is set by terminal inner, and will Each pin of USB interface is connected with the common port of switching chip, will be used to realize that the D+ and D- of data exchange draw in USB interface Pin is connected on control circuit by switching the first connection end of chip, and the VBUS pins and GND pin in USB interface are passed through The first connection end for switching chip is connected to the charging end of charging circuit, and the first of charging circuit is connected to by the second connection end Feeder ear, other pins are then electrically connected with the test side of electric power management circuit.By the improvement of the annexation to internal wiring, Circuit is controlled by detecting the electricity shared instruction that the voltage on VBUS pins or user operate, according to testing result to switching The control end of chip applies corresponding voltage, and the common port of control switching chip is connected to the second connection end, it is achieved thereby that eventually End can switch different circuits according to device type external in USB interface, and the electricity for reaching battery between different terminals can With the purpose shared.
Second embodiment of the present invention is related to a kind of terminal.Present embodiment is done on the basis of first embodiment Further improve, specific improvements are:The voltage on USB interface VBUS pins is entered using the ADC pins of processor directly Row detection, and the voltage of the control end of switching chip is applied to according to testing result control, concrete structure is as shown in Figure 4.
Terminal in present embodiment compared with the terminal shown in Fig. 2, directly using processor as control circuit, by will One ADC pin cramp joint of processor realizes the detection to VBUS pin voltages on the VBUS pins of USB interface, so that Directly according to testing result, different voltages to the control end of switching chip are applied by GPIO pin, control switching chip Common port alternative is connected to the first connection end and the second connection end, is realizing that battery electric quantity between terminal and terminal is shared Meanwhile, also simplify terminal inner circuit.In addition, the terminal in present embodiment, it is also possible between battery and charging circuit One electronic switch array is set, and the control end of electronic switch array is electrically connected on processor, so as to realize control electricity Sub switch array disconnects or each pin of turn-on battery and the connection between charging circuit or electric power management circuit.
Third embodiment of the present invention is related to a kind of electricity sharing method, and the electricity sharing method shown in Fig. 5 can be Used in user terminal, wherein, the supplier of electricity that the user terminal is shared as electricity can be such as smart mobile phone, flat board electricity Brain, personal digital assistant and wearable electronic equipment, etc..Specifically, the flow of the electricity sharing method that Fig. 5 is related to Can include:
In step 501, whether USB connecting lines insert in detection USB interface.
Specifically, step is performed when there are USB connecting lines to insert in detecting its USB interface as the terminal of supplier of electricity Rapid 502;Otherwise, continue to detect in USB interface whether there is the insertion of USB connecting lines, untill into step 502.
In step 502, the display interface in terminal provides electricity shared selection entrance.
Specifically, when there are USB connecting lines to insert in detecting USB interface, carried in the display interface of supplier of electricity terminal The shared selection entrance of delivery, such as in arbitrary interface in pop-up mode, there is provided the shared selection entrance of electricity, or in terminal Increase electricity is shared in setting interface selects, into confession user operation, etc., to will not enumerate here.
In addition, it is necessary to explanation, if electricity shares selection entrance to be provided in interface is set, in initial shape When USB connecting lines are not inserted into state, i.e. USB interface, the shared selection entrance of electricity can be set to not optional state, i.e. user The entrance cannot be operated, when USB connecting lines are inserted in detecting USB interface, the shared selection entrance of electricity optional state is set to. In actual applications, can be provided in the display interface of terminal according to the application scenarios of terminal or the use habit of user Electricity is shared to be selected to be operated into confession user, is not limited here.
In step 503, detect whether that user shares selection entrance to electricity and chooses operation.
Specifically, detect user to electricity share selection when choosing operation of entrance, judgement detect electricity be total to Instruction is enjoyed, step 504 is performed;Otherwise, continue to detect whether that what user shared selection entrance to electricity chooses operation, until sentencing Regular inspection measures electricity shared instruction, untill being extracted into the USB connecting lines in step 504, or USB interface.
In step 504, control circuit applies first voltage to the control end of switching chip.
Specifically, USB connecting lines insert in USB interface is detected, and when detecting electricity shared instruction, control Circuit processed applies first voltage to the control end of switching chip.
It should be noted that it is pre- to the first voltage that the control end of switching chip applies that circuit is controlled in present embodiment First set, and the magnitude of voltage can be not unique fixation according to actual specific setting, as long as receiving the shared finger of electricity When making, can notify that switching chip present terminal is needed as supplier of electricity, the common port that chip is switched when as supplier of electricity is needed The second connection end is connected to, is not limited here.
In step 505, the electrical connection between turn-on battery and USB interface.
Specifically, after control circuit applies first voltage to the control end of switching chip, the common port of chip is switched The second connection end is connected to, so that the electrical connection between turn-on battery and USB interface.
Compared with prior art, when thering are USB connecting lines to insert in UBS interfaces in present embodiment, by providing one The shared selection entrance of electricity that user can be operated, and by the detection to the entrance, determining whether user needs ought The supplier of electricity that preceding terminal is shared as electricity, is that another terminal connected by USB connecting lines is powered, and is judging to examine Measure electricity shared instruction, i.e. user and when choosing operation of entrance of selection is shared to electricity, by controlling circuit to switching chip Control end apply first voltage, control switching chip common port be connected to the second connection end, each pin of turn-on battery With the electrical connection of each pin of USB interface, so as to the electric current that the battery for realizing supplier of electricity terminal is put, by current conducting Circuit enters another terminal being attached thereto through USB connecting lines, is embodied as the terminal and powers, and has reached battery between different terminals The purpose that electricity can be shared, is effectively utilized the electricity of supplier of electricity battery.
It is seen that, present embodiment is the device embodiment corresponding with first embodiment, and present embodiment can be with First embodiment is worked in coordination implementation.The relevant technical details mentioned in first embodiment still have in the present embodiment Effect, in order to reduce repetition, repeats no more here.Correspondingly, the relevant technical details mentioned in present embodiment are also applicable in In first embodiment.
4th implementation method of the invention is related to a kind of electricity sharing method.Base of the present embodiment in the 3rd implementation method Further improvement is done on plinth, specific improvements are:After electrical connection between turn-on battery and USB interface, close aobvious Display screen.Idiographic flow is as shown in Figure 6.
In step 601, whether USB connecting lines insert in detection USB interface.Terminal as supplier of electricity is being detected When there are USB connecting lines to insert in its USB interface, step 602 is performed;Otherwise, continue whether there is USB to connect in detection USB interface Line is inserted, untill into step 602.
In step 602, the display interface in terminal provides electricity shared selection entrance.
In step 603, detect whether that user shares selection entrance to electricity and chooses operation.Detecting user couple Electricity shares when choosing operation of entrance of selection, and judgement detects electricity shared instruction, performs step 604;Otherwise, continue to detect Whether there is user that selection entrance is shared to electricity and choose operation, until judgement detects electricity shared instruction, into step Untill USB connecting lines in 604, or USB interface are extracted.
In step 604, control circuit applies first voltage to the control end of switching chip.
In step 605, the electrical connection between turn-on battery and USB interface.
Because step 601 is big to step 505 to step 605 and step 501 in the 3rd implementation method in present embodiment Cause identical, it is intended to which detecting in USB interface has USB connecting lines to insert, and when detecting electricity shared instruction control circuit to The control end for switching chip applies first voltage;So as to the common port for switching chip is connected into the second connection end, conducting is realized Electrical connection between battery and USB interface, here is omitted.
In step 606, display screen is closed.
Specifically, after the electrical connection between turn-on battery and USB interface, display screen is closed so that supplier of electricity enters Death of monks or nuns screen battery saving mode, thereby may be ensured that the battery of supplier of electricity is supported itself and loaded by electricity side enough.
It should be noted that terminal electric current maximum of mean consumption under normal bright screen state can reach 800mA, now If in itself with the terminal for receiving to power all in normal bright screen state, the operating pressure of supplier of electricity battery can accordingly increase supplier of electricity Greatly, after the electrical connection therefore between turn-on battery and USB interface, supplier of electricity will averagely disappear automatically into the screen battery saving mode that goes out The electric current of consumption drops to 30mA, while electricity is shared between two terminals are realized, reduces the loss of electric current.
Compared with prior art, in present embodiment as the terminal of supplier of electricity between turn-on battery and USB interface After electrical connection, by closing display screen, enter death of monks or nuns screen battery saving mode, while electricity is shared between two terminals are realized, Ensure that the battery of supplier of electricity is supported itself and loaded by electricity side enough, so as to ensure that two terminals can normal Standby work Make.
5th implementation method of the invention is related to a kind of electricity sharing method, and the electricity sharing method shown in Fig. 7 can be Used in user terminal, wherein, the user terminal as electricity share by electricity side, can be that such as smart mobile phone, flat board are electric Brain, personal digital assistant and wearable electronic equipment, etc..Specifically, the flow of the electricity sharing method that Fig. 7 is related to Can include:
In step 701, whether within a preset range the voltage on the power supply VBUS pins of detection USB interface.
Specifically, when the voltage on the power supply VBUS pins for detecting USB interface is in default scope, step is performed Rapid 702;Otherwise, continue detect USB interface power supply VBUS pins on voltage whether within a preset range, until entering step Untill 702.
It should be noted that preset range described in present embodiment is 3V~4.5V, due to passing through in UBS interfaces When the power supply unit that USB connecting lines are accessed is the terminal as supplier of electricity, the voltage on its VBUS pin will be generally less than 4.3V, And in order to the battery institute discharge stream for ensureing external supplier of electricity terminal can smoothly enter by electricity side, therefore VBUS pins Voltage is generally required more than 3V, therefore whether preset range is set into can accurately judge external equipment between 3V~4.5V It is as the terminal of supplier of electricity.
In addition, when the voltage on VBUS pins is not in preset range, if the voltage for detecting is more than 4.5V, one As can be determined that external power supply unit is charger, portable power source, host main equipments etc. (VBUS pin voltages are usually 5V), Or quick charger (VBUS pin voltages are usually 9V);If the voltage for detecting is less than 3V, it is believed that currently without External equipment, or selection is data interaction etc., after inserting USB connecting lines to UBS interfaces in actual applications, external sets The judgement of standby or execution power supply, here is omitted, and those skilled in the art can be according to existing detection and judgement Method is accurately obtained.
In a step 702, first voltage is applied to the control end of switching chip.
Specifically, when the voltage on the power supply VBUS pins for detecting USB interface is in default scope, to switching The control end of chip applies first voltage.
It should be noted that it is pre- to the first voltage that the control end of switching chip applies that circuit is controlled in present embodiment First set, and the magnitude of voltage can be not unique fixation according to actual specific setting, after USB connecting lines are inserted, not have When receiving electricity shared instruction, but detecting on VBUS pins voltage within a preset range, can notify that switching chip is current Terminal is needed as electricity side is received, and the common port that chip is switched when as by electricity side requires connect to the second connection end, this In be not limited.
In step 703, USB interface and the electrical connection between charging circuit and electric power management circuit are turned on.
Specifically, after first voltage is applied to the control end of switching chip, switching chip is according to being applied to control end First voltage, common port is connected on the second connection end, thus turn on the first feeder ear of USB interface and charging circuit with And the electrical connection between the test side of electric power management circuit.
In step 704, control circuit controling electronic switch arrays disconnect battery with charging circuit or power management electricity Connection between road.
Specifically, in first feeder ear of the conducting USB interface with charging circuit and the test side of electric power management circuit Between electrical connection after, control circuit controling electronic switch arrays disconnect each pin of battery, that is, recognize that pin, temperature draw Pin, positive pole pin, the connection between grounding pin, with charging circuit or electric power management circuit, so as to prevent supplier of electricity battery Discharge and flow through USB connecting lines into by behind electricity side, electric current is flowed into the battery by electricity side.
It should be noted that in order to ensure each pin for controlling circuit controling electronic switch arrays to disconnect battery and charge Connection between circuit or electric power management circuit, is the first feeder ear and power supply in conducting USB interface with charging circuit Manage after the electrical connection between the test side of circuit, one time delayed turn-off can be set in application layer and instruct, such as 50ms, so that Avoid what is be also not turned between the first feeder ear and the test side of electric power management circuit in USB interface and charging circuit In the case of be just disconnected by electricity side's battery each pin and charging circuit or electric power management circuit between connecting, cause end There is shutdown in end, influences the problem of the experience of user.
Compared with prior art, by the detection of the power supply VBUS pin voltages to USB interface in present embodiment, and When detecting voltage on VBUS pins within a preset range, first voltage is applied by the control end to switching chip, so that The common port of control switching chip is connected on the second connection end, realizes the first feeder ear of conducting USB interface and charging circuit And the electrical connection between the test side of electric power management circuit, reach from external supplier of electricity and obtain electric current for receiving what electricity side used Purpose;In addition, after the circuit is turned on, disconnecting each pin of battery and charging by controlling circuit controling electronic switch arrays Connection between circuit or electric power management circuit, USB connecting lines are flowed through into by electricity so as to prevent supplier of electricity battery from discharging Fang Hou, electric current is flowed into the battery by electricity side so that directly can be operated using the battery of supplier of electricity by electricity side, satisfaction is received The load of electricity side, and by the method that this terminal is power supply between terminal, after by electricity side's dead battery blank screen, pass through USB connecting lines can at once wake up screen from supplier of electricity direct access electricity, into mode of operation so that Consumer's Experience more preferably,
It is seen that, present embodiment is the device embodiment corresponding with first embodiment, and present embodiment can be with First embodiment is worked in coordination implementation.The relevant technical details mentioned in first embodiment still have in the present embodiment Effect, in order to reduce repetition, repeats no more here.Correspondingly, the relevant technical details mentioned in present embodiment are also applicable in In first embodiment.
6th implementation method of the invention is related to a kind of electricity sharing method.Base of the present embodiment in the 5th implementation method Further improvement is done on plinth, specific improvements are:In conducting USB interface and first feeder ear and power supply of charging circuit Manage after the electrical connection between the test side of circuit, provided in the display interface of terminal and stop the shared selection entrance of electricity, and Operation is chosen according to selection entrance is shared to stopping electricity, the common port of switching chip is connected to the first connection end.Specifically Flow is as shown in Figure 8.
In step 801, detection USB interface power supply VBUS pins on voltage whether within a preset range.In detection When voltage on to the power supply VBUS pins of USB interface is in default scope, step 802 is performed;Otherwise, continue to detect USB Voltage on the power supply VBUS pins of interface whether within a preset range, until enter step 802 untill.
In step 801, first voltage is applied to the control end of switching chip.
In step 803, USB interface and the electrical connection between charging circuit and electric power management circuit are turned on.
In step 804, control circuit controling electronic switch arrays disconnect battery with charging circuit or power management electricity Connection between road.
Due to the step 701 in the step 801 in present embodiment to step 804 and the 5th implementation method to step 704 It is roughly the same, it is intended to when detecting voltage on the power supply VBUS pins of USB interface within a preset range, to the control of switching chip End processed applies first voltage, and the common port for switching chip is connected into the second connection end, conducting USB interface and charging circuit After electrical connection between first feeder ear and the test side of electric power management circuit, control circuit controling electronic switch arrays disconnect Connection between battery and charging circuit or electric power management circuit, here is omitted.
In step 805, the display interface in terminal is provided and stops the shared selection entrance of electricity.
Specifically, in first feeder ear of the conducting USB interface with charging circuit and the test side of electric power management circuit Between electrical connection after, provided in the display interface of terminal and stop the shared selection entrance of electricity, such as in arbitrary interface with pop-up Mode, there is provided stop the shared selection entrance of electricity, or increase in the setting interface of terminal stop electricity it is shared select into Confession user operation, etc., will not enumerate here.
In addition, it is necessary to explanation, if stop electricity sharing selection entrance is provided in interface is set, initial When USB connecting lines are not inserted into state, i.e. USB interface, can will stop the shared selection entrance of electricity and be set to not optional state, I.e. user cannot operate the entrance, in first feeder ear of the conducting USB interface with charging circuit and the inspection of electric power management circuit After the electrical connection surveyed between end, the shared selection entrance of electricity will be stopped and be set to optional state.In actual applications, can basis The application scenarios of terminal or the use habit of user, offer stopping electricity is shared in the display interface of terminal selects into confession User operates, and is not limited here.
In addition, not limiting to it is noted that stopping the shared mode of electricity between two terminals in actual applications In a kind of above-mentioned situation, stopping the shared operation of electricity can also be determined by supplier of electricity, such as detect the screen quilt of supplier of electricity After wake-up, provided in the display interface of supplier of electricity and stop the shared selection entrance of electricity, by stopping the shared selection entrance of electricity Operation, the common port of control switching chip is connected to the first connection end, and the battery of supplier of electricity stops outwards electric discharge;Or will be for Electricity side's terminal or the physical button by electricity side's terminal, such as key, volume key, display screen etc. set interdependent snoop-operations, such as Double click operation etc., after the operation for detecting user, the common port of control switching chip is connected to the first connection end, supplier of electricity Battery stops outwards electric discharge, is stopped obtaining electricity, etc. from supplier of electricity by electricity side, will not enumerate herein, does not also do specific Limitation.
In step 806, detect whether that user shares selection entrance to stopping electricity and chooses operation.
Specifically, user is being detected to stopping when choosing operation of electricity shared port, performing step 807;Otherwise Continue to detect whether that user chooses operation to stop that electricity shares selection entrance, it is known that untill entrance step 807.
It should be noted that in actual applications, user is when electricity is shared between two terminals are stopped, it is also possible to not right Stop the shared selection entrance of electricity to be operated, but the USB connecting lines inserted in directly pulling out USB interface, therefore in detection Voltage on to VBUS pins changes, when not within a preset range, it is also possible to be directly entered step 807.
In step 807, processor applies second voltage to the control end of switching chip, switches the common port connection of chip To the first connection end.
Specifically, detect user to stop electricity sharing selection when choosing operation of entrance, processor is to switching The control end of chip applies second voltage, first feeder ear and electric power management circuit of disconnection USB interface and charging circuit Electrical connection between test side, the connection between the charging end and CPU of conducting USB interface and charging circuit, realization will switch core The common port of piece is connected to the first connection end, recovers existing terminal inner normal power supply circuit connection.
It should be noted that in present embodiment control circuit to switching chip control end apply second voltage with it is upper State the first voltage mentioned in implementation method to be similar to, be to preset, and the magnitude of voltage can specifically set according to actual It is fixed, it is not unique fixation, detect whether that user shares when choosing operation of entrance of selection to stopping electricity, place can be triggered Reason device applies second voltage to the control end of switching chip, and the common port for switching chip is connected to the first connection end, stops two Electricity between terminal is shared, and is not limited here.
Compared with prior art, in conducting USB interface and first feeder ear and electricity of charging circuit in present embodiment After electrical connection between the test side of power management circuits, shared by stopping electricity in the display interface offer by electricity side's terminal Selection entrance, such that it is able to decide whether that stopping the electricity between terminal shares, and more conforms to actual demand by user.
Above the step of various methods divide, be intended merely to description it is clear, can be merged into when realizing a step or Some steps are split, multiple steps are decomposed into, as long as comprising identical logical relation, all in the protection domain of this patent It is interior;To adding inessential modification in algorithm or in flow or introducing inessential design, but its algorithm is not changed With the core design of flow all in the protection domain of the patent.
It will be appreciated by those skilled in the art that all or part of step in realizing above-described embodiment method can be by Program is completed to instruct the hardware of correlation, and the program storage is in a storage medium, including some instructions are used to so that one Individual equipment (can be single-chip microcomputer, chip etc.) or processor (processor) perform the whole of each embodiment method of the application Or part steps.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey The medium of sequence code.
It will be understood by those skilled in the art that the respective embodiments described above are to realize specific embodiment of the invention, And in actual applications, can to it, various changes can be made in the form and details, without departing from the spirit and scope of the present invention.

Claims (10)

1. a kind of terminal, it is characterised in that the terminal includes:Switching chip, electric power management circuit, charging circuit, USB connect Mouth, control circuit and battery;
The electric power management circuit, the charging circuit are connected with the control circuit respectively;
The identification pin and temperature pin of the battery are electrically connected with the test side of the electric power management circuit, and the battery is just Pole pin and grounding pin are connected with the first feeder ear of the charging circuit;
The switching chip has control end, common port, the first connection end and the second connection end, wherein, the common port and institute State USB interface connection;First connection end middle part separates pin and is connected with the charging end of the charging circuit, other pins and institute State control circuit connection;The part pin of second connection end is electrically connected with the first feeder ear of the charging circuit, other Pin is electrically connected with the test side of the electric power management circuit;Wherein, it is described when being applied in first voltage in the control end Common port is connected to second connection end;
It is described to control circuit for detecting the voltage on the power supply VBUS pins of the USB interface, and in the electricity for detecting Press when within a preset range, first voltage is applied to the control end;Or, the control circuit is used to detect the shared finger of electricity Order, and when the electricity shared instruction is received, first voltage is applied to the control end.
2. terminal according to claim 1, it is characterised in that the control circuit includes processor and voltage detecting core Piece;
The processor has a GPIO pin, and the GPIO pin is connected with the control end of the switching chip;
The voltage checking chip is used to detect voltage on the VBUS pins, and in the voltage for detecting in default model When enclosing interior, interrupt signal is sent to the processor;
The processor applies first voltage when the interrupt signal is received to the control end.
3. terminal according to claim 1, it is characterised in that the control circuit includes processor;
The processor has a GPIO pin, and the GPIO pin is connected with the control end of the switching chip;
The processor also has an ADC pins, and the ADC pins are connected with the VBUS pins;
The processor detects the voltage on the VBUS pins by the ADC pins, and exists in the voltage for detecting When in preset range, first voltage is applied to the control end.
4. terminal according to claim 1, it is characterised in that the terminal also includes electronic switch array;
Wherein, the control end of the electronic switch array is electrically connected with the control circuit, under the control of the control circuit, The electronic switch array is switched on or off each pin and the charging circuit or power management electricity of the battery Connection between road.
5. a kind of electricity sharing method, it is characterised in that based on the terminal described in Claims 1-4 any one, the terminal As the supplier of electricity that electricity is shared;
The electricity sharing method includes:
There are USB connecting lines to insert in the USB interface is detected, and when detecting electricity shared instruction, the control electricity The control end for switching chip described in road direction applies first voltage;
The common port of the switching chip is connected to second connection end, turns between the battery and the USB interface Electrical connection.
6. electricity sharing method according to claim 5, it is characterised in that there is USB to connect in the USB interface is detected When wiring is inserted, provide electricity shared selection entrance in the display interface of the terminal;
When choosing operation of entrance of selection is shared to the electricity user is detected, judgement detects electricity shared instruction.
7. electricity sharing method according to claim 5, it is characterised in that turning on the battery and the USB interface Between electrical connection after, close the display screen.
8. a kind of electricity sharing method, it is characterised in that based on the terminal described in Claims 1-4 any one, the terminal As electricity share by electricity side;
The electricity sharing method includes:
Detect the voltage on the power supply VBUS pins of the USB interface;
The voltage for detecting within a preset range when, to it is described switching chip control end apply first voltage;
The common port of the switching chip is connected to second connection end, turns on the USB interface and the charging circuit Electrical connection between the test side of the first feeder ear and the electric power management circuit.
9. electricity sharing method according to claim 8, it is characterised in that turning on the USB interface and the charging After electrical connection between first feeder ear of circuit and the test side of the electric power management circuit, the control circuit control Electronic switch array disconnects each pin of the battery and the connection between charging circuit or electric power management circuit.
10. electricity sharing method according to claim 8, it is characterised in that turning on the USB interface and the charging After electrical connection between first feeder ear of circuit and the test side of the electric power management circuit, the electricity sharing method Also include:
There is provided in the display interface of the terminal and stop the shared selection entrance of electricity;
When choosing operation of entrance of selection is shared to the stopping electricity user is detected, the processor is to the switching core The control end of piece applies second electrical level, and the common port of the switching chip is connected to first connection end.
CN201710082912.1A 2017-02-16 2017-02-16 Terminal and electricity sharing method Pending CN106921192A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710082912.1A CN106921192A (en) 2017-02-16 2017-02-16 Terminal and electricity sharing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710082912.1A CN106921192A (en) 2017-02-16 2017-02-16 Terminal and electricity sharing method

Publications (1)

Publication Number Publication Date
CN106921192A true CN106921192A (en) 2017-07-04

Family

ID=59453783

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710082912.1A Pending CN106921192A (en) 2017-02-16 2017-02-16 Terminal and electricity sharing method

Country Status (1)

Country Link
CN (1) CN106921192A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019153152A1 (en) * 2018-02-07 2019-08-15 深圳市为通博科技有限责任公司 Charging detection circuit, charging box, communication apparatus for earphone and earphone
CN110794315A (en) * 2019-08-06 2020-02-14 厦门亿联网络技术股份有限公司 Method for detecting electric quantity of rechargeable battery
CN111463842A (en) * 2019-01-18 2020-07-28 青岛海信移动通信技术股份有限公司 Electronic equipment and communication method thereof
CN114498804A (en) * 2021-07-26 2022-05-13 荣耀终端有限公司 Electronic equipment and control circuit for starting up or waking up system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624037A (en) * 2011-01-26 2012-08-01 上海华勤通讯技术有限公司 Mobile terminal capable of charging external device
CN103268965A (en) * 2013-04-18 2013-08-28 深圳市金立通信设备有限公司 Battery detection circuit, battery and mobile terminal
CN104135053A (en) * 2014-08-06 2014-11-05 中国联合网络通信集团有限公司 Electric quantity sharing method and device
CN105576753A (en) * 2016-01-04 2016-05-11 联想(北京)有限公司 Information processing method and electronic equipment
CN205666633U (en) * 2015-11-17 2016-10-26 上海卓易科技股份有限公司 Mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624037A (en) * 2011-01-26 2012-08-01 上海华勤通讯技术有限公司 Mobile terminal capable of charging external device
CN103268965A (en) * 2013-04-18 2013-08-28 深圳市金立通信设备有限公司 Battery detection circuit, battery and mobile terminal
CN104135053A (en) * 2014-08-06 2014-11-05 中国联合网络通信集团有限公司 Electric quantity sharing method and device
CN205666633U (en) * 2015-11-17 2016-10-26 上海卓易科技股份有限公司 Mobile terminal
CN105576753A (en) * 2016-01-04 2016-05-11 联想(北京)有限公司 Information processing method and electronic equipment

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019153152A1 (en) * 2018-02-07 2019-08-15 深圳市为通博科技有限责任公司 Charging detection circuit, charging box, communication apparatus for earphone and earphone
US11349328B2 (en) 2018-02-07 2022-05-31 Shenzhen Weitongbo Technology Co., Ltd. Charging detection circuit, charging case, communication apparatus of earphone and earphone
CN111463842A (en) * 2019-01-18 2020-07-28 青岛海信移动通信技术股份有限公司 Electronic equipment and communication method thereof
CN110794315A (en) * 2019-08-06 2020-02-14 厦门亿联网络技术股份有限公司 Method for detecting electric quantity of rechargeable battery
CN114498804A (en) * 2021-07-26 2022-05-13 荣耀终端有限公司 Electronic equipment and control circuit for starting up or waking up system
CN114498804B (en) * 2021-07-26 2023-03-14 荣耀终端有限公司 Electronic equipment and control circuit for starting up or waking up system

Similar Documents

Publication Publication Date Title
CN202872406U (en) Interface multiplexing circuit and mobile terminal
CN102055223B (en) USB special charger recognition circuit
TWI494863B (en) Dual-interface card reader module
CN104272216A (en) Electronic device and control method therefor
CN103618356B (en) The charging system of a kind of mobile terminal and charging method thereof
CN101304568B (en) Apparatus and method for charging mobile terminal
CN106921192A (en) Terminal and electricity sharing method
US20120194124A1 (en) Wireless Battery Charging System
CN105375549A (en) Method and system for controlling a state of a battery, and battery
CN112165140B (en) Charging and discharging control method and device and power supply equipment
CN105071484B (en) A kind of charging method and device of the terminal with data exchanging function
CN106201758B (en) A kind of method and device that server node hard disk powers on
CN105068959A (en) Terminal and charging method and apparatus for terminal with data exchange function
EP2619843B1 (en) Providing power to a component
CN104090855A (en) Method and device for making USB (universal serial bus) mode and MHL (mobile high-definition link) mode of USB interface compatible
CN108599530A (en) A kind of powering mode converter and powering mode conversion method
CN112134337A (en) Power adapter, terminal device, electronic device and charging control method thereof
CN105048018A (en) Charging method and device for terminal having on-the-go (OTG) function
CN108181978B (en) Power control method and device for electronic equipment
CN112166422B (en) Mobile terminal
CN107104478A (en) A kind of information processing method and electronic equipment
CN106451628A (en) OTG charging control circuit and charging control method
CN105071489A (en) Charging method and apparatus of terminal having data exchange function
US10481576B2 (en) Method and device for implementing connection control
CN102544919B (en) Cable

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20170704

WD01 Invention patent application deemed withdrawn after publication