The content of the invention
The present invention provides a kind of current test method of terminal and terminal, to solve in the prior art using non-dismountable
The intelligent terminal of battery design, the technical problem of complete machine stand-by power consumption testing current can not be carried out after finishing assembly.
A kind of terminal provided in an embodiment of the present invention, including:Internal battery, terminal mainboard, the first power supply circuit, second supply
Circuit and USB USB type-C interfaces;
One end of first power supply circuit electrically connects with the internal battery, and the other end is electrically connected with the terminal mainboard
Connect;It is in series with switching device in first power supply circuit, the switching device is used for when in the conduction state by described
First power supply circuit is powered for the terminal mainboard;
One end of second power supply circuit electrically connects with the USB type-C interfaces, the other end and the terminal mainboard
Electrical connection;The USB type-C interfaces are used to connect pluggable external power source, and are off shape in the switching device
State and when the USB type-C interfaces are connected with the external power source, is the terminal mainboard by second power supply circuit
Power supply.
Alternatively, the USB type-C interfaces include the first pin and second pin;
First pin electrically connects with the switching device, and first pin is used at according to first pin
Electric signal controls the working condition of the switching device;
The second pin is electrically connected by second power supply circuit with the terminal mainboard, and the second pin is used for
When the USB type-C interfaces are connected with the external power source, by the second pin be connected it is described second power supply
Circuit is powered for the terminal mainboard.
Alternatively, first power supply circuit and second power supply circuit are in the side electricity being connected with the terminal mainboard
Connect, one way conducting device is in series with second power supply circuit, the one way conducting device is used to control described second to supply
Direction one-way conduction of the circuit along the USB type-C interfaces to the terminal mainboard.
Alternatively, the USB type-C interfaces also include the 3rd pin that is electrically connected with the terminal mainboard, and described the
Three pins are used for when the USB type-C interfaces are connected with the external power source, trigger the starting up of terminal.
Alternatively, the USB type-C interfaces are additionally operable to connect pluggable test equipment;
The USB type-C interfaces also include the 4th pin electrically connected with the terminal mainboard, and the 4th pin is used
The control signaling interacted between the transmitting-receiving terminal mainboard and the test equipment.
Alternatively, first pin is any SBU pins in the USB type-C interfaces, and the second pin is
Tx+ and Tx- pins in the USB type-C interfaces, the 3rd pin are that the VBUS in the USB type-C interfaces draws
Pin, the 4th pin are D+ the and D- pins in the USB type-C interfaces.
Based on same inventive concept, a kind of test system provided by the invention, including:
The test system includes test equipment, external power source, test adaptor head and terminal, the test equipment with it is described
There is communication connection, the 5th pin of the test equipment passes through the test adaptor head and the terminal between external power source
The first pin electrical connection of USB type-C interfaces, the first output port of the external power source by the test adaptor head with
The second pin electrical connection of the USB type-C interfaces of the terminal;
The test equipment is used for after the 5th pin successfully electrically connects with first pin, described in control cut-out
Internal battery in terminal is the power supply of the mainboard of the terminal, and in the main board power supply that the external power source is the terminal
When, pass through the supply current of the communication connection acquisition external power source;
The external power source is used to successfully electrically connect with the second pin in first output port and the terminal
In internal battery power supply be cut off after, pass through first output port be the terminal main board power supply.
Alternatively, the 6th pin of the test equipment passes through the test adaptor head and the USB type-C of the terminal
The 4th pin electrical connection of interface, the second output port of the external power source pass through the test adaptor head and the terminal
The 3rd pin electrical connection of USB type-C interfaces;
The external power source is used for after second output port successfully electrically connects with the 3rd pin, described in triggering
Starting up of terminal;
The test equipment is used to successfully electrically connect with the 4th pin in the 6th pin and terminal success
After start, control instruction is sent to the terminal by the 6th pin.
Based on same inventive concept, the present invention also provides a kind of current test method of terminal, including:
When the first pin in USB type-C interfaces in the terminal detects the first trigger signal, the end is controlled
The switching device connected in the first power supply circuit in end is off state, to cut off first power supply circuit to terminal master
The power supply of plate;Institute after first trigger signal successfully electrically connects for first pin with the power supply pin of test equipment
State the electric potential signal of the first pin;
When the second pin in USB type-C interfaces in the terminal detects the second trigger signal, by with it is described
The external power source of the second power supply circuit connection in terminal is powered to the terminal mainboard;Second trigger signal is described
The electric potential signal of two pins second pin after successfully being electrically connected with the external power source;
After the 4th pin in USB type-C interfaces in the terminal receives the control instruction that test equipment is sent, institute
State terminal mainboard and enter test pattern, so that the test equipment obtains the operating current of the terminal mainboard.
Alternatively, methods described also includes:
When the 3rd pin in USB type-C interfaces in the terminal detects second trigger signal, institute is triggered
State starting up of terminal;
After the starting up of terminal success, the control that the test equipment transmission is received by the 4th pin refers to
Order.
Another embodiment of the present invention provides a kind of terminal, and it includes memory and processor, wherein, the memory is used
Instructed in storage program, the processor is used to call the programmed instruction stored in the memory, is held according to the program of acquisition
Any of the above-described kind of method of row.
Another embodiment of the present invention provides a kind of computer-readable storage medium, and the computer-readable recording medium storage has
Computer executable instructions, the computer executable instructions are used to make the computer perform any of the above-described kind of method.
In the embodiment of the present invention, terminal include internal battery, terminal mainboard, the first power supply circuit, the second power supply circuit and
USB USB type-C interfaces;Wherein, one end of the first power supply circuit electrically connects with internal battery, the other end and end
Hold mainboard electrical connection;Switching device is in series with first power supply circuit, for passing through the first power supply electricity when in the conduction state
Road powers for terminal mainboard;One end of second power supply circuit electrically connects with USB type-C interfaces, the other end and terminal mainboard electricity
Connection;The USB type-C interfaces are used to connect pluggable external power source, and are off state in the switching device
And the USB type-C interfaces are when being connected with the external power source, are that terminal mainboard is powered by the second power supply circuit.It can be seen that
Due to being provided with the USB type-C interfaces for connecting external power source in terminal, the USB type-C interfaces further pass through
Two power supply circuits and the mainboard of terminal connect, and are provided with out in the first power supply circuit being connected with the internal battery in terminal
Device is closed, therefore, when needing to carry out complete machine testing current to terminal, can be connected by the USB type-C interfaces of terminal outside
Power supply, and control the switching device in the first power supply circuit to be off state, you can realize and by internal battery power switching be
Powered by connecting the second power supply circuit of external power source for terminal mainboard, so as to reach the in-built electrical that need not dismantle terminal
Pond, the purpose that also the Overall Power Consumption electric current of terminal can be accurately detected.
Embodiment
In order that the object, technical solutions and advantages of the present invention are clearer, the present invention is made below in conjunction with accompanying drawing into
One step it is described in detail, it is clear that described embodiment, only part of the embodiment of the present invention, rather than whole implementation
Example.Based on the embodiment in the present invention, what those of ordinary skill in the art were obtained under the premise of creative work is not made
All other embodiment, belongs to the scope of protection of the invention.
In the embodiment of the present invention, described terminal can make polytype terminal such as mobile phone, tablet personal computer, specific next
Say, the terminal is to include USB USB type-C interfaces.
The embodiment of the present invention is described in further detail with reference to Figure of description.
Fig. 1 is a kind of structural representation of the internal circuit of terminal provided in an embodiment of the present invention, as shown in figure 1, described
Terminal inner includes internal battery, terminal mainboard, the first power supply circuit, the second power supply circuit and USB type-C interfaces.
Specifically, first power supply circuit one end electrically connects with the positive pole of the internal battery of terminal, the other end and terminal mainboard
Electrical connection.There is switching device in the first power supply circuit internal series-connection, can pass through terminal when the switching device is in the conduction state
First power supply circuit is powered for terminal mainboard.
In the embodiment of the present invention, the switching device is specifically as follows MOSFET element, triode device or integrated load
Switch chip, specifically chosen which type of device can be true according to being actually needed by those skilled in the art in the application of reality
Fixed, the present invention is not particularly limited to this.But in Fig. 1, the switching device employs triode device (i.e. Q1 in Fig. 1) work
For a kind of example.
Second power supply circuit one end electrically connects with USB type-C interfaces, and the other end electrically connects with terminal mainboard, the present invention
In embodiment, the USB type-C interfaces are used to connect pluggable external power source and pluggable external test facility, and
Switching device in above-mentioned first power supply circuit is off state and when the USB type-C interfaces is connected with external power source, makes
Terminal is powered by the second power supply circuit for terminal mainboard.
Each pin defined in USB type-C interfaces has been shown in particular in Fig. 1, as shown in figure 1, the USB type-C
Include 24 pins in interface altogether, because the definition of each pin of USB type-C interfaces is skill well known by persons skilled in the art
Art, the present invention repeat no more to this.
The USB type-C interfaces include the first pin and second pin.Wherein, the first pin is that USB type-C connect
Any auxiliary signal pin in mouthful, i.e. SBU1 or SBU2, Fig. 1 are a kind of specific example of the embodiment of the present invention, in Fig. 1
In, the first pin is using SBU2 pins.In the embodiment of the present invention, the electric signal at the first pin is configured to institute in Fig. 1
The power down control signal shown, for controlling the working condition of the switching device in first switch circuit.Specifically, when the first pin
When the electric signal at place is low level, the switching device in the first power supply circuit is in the conduction state, and such first power supply circuit is led
Logical, the internal battery of terminal is powered by first power supply circuit for terminal mainboard, and the electric signal at the first pin is high electricity
Usually, the switching device in the first power supply circuit is off state, and the first circuit is not turned on, when now USB type-C interfaces
When place is connected with external power source, external power source is powered by the second power supply circuit for terminal mainboard.Second pin is USB type-
Data Tx+ and Tx- pin in C interface, in Fig. 1, the second pin are specifically SSTXn2 and SSTXp2, and the second pin has
Body is used to connect external power source, and it can be that terminal mainboard is powered to make external power source.
In the embodiment of the present invention, the 3rd pin is also included in the USB type-C interfaces, the 3rd pin specifically refers to Fig. 1
In VBUS pins, the VBUS pins be used for be used for when the USB type-C interfaces are connected with external power source, triggering terminal is opened
Machine.
In the embodiment of the present invention, the 4th pin is also included in the USB type-C interfaces, the 4th pin is specially USB
D+ and D- pins in type-C interfaces, the pin are used for when the USB type-C interfaces are connected with test equipment, and transmitting-receiving is eventually
The control instruction interacted between end mainboard and test equipment.
As shown in figure 1, the first power supply circuit and the second power supply circuit are electrically connected in the side being connected with terminal mainboard.On
Already described in text, when the USB type-C interfaces are not connected with having external power source, terminal mainboard uses internal battery to be powered for it, by
In the second pin of USB type-C interfaces be to be connected with the second power supply circuit all the time, and the first power supply circuit and second supply
Circuit is electrically connected in the side being connected with terminal mainboard, therefore, easily occurs when the internal battery of terminal supplies by first
When circuit is that terminal mainboard is powered, the electric current in the first power supply circuit pours in down a chimney into the second power supply circuit, so as to influence USB
The situation of type-C interface normal works.Therefore, in the embodiment of the present invention, one-way conduction is additionally provided with the second power supply circuit
Device, the one way conducting device are specifically as follows diode component, the diode component be used for control the second power supply circuit along
USB type-C interfaces are powered to the direction one-way conduction of terminal mainboard so as to avoid the internal battery of terminal for terminal mainboard
When, electric current flows into the possibility of the second power supply circuit.
It is discussed in detail what is provided in the embodiment of the present invention with reference to the internal circuit configuration of terminal described above
A kind of current test method of terminal.
The current test method of the terminal provided in the embodiment of the present invention, based on the test system described in Fig. 2, such as scheme
Shown in 2, the test system includes test equipment, foreign current, test adaptor mouth and terminal.
Specifically, having communication connection between the test equipment and external power source, the 5th pin of test equipment passes through survey
Rotary joint electrically connects with the first pin of the USB type-C interfaces of terminal, and the 6th pin of test equipment passes through the test
Adapter electrically connects with the 4th pin of the USB type-C interfaces of the terminal;First output port of external power source passes through survey
Rotary joint electrically connects with the second pin of the USB type-C interfaces of terminal, and the second output port of external power source passes through test
Adapter electrically connects with the 3rd pin of the USB type-C interfaces of terminal.
In the embodiment of the present invention, the test equipment can be polytype tools such as desktop computer, notebook computer
There is the test equipment of USB interface, the external power source specifically refers to programmable power supply.If by the test equipment to the electric current of terminal
Tested, then to meet that test equipment and external power source are both needed to be connected with terminal, in addition, test equipment also needs to connect by GPIB
Connect and be connected with external power source, so, after successful connection, under the control of test equipment, it is terminal that terminal, which will be switched off internal battery,
The power supply of mainboard, should be to be that terminal mainboard is powered by external power source, in this way, test equipment, which passes through GPIB connections, reads external electrical
The output current in source, you can test obtains the size of current of terminal.
In specific application scenarios, test computer and programmable power supply passes through a test adaptor head and the USB of terminal
Type C interface is connected, and then test adaptor head is connected with the USB type-C interfaces of terminal again.Specifically, test computer
The 5V power supplys of USB interface pass through test adaptor head and the first pin (i.e. auxiliary signal pin of terminal USB type-C interfaces
SBU1 or SBU2) it is connected, the data control line D+/D- for testing the USB interface of computer passes through test adaptor head and the USB of terminal
The 4th pin (i.e. D+ with D- pins) of type-C interfaces is connected, the first output port of programmable power supply by test adaptor head with
Second pin (i.e. Tx+ with Tx- pins) on terminal USB type-C interfaces is connected, and the second output port of programmable power supply passes through
Test adaptor head is connected with the 3rd pin (i.e. VBUS pins) on terminal USB type-C interfaces.
In this way, work as the auxiliary signal pin of the 5V power supplys of the USB interface of test computer and the USB type-C interfaces of terminal
After SBU1 or SBU2 is connected, the current potential on the auxiliary quotation marks pin will be because becoming high electricity being connected to the 5V power supplys of test computer
Position, i.e. power down control signal become high level, the switching device shut-off in the first power supply circuit, so as to cut off the built-in of terminal
Battery is the power supply of terminal mainboard.Now, due to Tx+ the and Tx- pins and programmable power supply on the USB type-C interfaces of terminal
The first output port be connected, Tx+ the and Tx- pins on terminal inner, the USB type-C interfaces of terminal again with second supply
Circuit is connected, and so while the power supply of terminal built-in battery is cut off, the power switching of terminal mainboard is to be supplied by second
The first output port power supply of the programmable power supply of circuit connection.
Further, since second output port phase of the VBUS pins also with programmable power supply on the USB type-C interfaces of terminal
Even, due to the presence of the second output port, then the dependence test software for coordinating terminal inner to install, terminal will be caused to be triggered out
Machine.After terminal is successfully started shooting, test computer passes through the data control line D+/D- of its USB interface and the USB type-C of terminal
The connection of the Tx+ and Tx- pins of interface, send and order to terminal mainboard, so that terminal enters corresponding test pattern.It is same with this
When, test computer is connected by the GPIB with programmable power supply, closes the second output port of programmable power supply, in order to avoid programmable power supply
The electric current of second output port output influences the accuracy of terminal current test.Afterwards, test computer can by with program-controlled electric
The GPIB connections in source, the electric current of the first output port output of programmable power supply is read, learn the static current of lcd situation of terminal.
It can be seen that using the test system and correlation technique that are provided in the embodiment of the present invention, pass through the power supply to terminal inner
Circuit is improved, and the current potential of the auxiliary signal pin of the USB type-C interfaces of terminal is configured into power down control signal,
On the premise of machine is not torn open, do not destroy the complete machine surface structure of terminal, do not influence terminal normal work, so that it may to all kinds of of terminal
State current is tested, and the outgoing of the terminal of plant produced has been effectively ensured.
Fig. 3 is a kind of schematic flow sheet of the current test method of the terminal provided in the embodiment of the present invention, such as Fig. 3 institutes
Show, methods described comprises the following steps S301 to step S303:
Step S301:When the first pin in USB type-C interfaces in the terminal detects the first trigger signal,
The switching device connected in the first power supply circuit in the terminal is controlled to be off state, to cut off the first power supply electricity
Power supply of the road to terminal mainboard;First trigger signal is the power supply pin success of first pin and test equipment
The electric potential signal of first pin after electrical connection;
Step S302:When the second pin in USB type-C interfaces in the terminal detects the second trigger signal,
The terminal mainboard is powered by the external power source connected with the second power supply circuit in the terminal;The second triggering letter
Number it is the electric potential signal of the second pin after the second pin successfully electrically connects with the external power source;
Step S303:The 4th pin in USB type-C interfaces in the terminal receives the control that test equipment is sent
After instruction, the terminal mainboard enters test pattern, so that the test equipment obtains the operating current of the terminal mainboard.
Specifically, before step S303 after step S302, methods described also includes the USB in the terminal
When the 3rd pin in type-C interfaces detects second trigger signal, the starting up of terminal is triggered;
Then, after starting up of terminal success, received by the 4th pin described in the test equipment transmission
Control instruction, and then, step S303 is can perform, after terminal receives the control instruction of test equipment, into test pattern, so that institute
State the operating current that test equipment obtains the terminal mainboard.
Based on same inventive concept, the embodiment of the present invention also provides another terminal, and the terminal can include centre
Device (Center Processing Unit, CPU), memory, input-output apparatus etc. are managed, input equipment can include touching
Screen etc., output equipment can include display device, as liquid crystal display (Liquid Crystal Display, LCD), negative electrode are penetrated
Spool (Cathode Ray Tube, CRT) etc..
Memory can include read-only storage (ROM) and random access memory (RAM), and provide storage to processor
The programmed instruction and data stored in device.In embodiments of the present invention, memory can be used for the electric current survey for storing above-mentioned terminal
The program of method for testing.
By calling the programmed instruction of memory storage, processor is used to perform according to the programmed instruction of acquisition processor
State the current test method of terminal.
Based on same inventive concept, the embodiments of the invention provide a kind of computer-readable storage medium, for saving as
The computer program instructions used in computing device are stated, it includes the program for the current test method for being used to perform above-mentioned terminal.
The computer-readable storage medium can be any usable medium or data storage device that computer can access, bag
Include but be not limited to magnetic storage (such as floppy disk, hard disk, tape, magneto-optic disk (MO) etc.), optical memory (such as CD, DVD,
BD, HVD etc.) and semiconductor memory (such as it is ROM, EPROM, EEPROM, nonvolatile memory (NAND FLASH), solid
State hard disk (SSD)) etc..
By the above it can be seen that:
In the embodiment of the present invention, terminal include internal battery, terminal mainboard, the first power supply circuit, the second power supply circuit and
USB USB type-C interfaces;Wherein, one end of the first power supply circuit electrically connects with internal battery, the other end and end
Hold mainboard electrical connection;Switching device is in series with first power supply circuit, for passing through the first power supply electricity when in the conduction state
Road powers for terminal mainboard;One end of second power supply circuit electrically connects with USB type-C interfaces, the other end and terminal mainboard electricity
Connection;The USB type-C interfaces are used to connect pluggable external power source, and are off state in the switching device
And the USB type-C interfaces are when being connected with the external power source, are that terminal mainboard is powered by the second power supply circuit.It can be seen that
Due to being provided with the USB type-C interfaces for connecting external power source in terminal, the USB type-C interfaces further pass through
Two power supply circuits and the mainboard of terminal connect, and are provided with out in the first power supply circuit being connected with the internal battery in terminal
Device is closed, therefore, when needing to carry out complete machine testing current to terminal, can be connected by the USB type-C interfaces of terminal outside
Power supply, and control the switching device in the first power supply circuit to be off state, you can realize and by internal battery power switching be
Powered by connecting the second power supply circuit of external power source for terminal mainboard, so as to reach the in-built electrical that need not dismantle terminal
Pond, the purpose that also the Overall Power Consumption electric current of terminal can be accurately detected.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or computer program
Product.Therefore, the present invention can use the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware
Apply the form of example.Moreover, the present invention can use wherein includes the meter of computer usable program code at one or more
The computer journey that calculation machine usable storage medium is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.)
The form of sequence product.
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram
Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided
The processors of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce
A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real
The function of being specified in present one flow of flow chart or one square frame of two or more flow and/or block diagram or two or more square frame
Device.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which produces, to be included referring to
The manufacture of device is made, the command device is realized in one flow of flow chart or two or more flow and/or one side of block diagram
The function of being specified in frame or two or more square frame.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted
Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, so as in computer or
The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or two or more flow and/or square frame
The step of function of being specified in one square frame of figure or two or more square frame.
Although preferred embodiments of the present invention have been described, but those skilled in the art once know basic creation
Property concept, then can make other change and modification to these embodiments.So appended claims be intended to be construed to include it is excellent
Select embodiment and fall into having altered and changing for the scope of the invention.
Obviously, those skilled in the art can carry out the essence of various changes and modification without departing from the present invention to the present invention
God and scope.So, if these modifications and variations of the present invention belong to the scope of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to comprising including these changes and modification.