Disclosure of Invention
The embodiment of the application discloses a position detection mechanism, a mobile terminal and a position detection method capable of improving detection precision.
In a first aspect, an embodiment of the present application discloses a position detection mechanism, which includes a to-be-detected member, a driving assembly, and a first detection member; the to-be-tested piece comprises a contact end; the first detection part is arranged corresponding to the contact end; the driving assembly is used for driving the to-be-detected piece to move relative to the first detection piece so that the contact end is in contact with or separated from the first detection piece; the first detection piece is used for detecting the position of the piece to be detected.
Position detection mechanism in this application embodiment is owing to be provided with and is used for detecting the first detection piece of the position of piece that awaits measuring, just drive assembly can drive the connecting piece is relative first detection piece removes, so that the contact jaw contact on the piece that awaits measuring perhaps leaves first detection piece, and then can through first detection piece with the physical contact of contact jaw indicates the position state of piece that awaits measuring, has improved the detection precision to the piece that awaits measuring position state.
In some embodiments, the position detection mechanism further includes a first bearing member, the to-be-detected member includes a second bearing member and a connecting member that are fixedly connected to each other, the first bearing member and the second bearing member are arranged side by side, and the driving assembly and the first detection member are arranged on the first bearing member; the connecting piece is bridged between the second bearing piece and the first bearing piece, and the contact end is arranged on the connecting piece. Therefore, the position detection mechanism is better in applicability, and the position of the connecting piece can be adjusted according to the specific space condition of the installation environment.
In order to reduce cost and complexity of the first detection member, the first detection member is a metal contact; when the connecting piece is contacted with the first detection piece, the first detection piece is in a conducting state; when the connecting piece is not in contact with the first detection piece, the first detection piece is in a disconnected state.
In order to better realize the conducting state of the first detection part when the contact end of the connection part is contacted with the first detection part, in an embodiment, the connection part is a metal connection part.
In some embodiments, the connecting member is made of an insulating material, and the contact end is provided with a metal contact piece at a position contacting with the first detecting member, so that a good conduction state can be ensured when contacting with the first detecting member, and the weight of the position detecting mechanism can be reduced and the installation is convenient.
In order to facilitate the contact between the connecting piece and the first detecting piece and reduce the occurrence of misjudgment, in one embodiment, the first bearing piece comprises a main body, a first mounting part and a second mounting part; the first mounting part and the second mounting part are respectively arranged on two end parts of the main body in a protruding manner along the moving direction of the connecting piece; the first detection piece is arranged on one side, close to the second installation part, of the first installation part; or the first detection piece is arranged on one side of the second installation part close to the first installation part.
In the position detection mechanism in the above embodiment, because only the first detection piece is provided, and thus only one position state of the to-be-detected piece can be determined by the first detection piece, in some embodiments, in order to detect a plurality of position states of the to-be-detected piece, the position detection mechanism further includes a second detection piece; the second detection part is arranged corresponding to the contact end. The driving assembly further drives the connecting piece to move relative to the second detecting piece so that the contact end on the connecting piece is in contact with or separated from the second detecting piece; the second detection piece is also used for detecting the position of the piece to be detected.
Similarly, in order to facilitate the contact between the connecting member and the second detecting member and reduce the occurrence of misjudgment, the contact end is located between the first detecting member and the second detecting member.
In some embodiments, in order to better achieve better contact between the connecting member and the second detecting member, the connecting member is made of an insulating material, and the contact end is provided with a metal contact piece at a position where the contact end is in contact with the second detecting member.
In order to improve the motion precision of the piece to be detected and the operation reliability of the position detection mechanism, in some embodiments, the driving assembly comprises a screw rod and a driving piece; the contact end of the connecting piece is rotationally connected with the screw rod, and the screw rod is also rotationally connected with the driving piece; the driving piece drives the screw rod to rotate, so that the connecting piece drives the second bearing piece to move relative to the first bearing piece.
For better installation of the driving assembly, in some embodiments, one end of the screw rod is installed on the first installation part and is rotatably connected with the driving part, and one end of the screw rod, which is far away from the driving part, is rotatably connected with the second installation part.
In a second aspect, an embodiment of the present application discloses a mobile terminal, which includes a display screen, a housing and a camera device; the display screen is arranged on the shell; the shell is provided with an opening, and an accommodating cavity communicated with the opening is formed for accommodating the camera device; the camera device comprises a camera and a position detection mechanism; the position detection mechanism comprises a piece to be detected, a driving assembly and a first detection piece; the camera is arranged on the piece to be detected; the to-be-tested piece comprises a contact end; the first detection part is arranged corresponding to the contact end; the driving assembly is used for driving the to-be-detected piece to move relative to the first detection piece so that the contact end is in contact with or separated from the first detection piece; the driving component also drives the piece to be detected to drive the camera to extend out of or retract into the shell; the first detection piece is used for detecting the position state of the camera.
The mobile terminal in the embodiment of the application is provided with the first detection piece, and the position state of the camera is detected through the change of the signal state of the first detection piece caused by the physical contact or the separation of the connector and the first detection piece, so that the detection precision of the position state of the camera can be improved.
Furthermore, the position detection mechanism in the mobile terminal further includes the position detection mechanism in any of the embodiments of the first aspect.
In order to determine the position state of the camera according to the signal state generated by the first detection piece and control the driving component, the mobile terminal further comprises a processor; the mobile terminal further comprises a processor electrically connected with the driving assembly and the first detection piece; when a triggering operation input by a user is received, the processor controls the driving assembly to drive the to-be-detected piece to drive the camera to move towards a preset direction; the processor also detects the signal state generated by the first detection piece, and determines that the camera is in the extending position or the retracting position when the processor detects that the signal state generated by the first detection piece changes within a first preset time.
The "extending position" refers to a position where the camera extends out of the accommodating cavity of the mobile terminal and is located outside the accommodating cavity; the retracted position refers to the position of the camera in the accommodating cavity of the mobile terminal; and the process that the camera is retracted into the accommodating cavity from the outside of the accommodating cavity is defined as a retraction process; the process that the camera extends out of the accommodating cavity from the accommodating cavity is defined as an extending process.
In the above embodiment, although the position state of the camera can be detected by the first detecting member disposed on the first bearing member, the specific position of the first detecting member and the position state of which the camera can be located are not limited, and therefore, in some embodiments, in order to detect the position state of whether the camera is located at the extended position, the first detecting member is disposed at one end of the first bearing member close to the opening; the triggering operation input by the user comprises a triggering operation for starting the camera; when receiving the trigger operation of user's input, the treater control drive assembly drive the piece that awaits measuring drives the camera moves towards predetermineeing the direction, includes: when a triggering operation which is input by a user and used for starting the camera is received, the processor controls the driving assembly to drive the piece to be tested to drive the camera to move towards the direction extending out of the shell; when it changes to detect the signal state that first detection piece produced in first preset time, confirm that the camera is in the extended position or the retracted position, include: and when the state of the signal generated by the first detection piece is detected to be changed within a first preset time, determining that the camera is located at the extending position.
In some embodiments, in order to detect whether the camera is in a position state of a retracted position, the first detection piece is arranged at one end of the first bearing piece far away from the opening; the triggering operation input by the user comprises a triggering operation for closing the camera; when receiving the trigger operation of user's input, the treater control drive assembly drive the piece that awaits measuring drives the camera moves towards predetermineeing the direction, includes: when a triggering operation for closing the camera input by a user is received, the processor controls the driving assembly to drive the to-be-detected piece to drive the camera to move towards the direction of retracting the shell; when it changes to detect the signal state that first detection piece produced in first preset time, confirm that the camera is in the extended position or the retracted position, include: and when the state of the signal generated by the first detection piece is detected to be changed within a first preset time, determining that the camera is in the retraction position.
The mobile terminal in the above embodiment is only provided with the first detection element, and thus can only determine whether the camera is in the extended position or the retracted position through the first detection element. However, in practical applications, the camera is in an extended position to facilitate the user to take a picture, and when the camera is not in use, the housing needs to be retracted to protect the camera. Therefore, in actual use, the extended position and the retracted position of the camera are required to be detected so as to ensure a better photographing effect and protect the camera.
Thus, in an embodiment, the position detection mechanism further comprises a second detection member; the second detection piece and the first detection piece are respectively arranged at two ends of the first bearing piece along the moving direction of the connecting piece, and the connecting position of the connecting piece and the driving assembly is positioned between the first detection piece and the second detection piece; the driving component also drives the piece to be detected to move relative to the second detection piece so that the contact end is contacted with or separated from the second detection piece; the second detection piece is also used for detecting the position of the piece to be detected. Wherein the first detecting member is close to the opening.
When a triggering operation which is input by a user and used for starting the camera is received, the processor controls the driving assembly to drive the piece to be tested to drive the camera to move towards the direction extending out of the opening; the processor also detects the signal state generated by the first detection piece, and determines that the camera is in the extending position when the processor detects that the signal state generated by the first detection piece changes within a first preset time; when a triggering operation for closing the camera input by a user is received, the processor controls the driving assembly to drive the piece to be tested to drive the camera to move towards the direction of retracting the opening; the processor also detects the signal state generated by the second detection piece, and determines that the camera is in the retraction position when detecting that the signal state generated by the second detection piece changes within a first preset time.
When the camera is determined to be located at the extending position, if the processor does not receive the triggering operation of closing the camera by the user, the camera should always be located at the extending position. However, when the camera receives the pressing of the external force, for example, when the user wants to manually press the camera and retract the camera into the housing, the camera should be retracted into the housing in accordance with the action control of the user, so as to better realize the human-computer interaction. In addition, if the camera touches an obstacle and is stressed due to the fact that the mobile terminal falls down, the camera is controlled to retract into the shell so as to protect the camera, and therefore when the camera is located at the extending position, it is important to judge whether the camera receives an external force pressing state.
Therefore, in order to better detect whether the camera receives external force pressing, in some embodiments, when the camera is in the extended position, the processor further detects a signal state generated by the first detecting element, and determines that the camera is in the external force pressing state when detecting that the signal state generated by the first detecting element changes.
However, the signal state of the first detection member changes, and is not necessarily pressed by an external force subjectively applied by a user, and may be mistakenly touched on the camera in the photographing process. Therefore, in order to avoid misjudgment, in some embodiments, when it is detected that the signal state of the first detection element changes, the processor further determines whether the duration of the change of the signal state of the first detection element reaches a second preset time; and when the duration of the change of the signal state of the first detection piece reaches the second preset time, determining that the camera is in an external force pressing state.
In a third aspect, an embodiment of the present application discloses a position detection method, which is applied to a mobile terminal, where the mobile terminal includes a housing and a camera device, the housing is provided with an opening, and a receiving cavity communicated with the opening is formed to receive the camera device; the camera device comprises a camera and a position detection mechanism; the position detection mechanism comprises a piece to be detected, a driving assembly and a first detection piece; the camera is arranged on the piece to be detected; the to-be-detected part comprises a contact end which is arranged corresponding to the first detection part; the position detection method comprises the following steps: when a triggering operation input by a user is received, controlling the driving assembly to drive the piece to be tested to drive the camera to move towards a preset direction; detecting the signal state generated by the first detection piece; when the state of a signal generated by the first detection piece is detected to be changed within a first preset time, determining that the camera is in an extending position or a retracting position; when the contact end and the first detection piece are changed from a separation state to a contact state, the state of a signal generated by the first detection piece is changed.
In one embodiment, the triggering operation input by the user comprises a triggering operation for starting the camera; when receiving the trigger operation of user's input, control drive assembly drive the piece that awaits measuring drives the camera moves towards predetermineeing the direction, include: when a triggering operation which is input by a user and used for starting the camera is received, controlling the driving assembly to drive the piece to be tested to drive the camera to move towards the direction extending out of the shell; when it changes to detect the signal state that first detection piece produced in first preset time, confirm that the camera is in the extended position or the retracted position, include: and when the state of the signal generated by the first detection piece is detected to be changed within a first preset time, determining that the camera is located at the extending position.
In some embodiments, the user-input trigger operation comprises a trigger operation to turn off the camera; when receiving the trigger operation of user's input, control drive assembly drive the piece that awaits measuring drives the camera moves towards predetermineeing the direction, include: when a triggering operation for closing the camera input by a user is received, controlling the driving assembly to drive the piece to be tested to drive the camera to move towards the direction of retracting the shell; when it changes to detect the signal state that first detection piece produced in first preset time, confirm that the camera is in the extended position or the retracted position, include: and when the state of the signal generated by the first detection piece is detected to be changed within a first preset time, determining that the camera is in the retraction position.
In one embodiment, the position detecting mechanism further includes a second detecting element disposed corresponding to the contact end, and the position detecting method further includes: when a triggering operation for closing the camera input by a user is received, controlling the driving assembly to drive the piece to be tested to drive the camera to move towards the direction of retracting the opening; detecting the signal state generated by the second detection piece; when the state of the signal generated by the second detection piece is detected to be changed within a first preset time, the camera is determined to be in the retraction position.
In one embodiment, the position detection method further includes: when the camera is positioned at the extending position, the signal state generated by the first detection piece is detected; when the state of the signal generated by the first detection piece is detected to be changed, the camera is determined to be in an external force pressing state.
In one embodiment, when detecting that the signal state of the first detecting element changes, the position detecting method further includes: judging whether the duration time of the change of the signal state of the first detection piece reaches a second preset time or not; and when the duration of the change of the signal state of the first detection piece reaches the second preset time, determining that the camera is in an external force pressing state.
In a fourth aspect, an embodiment of the present application discloses a computer-readable storage medium, where program instructions for position detection are stored in the computer-readable storage medium, and the program instructions are used for executing the position detection method according to the third aspect after being called.
Detailed Description
The application provides a mobile terminal and be applied to position detection mechanism among the mobile terminal, position detection mechanism is used for detecting the position of camera in the mobile terminal to ensure the position state of camera is in order to guarantee the effect of shooing and protect camera device. Embodiments of the present application are described below with reference to the accompanying drawings.
Please refer to fig. 1, which is a schematic front view of a camera 23 of a mobile terminal 200 according to an embodiment of the present application when the camera 23 protrudes out of a housing 22. The mobile terminal 200 may be any mobile terminal such as a smart phone, a smart watch, a tablet computer, a Personal Digital Assistant (PDA), a point of sale (POS), a vehicle-mounted computer, a desktop computer, a notebook computer, and a smart television, which is not limited in this embodiment.
As shown in fig. 1, the mobile terminal 200 includes a display screen 21, a housing 22, and a camera 23. The display screen 21 is installed on the housing 22, and a display surface of the display screen 21 is a front area of the mobile terminal 200. Referring to fig. 2, fig. 2 is another perspective view of the mobile terminal 200 shown in fig. 1, the housing 22 is provided with an opening 221, in this embodiment, the opening 221 is located at the top of the mobile terminal 200, and the camera 23 can extend out of the housing 22 from the opening 221 or retract into the housing 22. It is to be understood that the installation position of the camera 23 in the mobile terminal 200 is not limited.
Referring to fig. 3, fig. 3 is a rear view of the mobile terminal 200 with a rear cover removed. As shown in fig. 3, a housing chamber 201 is provided in the housing 22. The receiving cavity 201 is communicated with the opening 221. The camera 23 can be movably accommodated in the accommodating cavity 201, and can extend out of or retract into the housing 22 through the opening 221. In one embodiment, the imaging device 23 includes a camera 231 and a position detection mechanism 100. The camera 231 is disposed on the position detection mechanism 100 and can be driven by the position detection mechanism 100 to extend out of or retract into the housing 22. The position detection mechanism 100 is disposed in the accommodating cavity 201, and is configured to drive the camera 231 to extend and retract and detect a specific position of the camera 231.
In the present embodiment, the camera 23 is used to capture a scene, a portrait, etc. on the front side of the mobile terminal 200, that is, the camera 23 is used as a front camera. In another embodiment, the image pickup device 23 may be used as a rear image pickup device, and the image pickup device 23 may be a rotary type image pickup device, which is not limited herein.
It should be clear that, the present application does not limit the specific structure of the mobile terminal 200, as long as the mobile terminal 200 has an accommodating cavity 201 for accommodating the camera device 23, and the camera device 23 can extend out of or retract into the accommodating cavity.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a position detection mechanism 100 according to an embodiment of the present application. In some embodiments, the position detecting mechanism 100 includes a device under test 90, a driving assembly 30, and a first detecting member 50. The camera 231 is arranged on the piece to be tested 90; the dut 90 includes a contact end 91. The first detecting element 50 is disposed corresponding to the contact end 91. The driving assembly 30 is configured to drive the to-be-detected member 90 to move relative to the first detecting member 50, so that the contact end 91 contacts with or leaves the first detecting member 50. The first detecting member 50 is used for detecting the position of the member to be detected 90. When the contact terminal 91 and the first detecting element 50 change from a contact state to a contact state or from a contact state to a contact state, the state of the signal generated by the first detecting element 50 changes, thereby indicating different position states of the camera 231.
The state of the signal generated by the first detecting element 50 may be a change from absence to presence of the signal, a change from presence to absence of the signal, a change from a large value to a small value of the signal, or a change from a small value to a large value of the signal, which is not limited herein.
In addition, the mobile terminal 200 further includes a circuit board 202 disposed within the housing 22. The circuit board 202, also called a motherboard in the mobile terminal 200, is one of the most basic and important components of the mobile terminal 200, and various control chips (such as a processor and an I/O control chip) and various electronic components (such as various chips, resistors, capacitors, etc.) are mounted on the circuit board 202 and have wires distributed thereon. The first detecting member 50 can be electrically connected to a target component (e.g., a processor) disposed on the circuit board 202 through a specific circuit. The target element determines the position state of the camera 231 according to the state of the signal generated by the first detecting member 50.
Mobile terminal 200 and position detection mechanism 100 in this application embodiment, owing to be provided with first detection piece 50, just drive assembly 30 can drive it is relative to await measuring piece 90 first detection piece 50 removes, so that contact jaw 91 with contact or leave first detection piece 50, and then can through first detection piece 50 with the position state of connecting piece is instructed in the physical contact of contact jaw 91, has improved the detection precision to the position state of camera 231, confirms the position state of camera 231 through the physical contact between the component promptly, has the advantage that stability is stronger and do not receive external environment's interference, and then has improved the detection precision to camera 231 position state.
In order to make the mobile terminal 200 thinner and lighter and better mount and fix the first detecting member 50 and the driving assembly 30, in one embodiment, the position detecting mechanism 100 further includes a first carrying member 10, the to-be-detected member 90 includes a second carrying member 20 and a connecting member 40 fixedly connected to each other, and the first carrying member 10 and the second carrying member 20 are arranged side by side. The driving assembly 30 and the first detecting member 50 are disposed on the first carrying member 10. The connecting member 40 is bridged between the second supporting member 20 and the first supporting member 10, and the contact end 91 is disposed on the connecting member 40. The driving assembly 30 drives the connecting member 40 to move the second bearing member 20 relative to the first bearing member 10. The camera 231 is disposed on the second supporting member 20, and the driving assembly 30 drives the connecting member 40 to drive the second supporting member 20 to move, so as to drive the camera 231 to extend or retract into the housing 22. Specifically, the camera 231 is fixedly disposed at one end of the second carrier 20 close to the opening 221.
It should be noted that the second carrier 20 and the connecting member 40 may be a unitary structure or may be separate two elements. When the second bearing member 20 and the connecting member 40 are two independent elements, the fixing positions of the connecting member 40 and the second bearing member 20 can be adjusted, so that the position detecting mechanism 100 has better applicability, and the position of the connecting member 40 can be adjusted according to the specific space condition of the installation environment.
In one embodiment, the first carrier 10 is a driving component support and is used for carrying and fixing the driving component 30, and the second carrier 20 is a camera support and is used for carrying and fixing the camera 231.
In the above embodiment, although the position state of the camera 231 can be detected by the first detecting member 50 disposed on the first carrier 10, the specific position of the first detecting member 50 and the position state of the position where the camera 231 can be detected are not limited, and therefore, in some embodiments, in order to detect the position state of whether the camera 231 is in the extended position, the first detecting member 50 is disposed at one end of the first carrier 10 close to the opening 221 (as shown in fig. 4). Specifically, when the driving assembly 30 drives the connecting member 40 to drive the second carrying member 20 to move toward the direction close to the opening 221, if the connecting member 40 contacts the first detecting member 50, it can be determined that the second carrying member 20 moves along the first direction to reach the first preset position, that is, the camera 231 is at the extending position.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a position detection mechanism 100 according to another embodiment of the present application. In some embodiments, to detect whether the camera 231 is in the retracted position, the first detecting member 50 is disposed at an end of the first carrier 10 away from the opening 221. Specifically, when the driving assembly 30 drives the connecting member 40 to drive the second carrying member 20 to move in a direction away from the opening 221, if the connecting member 40 contacts the first detecting member 50, it can be determined that the second carrying member 20 moves in the second direction to reach a second preset position, that is, the camera 231 is in the retracted position. Wherein the first direction and the second direction are opposite.
The "extending position" refers to a position where the camera 231 extends out of the accommodating cavity 201 of the mobile terminal 200 and is located outside the accommodating cavity 201; the "retracted position" refers to a position where the camera 231 is located in the receiving cavity 201 of the mobile terminal 200; and a process of retracting the camera 231 from the outside of the receiving cavity 201 to the inside of the receiving cavity 201 is defined as a "retracting process"; the process of the camera 231 extending out of the accommodating cavity 201 from the accommodating cavity 201 is defined as an extending process.
The mobile terminal 200 and the position detecting mechanism 100 in the above embodiment are provided with only the first detecting member 50, and thus it can be determined whether the camera 231 is in the extended position or the retracted position only by the first detecting member 50. However, in practical applications, the camera 231 is in the extended position to facilitate the user to take a picture, and when the camera 231 is not in use, the housing 22 needs to be retracted to protect the camera 231. Therefore, in practical use, the extended position and the retracted position of the camera 231 need to be detected to ensure a better photographing effect and to facilitate protection of the camera 231.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a position detecting mechanism in a further embodiment of the present application, in order to ensure the accuracy of detecting the extended position of the camera 231 and the accuracy of detecting the retracted position of the camera 231, in some embodiments, the position detecting mechanism 100 further includes a second detecting element 60. The second detecting member 60 and the first detecting member 50 are respectively disposed at two ends of the first bearing member 10 along the moving direction of the second bearing member 20, and the connecting position of the connecting member 40 and the driving assembly 30 is located between the first detecting member 50 and the second detecting member 60. The link 40 moves between the first sensing member 50 and the second sensing member 60 under the driving of the driving assembly 30. The first detecting member 50 is close to the opening 221, and the second detecting member 60 is far from the opening 221, that is, the first detecting member 50 detects the extending position of the camera 231, and the second detecting member 60 detects the retracting position of the camera 231.
Referring to fig. 7, in order to improve the motion precision of the second carrier 20 and improve the operation reliability of the mobile terminal 200, in one embodiment, the driving assembly 30 includes a driving member 31 and a screw rod 32. The driving member 31 is located in the accommodating cavity 201, and the screw rod 32 is rotatably connected with the driving member 31. The first end of the connecting member 40 is rotatably connected to the screw rod 32, and the second end of the connecting member 40 is fixedly connected to the second carrier 20. When the driving element 31 drives the screw rod 32 to rotate, the second bearing element 20 can be driven to move by the connecting element 40. In the present embodiment, the connecting member 40 is sleeved on the screw rod 32 and is screwed with the screw rod 32.
In some embodiments, the first carrier 10 includes a main body 11, a first mounting portion 12, and a second mounting portion 13. The main body 11 is fixed on the inner wall of the receiving cavity 201. The first mounting portion 12 is protrudingly provided on one end portion of the main body 11, and the second mounting portion 13 is protrudingly provided on the other end portion of the main body 11. The second mounting portion 13 is disposed adjacent to the opening 221. Specifically, the first mounting portion 12 includes a substantially sleeve-shaped base, and the driving member 31 is accommodated in the base and attached to an inner wall of the base, so as to prevent the driving member 31 from shaking and vibrating, thereby ensuring the shooting quality of the camera 231. The second mounting portion 13 is provided with a mounting hole 131. One end of the screw rod 32 is rotatably connected with the driving part 31, and the screw rod 32 is far away from one end of the driving part 31 and the mounting hole 131 of the second mounting part 13, so that the driving assembly 30 is mounted and fixed, and the mounting structure is simple.
In some embodiments, in order to reduce the weight of the camera device 23 and facilitate the development of the mobile terminal 200 in a light weight and a thin weight, the first carrier 10 is made of plastic. In other embodiments, the first carrier 10 may be made of other materials, which is not limited herein.
In addition, in order to improve the accuracy of the rotation control of the screw 32, in some embodiments, the driving member 31 is a stepping motor. In other embodiments, the driving member 31 may also be a driving device such as an air cylinder, an oil cylinder, etc., and is not limited herein.
Referring to fig. 8, when the driving member 31 drives the screw rod 32 to rotate counterclockwise, the connecting member 40 drives the second carrier 20 to move along a first direction, so that the camera 231 moves towards the opening 221; when the second bearing member 20 moves to the first preset position, i.e. the camera 231 is in the extended position, the connecting member 40 contacts with the first detecting member 50.
Referring to fig. 9, when the driving member 31 drives the screw rod 32 to rotate clockwise, the connecting member 40 drives the second carrier 20 to move along the second direction, so that the camera 231 moves away from the opening 221; when the second carrier 20 moves to a second preset position, i.e. the camera 231 is in the retracted position, the connecting member 40 contacts the second detecting member 60. When the camera 231 is in the extending process or the retracting process, the connecting member 40 is not in contact with both the first detecting member 50 and the second detecting member 60.
It should be noted that the rotation direction of the driving member 31 for driving the lead screw 32 is not limited, for example, when the driving member 31 drives the lead screw 32 to rotate clockwise, the camera 231 can extend out of the housing 22 from the opening 221, and when the driving member 31 drives the lead screw 32 to rotate counterclockwise, the camera 231 can retract into the housing 22 from the opening 221.
Referring again to fig. 6, in order to reduce the cost and complexity of the first detecting element 50 and the second detecting element 60, in some embodiments, the first detecting element 50 and the second detecting element 60 are both metal contacts. For example, the first detecting member 50 and the second detecting member 60 may be a pair of spaced metal contacts, and the connecting member 40 is a metal connecting member. Therefore, when the connecting member 40 is in contact with the first detecting member 50, the first detecting member 50 is in a conducting state; when the connecting member 40 contacts the second detecting member 60, the second detecting member 60 is in a conductive state. When neither of the connecting members 40 is in contact with the first detecting member 50 or the second detecting member 60, the first detecting member 50 and the second detecting member 60 are in a disconnected state. In addition, the first detecting member 50 and the second detecting member 60 may be a metal contact, in which case the connecting member 40 is a metal member and one end thereof is grounded.
In other embodiments, the connecting member 40 may also be made of an insulating material, and the positions of the connecting member 40 for contacting the first detecting member 50 and the second detecting member 60 are respectively provided with a first metal contact piece 41 and a second metal contact piece 42, so that the weight of the position detecting mechanism 100 can be reduced and the installation can be facilitated.
Referring to fig. 10, fig. 10 is a schematic view illustrating an operation principle of the first detecting element 50 or the second detecting element 60. In this embodiment, the first detecting element 50 will be described as an example. In the present embodiment, the circuit board 202 is provided with a first resistor R1, a second resistor R2, and a processor 24. A first terminal of the first resistor R1 is electrically connected to a power source VCC (e.g., a battery) in the mobile terminal 200, and a second terminal of the first resistor R1 is grounded through the second resistor R2. One pin of the processor 24 is connected to a connection node N between the first resistor R1 and the second resistor R2. One of the metal contacts of the first sensing piece 50 is connected to a connection node N between the first resistor R1 and the second resistor R2, and the other of the metal contacts of the first sensing piece 50 is grounded. Thus, when the connector 40 is not in contact with the first detecting element 50, the two metal contacts are in an open state, and the voltage at the connection node N is the divided voltage of the second resistor R2, i.e. the pin of the processor 24 detects a high signal. For example, when the power supply voltage is 5V, the divided voltage at the connection node N is 5V × R2/(R1+ R2). When the connecting member 40 contacts the first detecting member 50, the two metal contacts are in a conducting state, and at this time, the connecting node N is grounded, that is, the processor 24 detects a low-level signal. Therefore, when the pin of the processor 24 detects that the connection node N changes from a high level signal to a low level signal, it can be determined that the connection member 40 is in contact with the first detection member 50, and the second bearing member 20 moves to the first preset position, i.e. the camera 231 is in the extended position.
Referring to fig. 6 again, the installation positions of the first detecting element 50 and the second detecting element 60 may affect the contact degree of the connecting element 40 with the first detecting element 50 and the second detecting element 60, respectively, for example, if the first detecting element 50 is disposed on the side of the second installation part 13 far from the first installation part 13, even if the camera 231 reaches the extending position, the connecting element 40 may not contact with the first detecting element 50, and thus the situation of erroneous determination may occur. Therefore, in order to facilitate the contact between the connecting member 40 and the first detecting member 50 and the second detecting member 60 and reduce the occurrence of misjudgment, in some embodiments, the first detecting member 50 is disposed on a side of the second mounting portion 13 close to the first mounting portion 12. The second detecting member 60 is disposed on a side of the first mounting portion 12 close to the second mounting portion 13.
Referring to fig. 11, fig. 11 is a block diagram of a mobile terminal 200 according to an embodiment of the present application. The mobile terminal 200 further comprises at least one processor 24, a communication bus 25, at least one communication interface 26 and a memory 27. It is understood that fig. 11 is only an example of the mobile terminal 200 and does not constitute a limitation to the mobile terminal 200, and that the mobile terminal 200 may include more or less components than those shown in fig. 11, or may combine some components, or different components, for example, the mobile terminal 200 may further include an input-output device, a network access device, and the like.
The processor 24 is communicatively connected to the at least one communication interface 26, the memory 27, the display screen 21, the driving member 31, the first detecting member 50 and the second detecting member 60 through the communication bus 25. The Processor 24 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like, which is the control center of the mobile terminal 200 and connects the various parts of the entire mobile terminal 200 using various interfaces and lines. The communication bus 25 may include a path to transfer information between the aforementioned components.
The communication interface 26 may be any device, such as a transceiver, for communicating with other devices or communication networks, such as an ethernet, a Radio Access Network (RAN), a Wireless Local Area Network (WLAN), etc.
The memory 27 may be used for storing computer programs and/or modules, and the processor 24 implements various functions of the mobile terminal 200 by operating or executing the computer programs and/or modules stored in the memory 27 and calling data stored in the memory 27. The memory 27 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, application programs required for a plurality of functions (such as a sound playing function, an image playing function, etc.), and the like; the data storage area may store data (such as audio data, a phonebook, etc.) created according to the use of the mobile terminal 200, and the like. In addition, the memory 27 may include a high speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), a plurality of magnetic disk storage devices, a Flash memory device, or other volatile solid state storage devices. The memory 27, which may be separate, is coupled to the processor 24 via the communication bus 25. The memory 27 may also be integrated with the processor 24.
In one implementation, the processor 24 may include one or more CPUs, such as CPU0 and CPU1 in fig. 11, for example.
In particular implementations, mobile terminal 200 may include multiple processors, such as processor 24 and processor 241 in FIG. 11, for example, as an example. Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
In an embodiment of the present application, when the camera 231 needs to extend out of the housing 22, the processor 24 may send a control signal to the driving member 31 to control the driving member 31 to operate, so as to drive the connecting member 40 to drive the second supporting member 20 to move, so that the camera 231 moves along a direction of extending out of the opening 221 of the mobile terminal 200, or moves along a direction of retracting back into the receiving cavity 201 of the mobile terminal 200, and the processor 24 may determine a position state of the camera 231 according to a signal state generated by the first detecting member 50.
In one embodiment, when a triggering operation of a user input is received, the processor 24 controls the driving assembly 30 to drive the connecting member 40 to move the second bearing member 20 in a predetermined direction. The processor 24 further detects a signal state generated by the first detecting element 50, and determines that the camera 231 is in the extended position or the retracted position when it is detected that the signal state generated by the first detecting element 50 changes within a first preset time.
In some embodiments, when the position detecting mechanism 100 is the structure shown in fig. 4, the first detecting member 50 is disposed at an end of the first carrying member 10 close to the opening 221. The triggering operation input by the user includes a triggering operation for starting the camera 231. When a triggering operation of user input is received, the processor 24 controls the driving assembly 30 to drive the connecting member 40 to drive the second bearing member 20 to move towards a preset direction, including: when a triggering operation for starting the camera 231 is received, which is input by a user, the processor 24 controls the driving assembly 30 to drive the connecting member 40 to drive the second bearing member 20 to move toward the opening. When it is detected that the state of the signal generated by the first detecting element 50 changes within a first preset time, determining that the camera 231 is in the extended position or the retracted position includes: when it is detected that the state of the signal generated by the first detecting element 50 changes within a first preset time, it is determined that the camera 231 is located at the extended position. In this way, the protruding position of the camera 231 can be detected with high accuracy.
In some embodiments, when the position detecting mechanism 100 is the structure shown in fig. 5, the first detecting member 50 is disposed at an end of the first carrying member 10 away from the opening 221. The triggering operation input by the user includes a triggering operation for turning off the camera 231. When a triggering operation of user input is received, the processor 24 controls the driving assembly 30 to drive the connecting member 40 to drive the second bearing member 20 to move towards a preset direction, including: when a triggering operation for closing the camera 231 is received, which is input by a user, the processor 24 controls the driving assembly 30 to drive the connecting member 40 to drive the second bearing member 20 to move in a direction away from the opening 221. When it is detected that the state of the signal generated by the first detecting element 50 changes within a first preset time, determining that the camera 231 is in the extended position or the retracted position includes: when it is detected that the state of the signal generated by the first detecting element 50 changes within a first preset time, it is determined that the camera 231 is in the retracted position.
In some embodiments, when the position detecting mechanism 100 is the structure shown in fig. 6, the position detecting mechanism 100 further includes a second detecting member 60, and the first detecting member 50 is close to the opening 221. When a triggering operation for starting the camera 231 is received by the user, the processor 24 controls the driving assembly 30 to drive the connecting member 40 to drive the second bearing member 20 to move towards the direction extending out of the opening; the processor 24 further detects a signal state generated by the first detecting element 50, and determines that the camera 231 is in the extended position when detecting that the signal state generated by the first detecting element 50 changes within a first preset time. When a triggering operation for closing the camera 231 is received by the user input, the processor 24 controls the driving assembly 30 to drive the connecting member 40 to move the second bearing member 20 toward the direction of retracting the opening 221; the processor 24 further detects a signal state generated by the second detecting element 60, and determines that the camera 231 is in the retracted position when detecting that the signal state generated by the second detecting element 60 changes within a first preset time.
When it is determined that the camera 231 is located at the extended position, if the processor 24 does not receive a trigger operation of closing the camera by the user, the camera 231 should always be located at the extended position. However, when the camera 231 receives the pressing of the external force, for example, when the user wants to manually press the camera 231 to retract the camera 231 into the housing 22, the camera 231 should be retracted into the housing 22 in accordance with the action control of the user, so as to better realize the human-computer interaction. In addition, if the camera 231 touches an obstacle and is pressed due to the falling of the mobile terminal 200, the camera 231 should be retracted into the housing 22 to protect the camera 231, and therefore, when the camera 231 is in the extended position, it is important to determine whether the camera 231 is pressed by an external force.
When it is determined that the camera 231 is in the extended position, the link 40 is always in contact with the first detecting member 50. At this time, the state of the signal generated by the first detecting member 50 is constant. When the camera 231 is pressed by an external force, the second carrier 20 moves in a direction of retracting the housing 22 under the action of the external force, and further drives the connecting member 40 to move in a direction away from the first detecting member 50, so that the connecting member 40 and the first detecting member 50 are in a separated state, and at this time, a signal state generated by the first detecting member 50 changes due to the fact that the first detecting member 50 and the connecting member 40 are in the separated state from a contact state.
Therefore, in order to better detect whether the camera 231 receives external force pressing, in some embodiments, when the camera 231 is determined to be in the extended position, the processor 24 further detects a signal state generated by the first detecting element 50, and when it is detected that the signal state generated by the first detecting element 50 changes, determines that the camera 231 is in the external force pressing state.
However, the signal state of the first detecting member 50 is changed, and may not be pressed by an external force subjectively applied by the user, and may be erroneously touched to the camera 231 during photographing. Therefore, in order to avoid the misjudgment, in some embodiments, when the change of the signal state of the first detecting element 50 is detected, the processor 24 further determines whether the duration of the change of the signal state of the first detecting element reaches a second preset time; when the duration of the change of the signal state of the first detecting member 50 reaches the second preset time, it is determined that the camera 231 is in an external force pressing state. The second preset time and the first preset time may be the same or different, and are not limited herein.
The following is an exemplary description of how processor 24 of mobile terminal 200 determines the particular case of the triggering operation in which the user input is received.
One case is shown in fig. 12, in which the mobile terminal 200 is taken as a mobile phone as an example to exemplarily explain the case, when the mobile terminal 200 shown in this embodiment is installed with a camera application corresponding to the image capturing device 23, the interface of the mobile terminal 200 may display the first icon 203 of the camera application. The camera application includes application software capable of applying the camera device 23, such as WeChat, QQ, and the like. The processor 24 of the mobile terminal 200 controls the mobile terminal 200 to enter a photographing interface when detecting that the first icon 203 of the camera application receives a click event input by a user. The processor 24 controls the driving member 31 to drive the screw rod 32 to rotate, so that the camera 231 extends out of the housing 22 from the opening 221 to reach a preset shooting position and is located at an extended position.
Fig. 13 shows a case, in which the mobile terminal 200 is taken as a mobile phone for example, the mobile terminal 200 includes a first camera device and a second camera device 28, where the first camera device is the camera device 23 that can be extended from and retracted from the housing 22 through the opening 221, and the second camera device 28 is fixedly embedded in the back of the mobile terminal 200 for use as a rear camera device, in a case that the mobile terminal 200 shown in this embodiment is equipped with a camera application, when the processor 24 of the mobile terminal 200 detects that the first icon 203 of the camera application receives a click event input by a user (similar to the interface of the mobile terminal shown in fig. 12), referring to fig. 14, the processor 24 controls the mobile terminal 200 to enter the shooting interface 29, and the shooting interface 29 includes a second icon 291. In this embodiment, the second icon 291 is an application icon for switching the image capturing device, and when the processor 24 detects that the second icon 291 receives a click event input by a user, the processor 24 controls the image capturing device to be switched. For example, the second camera 28 currently used by the mobile terminal 200 is switched to the first camera, or the first camera currently used by the mobile terminal 200 is switched to the second camera 28.
For example, the content displayed by the processor 24 controlling the mobile terminal 200 entering the shooting interface 29 is a picture obtained by the second camera 28, that is, the camera currently operated by the mobile terminal 200 is the second camera 28, and when the processor 24 detects that the second icon 291 receives a click event input by the user, the processor 24 controls to turn on the first camera, so that the first camera extends out of the housing 22 and switches to operate the first camera. For another example, the processor 24 controls the mobile terminal 200 to enter the shooting interface 29 to display a picture acquired by the first camera device, that is, the camera device in which the mobile terminal 200 is currently operating is the first camera device, and when the processor 24 detects that the second icon 291 receives a click event input by the user, the processor 24 controls to turn off the first camera device so that the first camera device retracts into the housing 22 and switches to the second camera device 28 to operate.
Referring to fig. 12 again, the mobile terminal 200 may be provided with a plurality of physical keys 204. In one embodiment, one of the physical keys 204 is a start key of the camera 23. When the processor 24 detects a trigger event of the user to the start key, the camera 23 is controlled to be started or closed. In one embodiment, when the processor 24 of the mobile terminal 200 detects a trigger event of one of the physical keys by the user, the processor 24 controls the camera 23 to be started.
It should be noted that, in the present application, the application of the position detection mechanism 100 to the mobile terminal 200 is only one application example, and the position detection mechanism 100 may obviously be applied to other structures (for example, a gastroscopic probe), and is not limited to the mobile terminal 200.
Referring to fig. 15, fig. 15 is a flowchart illustrating a position detection method according to a first embodiment of the present application. The location detection method is applied to the mobile terminal 200 shown in fig. 3. When the position detection mechanism 100 has the structure shown in fig. 4 or 5, the position detection method includes the following steps:
step S1501, when a trigger operation input by a user is received, controlling the driving assembly to drive the to-be-detected piece to drive the camera to move towards a preset direction.
Wherein the preset direction comprises a first direction or a second direction; the triggering operation input by the user includes a triggering operation for starting the camera 231 or a triggering operation for closing the camera 231. For example, when a triggering operation of turning on the camera 231 is received, which is input by a user, the driving assembly 30 is controlled to operate to drive the to-be-tested object 90 to drive the camera 231 to move towards the first direction, so that the camera 231 extends out of the housing 22; or, when a triggering operation of turning off the camera 231 by user input is received, the driving assembly 30 is controlled to operate to drive the to-be-tested piece 90 to drive the camera 231 to move towards the second direction, so that the camera 231 retracts into the housing 22.
In step S1502, the signal state generated by the first detecting element is detected.
Step S1503, determining that the camera is in the extended position or the retracted position when it is detected that the state of the signal generated by the first detecting element changes within a first preset time. When the contact end and the first detection piece are changed from a separation state to a contact state, the state of a signal generated by the first detection piece is changed.
In the position detection method in the embodiment of the present application, the position state of the camera 231 is determined according to the signal state of the first detection element 50, and the position detection method has good stability and is not interfered by an external environment, so that the detection precision of the position state of the camera 231 is improved.
Referring to fig. 16, fig. 16 is a flowchart illustrating a position detection method according to a second embodiment of the present application. In some embodiments, the location detection method is applied to the mobile terminal 200 shown in fig. 3. The triggering operation input by the user includes a triggering operation for starting the camera 231. When the position detection mechanism 100 has the structure shown in fig. 4, the position detection method further includes the steps of:
step S1601, when a triggering operation for starting the camera input by a user is received, controlling a driving component to drive the piece to be tested to drive the camera to move towards a direction extending out of the opening.
Step S1602, detecting a signal state generated by the first detecting element.
Step S1603, when it is detected that the state of the signal generated by the first detecting member changes within a first preset time, it is determined that the camera is located at an extending position.
Referring to fig. 17, fig. 17 is a flowchart illustrating a position detection method according to a third embodiment of the present application. In some embodiments, the location detection method is applied to the mobile terminal 200 shown in fig. 3. The triggering operation input by the user includes a triggering operation for turning off the camera 231. When the position detection mechanism 100 has the structure shown in fig. 5, the position detection method further includes the steps of:
step 1701, when a triggering operation for starting the camera input by a user is received, controlling a driving component to drive the piece to be tested to drive the camera to move towards the direction of retracting the opening.
In step S1702, the signal state generated by the first detecting element is detected.
Step S1703, when it is detected that a state of a signal generated by the first detecting element changes within a first preset time, it is determined that the camera is in a retracted position.
Referring to fig. 18, fig. 18 is a flowchart illustrating a position detection method according to a fourth embodiment of the present application. In some embodiments, the location detection method is applied to the mobile terminal 200 shown in fig. 3. The triggering operation input by the user includes a triggering operation for starting the camera 231 and a triggering operation for closing the camera 231. When the position detection mechanism 100 has the structure shown in fig. 6, the position detection method further includes the steps of:
step S1801, when a triggering operation for starting the camera input by a user is received, controlling the driving component to drive the to-be-detected object to drive the camera to move towards a direction extending out of the housing.
Step S1802, detecting a state of a signal generated by the first detecting element.
Step S1803, when it is detected that the state of the signal generated by the first detecting element changes within a first preset time, it is determined that the camera is located at the extended position.
Step S1804, when a triggering operation for starting the camera input by the user is received, controlling the driving assembly to drive the to-be-detected object to drive the camera to move in a direction of retracting the housing.
Step S1805, detecting a signal state generated by the second detecting element.
Step S1806, when it is detected that the state of the signal generated by the second detecting element changes within a first preset time, it is determined that the camera is in the retracted position.
Referring to fig. 19, fig. 19 is a flowchart illustrating a position detection method according to a fifth embodiment of the present application. In some embodiments, the location detection method is applied to the mobile terminal 200 shown in fig. 3. When the position detection mechanism 100 has the structure shown in fig. 4 or fig. 6, the position detection method further includes the steps of:
in step S1901, when the camera is located at the extended position, a signal state of the first detecting element is detected.
Step S1902, determining whether a signal state of the first detecting element changes. If yes, go to step S1903; if not, the process continues to step S1902.
Step S1903, determine whether the duration of the change of the signal state of the first detecting element is greater than a second preset time. If yes, go to step S1904; if not, the process continues to step S1903.
The second preset time may be the same as or different from the first preset time, and is not limited herein.
Step S1904, determining that the camera is in an external force pressing state.
It should be noted that, for simplicity of description, the above-mentioned embodiments of the method are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the order of acts described, as some steps may be performed in other orders or simultaneously according to the present application.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The steps in the method of the embodiment of the application can be sequentially adjusted, combined and deleted according to actual needs.
The location detection methods provided herein may be implemented in hardware, firmware, or as software or computer code that may be stored in a computer-readable storage medium, such as a Read-Only Memory (ROM), Random Access Memory (RAM), floppy disk, hard disk, or magneto-optical disk, or as computer code that is originally stored on a remote or non-transitory machine-readable medium, downloaded over a network, and stored in a local recording medium, such that the methods described herein may be presented using a general-purpose computer or special-purpose processor, or as software stored on a recording medium in programmable or special-purpose hardware, such as an Application Specific Integrated Circuit (ASIC) or Field Programmable Gate Array (FPGA). As can be appreciated in the art, a computer, processor, microprocessor, controller or programmable hardware includes memory components, e.g., RAM, ROM, flash memory, etc., which can store or receive software or computer code when accessed and executed by a computer, processor or hardware implementing the processing methods described herein. In addition, when a general-purpose computer accesses code for implementing the processing shown herein, execution of the code transforms the general-purpose computer into a special-purpose computer for performing the processing shown herein.
The computer readable storage medium may be a solid state memory, a memory card, an optical disc, etc. The computer-readable storage medium stores program instructions for a computer, a mobile phone, a tablet computer, or a mobile terminal of the present application to call and then execute the position detection method shown in fig. 15 to 19.
The foregoing is an implementation of the embodiments of the present application, and it should be noted that, for those skilled in the art, several modifications and decorations can be made without departing from the principle of the embodiments of the present application, and these modifications and decorations are also regarded as the protection scope of the present application.