Disclosure of Invention
The embodiment of the application provides a mobile terminal USB plugging method and a plugging system, which can solve the problems.
The embodiment of the application provides a method for plugging and unplugging a USB of a mobile terminal, which comprises the following steps:
s1: fixing the mobile terminal;
s2: detecting the current position of a USB port of the mobile terminal;
s3: controlling a USB socket to be opposite to the USB port according to the current position;
s4: controlling the USB socket to be plugged into the USB port;
s5: and controlling the USB socket to be separated from the USB port.
Preferably, the step S3 includes the steps of:
s31: judging whether a historical position exists or not;
s32: when there is no history position, controlling the USB socket to face the USB port, storing the current position as the history position, and entering step S4;
s33: when a historical position exists, judging whether the current position is consistent with the historical position;
s34: when the current position is inconsistent with the historical position, adjusting the position of the USB socket according to the current position, controlling the USB socket to be opposite to the USB port, storing the current position as the historical position, and entering the step S4.
Preferably, the adjusting the position of the USB socket according to the current position includes:
moving the USB socket along a first direction and a second direction according to the current position;
wherein the first direction and the second direction are as follows: the USB socket is positioned in the plane where the end face of the USB socket is positioned and in two mutually orthogonal directions.
Preferably, the step S31 is followed by the step of:
s33: when the current position coincides with the history position, the process proceeds to step S4.
Preferably, the step S3 is preceded by the step of:
s0: initializing the location of the USB socket.
The application also provides a mobile terminal USB plug system, including:
the clamp is used for clamping the mobile terminal;
the detection mechanism is used for detecting the current position of the USB port of the mobile terminal;
the control mechanism is used for controlling the insertion and the separation of a USB socket and the USB port and the USB socket and the USB port according to the current position;
the detection mechanism is connected with the control mechanism.
Preferably, the control mechanism comprises:
a memory for storing the current location as a historical location;
a judger for judging whether the current position is consistent with the historical position;
the controller is used for adjusting the position of the USB socket according to the current position and controlling the USB socket to be opposite to the USB port when the current position is inconsistent with the historical position;
the detection mechanism is electrically connected with the judger, and the judger is electrically connected with the memory and the controller respectively.
Preferably, the controller includes:
the first driving piece is used for moving the USB socket along a first direction according to the current position;
the second driving piece is used for moving the USB socket along a second direction according to the current position;
the first direction and the second direction are as follows: the USB socket is positioned in the plane where the end face of the USB socket is positioned and in two mutually orthogonal directions.
Preferably, at least one of the first drive and the second drive is a motor.
Preferably, the detection means comprises visual detection means.
The technical scheme provided by the embodiment of the application can achieve the following beneficial effects:
according to the USB plugging and unplugging method, the current position of the USB port on the clamp is detected, the USB socket is adjusted according to the current position, the USB socket is opposite to the USB port, and finally the USB socket is plugged into the USB port. In the mode, the detection link is added, so that the adjustment position of the USB socket can be determined, the machine adjusting time is saved, and the working efficiency is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Detailed Description
The present application is described in further detail below with reference to specific embodiments and with reference to the attached drawings. The terms "front", "rear", "left", "right", "upper" and "lower" are used herein with reference to the placement in the drawings.
As shown in fig. 1, an embodiment of the present application provides a method for plugging a USB of a mobile terminal, which is used for plugging a USB port of the mobile terminal, such as a mobile phone, into a USB socket during a test process, so as to facilitate signal communication during the test, and includes the steps of:
s1: the fixed mobile terminal, namely the USB port is fixed, and the fixed mobile terminal can be fixed by a clamp or adhesive glue and the like;
s2: detecting the current position of a USB port of the mobile terminal, and generally establishing a two-dimensional coordinate system in a plane where the end face of the USB port is located to obtain the coordinates of the USB port;
s3: controlling the USB socket and the USB port according to the current position, namely controlling the USB socket to be opposite to the USB port according to the coordinate of the USB port;
s4: controlling the USB socket to be inserted into the USB port, namely moving the USB socket along a plane which is perpendicular to the end face of the USB socket and is close to the USB port, so that the USB socket and the USB port are inserted;
then, the mobile terminal is tested, and after the test is completed, the process proceeds to step S5,
s5: and controlling the USB socket to be separated from the USB port, namely moving the USB socket along a plane which is perpendicular to the end face of the USB socket and deviates from the direction of the USB port, so that the USB socket is separated from the USB port, thus completing the sequential plugging and unplugging of the USB socket and the USB port once, and repeating the steps S1-S5 for the next plugging and unplugging operation.
The USB plugging method of the above embodiment first detects the current position of the USB port on the clamp, then adjusts the USB socket according to the current position, so that the USB socket is opposite to the USB port, and finally inserts the USB socket into the USB port. In the mode, the detection link is added, so that the adjustment position of the USB socket can be determined, the machine adjusting time is saved, and the working efficiency is improved.
As shown in fig. 2, the step S3 may further include the steps of:
s31: judging whether a historical position exists or not;
s32: when the historical position does not exist, controlling the USB socket to be opposite to the USB port, storing the current position as the historical position, and entering the step S4;
s33: when the historical position exists, judging whether the current position is consistent with the historical position;
s34: when the current position is inconsistent with the historical position, the position of the USB socket is adjusted according to the current position, the USB socket is controlled to be opposite to the USB port of the mobile terminal, generally, the USB socket is projected to the plane of the end face of the USB socket along the direction perpendicular to the plane of the end face of the USB socket, the offset distance between the USB socket and the current position is obtained, and then the offset distance of the USB socket is adjusted, so that the USB socket is opposite to the USB port; and stores the current position as the history position, and proceeds to step S4.
By judging whether the historical position exists or not and whether the historical position is consistent with the current position or not, when the historical position exists, the USB socket and the USB port are plugged and pulled at least once, and at the moment, when the current position is inconsistent with the historical position, the position of the USB socket is adjusted, so that the action times of adjusting the USB socket can be reduced, and the working efficiency is improved.
The two-dimensional coordinate system in the plane of the end face of the USB port may be a rectangular coordinate system, or may be a polar coordinate system, preferably a rectangular coordinate system, so as to facilitate control of the USB socket. Specifically, the two mutually orthogonal directions of the rectangular coordinate system are respectively a first direction and a second direction, and at this time, adjusting the position of the USB socket according to the current position includes: and moving the USB socket along the first direction and the second direction according to the current position.
In order to further simplify the control procedure of the USB socket, step S31 is followed by the steps of:
s33: when the current position coincides with the history position, the flow proceeds to step S4.
In the step S3, in each insertion process of the USB socket and the USB port, the position of the USB socket is adjusted, that is, the driving mechanism of the USB socket is started, and only when the current position is consistent with the historical position, the moving distance of the USB socket is zero, and then the USB socket is controlled to be inserted into the USB port.
In order to facilitate the control program to adjust the USB socket and the USB port more quickly, step S3 includes the following steps:
s0: initializing the position of the USB socket, for example, initially, setting the position of the USB socket as a zero point of a rectangular coordinate system or a polar coordinate system, but may also be set as another coordinate position.
Step S0 may be provided before step S1, between step S1 and step S2, or between step S2 and step S3.
The present application further provides a mobile terminal USB plug system, as shown in fig. 3, including:
a holder (not shown in the drawings) for holding the mobile terminal;
the detection mechanism 2 is used for detecting the current position of the USB port of the mobile terminal;
the control mechanism 3 is used for controlling the insertion and the separation of the USB socket and the USB port and the USB socket and the USB port according to the current position;
wherein, the detection mechanism 2 is electrically connected with the control mechanism 3 to facilitate signal communication.
The USB plugging system can adopt the plugging method, firstly detects the position of the USB port through the detection mechanism 2, then adjusts the USB socket according to the position of the USB port to enable the USB socket to be opposite to the USB port, and finally inserts the USB socket into the USB port to improve the debugging efficiency.
As shown in fig. 4, the control mechanism 3 may specifically include:
a memory 31 for storing the current position as a history position;
a determiner 32 for determining whether the current position coincides with the historical position;
a controller 33 for adjusting the position of the USB socket according to the current position when the current position is inconsistent with the historical position, and controlling the USB socket to be directly opposite to the USB port of the mobile terminal
At this time, the detection means 2 is electrically connected to the determiner 32, and the determiner 32 is electrically connected to the memory 31 and the controller 33, respectively.
The memory 31, the determiner 32, and the controller 33 can adopt the above method to further improve the tuning efficiency.
Further, the controller 33 includes:
the first driving piece is used for moving the USB socket along a first direction according to the current position;
the second driving piece is used for moving the USB socket along a second direction according to the current position;
namely, the USB socket is moved along two different directions by the two driving pieces respectively so as to better enable the USB socket to be opposite to the USB port.
Specifically, the second driving member includes a second movable portion; the first driving piece comprises a first fixing portion, the first fixing portion is installed on the second movable portion, namely the first driving piece can move along the second direction under the driving of the second driving piece, and therefore the whole mobile terminal USB plugging system is simplified.
The control mechanism 3 further comprises a third driving member, the third driving member is used for driving the USB socket to move along a third direction, and the third direction is perpendicular to a plane where the end face of the USB socket is located. The third driving part can be independently arranged with the first driving part and the second driving part and also can be associated with the first driving part and the second driving part, namely, the third driving part comprises a third movable part, the second driving part comprises a second fixed part, the second fixed part is arranged at the third movable part, at the moment, the first fixed part can be connected with the second movable part, or the first driving part and the second driving part can be independently arranged, preferably, the first fixed part is connected with the second movable part, so that the first driving part, the second driving part and the third driving part form a three-dimensional moving platform, and the USB plugging and unplugging system control of the mobile terminal is facilitated.
The first driving piece, the second driving piece and the third driving piece can be independently arranged and respectively push against the USB socket, or only one of the first driving piece, the second driving piece and the third driving piece can be connected with the movable part of the other one.
The first driving member, the second driving member and the third driving member may be manual driving members independently, such as telescopic rods, or may be motors or hydraulic cylinders, and preferably, all of the three are motors to facilitate the operation of the whole control system, and of course, one or both of the three may be motors.
In the above embodiment, the detection mechanism 2 may include a position sensor, a length sensor, or a visual detection mechanism, or the detection mechanism 2 includes two or three of the position sensor, the length sensor, and the visual sensor, or includes other detection devices, preferably a visual detection mechanism, to facilitate the operation.
The visual inspection mechanism typically includes a camera, such as an analog camera or a digital camera.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.