Position detection mechanism and position detection method

The position detection mechanism for camera devices in mobile terminals uses a Hall sensor with multiple working surfaces and strategically placed magnets to improve the accuracy of camera position detection, addressing the limitations of existing technologies and enhancing both performance and longevity.

JP7662163B2Active Publication Date: 2025-04-15HONOR DEVICE CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2023044990
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-03-29
Filing Date
2023-03-22
Publication Date
2025-04-15
Estimated Expiration
2040-03-27

AI Technical Summary

Technical Problem

Existing position detection mechanisms for camera devices in mobile terminals lack accuracy in determining the telescopic position and state of the camera, which affects the shooting effect and the longevity of the camera device.

Method used

A position detection mechanism that includes a Hall sensor with multiple working surfaces and magnets, allowing for the generation of multiple induction signals to accurately determine the positional state of the camera device, thereby improving detection accuracy.

Benefits of technology

The proposed mechanism enhances the accuracy of camera position detection, ensuring better shooting performance and extending the lifespan of the camera device by precisely determining its telescopic state.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007662163000001
    Figure 0007662163000001
  • Figure 0007662163000002
    Figure 0007662163000002
  • Figure 0007662163000003
    Figure 0007662163000003
Patent Text Reader

Abstract

To provide a position detection mechanism, a mobile terminal and a position detection method.SOLUTION: A mobile terminal includes: a camera; and a position detection mechanism 100 that is arranged in an accommodating cavity. The position detection mechanism includes: a circuit board; a bracket; a first magnet 30; and a Hall sensor 50. The camera of the mobile terminal is arranged on the bracket, and the camera can stretch out of or retract into the accommodating cavity constituted by a housing. The Hall sensor includes a first working surface and a second working surface that respectively extend in different directions. The Hall sensor senses a magnetic field of the first magnet through the first working surface and the second working surface and generates induction signals. The induction signals are used to determine a stretching-out position and a retracting position of the camera. According to the present application, the Hall sensor senses the magnetic field of the first magnet to generate two induction signals, so that detection accuracy of a position state of the camera can be improved.SELECTED DRAWING: Figure 5
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This application claims priority from Chinese Patent Application No. 201910249922.9, entitled "Location Detection Mechanism, Mobile Terminal, and Location Detection Method," filed with the State Intellectual Property Office of the People's Republic of China on March 29, 2019, which is incorporated herein by reference in its entirety.

[0002] The present application relates to the field of communication technologies, and in particular to a location detection mechanism, a mobile terminal, and a method for locating a communication product. [Background technology]

[0003] With the development and popularization of science and technology, position detection mechanisms (e.g., position detection components of retractable cameras and position detection components of retractable gastroscope probes) have been widely used. For example, to solve the problem that the front camera device occupies the display area, a retractable camera assembly may be disposed in a mobile terminal. The components of the retractable camera may include a camera device and a motor for moving the camera device. The camera device of the retractable camera assembly can be extended outside the mobile terminal when it needs to be photographed, and can be retracted into the storage space of the mobile terminal when it does not need to be photographed.

[0004] However, how to accurately detect the position of the camera device (i.e., the telescopic position and telescopic state of the camera) to ensure better shooting effects and protect the camera device is a goal that the industry continues to pursue. Summary of the Invention

[0005] The embodiments of the present application disclose a position detection mechanism, a mobile terminal, and a position detection method that can improve detection accuracy.

[0006] According to a first aspect, an embodiment of the present disclosure discloses a position detection mechanism. The mechanism includes a first body, a second body spaced apart from the first body and movable relative to the first body, a first magnet disposed on the second body, and a Hall sensor disposed on the first body and including a first working surface and a second working surface extending in different directions. The Hall sensor senses a magnetic field of the first magnet through the first working surface to generate a first induced signal, and the Hall sensor further senses a magnetic field of the first magnet through the second working surface to generate a second induced signal, and the first induced signal and the second induced signal are used to determine a position state of the second body. The position state of the second body includes a first position state in which the second body moves in a first direction to a first preset position, and a second position state in which the second body moves in a second direction to a second preset position. The second direction is opposite to the first direction.

[0007] The action surface refers to the magnetic sensing surface of the Hall sensor. In the position detection mechanism disclosed in this embodiment of the present application, since the Hall sensor includes a first action surface and a second action surface, the Hall sensor can sense the magnetic field of the first magnet through the first action surface to generate a first induced signal, and the Hall sensor further senses the magnetic field of the first magnet through the second action surface to generate a second induced signal. As a result, when the second body moves relative to the first body, the position state of the second body can be determined based on the two induced signals (the first induced signal and the second induced signal) output from the Hall sensor. In other words, the position state of the second body is determined only when both of the two signals satisfy a certain condition, thereby improving the detection accuracy.

[0008] In order to more strongly sense the magnetic field generated by the first magnet and further improve the detection accuracy, the moving direction of the first working surface and the moving direction of the second body are substantially perpendicular. The second working surface is substantially perpendicular to the first working surface, and both the first working surface and the second working surface are substantially perpendicular to the surface of the first body on which the Hall sensor is located. "Substantially perpendicular" may be interpreted as being vertical, being approximately vertical, or having a certain preset angle.

[0009] In some embodiments, the Hall sensor further includes a third working surface, the extension direction of which is different from the extension directions of both the first and second working surfaces, so as to detect interference from an external magnetic field. The Hall sensor senses the magnetic field of the first magnet and / or an external magnetic field through the third working surface and generates a third induced signal. The third induced signal is used to determine whether the position detection mechanism is interfered with by an external magnetic field. The external magnetic field is a magnetic field generated by an object other than the first and second magnets described below.

[0010] When there is no external magnetic field, the third induction signal generated by the Hall sensor does not change, and when there is an external magnetic field, the third induction signal generated by the Hall sensor changes; or when there is no external magnetic field, the third induction signal generated by the Hall sensor is 0, and when there is an external magnetic field, the third induction signal generated by the Hall sensor is not 0.

[0011] In one embodiment, the third working surface is substantially perpendicular to the first working surface and the second working surface, respectively, to reduce interference from existing magnetic fields and improve the accuracy of sensing the external magnetic field.

[0012] In order to improve the detection accuracy of the position state of the second body, the position detection mechanism further includes a second magnet. The second magnet and the first magnet are arranged at an interval on the second body. The Hall sensor senses the magnetic field of the first magnet and / or the second magnet through the first working surface to generate a first induced signal, and the Hall sensor further senses the magnetic field of the first magnet and / or the second magnet through the second working surface to generate a second induced signal. In this embodiment, since the first induced signal and the second induced signal are generated by sensing at least one of the two magnets, when the second body is moving, the first induced signal and the second induced signal show a relatively high rate of change. Furthermore, since the moving position of the second body can be determined based on the different first induced signal and second induced signal, the detection accuracy of the position state of the second body is improved.

[0013] As the second body moves relative to the first body, the first magnet and the second magnet move relative to the Hall sensor, but regardless of the position to which the second body moves relative to the first body, the Hall sensor is always located within the range of the magnetic field generated by the first magnet and the second magnet to ensure stability in the generation of the first and second induced signals by the Hall sensor.

[0014] In one embodiment, the magnetic field generated by the first magnet and the magnetic field generated by the second magnet are at least partially overlapped, so that when the second body moves relative to the first body, the magnetic flux sensed by the first and second working surfaces changes significantly, which can improve the sensitivity of the Hall sensor that senses the magnetic field, thereby improving the accuracy of detecting the state of the first body.

[0015] In this embodiment, both the first and second magnets are bar magnets to facilitate control of the production process and promote foolproofness when processing on a production line. In another embodiment, the first and second magnets may alternatively be cylindrical magnets having semicircular cross sections.

[0016] In one embodiment, to confirm the positional relationship between the Hall sensor and the first and second magnets when the second body moves, and to ensure that the Hall sensor can sense the magnetic field generated by the first and second magnets, a line connecting the center point of the first magnet and the center point of the second magnet is substantially parallel to the direction of movement of the second body. The center point refers to the center of gravity of the element. If an element is a regular object, the center point of the element is the geometric center of the regular object. "Substantially parallel" may be interpreted as parallel, approximately parallel, or having a certain preset angle.

[0017] In one embodiment, the north-south axis of the first magnet and the north-south axis of the second magnet are each substantially parallel to the direction of movement of the second body, such that when the second body moves, the Hall sensor can sense the overlapping magnetic fields generated by the first magnet and the second magnet.

[0018] Furthermore, to ensure the detection sensitivity of the Hall sensor and ensure that the rate of change of the magnetic flux passing through the first and second working surfaces meets certain requirements, the adjacent ends of the first and second magnets have the same polarity. In one embodiment, the magnetic poles with the same name are the north poles. The north-south axis is the vector of the magnet from the north pole to the south pole, i.e. the direction of the magnetic poles. The part of the magnet with the strongest magnetic force is called the magnetic pole. A magnet rotating freely in a horizontal plane always has one magnetic pole pointing to the south and the other magnetic pole pointing to the north when the magnet is stationary. The magnetic pole pointing to the south is called the south pole (south pole) and the magnetic pole pointing to the north is called the north pole (north pole).

[0019] According to a second aspect, an embodiment of the present disclosure discloses a mobile terminal including a display screen, a housing, and a camera device. The display screen is attached to the housing. The housing is provided with an opening, and a receiving cavity is formed to receive the camera device and communicate with the opening. The mobile terminal further includes a position detection mechanism disposed in the receiving cavity. The position detection mechanism includes a circuit board, a bracket, a first magnet, and a Hall sensor. The camera device includes a camera and a drive assembly. The camera is disposed on the bracket, and the drive assembly is connected to the bracket to move the bracket to extend the camera out of the housing or retract it into the housing. The Hall sensor includes a first action surface and a second action surface that respectively extend in different directions. The Hall sensor senses a magnetic field of the first magnet through the first action surface to generate a first induced signal, and the Hall sensor further senses a magnetic field of the first magnet through the second action surface to generate a second induced signal. The first induced signal and the second induced signal are used to determine a position state of the camera. The camera position states include a retracted position and an extended position.

[0020] The mobile terminal disclosed in this embodiment of the present application includes the position detection mechanism of the previously described embodiment, and the camera is arranged on a bracket, so that in order to improve the detection accuracy of the position state of the camera, the position state of the camera can be determined using the first induced signal and the second induced signal generated by the Hall sensor.

[0021] In one embodiment, the drive assembly includes a drive member, an adapter, and a lead screw. One end of the adapter is fixedly connected to the bracket, and the other end of the adapter is rotatably connected to the lead screw. The lead screw is further rotatably connected to the drive member. The drive member can rotate the lead screw, so that the adapter moves the bracket and the camera extends out of the housing through the opening or retracts into the housing. In this embodiment, the lead screw is configured to move the bracket, which effectively improves the moving accuracy of the bracket and improves the operation reliability of the mobile terminal.

[0022] In one embodiment, the Hall sensor is disposed on a surface of the circuit board facing the display screen, and the camera is disposed on a surface of the bracket facing the display screen. The direction of movement of the first working surface and the direction of movement of the bracket are substantially perpendicular. The second working surface and the first working surface are substantially perpendicular, and both the first working surface and the second working surface are substantially perpendicular to the surface of the circuit board facing the display screen.

[0023] In one embodiment, the Hall sensor further includes a third working surface, the extension direction of which is different from the extension directions of both the first working surface and the second working surface. The Hall sensor senses the magnetic field of the first magnet and / or an external magnetic field through the third working surface to generate a third induced signal. The third induced signal is used to determine whether the mobile terminal is interfered with by the external magnetic field.

[0024] In one embodiment, the third working surface is substantially parallel to a surface of the circuit board that faces the display screen.

[0025] Furthermore, the location detection mechanism of the mobile terminal may alternatively be the location detection mechanism in any one of the multiple embodiments of the first aspect described above.

[0026] In some embodiments, the mobile terminal further includes a processor for controlling the drive assembly based on the first and second induced signals generated by the Hall sensor. The processor is electrically connected to the drive assembly and the Hall sensor. When the processor receives a trigger operation input by a user, the processor controls the drive assembly to move to move the bracket, thereby extending the camera out of the housing through the opening or retracting the camera into the housing. The processor further obtains the first and second induced signals transmitted by the Hall sensor and determines a position state of the camera based on the obtained first and second induced signals.

[0027] The states of the camera include a retracted position, an extended position, a retraction process, or an extension process. The "retracted position" here means that the camera is located in the housing cavity of the mobile terminal. The "extended position" here means that the camera is extended out of the housing cavity of the mobile terminal and located outside the housing cavity. The "retraction process" here means the process in which the camera retracts from the outside of the housing cavity into the housing cavity. The "extension process" here means the process in which the camera extends from the housing cavity to the outside of the housing cavity.

[0028] In order to improve the accuracy of detecting the state of the camera, a reference signal is preset in the mobile terminal. In this way, the state of the camera can be accurately determined by comparing the first and second guiding signals with the preset reference signal. Thus, in some embodiments, the processor acquiring the first and second guiding signals transmitted by the Hall sensor and determining the state of the camera based on the acquired first and second guiding signals includes the processor acquiring the first and second guiding signals transmitted by the Hall sensor and determining whether the first and second guiding signals are continuously changing. If the first and second guiding signals no longer change, the processor calculates a difference between the first guiding signal and the first reference signal and a difference between the second guiding signal and the second reference signal, respectively. The first and second reference signals are guiding signals generated by the first and second working surfaces of the Hall sensor, respectively, when the camera is in the extended position. Alternatively, the first and second reference signals are guiding signals generated by the first and second working surfaces of the Hall sensor, respectively, when the camera is in the retracted position. The processor further determines whether the absolute value of the difference is smaller than a preset threshold value. If the absolute value of the difference is smaller than the preset threshold, the processor determines that the camera is in the extended or retracted position. If the first and second guiding signals are continuously changing, the processor determines that the camera is in the process of extending or retracting.

[0029] In order to avoid the presence of a magnetic field during the process of detecting the position of the camera and to avoid its influence on the detection accuracy, in some embodiments, when the first induction signal and the second induction signal no longer change, the processor further acquires a third induction signal generated by the third working surface of the Hall sensor, and calculates the difference between the acquired third induction signal and the steady-state signal. The processor further determines whether the absolute value of the difference is greater than a reference threshold. Only if the absolute value of the difference is not greater than the reference threshold, the processor respectively calculates the difference between the first induction signal and the first reference signal, and the difference between the second induction signal and the second reference signal. In this way, the influence of the external magnetic field on the calculation accuracy can be eliminated.

[0030] The steady-state signal is the induced signal generated by the third working surface of the Hall sensor in an environment where the mobile terminal is not subject to any external magnetic field.

[0031] When there is interference from an external magnetic field, the camera position detection will be in error, making the position detection meaningless. Therefore, in one embodiment, when the amount of change of the third induced signal compared with the steady-state signal is greater than a reference threshold, the mobile terminal is controlled to send instruction information to instruct the user to move away from the magnetic field.

[0032] In one embodiment, to accurately determine whether the camera is in the extended position, the trigger operation input by the user includes a trigger operation for activating the camera, the first reference signal includes a first extension reference signal, the second reference signal includes a second extension reference signal, and the preset threshold includes a first preset threshold. The first extension reference signal and the second extension reference signal are induced signals generated by the first and second working surfaces of the Hall sensor, respectively, when the camera is in the extended position. When the processor receives the trigger operation input by the user for activating the camera, the processor controls the drive assembly to move to move the second body in the first direction so that the camera is in the process of extension. The processor further obtains the first and second induced signals transmitted by the Hall sensor when the camera is in the process of extension, and determines whether the first and second induced signals are continuously changing. If the first and second induced signals no longer change, the processor calculates a difference between the first induced signal and the first extension reference signal, and a difference between the second induced signal and the second extension reference signal, respectively. The processor further determines whether the absolute value of the difference is less than a first preset threshold If the absolute value of the difference is less than the first preset threshold, the processor determines that the camera is in an extended position.

[0033] Further, to accurately determine whether the camera is in the retracted position, the trigger operation input by the user further includes a trigger operation for turning off the camera, the first reference signal includes a first retracted reference signal, the second reference signal includes a second retracted reference signal, and the preset threshold includes a second preset threshold. The first retracted reference signal and the second retracted reference signal are guiding signals generated by the first and second working surfaces of the Hall sensor, respectively, when the camera is in the retracted position. When the processor receives the trigger operation input by the user for turning off the camera, the processor controls the drive assembly to move in order to move the second body in the second direction so that the camera is in the retracted process. The processor further obtains the first and second guiding signals transmitted by the Hall sensor when the camera is in the retracted process, and determines whether the first and second guiding signals are continuously changing. If the first and second guiding signals no longer change, the processor calculates the difference between the first guiding signal and the first retracted reference signal, and the difference between the second guiding signal and the second retracted reference signal, respectively. The processor further determines whether the absolute value of the difference is smaller than a second preset threshold. If the absolute value of the difference is less than the second preset threshold, the processor determines that the camera is in a retracted position.

[0034] If the absolute value of the difference is not smaller than the first preset threshold, this indicates that the camera is not fully extended out of the housing. In this case, a possible reason is that the bracket is impeded in moving, for example, the resistance to the bracket's movement is greater than the driving force of the driving member, so that the bracket stops moving during the moving process. Another possible reason is that a certain structure of the mobile terminal is broken. In this case, if the driving member continues to move, the driving assembly and the bracket may be damaged. Therefore, in order to avoid this situation, in some embodiments, the processor controls the driving assembly to continue moving so as to make the bracket continue moving in the first direction, and determines whether the camera is in the extended position. If the camera is not yet in the extended position, the processor controls the driving assembly to move the bracket in the second direction so as to retract the camera into the housing, thereby protecting the bracket and the driving assembly.

[0035] Similarly, if the absolute value of the difference is not less than the second preset threshold, the processor controls the drive assembly to continue moving to cause the bracket to continue moving in the second direction and determines whether the camera is in a retracted position, and if the camera is not yet in the retracted position, the processor controls the drive assembly to stop moving.

[0036] If the processor does not receive a user trigger operation to turn off the camera when it is determined that the camera is in the extended position, the camera should always be in the extended position, i.e., the bracket is in the first preset position and does not move. However, when the camera is subjected to external pressure, for example, when the user manually pushes the camera to retract the camera into the housing, if the driving member is not yet moving in this case, it will affect the service life of the driving member or even damage the driving member. Therefore, in some embodiments, when it is determined that the camera is in the extended position, the processor further obtains the first and second guiding signals transmitted by the Hall sensor when the camera is in the extended position, and determines whether the first and second guiding signals are changing. If the first and second guiding signals are changing, the processor determines whether the amount of change of the first and second guiding signals is greater than a third preset threshold. If the amount of change of the first and second guiding signals is greater than the third preset threshold, the processor controls the driving assembly to move the bracket in the second direction, thereby retracting the camera into the housing.

[0037] However, the change of the first and second induction signals may not be caused by the movement of the bracket due to the external pressure on the camera. There may be interference of external magnetic field. Therefore, when the camera is in the extended position and the first and second induction signals output by the Hall sensor are changing, it is further necessary to determine whether there is interference of external magnetic field, so as to avoid inaccurate judgment and further to avoid the influence on the user experience. For example, when a user is using the camera to take a picture, if it is detected that the first and second induction signals output by the Hall sensor are changing in this case, and the camera is controlled to retract, the user's photography will be interrupted, resulting in an unsatisfactory user experience.

[0038] Thus, in some embodiments, before the processor controls the drive assembly to move the bracket in the second direction so that the camera retracts into the housing, the processor further obtains a third induced signal transmitted by the Hall sensor when the camera is in the extended position, and calculates a difference between the obtained third induced signal and a steady-state signal. The steady-state signal is an induced signal generated by the third active surface of the Hall sensor in an environment where the mobile terminal is not affected by an external magnetic field. The processor further determines whether the absolute value of the difference is greater than a fourth preset threshold. If the absolute value of the difference is not greater than the fourth preset threshold, the processor controls the drive assembly to move the bracket in the second direction, so that the camera retracts into the housing.

[0039] In one embodiment, if the absolute value of the difference is greater than a fourth preset threshold, the processor further controls the mobile terminal to send instruction information to instruct the user to move away from the external magnet.

[0040] Furthermore, if the processor determines that the camera is successfully extended and in the extended position, or that the camera is successfully retracted and in the retracted position, the processor further records the number of times the camera has been successfully extended or successfully retracted, respectively, to indicate the current state of the camera.

[0041] According to a third aspect, an embodiment of the present disclosure discloses a position detection method. The method is applied to a mobile terminal. The mobile terminal includes a housing, a circuit board, a bracket, and a camera device. The circuit board, the bracket, and the camera device are disposed in the housing. An opening is provided in the housing, and a receiving cavity for receiving the camera device is formed in communication with the opening. The camera device includes a camera and a drive assembly, the camera is disposed in the bracket, and the drive assembly is connected to the bracket. A Hall sensor is provided on the circuit board, and a first magnet is provided on the bracket. The position detection method includes a step of controlling the drive assembly to move the bracket in a preset direction when a trigger operation of a user is received, a step of acquiring a first induction signal and a second induction signal generated by the Hall sensor, the first induction signal being generated by a first working surface of the Hall sensor sensing a magnetic field of the first magnet, and the second induction signal being generated by a second working surface of the Hall sensor sensing a magnetic field of the first magnet, and a step of determining a position state of the camera based on the acquired first induction signal and second induction signal, the position state of the camera including an extended position and a retracted position.

[0042] In some embodiments, the step of determining the position state of the camera based on the acquired first and second guiding signals includes the steps of determining whether the first and second guiding signals are continuously changing; if the first and second guiding signals no longer change, calculating a difference between the first guiding signal and the first reference signal and a difference between the second guiding signal and the second reference signal, respectively, where the first reference signal and the second reference signal are guiding signals generated by the first and second acting surfaces of the Hall sensor, respectively, when the camera is in the extended position, or the first reference signal and the second reference signal are guiding signals generated by the first and second acting surfaces of the Hall sensor, respectively, when the camera is in the retracted position; determining whether the absolute value of the difference is smaller than a preset threshold; and determining that the camera is in the extended position or the retracted position if the absolute value of the difference is smaller than the preset threshold.

[0043] In some embodiments, if the first guiding signal and the second guiding signal are continuously changing, it is determined that the camera is in an extension process toward the extended position, or that the camera is in a retraction process toward the retracted position.

[0044] In one embodiment, before the step of "respectively calculating a difference between the first induced signal and the first reference signal, and a difference between the second induced signal and the second reference signal", the position detection method further includes a step of calculating a difference between the acquired third induced signal and a steady-state signal, where the third induced signal is generated by the third active surface of the Hall sensor sensing the magnetic field of the first magnet, and the steady-state signal is an induced signal generated by the third active surface of the Hall sensor in an environment where the mobile terminal is not affected by an external magnetic field; a step of determining whether the absolute value of the difference is greater than a reference threshold; and if the absolute value of the difference is not greater than the reference threshold, a step of respectively calculating the difference between the first induced signal and the first reference signal, and the difference between the second induced signal and the second reference signal.

[0045] In one embodiment, if the difference is greater than a reference threshold, the mobile terminal is controlled to transmit an indication.

[0046] In one embodiment, the trigger operation input by the user includes a trigger operation for activating the camera, the first reference signal includes a first extension reference signal, the second reference signal includes a second extension reference signal, and the preset threshold includes a first preset threshold. The first extension reference signal and the second extension reference signal are induced signals generated by the first and second acting surfaces of the Hall sensor, respectively, when the camera is in the extended position. Controlling the drive assembly to move the bracket in the preset direction upon receiving the trigger operation input by the user includes controlling the drive assembly to move the bracket in the first direction upon receiving the trigger operation input by the user for activating the camera. Respectively calculating a difference between the first induced signal and the first reference signal and a difference between the second induced signal and the second reference signal includes respectively calculating a difference between the first induced signal and the first extension reference signal and a difference between the second induced signal and the second extension reference signal. Determining whether the absolute value of the difference is less than the preset threshold includes determining whether the absolute value of the difference is less than a first preset threshold. Determining that the camera is in the extended or retracted position when the absolute value of the difference is less than the preset threshold includes determining that the camera is in the extended position when the absolute value of the difference is less than a first preset threshold.

[0047] In some embodiments, the trigger operation input by the user includes a trigger operation for turning off the camera, the first reference signal further includes a first retraction reference signal, the second reference signal further includes a second retraction reference signal, and the preset threshold further includes a second preset threshold. The first retraction reference signal and the second retraction reference signal are guiding signals generated by the first and second working surfaces of the Hall sensor, respectively, when the camera is in the retracted position. Controlling the drive assembly to move the bracket in the preset direction upon receiving the trigger operation input by the user to turn off the camera includes controlling the drive assembly to move the bracket in the second direction upon receiving the trigger operation input by the user to turn off the camera. The steps of calculating a difference between the first guiding signal and the first reference signal and a difference between the second guiding signal and the second reference signal, respectively, further include calculating a difference between the first guiding signal and the first retraction reference signal and a difference between the second guiding signal and the second retraction reference signal, respectively. The step of determining whether the absolute value of the difference is less than the preset threshold further includes determining whether the absolute value of the difference is less than a second preset threshold. The step of determining that the camera is in the extended or retracted position if the absolute value of the difference is less than the preset threshold further includes determining that the camera is in the retracted position if the absolute value of the difference is less than a second preset threshold.

[0048] In one embodiment, the position detection method further includes controlling the bracket to continue moving in the first direction to determine whether the camera is in an extended position if the absolute value of the difference is not less than a first preset threshold, and, if the camera is not yet in the extended position, controlling the bracket to move in a second direction such that the camera is in a retracted position.

[0049] In one embodiment, the position detection method further includes controlling the bracket to continue moving in the second direction if the absolute value of the difference is not less than a second preset threshold to determine whether the camera is in a retracted position, and controlling the drive assembly to stop operation if the camera is not yet in the retracted position.

[0050] In some embodiments, the position detection method further includes acquiring the first and second induced signals generated by the Hall sensors when the camera is in the extended position; determining whether the first and second induced signals are changing; and if the first and second induced signals are changing, determining whether an amount of change in the first and second induced signals is greater than a third preset threshold; and if the amount of change in the first and second induced signals is greater than the third preset threshold, controlling the drive assembly to move the bracket in the second direction such that the camera is in the retracted position.

[0051] In some embodiments, prior to the step of "controlling the drive assembly to move the bracket in the second direction so that the camera is in the retracted position", the position detection method further includes the steps of acquiring a third induced signal generated by the Hall sensor and calculating a difference between the third induced signal and a steady-state signal, determining whether the absolute value of the difference is greater than a reference threshold, and, if the absolute value of the difference is not greater than the reference threshold, controlling the drive assembly to move the bracket in the second direction so that the camera is in the retracted position.

[0052] In one embodiment, before the step of controlling the drive assembly to move the bracket in the second direction so that the camera is in the retracted position, the position detection method further includes the steps of acquiring a third induced signal generated by the Hall sensor and calculating a difference between the third induced signal and a steady-state signal, acquiring a third induced signal generated by the Hall sensor and calculating a difference between the acquired third induced signal and the steady-state signal, where the third induced signal is generated by a third active surface of the Hall sensor sensing a magnetic field of the first magnet, and the steady-state signal is an induced signal generated by the third active surface of the Hall sensor in an environment where the mobile terminal is not affected by an external magnetic field, determining whether the absolute value of the difference is greater than a reference threshold, and controlling the drive assembly to move the bracket in the second direction so that the camera is in the retracted position if the absolute value of the difference is not greater than the reference threshold.

[0053] In one embodiment, the method further includes controlling the mobile terminal to generate an indication if the absolute value of the difference is greater than a reference threshold.

[0054] According to a fourth aspect, an embodiment of the present disclosure discloses a computer readable storage medium, the computer readable storage medium storing program instructions, the program instructions being called to perform the location method according to the third aspect. [Brief description of the drawings]

[0055] In order to describe the technical solutions in the embodiments or background art of the present application, the following describes the accompanying drawings necessary for describing the embodiments or background art of the present application.

[0056] [Figure 1] 1 is a schematic front view of a camera device of a mobile terminal extended outside of a housing according to one embodiment of the present disclosure.

[0057] [Diagram 2] 2 is a schematic diagram of the mobile terminal shown in FIG. 1 from another perspective.

[0058] [Diagram 3] 2 is a schematic rear view of a portion of the structure of a mobile terminal with the rear housing removed, according to another embodiment of the present application;

[0059] [Figure 4] FIG. 2 is a schematic diagram of a position detection mechanism according to one embodiment of the present disclosure.

[0060] [Diagram 5] FIG. 13 is a schematic diagram of a position detection mechanism according to another embodiment of the present application.

[0061] [Figure 6] FIG. 13 is a schematic diagram of a position detection mechanism according to yet another embodiment of the present application.

[0062] [Figure 7] FIG. 6 is a schematic diagram regarding the operating principle of the Hall sensor shown in FIG. 5.

[0063] [Figure 8] 6 is a schematic diagram of the second body of FIG. 5 in a second position state. FIG.

[0064] [Figure 9] 6 is a schematic diagram of the second body of FIG. 5 in a first position state.

[0065] [Figure 10] 7 is a schematic diagram of the second body of FIG. 6 in a second position state. FIG.

[0066] [Figure 11] 7 is a schematic diagram of the second body of FIG. 6 in a first position state. FIG.

[0067] [Figure 12] FIG. 2 is a structural block diagram of a mobile terminal according to one embodiment of the present disclosure.

[0068] [Figure 13] FIG. 2 is a schematic diagram of an application scenario for a mobile terminal.

[0069] [Figure 14] 2 is a schematic rear view of a mobile terminal according to another embodiment of the present application;

[0070] [Figure 15] FIG. 15 is a schematic diagram of an application scenario of the mobile terminal shown in FIG.

[0071] [Figure 16] 1 is a flowchart of a location detection method according to an embodiment of the present disclosure.

[0072] [Figure 17] 17 is a sub-flowchart of step S1603 in FIG. 16.

[0073] [Figure 18] 4 is a flowchart of a location detection method according to another embodiment of the present application.

[0074] [Figure 19] 4 is a flowchart of a location detection method according to yet another embodiment of the present application.

[0075] [Figure 20] 4 is a flowchart of a location detection method according to yet another embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0076] The present application provides a mobile terminal and a position detection mechanism applied to the mobile terminal. The position detection mechanism is configured to detect the position of a camera device in the mobile terminal to confirm the position state of the camera, thereby ensuring the shooting effect and protecting the camera device. Hereinafter, an embodiment of the present application will be described with reference to the accompanying drawings.

[0077] 1 is a schematic front view of a camera device 23 of a mobile terminal 200 extended outside a housing 22 according to an embodiment of the present disclosure. The mobile terminal 200 may be any mobile terminal, such as a smartphone, a smart watch, a tablet computer, a personal digital assistant (PDA), a point of sales (POS), an in-vehicle computer, a desktop computer, a notebook computer, or a smart TV, which is not limited in this embodiment of the present application.

[0078] As shown in Fig. 1, the mobile terminal 200 includes a display screen 21, a housing 22, and a camera device 23. The display screen 21 is attached to the housing 22, and the display surface of the display screen 21 is the front area of ​​the mobile terminal 200. Fig. 2 is a schematic diagram of the mobile terminal 200 shown in Fig. 1 from another perspective. 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 device 23 can be extended out of the housing 22 from the opening 221 or can be retracted into the housing 22. It should be understood that the mounting position of the camera device 23 in the mobile terminal 200 is not limited.

[0079] FIG. 3 is a schematic rear view of a part of the structure of the mobile terminal 200 with the rear housing removed. As shown in FIG. 3, the housing 22 has an accommodating cavity 201 therein. The accommodating cavity 223 is in communication with the opening 221. The camera device 23 can be movably accommodated in the accommodating cavity 201 and can be extended out of the housing 22 through the opening 221 or retracted into the housing 22. In one embodiment, the mobile terminal 200 further includes a position detection mechanism 100. The position detection mechanism 100 is disposed in the accommodating cavity 201 and configured to detect a specific position of the camera device 23 by extending or retracting the camera device 23. The position detection mechanism 100 includes a first body 10, a second body 20, a first magnet 30, and a Hall sensor 50. The second body 20 is spaced apart from the first body 10 and can move relative to the first body 10. The first magnet 30 is disposed on the second body 20 and can move together with the second body 20. The Hall sensor 50 is disposed on the first body 10. The camera device 23 is disposed on the position detection mechanism and is extended out of the housing 22 or retracted into the housing 22 by the drive of the position detection mechanism.

[0080] 4 is a schematic structural diagram of the position detection mechanism 100 according to an embodiment of the present disclosure. In this embodiment, the first body 10 is a circuit board, which is located in the receiving cavity 201 and fixedly disposed in the housing 22. The second body 20 is a bracket. The camera device 23 includes a camera 231 and a driving assembly 232. The camera 231 is disposed in the bracket, and the driving assembly 232 is fixedly connected to the bracket so as to move the bracket to extend the camera 231 out of the housing 22 from the opening 221 or retract it into the housing 22. Specifically, the camera 231 is fixed to one end of the bracket close to the opening 221.

[0081] In this embodiment, the Hall sensor 50 is disposed on one side of the circuit board facing the display screen 21. The first magnet 30 is disposed on one side of the bracket facing the display screen 21.

[0082] The circuit board is also known as the main board of the mobile terminal 200, and is one of the most basic and important components of the mobile terminal 200. Various control chips (such as a processor, an I / O control chip, etc.) and various electronic elements (such as various chips, resistors, capacitors, etc.) are mounted on the circuit board, and wiring is arranged on the circuit board. The Hall sensor 50 may be soldered to the circuit board so that the generated induction signal is transmitted to a target element (such as a processor) through a specific wiring to realize an electrical connection between the Hall sensor 50 and another electronic element. For example, the Hall sensor 50 is electrically connected to the processor and transmits the generated induction signal to the processor. The processor determines the extension / retraction position of the camera 231 based on the induction signal.

[0083] In this embodiment, the camera device 23 is configured to capture a landscape photo or a portrait photo on the front side of the mobile terminal 200, i.e., the camera device 23 is used as a front camera device. In another embodiment, the camera device 23 may be used as a rear camera device, etc., and the camera device 23 may alternatively be configured as a rotating camera device, which is not limited in this specification.

[0084] It should be noted that the present application does not limit the specific structure of the mobile terminal 200, so long as the mobile terminal 100 is provided with a housing cavity 201 for housing the camera device 23, and the camera device 23 can be extended outside the housing cavity or retracted into the housing cavity.

[0085] In order to improve the moving accuracy of the second body 20 and the operation reliability of the mobile terminal, in one embodiment, the driving assembly 232 includes a driving member 2321, an adapter 2322, and a lead screw 2323. The driving member 2321 is located in the receiving cavity 221, and the lead screw 2323 is rotatably connected to the driving member 2321. One end of the adapter 2322 is fixedly connected to the second body 20, and the other end of the adapter 2322 is rotatably connected to the lead screw 2323. Therefore, when the driving member 2321 rotates the lead screw 2323, the adapter 2322 can move the second body 20.

[0086] For example, when the driving member 2321 rotates the lead screw 2323 counterclockwise, the second body 20 moves the camera 231 in a direction (first direction) toward the opening 221, and when the driving member 2321 rotates the lead screw 2323 clockwise, the second body 20 moves the camera 231 in a second direction so as to retreat into the housing 22. It should be understood that the rotation direction in which the driving member 2321 moves the lead screw 2323 is not limited. For example, when the driving member 2321 rotates the lead screw 2323 clockwise, the camera 231 can extend out of the housing 22 from the opening 221. When the driving member 2321 rotates the lead screw 2323 counterclockwise, the camera 231 can retreat into the housing 22 from the opening 221, and is accommodated in the accommodation cavity 201. In this embodiment, the driving member 2321 is a step motor. It should be understood that the drive member 2321 is not limited to a step motor, and the drive member 2321 may alternatively be a drive device such as a pneumatic or hydraulic cylinder.

[0087] FIG. 5 is a schematic diagram of a position detection mechanism 100 disclosed in another embodiment of the present application. The Hall sensor 50 senses the magnetic field of the first magnet 30 and generates an induced signal. The Hall sensor 50 includes a first action surface (a) and a second action surface (b) that extend in different directions. The Hall sensor 50 senses the magnetic field of the first magnet 30 through the first action surface (a) and generates a first induced signal, and the Hall sensor 50 further senses the magnetic field of the first magnet 30 through the second action surface (b) and generates a second induced signal. The first induced signal and the second induced signal are used to determine the position state of the second body 20. The position state of the second body 20 includes a first moving process in which the second body 20 moves in a first direction, a second moving process in which the second body 20 moves in a second direction, a first position state in which the second body 20 moves in a first direction to a first preset position, or a second position state in which the second body 20 moves in a second direction to a second preset position. In one embodiment, the second direction is opposite to the first direction.

[0088] That is, the mobile terminal 200 in this embodiment of the present application can determine the position state of the camera 231 based on the first guiding signal and the second guiding signal generated by the Hall sensor 50. For example, when the camera 231 is in the extended position, the user can use the camera 231 to take a picture, and when the camera 231 is in the retracted position, the camera 231 can be protected. The position state of the camera 231 includes an extended process (corresponding to a first moving process), a retracted process (corresponding to a second moving process), an extended position (corresponding to a first position state), or a retracted position (corresponding to a second position state). The "retracted process" here refers to a process in which the camera 231 retracts from the outside of the accommodating cavity 201 into the accommodating cavity 201. The "extended process" here refers to a process in which the camera 231 extends from the accommodating cavity 201 to the outside of the accommodating cavity 201. The "retracted position" here means that the camera 231 is located in the accommodating cavity 201 of the mobile terminal 200. In this context, the "extended position" means that the camera 231 is extended out of the receiving cavity 201 of the mobile terminal 231 and is positioned outside the receiving cavity 201.

[0089] According to the mobile terminal 200 and the position detection mechanism 100 disclosed in the present embodiment of the present application, since the Hall sensor 50 includes a first action surface (a) and a second action surface (b), the Hall sensor 50 can sense the magnetic field of the first magnet 30 through the first action surface (a) to generate a first induced signal, and the Hall sensor 50 further senses the magnetic field of the first magnet 30 through the second action surface (b) to generate a second induced signal. As a result, when the second body 20 moves relative to the first body 10, the Hall sensor 50 outputs two induced signals (the first induced signal and the second induced signal) to determine the state of the moving second body 20. That is, the position state of the second body 20 can be determined only when both of the two signals satisfy the preset condition. As a result, the detection accuracy can be improved compared to an existing Hall sensor having only one action surface.

[0090] In one embodiment, in order to more strongly sense the magnetic field generated by the first magnet 30 and further improve detection accuracy, the direction of movement of the first working surface (a) is substantially perpendicular to the direction of movement of the second body 20. The second working surface (b) is substantially perpendicular to the first working surface (a), and both the first working surface (a) and the second working surface (b) are substantially perpendicular to the surface of the first body 10 on which the Hall sensor 50 is disposed.

[0091] In some embodiments, the Hall sensor 50 further includes a third working surface (c) whose extension direction is different from the extension directions of both the first working surface (a) and the second working surface (b) so as to detect interference of an external magnetic field. The third working surface (c) may be substantially parallel to the surface of the first body 10 on which the Hall sensor 50 is disposed. The Hall sensor 50 senses the magnetic field of the first magnet 30 and / or an external magnetic field through the third working surface (c) and generates a third induced signal. The third induced signal is used to determine whether the position detection mechanism 100 is interfered with by an external magnetic field. The external magnetic field is a magnetic field generated by an object other than the first magnet 30.

[0092] In the absence of an external magnetic field, the third induced signal generated by the Hall sensor 50 does not change, and in the presence of an external magnetic field, the third induced signal generated by the Hall sensor 50 changes. That is, in the absence of an external magnetic field, regardless of how the second body 20 moves relative to the first body 10, the magnetic flux of the magnetic field generated by the first magnet 30 and the second magnet 40 passing through the third action surface described below is the same. Alternatively, in the absence of an external magnetic field, the third induced signal generated by the Hall sensor 50 is 0, and in the presence of an external magnetic field, the third induced signal generated by the Hall sensor 50 is not 0. That is, in the absence of an external magnetic field, regardless of how the second body 20 moves relative to the first body 10, the magnetic flux of the magnetic field generated by the first magnet 30 and the second magnet 40 passing through the third action surface described below is all 0.

[0093] In some embodiments, the third active surface (c) is substantially perpendicular to the first active surface (a) and the second active surface (b), respectively, i.e., the third active surface (c) is substantially parallel to the surface of the circuit board facing the display screen, in order to reduce interference from existing magnetic fields and improve the accuracy of sensing external magnetic fields.

[0094] Please refer to Fig. 3, Fig. 4, and Fig. 6 together. Fig. 6 is a schematic diagram of a position detection mechanism 100 disclosed in yet another embodiment of the present application. In some embodiments, the position detection mechanism 100 further includes a second magnet 40 to improve the detection accuracy of the position state of the second body 20. The second magnet 40 and the first magnet 30 are arranged at an interval on the second body 20. The Hall sensor 50 senses the magnetic field of the first magnet 30 and / or the second magnet 40 through the first action surface (a) to generate a first induced signal, and the Hall sensor 50 further senses the magnetic field of the first magnet 30 and / or the second magnet 40 through the second action surface (b) to generate a second induced signal. In this embodiment, since the first induced signal and the second induced signal are generated by sensing at least one of the two magnets, the first induced signal and the second induced signal show a relatively high rate of change when the second body 20 is moving. Furthermore, since the movement position of the second body 20 can be determined based on the different first and second induced signals, the detection accuracy of the position state of the second body is improved.

[0095] In some embodiments, when the second body 20 moves relative to the first body 10, the first magnet 30 and the second magnet 40 move relative to the Hall sensor 50, and the Hall sensor 50 is always located within the range of the magnetic field generated by at least one of the first magnet 30 and the second magnet 40. This allows the Hall sensor 50 to generate the first induced signal and the second induced signal regardless of the position to which the second body 20 moves relative to the first body 10, thereby ensuring stability of detection.

[0096] For example, in one embodiment, regardless of how the second body 20 moves, as long as it is guaranteed that the distance between the center point of the Hall sensor 50 and the surface of the magnet closest to the Hall sensor 50 is less than 5 mm when the second body 20 moves, it can be guaranteed that the Hall sensor 50 is always located within the range of the magnetic field generated by the first magnet 30 and the second magnet 40. Of course, the volume of the Hall sensor 50 and the volume of the magnet are not fixed, the strength of the generated magnetic field is uncertain, and the ability to sense the magnetic field is also uncertain. Therefore, as long as it can be guaranteed that the Hall sensor 50 is always located within the range of the magnetic field generated by at least one of the first magnet 30 and the second magnet 40 when the second body 20 moves relative to the first body 10, the relative positions between the Hall sensor 50 and the first magnet 30 and the second magnet 40 are not limited.

[0097] It should be understood that since the relative distance between the first body 10 and the second body 20 is not fixed and can be set according to specific design needs, the position of the Hall sensor 50 on the circuit board and the positions of the first magnet 30 and the second magnet 40 on the second body 20 are also not fixed, as long as it can be ensured that the Hall sensor 50 is always located within the range of the magnetic field generated by at least one of the first magnet 30 and the second magnet 40 regardless of how the second body 20 moves relative to the first body 10.

[0098] Furthermore, in some embodiments, the magnetic field generated by the first magnet 30 and the magnetic field generated by the second magnet 40 overlap, so that when the second body 20 moves relative to the circuit board, the magnetic flux sensed by the first working surface (a) and the second working surface (b) changes significantly. This improves the sensitivity of the Hall sensor 50 that senses the magnetic field, thereby improving the detection accuracy of the state of the second body 20.

[0099] For example, in one embodiment, when the distance between two adjacent end faces of the first magnet 30 and the second magnet 40 is less than 6 mm, it can be ensured that the magnetic fields generated by the first magnet 30 and the second magnet 40 overlap. Of course, since magnets with different volumes generate different magnetic fields, the distance between the first magnet 30 and the second magnet 40 is not limited as long as it can be ensured that the magnetic fields generated by the first magnet 30 and the second magnet 40 overlap.

[0100] In one particular embodiment, both the first magnet 30 and the second magnet 40 are bar magnets to facilitate control of the production process and promote foolproofness when processing on a production line. Of course, the shape of the first magnet 30 and the second magnet 40 is not specifically limited. For example, in another embodiment, the first magnet 30 and the second magnet 40 may alternatively be cylindrical magnets with a semicircular cross section. To ensure the stability of the arrangement of the first magnet 30 and the second magnet 40, the flat surface of the cylindrical magnet is used for fixed connection to the second body 20.

[0101] In one embodiment, the line connecting the center point of the first magnet 30 and the center point of the second magnet 40 is substantially parallel to the moving direction of the second body 20. This ensures the positional relationship between the Hall sensor 50 and the first magnet 30 and the second magnet 40 when the second body 20 moves (arrow L in FIG. 5 ) so that the Hall sensor 50 can reliably sense the magnetic field generated by the first magnet 20 and the second magnet 30. The center point refers to the center of gravity of the element. If an element is a regular object, the center point of the element is the geometric center of the regular object.

[0102] In some embodiments, the north-south axis of the first magnet 30 and the north-south axis of the second magnet 40 are each substantially parallel to the direction of movement of the second body 20, so that when the second body 20 moves, the Hall sensor 50 can sense the overlapping magnetic fields generated by the first magnet 30 and the second magnet 40.

[0103] In order to ensure the detection sensitivity of the Hall sensor 50, the superimposed magnetic fields generated by the first magnet 30 and the second magnet 40 need to ensure that the rate of change of the first induced signal and the second induced signal generated by the Hall sensor 50 meets certain requirements when the second body 20 moves relative to the first body 10. Thus, in one embodiment, the adjacent ends of the first magnet 30 and the second magnet 40 are magnetic poles with the same name. In one embodiment, the magnetic poles with the same name are north poles.

[0104] The north-south axis is the direction of a magnet's vector, or magnetic poles, from the north pole to the south pole. The part of a magnet that has the strongest magnetic force is called its magnetic pole. A magnet that rotates freely on a horizontal plane always has one magnetic pole that points south and another that points north when the magnet is at rest. The pole that points south is called the south pole (south pole) and the pole that points north is called the north pole (north pole).

[0105] It should be noted that in the embodiments of the present application, the term "substantially parallel" may be interpreted as being parallel, nearly parallel, or having a particular preset angle, and the term "approximately perpendicular" may be interpreted as being vertical, nearly vertical, or having a particular preset angle.

[0106] FIG. 7 is a schematic diagram of the operation principle of the Hall sensor 50. As shown in FIG. 7, the Hall sensor 50 includes a Hall element. For example, the Hall element is a semiconductor sheet. The working surface of the Hall sensor 50 refers to the plane in which the Hall sensor senses a magnetic field, i.e., the plane in which the semiconductor sheet is located. When the Hall sensor 50 is working, a current flows through the semiconductor sheet, and a magnetic field is applied in the vertical direction of the sheet. In this case, the sheet generates a potential difference in a direction perpendicular to the current and the magnetic field. For example, when the working surface of the Hall sensor 50 is located between the first surface 501 and the second surface 502 and is parallel to the first surface 501 and the second surface 502, respectively, and when a magnetic field passes through the Hall sensor 50 from the first surface (upper surface) 501 of the Hall sensor 50, the first output terminal 503 of the Hall sensor 50 outputs a low level signal, and the second output terminal 504 outputs a high level signal. Conversely, when a magnetic field passes through the Hall sensor 50 from the second surface (lower surface) 502 of the Hall sensor 50, the first output terminal 503 of the Hall sensor 50 outputs a high level signal and the second output terminal 504 outputs a low level signal.

[0107] It should be noted that FIG. 7 uses the Hall sensor 50 with two voltage signal output terminals corresponding to each working surface as an example to illustrate the working principle of the Hall sensor. In another embodiment, each working surface of the Hall sensor 50 may alternatively correspond to one output terminal, three output terminals, etc. The output signal of each output terminal may be a voltage signal or a current signal, which is not limited herein. When a magnetic field passes through the working surface of the Hall sensor 50, the output terminal of the Hall sensor 50 outputs an electrical signal in the form of a voltage or a current. When the direction of the magnetic field passing through the working surface of the Hall sensor 50 is different, the output electrical signal is different. Different electrical signals are used to indicate the terminal processor 24 performing different operations.

[0108] Furthermore, the Hall sensor 50 used in this embodiment of the present application may be a linear Hall sensor, which includes a Hall element, a linear amplifier, and an emitter follower. The Hall sensor 50 outputs an analog signal. Of course, the Hall sensor 50 may alternatively be a switch-type Hall sensor, which includes a voltage regulator, a Hall element, a differential amplifier, a Schmitt trigger, and an output stage. The Hall sensor 50 outputs a digital signal.

[0109] It should be noted that regardless of the type of Hall sensor, the Hall sensor can be configured to output different induction signals based on different magnetic field strengths detected. Thus, when the second body 20 moves to a different position relative to the first body 10, the magnetic field strength sensed by the Hall sensor 50 is different. In this way, the position state of the camera 231 can be determined based on the first induction signal and the second induction signal generated by the Hall sensor 50. When the camera 231 is in a different position, the magnetic field sensed by the Hall sensor 50 is different, i.e., when the second body 20 moves, the magnetic flux passing through the first working surface (a) and the second working surface (b) of the Hall sensor 50 is different, so the induction signal generated is different.

[0110] FIG. 8 is a schematic diagram of the second body 20 of the position detection mechanism 100 of FIG. 5 in the second position state. As shown in FIG. 8, when the second body 20 is in the second position state (corresponding to the retracted position of the camera 231), most of the magnetic field lines emitted from the N pole of the first magnet 30 can pass through the first action surface (a) and the second action surface (b) and return to the S pole of the first magnet 30. In this case, assuming that the magnetic flux passing through the first action surface (a) is Φ1 and the magnetic flux passing through the second action surface (b) is Φ2, the first action surface (a) generates a first induced signal v1 and the second action surface (b) generates a second induced signal v2. The first induced signal v1 and the second induced signal v2 may be the same or different. When the second body 20 moves, the distance between the N pole of the first magnet 30 and the Hall sensor 50 becomes closer and then gradually moves farther away. In this process, the amount of magnetic flux passing through the first action surface (a) and the second action surface (b) changes, so the first induced signal v1 and the second induced signal v2 change accordingly. For example, in this embodiment, the induced signal is a voltage signal. When the amount of magnetic flux passing through the action surface increases, the voltage signal output by the Hall sensor becomes stronger.

[0111] 9 is a schematic diagram of the second body 20 of the position detection mechanism 100 of FIG. 5 in the first position state. As shown in FIG. 9, when the second body 20 moves to the first position state (corresponding to the camera 231 in the extended position), assuming that the magnetic flux passing through the first action surface (a) is Φ3 and the magnetic flux passing through the second action surface (b) is Φ4, the first action surface (a) generates a first induced signal v3 and the second action surface (b) generates a second induced signal v4. In this position, only a part of the magnetic field lines radiated from the N pole of the first magnet 30 can pass through the first action surface (a) and the second action surface (b) and return to the S pole of the first magnet 30, so the first induced signal v3 is weaker than the first induced signal v1 and the second induced signal v4 is weaker than the second induced signal v2. That is, when the second body 20 moves to a different position relative to the first body 10, the first induced signal generated by the first acting surface (a) of the Hall sensor 50 is different, and the second induced signal generated by the second acting surface (b) of the Hall sensor 50 is also different. Thus, the moving position of the second body 20 relative to the first body 10 can be determined based on the first induced signal and the second induced signal.

[0112] In some embodiments, to ensure that the Hall sensor 50 generates both a corresponding first induced signal and a corresponding second induced signal when the second body 20 moves, regardless of whether the second body 20 is in a first position state or a second position state, a line connecting the center point of the Hall sensor 50 and the center of the end face of the first magnet 30 that has polarity and is closest to the center of the Hall sensor 50 is substantially perpendicular to the direction of movement of the second body 20.

[0113] Please refer to Figures 10 and 11 together. Figure 10 is a schematic diagram of the second body 20 of the position detection mechanism 100 of Figure 6 when it is in the second position state. Figure 11 is a schematic diagram of the second body 20 of the position detection mechanism 100 of Figure 6 when it is in the first position state. Similarly, when the second body 20 is provided with a first magnet 30 and a second magnet 40, in order to ensure that the Hall sensor 50 generates a corresponding first induced signal and a corresponding second induced signal when the second body 20 moves, in some embodiments, when the second body 20 is in the second position state, an end face of the first magnet 30 away from the second magnet 40 is close to the Hall sensor 50, and a line connecting the center point of the Hall sensor 50 and the center of the end face of the first magnet 30 that has polarity and is close to the center of the Hall sensor 50 is substantially perpendicular to the direction of movement of the second body 20, and when the second body 20 is in the first position state, an end face of the second magnet 40 away from the first magnet 30 is close to the Hall sensor 50, and a line connecting the center point of the Hall sensor 50 and the center of the end face of the second magnet 40 that has polarity and is close to the center of the Hall sensor 50 is substantially perpendicular to the direction of movement of the second body 20.

[0114] FIG. 12 is a structural block diagram of a mobile terminal 200 according to an embodiment of the present disclosure. The mobile terminal 200 further includes at least one processor 24, a communication bus 25, at least one communication interface 26, and a memory 27. It should be understood that FIG. 12 is merely an example of the mobile terminal 200 and is not a limitation on the mobile terminal 200. The mobile terminal 200 may include more or fewer components than those shown in FIG. 12, and 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.

[0115] The processor 24 is communicatively connected to at least one communication interface 26, the memory 27, the display screen 21, the drive member 2321, and the Hall sensor 50 by a communication bus 25. The processor 24 may be a Central Processing Unit (CPU), the processor may be another general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or another programmable logic device, a discrete gate or transistor logic device, or a discrete hardware assembly, etc. The general purpose processor may be a microprocessor, the processor may be any conventional processor, etc. The processor is the control center of the mobile terminal 200 and is connected to various parts of the entire mobile terminal 200 using various interfaces and wiring.

[0116] The communication bus 25 may include a path for transmitting information between the aforementioned components.

[0117] Communications interface 26 is configured to communicate with another device or a communications network (such as Ethernet, radio access network (RAN), or wireless local area networks (WLAN)) using any device such as a transceiver.

[0118] The memory 27 may be configured to store computer programs and / or modules. The processor 24 realizes various functions of the mobile terminal 200 by starting or executing the computer programs and / or modules stored in the memory 27 and by calling the data stored in the memory 27. The memory 27 may mainly include a program storage area and a data storage area. The program storage area may store an operating system and application programs required by multiple functions (such as a voice playback function and an image playback function). The data storage area may store data created based on the use of the mobile terminal 200 (such as voice data and a phone book). In addition, the memory 27 may include a high-speed random access memory, and may further 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, a multiple magnetic disk storage device, a flash memory device, or another volatile solid-state storage device. The memory 27 may exist independently and be connected to the processor 24 using a communication bus 25. Alternatively, the memory 27 may be integrated into the processor 24 .

[0119] In a specific implementation, in one embodiment, processor 24 may include one or more CPUs (such as CPU0 and CPU1 in FIG. 12).

[0120] In a specific implementation, in one embodiment, mobile terminal 200 may include multiple processors (e.g., processor 24 and processor 241 of FIG. 12). Each processor may be a single-core (single-CPU) processor or a multi-core (multiple-CPU) processor. A processor herein may be one or more devices, circuits, and / or processing cores configured to process data (e.g., computer program instructions).

[0121] In an embodiment of the present disclosure, when the camera 231 needs to be extended out of the housing 22, the processor 24 may transmit a control signal to the driving member 2321 to control the driving member 2321 to move in order to move the second body 20 and further to move the camera 231 in a direction extending out of the opening 221 of the mobile terminal 200 or in a direction retracting into the receiving cavity 201 of the mobile terminal 200. In this case, the Hall sensor 50 may generate a first induction signal and a second induction signal by sensing the magnetic fields of the first magnet 30 and the second magnet 40, and provide feedback to the processor 24. The processor 24 may compare the signal generated by the Hall sensor 50 with a reference signal and determine the state of the camera 231 based on the comparison result.

[0122] In one embodiment, when the processor 24 receives a trigger operation input by a user, the processor 24 controls to move the drive assembly 232 to move the second body 20 and further to extend the camera 231 out of the housing 22 through the opening 221 or retract it into the housing 22. The processor 24 further acquires the first and second induced signals transmitted by the Hall sensor 50 and determines a position state of the camera 231 based on the acquired first and second induced signals.

[0123] The processor 24 acquiring the first and second guiding signals transmitted by the Hall sensor 50 and determining the position state of the camera 231 based on the acquired first and second guiding signals includes the processor 24 acquiring the first and second guiding signals transmitted by the Hall sensor 50 and determining whether the first and second guiding signals are continuously changing. If the first and second guiding signals are no longer changing, the processor 24 calculates the difference between the first guiding signal and the first reference signal and the difference between the second guiding signal and the second reference signal, respectively. The processor 24 further determines whether the absolute value of the difference is smaller than a preset threshold. If the absolute value of the difference is smaller than the preset threshold, the processor 24 determines that the camera 231 is in the extended position or in the retracted position. If the first and second guiding signals are continuously changing, the processor 24 determines that the camera 231 is in the extension process or in the retraction process.

[0124] In some embodiments, the trigger operation input by the user includes a trigger operation for activating the camera, the first reference signal includes a first extension reference signal, the second reference signal includes a second extension reference signal, and the preset threshold includes a first preset threshold. When the processor 24 receives the trigger operation input by the user for activating the camera 231, the processor 24 controls the drive assembly 232 to move the second body 20 in the first direction so that the camera 231 is in the extension process. The processor 24 further obtains the first induction signal and the second induction signal transmitted by the Hall sensor 50 when the camera 231 is in the extension process. When the first induction signal and the second induction signal do not change any more, the processor 24 calculates the difference between the first induction signal and the first extension reference signal, and the difference between the second induction signal and the second extension reference signal, respectively. The processor 24 further determines whether the absolute value of the difference is smaller than the first preset threshold, and determines that the camera 231 is in the extension position if the absolute value of the difference is smaller than the first preset threshold.

[0125] When the second body 20 moves in the first direction, the positions of the first magnet 30 and the second magnet 40 relative to the Hall sensor 50 change, so that the first induced signal and the second induced signal output by the Hall sensor 50 are constantly changing. When the second body 20 stops moving, the positions of the first magnet 30 and the second magnet 40 relative to the Hall sensor 50 are fixed. In this case, the first induced signal and the second induced signal output by the Hall sensor 50 tend to be stable, i.e., do not change. Therefore, when the acquired first induced signal and the second induced signal are continuously changing, this indicates that the second body 20 is in a moving state, i.e., the camera 231 is in an extension process or a retraction process. When the acquired first induced signal and the second induced signal do not change any more, this indicates that the second body 20 is in a state where it has stopped moving. In this case, the processor 24 calculates the difference between the first induction signal and the first extension reference signal, and the difference between the second induction signal and the second extension reference signal, respectively, and if the absolute value of the difference is smaller than the first preset threshold, it determines that the second body 20 has moved to the first preset position, that is, the camera 231 is in the extension position. In this manner, it can be detected whether the camera 231 has been normally extended and is in the extension position. In this embodiment, since the Hall sensor 50 can generate two induction signals, the accuracy of detection can be improved by using the two induction signals as the basis for the determination.

[0126] In some embodiments, the first and second induced signals generated by the Hall sensor 50 when the camera 231 is in the extended position may be detected in advance, and an average value of the first induced signals obtained by multiple detections is calculated and used as the first extension reference signal. Similarly, an average value of the second induced signals obtained by multiple detections is calculated and used as the second extension reference signal.

[0127] If the absolute value of the difference is not smaller than the first preset threshold, this indicates that the second body 20 has not moved to the first preset position, i.e., the camera 231 has not been fully extended out of the housing 22. In this case, a possible reason is that the second body 20 is impeded in moving, for example, the resistance to the movement of the second body 20 is greater than the driving force of the driving member 2321, so that the second body 20 stops moving in the process of moving. Another possible reason is that a specific structure of the mobile terminal 200 is broken. In this case, if the driving member 2321 continues to move, the driving assembly 232 and the second body 20 may be damaged. Therefore, in order to avoid this situation, in some embodiments, if the absolute value of the difference is not smaller than the first preset threshold, the processor 24 controls the driving assembly 232 to continue moving so as to make the second body 20 continue moving in the first direction, and determines whether the camera 231 is in the extended position. If the camera 231 is not yet in the extended position, the processor 24 controls the drive assembly 232 to move the second body 20 in the second direction to retract the camera 231 into the housing 22, thereby protecting the camera 231 and the drive assembly 232.

[0128] In some embodiments, upon determining that camera 231 is in the extended position, processor 24 further records the number of times camera 231 is in the extended position to indicate that camera 231 has been successfully extended out of housing 22. For example, processor 24 may control a counter count from 0 to 1 to indicate that camera 231 has been successfully extended out of housing 22, and control the counter to be cleared when camera 231 is retracted into housing 22.

[0129] In another embodiment, the trigger operation input by the user further includes a trigger operation for turning off the camera, the first reference signal includes a first retraction reference signal, the second reference signal includes a second retraction reference signal, and the preset threshold includes a second preset threshold. When the processor 24 receives the trigger operation input by the user for turning off the camera 231, the processor 24 controls the drive assembly 232 to move the second body 20 in the second direction so that the camera 231 is in the retraction process. The processor 24 further obtains the first induction signal and the second induction signal transmitted by the Hall sensor 50 when the camera 231 is in the retraction process, and determines whether the first induction signal and the second induction signal are continuously changing. If the first induction signal and the second induction signal do not change any more, the processor 24 calculates the difference between the first induction signal and the first retraction reference signal, and the difference between the second induction signal and the second retraction reference signal, respectively. The processor 24 further determines whether the absolute value of the difference is smaller than the second preset threshold, and determines that the camera 231 is in the retracted position if the absolute value of the difference is smaller than the second preset threshold.

[0130] In some embodiments, the first and second induced signals generated by the Hall sensor 50 when the camera 231 is in the reverse position may be detected in advance, and an average value of a plurality of first induced signals obtained by multiple detections when the camera 231 is in the reverse position is calculated and used as a first reverse reference signal. Similarly, an average value of a plurality of second induced signals obtained by multiple detections when the camera 231 is in the reverse position is calculated and used as a second reverse reference signal.

[0131] The second preset threshold may be the same as or different from the first preset threshold and may be specifically set according to design requirements. Furthermore, the first expanded reference signal, the first retracted reference signal, the second expanded reference signal, and the second retracted reference signal may be different and may be set and stored in memory 27 before the mobile terminal is delivered.

[0132] If the absolute value of the difference is not smaller than the preset threshold, this indicates that the second body 20 has not moved to the second preset position, i.e., the camera 231 has not fully retracted into the housing 22. In this case, a possible reason is that the second body 20 is impeded in moving, for example, the resistance to the movement of the second body 20 is greater than the driving force of the driving member 2321, so that the second body 20 stops moving in the process of moving. Another possible reason is that a specific structure of the mobile terminal 200 is broken. In this case, if the driving member 2321 continues to move, the driving assembly 232 and the second body 20 may be damaged. Therefore, to avoid this situation, in some embodiments, if the absolute value of the difference is not smaller than the second preset threshold, the processor 24 controls the driving assembly 232 to continue moving so as to make the second body 20 continue moving in the second direction, and further determines whether the camera 231 is in the retracted position. If the camera 231 is not yet in the retracted position, the processor 24 controls the drive assembly 232 to stop operating in order to protect the drive assembly 232 and the second body 20 .

[0133] In some embodiments, upon determining that the camera 231 is in the retracted position, the processor 24 further records the number of times that the camera 231 is in the retracted position to indicate that the camera 231 has been successfully retracted into the housing 22. For example, the processor 24 can control the number of a counter from 0 to 1 to indicate that the camera 231 has been successfully retracted into the housing 22.

[0134] In the process of detecting the position state of the camera 231, there may also be interference from an external magnetic field, and when there is interference in the external magnetic field, an error occurs in the position detection of the camera 231, i.e., an inaccurate determination is easily generated. Therefore, in order to ensure the detection accuracy of the position of the camera 231, in some embodiments, regardless of whether the camera 231 is in the process of detecting the extended position or the retracted position, when the acquired first and second induced signals no longer change, the processor 24 further acquires a third induced signal generated by the Hall sensor 50 and calculates the difference between the third induced signal and the steady-state signal. The processor further determines whether the absolute value of the difference is greater than a reference threshold. If the absolute value of the difference is greater than the reference threshold, this indicates that there is interference from an external magnetic field. In this case, the processor 24 controls the mobile terminal 200 to transmit instruction information to instruct the user to move away from the magnetic field. If the absolute value of the difference is not greater than the reference threshold, this indicates that there is no interference from the external magnetic field, or the interference from the external magnetic field is relatively weak and does not affect the position detection of the camera 231. In this case, the position of the camera 231 can be detected. The steady-state signal is an induced signal generated by the third working surface (c) of the Hall sensor 50 when the mobile terminal 200 is not interfered with by an external magnetic field. For example, in the absence of an external magnetic field, the third working surface (c) may not generate a signal, and the steady-state signal may be set to 0 in this case. In the absence of an external magnetic field, the third working surface (c) may further generate a constant induced signal. This constant signal may be used as the steady-state signal. In the presence of an external magnetic field, the induced signal generated by the third working surface (c) changes compared to the steady-state signal, and if the amount of change exceeds a reference threshold, this indicates that the external magnetic field is relatively strong. Furthermore, the reference threshold is not limited and may be determined according to a specific design requirement.

[0135] In some embodiments, the mobile terminal 200 may be pre-positioned in an environment free of external magnetic field interference, and an average value of multiple third induced signals obtained by multiple detections is calculated, and the average value is used as the steady-state signal. Alternatively, the steady-state signal may be set and stored in the memory 27 before the mobile terminal 200 is delivered.

[0136] The mobile terminal 200 may include an indication device (e.g., a light-emitting diode or a buzzer). When it is determined that there is an external magnetic field interference, the light-emitting diode can be controlled to emit light, or the buzzer can be controlled to emit a sound. Of course, the indication device may alternatively be the display screen 10. When it is determined that there is an external magnetic field interference, the display screen 10 is controlled to display indication information.

[0137] If the processor 24 does not receive a user trigger operation to turn off the camera when it is determined that the camera 231 is in the extended position, the camera 231 should always be in the extended position, i.e., the second body 20 is in the first preset position and does not move. However, when the camera 231 is subjected to external pressure, for example, when the user manually pushes the camera 231 to retract the camera into the housing 22, if the driving member 2321 has not yet moved in this case, it will affect the service life of the driving member 2321 or even damage the driving member 2321. Therefore, in order to avoid this situation, in some embodiments, when it is determined that the camera 231 is in the extended position, the processor 24 further obtains the first and second induced signals transmitted by the Hall sensor 50 when the camera 231 is in the extended position, and determines whether the first and second induced signals have changed. If the first and second induced signals have changed, the processor 24 determines whether the amount of change of the first and second induced signals is greater than a third preset threshold. If the amount of change in the first induced signal and the second induced signal is greater than the third preset threshold, the processor 24 controls to move the drive assembly 232 to move the second body 20 in the second direction, thereby causing the camera 231 to retract into the housing 22. Whether the first induced signal and the second induced signal have changed means whether the first induced signal at the current time has changed compared to the first induced signal at the previous time, and whether the second induced signal at the current time has changed compared to the second induced signal at the previous time.

[0138] If the amount of change of the first induction signal and the second induction signal is greater than the third preset threshold, since the user's operation to turn off the camera 231 has not been received, this indicates that the camera 231 is in a state of being pressed by an external force. In this case, the processor 24 controls the second body 20 to move in the second direction and to move the driving member 2321 to further retract the camera 231 into the housing 22. In this way, after pressure is applied to the camera 23, the mobile terminal 200 automatically controls the camera 231 to retract into the housing 22. In addition to the trigger command transmitted by the button operation or touch operation, the mobile terminal 200 can further control the camera 231 to retract into the housing 22 in response to a trigger by an external pressure. This increases the ways to turn off the camera 231, improves the user experience, and protects the driving assembly 232.

[0139] However, the change in the first and second induction signals may not be caused by the movement of the second body 20 due to the external pressure on the camera 231. There may be an external magnetic field interference. Therefore, when the camera 231 is in the extended position and the first and second induction signals output by the Hall sensor 50 are changing, it is further necessary to determine whether there is an external magnetic field interference, so as to avoid inaccurate determination and further to avoid affecting the user experience. For example, when a user is using the camera 231 to take a picture, if it is detected that the first and second induction signals output by the Hall sensor 50 are changing in this case and the camera 231 is controlled to retract, the user's photo taking will be interrupted, resulting in an unsatisfactory user experience.

[0140] Therefore, in some embodiments, before the processor 24 controls the drive assembly 232 to move the second body 20 in the second direction so that the camera 231 retracts into the housing 22, the processor 22 further obtains a third induced signal transmitted by the Hall sensor 50 when the camera 231 is in the extended position, and calculates a difference between the third induced signal and a steady-state signal. The processor 24 further determines whether the absolute value of the difference is greater than a reference threshold. If the absolute value of the difference is not greater than the reference threshold, the processor 24 controls the drive assembly 232 to move the second body 20 in the second direction, so that the camera 231 retracts into the housing 22. If the absolute value of the difference is greater than the reference threshold, the processor 24 controls the mobile terminal 200 to transmit instruction information to instruct the user to move away from the external magnet.

[0141] The following describes an example of how processor 24 of mobile terminal 200 determines a particular situation upon receiving a trigger operation input by a user.

[0142] One situation is shown in FIG. 13, and the situation is described by using an example that the mobile terminal 200 is a mobile phone. When a camera application corresponding to the camera device 23 is installed in the mobile terminal 200 shown in this embodiment, the interface of the mobile terminal 200 can display the first icon 202 of the camera application. The camera application includes application software (such as WeChat or QQ) that can use the camera device 23. When the processor 24 of the mobile terminal 200 detects that the first icon 202 of the camera application receives a click event input by a user, the processor 24 controls the mobile terminal 200 to enter the shooting interface. The processor 24 controls the driving member 2321 to rotate the lead screw 2323, so that the camera 231 extends out of the housing 22 from the opening 221 to reach the preset shooting position, and is in the extended position.

[0143] One situation is shown in FIG. 14, and the situation is described using an example that the mobile terminal 200 is a mobile phone. The mobile terminal 200 includes a first camera device and a second camera device 28. The first camera device is the aforementioned camera device 23 that can be extended out of the housing 22 from the opening 221 in this application or retracted into the housing 22. The second camera device 28 is fixedly embedded in the back of the mobile terminal 200 and is used as a back camera device. When the mobile terminal 200 shown in this application is equipped with a camera application, and when the processor 24 of the mobile terminal 200 detects that the first icon 202 of the camera application receives a click event input by the user (similar to the interface of the mobile terminal shown in FIG. 13), referring to FIG. 15, the processor 24 controls the mobile terminal 200 to enter the photographing interface 29, and the photographing interface 29 includes a second icon 291. In this embodiment, the second icon 291 is an application icon for switching the operating camera device. When the processor 24 detects that the second icon 291 has received a click event input by the user, the processor 24 controls switching of the camera device to be used. For example, the second camera device 28 currently used by the mobile terminal 200 is switched to the first camera device, or the first camera device currently used by the mobile terminal 200 is switched to the second camera device 28.

[0144] For example, the processor 24 controls the mobile terminal 200 to enter the photographing interface 29, and the content to be displayed is an image captured by the second camera device 28, i.e., the camera device currently operating in the mobile terminal 200 is the second camera device 28. When the processor 24 detects that the second icon 291 has received a click event input by the user, the processor 24 controls the power off of the second camera device 28 and switches to the first camera device to be operated. In another example, the processor 24 controls the mobile terminal 200 to enter the photographing interface 29, and the content to be displayed is an image captured by the first camera device, i.e., the camera device currently operating in the mobile terminal 200 is the first camera device. When the processor 24 detects that the second icon 291 has received a click event input by the user, the processor 24 controls the power off of the first camera device to retract into the housing 22, and switches to the second camera device 28 to be operated.

[0145] 13 , the mobile terminal 200 may be provided with a plurality of physical buttons 203. In one embodiment, one of the plurality of physical buttons 203 is a activation button for the camera device 23. When the processor 24 detects a user trigger event on the activation button, the processor 24 controls activation or power-off of the camera device 23. In one embodiment, when the processor 24 of the mobile terminal 200 detects a user trigger event on one of the plurality of physical buttons, the processor 24 controls activation of the camera device 23.

[0146] It should be noted that in this application, the application of the position detection mechanism 100 to the mobile terminal 200 is merely one application example. It is clear that the position detection mechanism 100 may alternatively be applied to another structure (e.g., a gastroscope probe) and is not limited to the mobile terminal 200.

[0147] 16 is a flow chart of a location detection method according to an embodiment of the present disclosure. The location detection method is applied to the mobile terminal 200 shown in FIG. 3. The location detection method includes the following steps.

[0148] Step S1601: When a trigger operation input by a user is received, the drive assembly 232 is controlled to move the bracket in a preset direction.

[0149] The preset direction includes a first direction or a second direction. The trigger operation input by the user includes a trigger operation for activating the camera 231 or a trigger operation for turning off the camera 231. For example, when a trigger operation input by the user for activating the camera 231 is received, the drive assembly 232 is controlled to operate to move the bracket in a first direction to extend the camera 231 out of the housing 22. Alternatively, when a trigger operation input by the user for turning off the camera 231 is received, the drive assembly 232 is controlled to operate to move the bracket in a second direction opposite to the first direction to retract the camera 231 into the housing 22.

[0150] Step S1602: The first and second induced signals generated by the Hall sensor 50 are obtained.

[0151] The first induced signal is an induced signal generated by the first working surface (a) of the Hall sensor 50 sensing the magnetic field of the first magnet. The second induced signal is an induced signal generated by the second working surface (b) of the Hall sensor 50 sensing the magnetic field of the first magnet.

[0152] Step S1603: Determine a position state of the camera 231 based on the acquired first and second guiding signals. The position state of the camera 231 includes an extended position and a retracted position.

[0153] According to the position detection method in this embodiment of the present application, the position state of the camera 231 is determined based on the acquired first guiding signal and second guiding signal, that is, the position state of the camera 231 is determined based on the two guiding signals together. This improves the detection accuracy of the position state of the camera 231.

[0154] Figure 17 is a sub-flowchart relating to step S1603 of Figure 16. In some embodiments, step S1603 specifically includes the following steps:

[0155] Step S16031: It is determined whether the first and second induced signals are continuously changing. If the result is a positive determination, step S16039 is performed. If the result is a negative determination, step S16032 is performed.

[0156] Step S16032: A third induced signal generated by the Hall sensor is acquired, and a difference between the acquired third induced signal and a steady-state signal is calculated.

[0157] The third induced signal is an induced signal generated by the third active surface (c) of the Hall sensor 50 sensing the magnetic field of the first magnet 30. The steady-state signal is an induced signal generated by the third active surface (c) of the Hall sensor 50 in an environment where the mobile terminal 200 is not affected by an external magnetic field.

[0158] Step S16033: Determine whether the absolute value of the difference is greater than a reference threshold value. If the result is a positive determination, step S16038 is performed. If the result is a negative determination, step S16034 is performed.

[0159] Step S16034: A difference between the first induced signal and the first reference signal, and a difference between the second induced signal and the second reference signal are calculated.

[0160] The first and second reference signals are induced signals generated by the first and second working surfaces (a) and (b) of the Hall sensor 50, respectively, when the camera 231 is in the extended position. Alternatively, the first and second reference signals are induced signals generated by the first and second working surfaces (a) and (b) of the Hall sensor 50, respectively, when the camera 231 is in the retracted position.

[0161] Step S16035: Determine whether the absolute value of the difference is smaller than a preset threshold. If the result is a positive determination, step S16036 is performed. If the result is a negative determination, step S16037 is performed.

[0162] Step S16036: It is determined whether the camera 231 is in the extended position or in the retracted position.

[0163] Step S16037: It is determined that the camera 231 is neither in the extended position nor in the retracted position, and the drive assembly is controlled to move the bracket in the preset direction again.

[0164] Step S16038: Control the mobile terminal 200 to transmit the instruction information.

[0165] Step S16039: It is determined whether the camera 231 is in the extension process or the retraction process.

[0166] 18 is a flow chart of a position detection method according to another embodiment of the present application. In some embodiments, the trigger operation input by the user includes a trigger operation for activating the camera, the first reference signal includes a first extension reference signal, the second reference signal includes a second extension reference signal, and the preset threshold includes a first preset threshold. The first extension reference signal and the second extension reference signal are induction signals generated by the first working surface (a) and the second working surface (b) of the Hall sensor 50, respectively, when the camera 231 is in the extended position. The position detection method includes the steps listed below.

[0167] Step S1801: When a trigger operation input by a user for activating the camera 231 is received, the drive assembly 232 is controlled to move the bracket in a first direction.

[0168] Step S1802: The first and second induced signals generated by the Hall sensor 50 are obtained.

[0169] Step S1803: Determine whether the first and second induced signals are continuously changing. If the result is a positive determination, step S1811 is performed. If the result is a negative determination, step S1804 is performed.

[0170] Step S1804: Obtain a third induced signal generated by the Hall sensor, and calculate a difference between the obtained third induced signal and a steady-state signal.

[0171] The third induced signal is an induced signal generated by the third active surface (c) of the Hall sensor 50 sensing the magnetic field of the first magnet 30. The steady-state signal is an induced signal generated by the third active surface (c) of the Hall sensor 50 in an environment where the mobile terminal 200 is not affected by an external magnetic field.

[0172] Step S1805: Determine whether the absolute value of the difference is greater than a reference threshold. If the result is a positive determination, step S1810 is performed. If the result is a negative determination, step S1806 is performed.

[0173] Step S1806: Calculate a difference between the first derived signal and the first expanded reference signal, and a difference between the second derived signal and the second expanded reference signal.

[0174] Step S1807: Determine whether the absolute value of the difference is less than the first preset threshold. If the result is a positive determination, step S1808 is performed. If the result is a negative determination, step S1809 is performed.

[0175] Step S1808: The camera is determined to be in an extended position and the number of successful extensions is recorded.

[0176] In some embodiments, the step of recording the number of successful decompressions may be omitted.

[0177] Step S1809: Control the bracket to continue moving in the first direction, determine whether the camera 231 is in the extended position, and if the camera 231 is not yet in the extended position, control the drive assembly 232 to move the bracket in the second direction to move the camera 231 to the retracted position.

[0178] Step S1810: Control the mobile terminal 200 to transmit instruction information.

[0179] Step S1811: It is determined that the camera 231 is in the process of extension.

[0180] 19 is a flow chart of a position detection method according to another embodiment of the present application. In some embodiments, the trigger operation input by the user includes a trigger operation for turning off the camera, the first reference signal includes a first retraction reference signal, the second reference signal includes a second retraction reference signal, and the preset threshold includes a second preset threshold. The first retraction reference signal and the second retraction reference signal are induction signals generated by the first working surface (a) and the second working surface (b) of the Hall sensor 50, respectively, when the camera 231 is in the retracted position. The position detection method includes the steps listed below.

[0181] Step S1901: When a trigger operation input by a user to turn off the camera 231 is received, the drive assembly 232 is controlled to move the bracket in the second direction.

[0182] Step S1902: The first and second induced signals generated by the Hall sensor 50 are obtained.

[0183] Step S1903: Determine whether the first and second induced signals are continuously changing. If the result is a positive determination, step S1911 is performed. If the result is a negative determination, step S1904 is performed.

[0184] Step S1904: Obtain a third induction signal generated by the Hall sensor, and calculate a difference between the obtained third induction signal and a steady-state signal.

[0185] The third induced signal is an induced signal generated by the third active surface (c) of the Hall sensor 50 sensing the magnetic field of the first magnet 30. The steady-state signal is an induced signal generated by the third active surface (c) of the Hall sensor 50 in an environment where the mobile terminal 200 is not affected by an external magnetic field.

[0186] Step S1905: Determine whether the absolute value of the difference is greater than a reference threshold. If the result is a positive determination, step S1910 is performed. If the result is a negative determination, step S1906 is performed.

[0187] Step S1906: A difference between the first guided signal and the first receding reference signal, and a difference between the second guided signal and the second receding reference signal are calculated.

[0188] Step S1907: Determine whether the absolute value of the difference is less than a second preset threshold. If the result is a positive determination, step S1908 is performed. If the result is a negative determination, step S1909 is performed.

[0189] Step S1908: It is determined that the camera 231 is in the retreat position, and the number of successful retreats is recorded.

[0190] In some embodiments, the step of recording the number of successful retractions may be omitted.

[0191] Step S1909: Control the bracket to continue moving in the second direction, determine whether the camera 231 is in the retracted position, and control the drive assembly 232 to stop operation if the camera 231 is not yet in the retracted position.

[0192] Step S1910: Control the mobile terminal 200 to transmit instruction information.

[0193] Step S1911: It is determined that the camera 231 is in the process of reversing.

[0194] 20 is a flow chart of a location detection method according to yet another embodiment of the present application. In some embodiments, the location detection method includes the following steps:

[0195] Step S2001: When the camera 231 is in the extended position, the first induced signal and the second induced signal generated by the Hall sensor 50 are obtained.

[0196] Step S2002: Determine whether the first and second induced signals are changing. If the result is a positive determination, step S2003 is performed. If the result is a negative determination, step S2002 is performed.

[0197] Step S2003: Determine whether the amount of change of each of the first and second induced signals is greater than a third preset threshold. If the result is a positive determination, step S2004 is performed. If the result is a negative determination, step S2003 is performed.

[0198] Step S2004: Obtain a third induced signal generated by the Hall sensor, and calculate a difference between the obtained third induced signal and a steady-state signal.

[0199] The third induced signal is an induced signal generated by the third active surface (c) of the Hall sensor 50 sensing the magnetic field of the first magnet 30. The steady-state signal is an induced signal generated by the third active surface (c) of the Hall sensor 50 in an environment where the mobile terminal 200 is not affected by an external magnetic field.

[0200] Step S2005: Determine whether the absolute value of the difference is greater than a reference threshold. If the result is a positive determination, step S2007 is performed. If the result is a negative determination, step S2006 is performed.

[0201] Step S2006: The drive assembly 232 is controlled to move the bracket in the second direction so that the camera 231 is in the retracted position.

[0202] Step S2007: Control the mobile terminal 200 to transmit instruction information.

[0203] It should be noted that for ease of explanation, the above-described method embodiments are depicted as a combination of a series of operations. However, those skilled in the art will appreciate that the present application is not limited to the described order of operations, since some steps may be performed in other orders or simultaneously according to the present application.

[0204] In each of the above embodiments, the description of the embodiment has its own attention. For the parts not described in detail in one embodiment, please refer to the relevant descriptions of other embodiments.

[0205] The order of each step in the method in the embodiments of the present application may be adjusted, combined or removed based on actual requirements.

[0206] The location detection methods provided herein may be implemented in hardware or firmware, and may be used as software or computer code that may be stored in a computer-readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a floppy disk, a hard disk, a magneto-optical disk, or as computer code that is initially stored in a remote storage medium or a non-transitory machine-readable medium and downloaded over a network and stored in a local storage medium. Thus, the methods described herein may be provided using software stored in a storage medium of a general-purpose computer, a dedicated processor, or a programmable or dedicated hardware, such as an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA). As can be understood in the art, a computer, processor, microprocessor, controller, or programmable hardware includes a memory component, such as a RAM, a ROM, or a flash memory. The memory component may store or receive the software or computer code that implements the processing methods described herein, when the computer, processor, or hardware accesses and executes the software or computer code. Furthermore, when a general purpose computer has access to code for implementing the processes described herein, execution of this code transforms the general purpose computer into a special purpose computer for performing the processes described herein.

[0207] The computer-readable storage medium may be a solid-state memory, a memory card, an optical disk, etc. The computer-readable storage medium stores program instructions, which are called by a computer, a mobile phone, a tablet computer, or a mobile terminal in this application to execute the location detection method shown in Figures 16 to 20.

[0208] The above description is an implementation example of each embodiment of the present application. It should be noted that a person skilled in the art may make some improvements and refinements without departing from the principle of the embodiments of the present application, and such improvements and refinements shall fall within the protection scope of the present application. [Other possible items] (Item 1) A first body; a second body spaced apart from the first body and movable relative to the first body; A first magnet disposed in the second body; a Hall sensor disposed on the first body, the Hall sensor including a first working surface and a second working surface extending in different directions; A position detection mechanism comprising: (Item 2) 2. The position detection mechanism of claim 1, wherein a direction of movement of the first acting surface and a direction of movement of the second body are substantially perpendicular, the second acting surface is substantially perpendicular to the first acting surface, and both the first acting surface and the second acting surface are substantially perpendicular to a surface of the first body on which the Hall sensor is disposed. (Item 3) 3. The position detection mechanism according to claim 1, wherein the Hall sensor further includes a third working surface, the extension direction of which is different from the extension directions of both the first working surface and the second working surface. (Item 4) 4. The position detection mechanism according to item 3, wherein the third working surface is substantially perpendicular to the first working surface and the second working surface, respectively. (Item 5) 2. The position detection mechanism according to item 1, wherein the position detection mechanism further comprises a second magnet, the second magnet and the first magnet being spaced apart from each other in the second body. (Item 6) 6. The position detection mechanism according to item 5, wherein a line connecting the center point of the first magnet and the center point of the second magnet is substantially parallel to the movement direction of the second body. (Item 7) 7. The position detection mechanism according to item 6, wherein the north-south axis of the first magnet and the north-south axis of the second magnet are each substantially parallel to the direction of movement of the second body. (Item 8) 8. The position detection mechanism according to item 7, wherein adjacent ends of the first magnet and the second magnet have the same polarity. (Item 9) 1. A mobile terminal comprising a display screen, a housing, and a camera device, the display screen being attached to the housing, the housing having an opening and a cavity communicating with the opening for accommodating the camera device, the mobile terminal further comprising a position detection mechanism disposed in the cavity, the position detection mechanism having a circuit board, a bracket, a first magnet, and a Hall sensor, the camera device having a camera and a drive assembly, the camera being disposed on the bracket, the drive assembly being connected to the bracket to move the bracket to extend the camera out of the housing or retract it into the housing, the Hall sensor being disposed on the circuit board, and the Hall sensor including first and second active surfaces extending in different directions. (Item 10) 10. The mobile terminal of claim 9, wherein a direction of movement of the first working surface and a direction of movement of the bracket are substantially perpendicular, the second working surface and the first working surface are substantially perpendicular, and both the second working surface and the first working surface are substantially perpendicular to a surface of the circuit board facing the display screen. (Item 11) 11. The mobile terminal of item 9 or 10, wherein the Hall sensor further includes a third working surface, the extension direction of which is different from the extension directions of both the first working surface and the second working surface. (Item 12) Item 12. The mobile terminal of item 11, wherein the third active surface is substantially parallel to the surface of the circuit board facing the display screen. (Item 13) Item 13. The mobile terminal of item 12, wherein the position detection mechanism further comprises a second magnet, the second magnet and the first magnet being spaced apart from each other on the bracket. (Item 14) Item 14. A mobile terminal according to item 13, wherein a line connecting a center point of the first magnet and a center point of the second magnet is substantially parallel to a direction of movement of the second body. (Item 15) Item 15. The mobile terminal of item 14, wherein the north-south axis of the first magnet and the north-south axis of the second magnet are each substantially parallel to a direction of movement of the second body. (Item 16) Item 16. The mobile terminal of item 15, wherein adjacent ends of the first magnet and the second magnet are of the same polarity. (Item 17) 10. The mobile terminal of item 9, wherein the drive assembly includes a drive member, an adapter, and a lead screw, one end of the adapter fixedly connected to the bracket, the other end of the adapter rotatably connected to the lead screw, and the lead screw further rotatably connected to the drive member, and the drive member is capable of rotating the lead screw, thereby causing the adapter to move the bracket and the camera to extend out of the housing through the opening or retract into the housing. (Item 18) 10. The mobile terminal of claim 9, further comprising a processor electrically connected to the drive assembly and the Hall sensor, wherein upon receiving a trigger operation input by a user, the processor controls the drive assembly to move the bracket, and the processor further acquires a first induced signal generated by the first active surface of the Hall sensor sensing the magnetic field of the first magnet and a second induced signal generated by the second active surface of the Hall sensor sensing the magnetic field of the first magnet, and determines a position state of the camera based on the acquired first induced signal and second induced signal. (Item 19) The mobile terminal of item 11, further comprising a processor electrically connected to the drive assembly and the Hall sensor, the processor further acquiring a third induced signal generated by the third active surface of the Hall sensor sensing the magnetic field of the first magnet, and determining whether the mobile terminal is being interfered with by an external magnetic field based on the acquired third induced signal. (Item 20) A position detection method applicable to a mobile terminal, the mobile terminal comprising: a housing, a circuit board, a bracket, and a camera device, the circuit board, the bracket, and the camera device being disposed in the housing, the housing being provided with an opening, and a receiving cavity communicating with the opening, for receiving the camera device, the camera device having a camera and a drive assembly, the camera being disposed on the bracket, the drive assembly being connected to the bracket, a Hall sensor being provided on the circuit board, and a first magnet being provided on the bracket, the position detection method comprising: upon receiving a user trigger operation, controlling the drive assembly to move the bracket in a preset direction; acquiring a first induced signal and a second induced signal generated by the Hall sensor, the first induced signal being an induced signal generated by a first working surface of the Hall sensor sensing a magnetic field of the first magnet, and the second induced signal being an induced signal generated by a second working surface of the Hall sensor sensing the magnetic field of the first magnet; determining a position state of the camera based on the acquired first guiding signal and the acquired second guiding signal, the position state of the camera including an extended position and a retracted position; A position detection method comprising: (Item 21) The step of determining a position state of the camera based on the acquired first guided signal and second guided signal, determining whether the first induced signal and the second induced signal are continuously changing; a step of calculating a difference between the first guiding signal and a first reference signal and a difference between the second guiding signal and a second reference signal, respectively, when the first guiding signal and the second guiding signal do not change any more, the first reference signal and the second reference signal being guiding signals generated by the first and second working surfaces of the Hall sensor, respectively, when the camera is in the extended position, or the first reference signal and the second reference signal being guiding signals generated by the first and second working surfaces of the Hall sensor, respectively, when the camera is in the retracted position; determining whether the absolute value of the difference is less than a preset threshold; determining that the camera is in the extended position or in the retracted position if the absolute value of the difference is less than the preset threshold; 21. The position detection method according to item 20, comprising: (Item 22) The position detection method further comprises: 22. The position detection method according to item 21, further comprising a step of determining that the camera is in an extension process of extending toward the extended position, or determining that the camera is in a retraction process of extending toward the retracted position, when the first guided signal and the second guided signal are continuously changing. (Item 23) Prior to the step of calculating a difference between the first induced signal and a first reference signal and a difference between the second induced signal and a second reference signal, the position detection method further comprises: acquiring a third induced signal generated by the Hall sensor, and calculating a difference between the acquired third induced signal and a steady-state signal, the third induced signal being an induced signal generated by a third working surface of the Hall sensor sensing the magnetic field of the first magnet, and the steady-state signal being an induced signal generated by the third working surface of the Hall sensor in an environment where the mobile terminal is not affected by an external magnetic field; determining whether the absolute value of the difference is greater than a reference threshold; calculating the difference between the first induced signal and the first reference signal and the difference between the second induced signal and the second reference signal, respectively, if the absolute value of the difference is not greater than the reference threshold value; 22. The position detection method according to Item 21, comprising: (Item 24) The position detection method further comprises: Item 24. A method for detecting a position according to item 23, comprising controlling the mobile terminal to transmit indication information if the absolute value of the difference is greater than the reference threshold value. (Item 25) the trigger operation input by the user includes a trigger operation for activating the camera, the first reference signal includes a first extension reference signal, the second reference signal includes a second extension reference signal, the preset threshold includes a first preset threshold, and the first extension reference signal and the second extension reference signal are induction signals generated by the first acting surface and the second acting surface of the Hall sensor, respectively, when the camera is in the extended position; the step of controlling the drive assembly to move the bracket in a preset direction upon receiving a trigger operation from a user includes the step of controlling the drive assembly to move the bracket in the first direction upon receiving the trigger operation input by the user to activate the camera; the step of calculating a difference between the first induced signal and a first reference signal and a difference between the second induced signal and a second reference signal includes the step of calculating a difference between the first induced signal and the first expanded reference signal and a difference between the second induced signal and the second expanded reference signal, determining whether the absolute value of the difference is less than a preset threshold includes determining whether the absolute value of the difference is less than the first preset threshold; 22. The position detection method of claim 21, wherein the step of determining that the camera is in the extended position or the retracted position if the absolute value of the difference is less than the preset threshold includes a step of determining that the camera is in the extended position if the absolute value of the difference is less than the first preset threshold. (Item 26) the trigger operation input by the user includes a trigger operation for turning off the camera, the first reference signal further includes a first retraction reference signal, the second reference signal further includes a second retraction reference signal, the preset threshold further includes a second preset threshold, and the first retraction reference signal and the second retraction reference signal are induction signals generated by the first acting surface and the second acting surface of the Hall sensor, respectively, when the camera is in the retracted position; the step of controlling the drive assembly to move the bracket in a preset direction upon receiving a trigger operation from a user includes the step of controlling the drive assembly to move the bracket in the second direction upon receiving a trigger operation input by the user to turn off the camera; the step of calculating a difference between the first induced signal and a first reference signal and a difference between the second induced signal and a second reference signal further comprises the step of calculating a difference between the first induced signal and the first receding reference signal and a difference between the second induced signal and the second receding reference signal, determining whether the absolute value of the difference is less than a preset threshold further comprises determining whether the absolute value of the difference is less than the second preset threshold; 26. The position detection method according to claim 21 or 25, wherein the step of determining that the camera is in the extended position or the retracted position if the absolute value of the difference is smaller than the preset threshold further comprises the step of determining that the camera is in the retracted position if the absolute value of the difference is smaller than the second preset threshold. (Item 27) The position detection method further comprises: 26. The position detection method of claim 25, further comprising the steps of: if the absolute value of the difference is not smaller than the first preset threshold, controlling the bracket to continue moving in the first direction; determining whether the camera is in the extended position; and, if the camera is not yet in the extended position, controlling the bracket to move in the second direction so that the camera is in the retracted position. (Item 28) The position detection method further comprises: 27. The position detection method of claim 26, further comprising the steps of: controlling the bracket to continue moving in the second direction if the absolute value of the difference is not less than the second preset threshold; determining whether the camera is in the retracted position; and controlling the drive assembly to stop operation if the camera is not yet in the retracted position. (Item 29) The position detection method further comprises: acquiring a first induced signal and a second induced signal generated by the Hall sensor when the camera is in the extended position; determining whether the first induced signal and the second induced signal are changing; If the first induced signal and the second induced signal are changing, determining whether the amount of the change in the first induced signal and the second induced signal is greater than a third preset threshold; controlling the drive assembly to move the bracket in the second direction such that the camera is in the retracted position if the amount of change in the first guiding signal and the second guiding signal is greater than the third preset threshold. 26. The position detection method according to item 20 or 25, comprising: (Item 30) Prior to the step of controlling the drive assembly to move the bracket in the second direction so that the camera is in the retracted position, the position detection method further comprises: acquiring a third induced signal generated by the Hall sensor, and calculating a difference between the third induced signal and a steady-state signal, the third induced signal being generated by a third active surface of the Hall sensor sensing the magnetic field of the first magnet, and the steady-state signal being an induced signal generated by the third active surface of the Hall sensor in an environment where the mobile terminal is not affected by an external magnetic field; determining whether the absolute value of the difference is greater than a reference threshold; if the absolute value of the difference is not greater than the reference threshold, controlling the drive assembly to move the bracket in the second direction such that the camera is in the retracted position. 30. The position detection method according to item 29, comprising: (Item 31) 31. The method of claim 30, further comprising the step of controlling the mobile terminal to generate indication information if the absolute value of the difference is greater than the reference threshold.

Claims

1. A position detection method applied to a mobile terminal, the mobile terminal comprising a housing, a circuit board, a bracket, and a camera device, the circuit board, the bracket, and the camera device being disposed in the housing, the housing being provided with an opening, and a receiving cavity communicating with the opening and receiving the camera device, the camera device having a camera and a drive assembly, the camera being disposed on the bracket, the drive assembly being connected to the bracket, a Hall sensor being provided on the circuit board, and a first magnet being provided on the bracket, the position detection method comprising: upon receiving a user trigger operation, controlling the drive assembly to move the bracket in a preset direction; acquiring a first induced signal and a second induced signal generated by the Hall sensor, the first induced signal being an induced signal generated by a first acting surface of the Hall sensor sensing a magnetic field of the first magnet, and the second induced signal being an induced signal generated by a second acting surface of the Hall sensor sensing the magnetic field of the first magnet, the first acting surface and the second acting surface extending in different directions; determining a position state of the camera based on the acquired first guiding signal and the acquired second guiding signal, the position state of the camera including an extended position and a retracted position; Equipped with The step of determining a position state of the camera based on the acquired first and second guiding signals, determining whether the first induced signal and the second induced signal are continuously changing; if the first guiding signal and the second guiding signal do not change any more, calculating a difference between the first guiding signal and a first reference signal and a difference between the second guiding signal and a second reference signal, respectively, where the first reference signal and the second reference signal are guiding signals generated by the first and second working surfaces of the Hall sensor, respectively, when the camera is in the extended position, or the first reference signal and the second reference signal are guiding signals generated by the first and second working surfaces of the Hall sensor, respectively, when the camera is in the retracted position; determining whether the absolute value of the difference is less than a preset threshold; determining that the camera is in the extended position or in the retracted position if the absolute value of the difference is less than the preset threshold; A position detection method comprising:

2. A position detection method applied to a mobile terminal, the mobile terminal comprising a housing, a circuit board, a bracket, and a camera device, the circuit board, the bracket, and the camera device being disposed in the housing, the housing being provided with an opening, and a receiving cavity communicating with the opening and receiving the camera device, the camera device having a camera and a drive assembly, the camera being disposed on the bracket, the drive assembly being connected to the bracket, a Hall sensor being provided on the circuit board, and a first magnet being provided on the bracket, the position detection method comprising: upon receiving a user trigger operation, controlling the drive assembly to move the bracket in a preset direction; acquiring a first induced signal and a second induced signal generated by the Hall sensor, the first induced signal being an induced signal generated by a first working surface of the Hall sensor sensing a magnetic field of the first magnet, and the second induced signal being an induced signal generated by a second working surface of the Hall sensor sensing the magnetic field of the first magnet; determining a position state of the camera based on the acquired first guiding signal and the acquired second guiding signal, the position state of the camera including an extended position and a retracted position; Equipped with The step of determining a position state of the camera based on the acquired first and second guiding signals, determining whether the first induced signal and the second induced signal are continuously changing; if the first guiding signal and the second guiding signal do not change any more, calculating a difference between the first guiding signal and a first reference signal and a difference between the second guiding signal and a second reference signal, respectively, where the first reference signal and the second reference signal are guiding signals generated by the first and second working surfaces of the Hall sensor, respectively, when the camera is in the extended position, or the first reference signal and the second reference signal are guiding signals generated by the first and second working surfaces of the Hall sensor, respectively, when the camera is in the retracted position; determining whether the absolute value of the difference is less than a preset threshold; determining that the camera is in the extended position or in the retracted position if the absolute value of the difference is less than the preset threshold; A position detection method comprising:

3. The position detection method further comprises:

3. The position detection method according to claim 1, further comprising a step of determining, when the first guiding signal and the second guiding signal are continuously changing, that the camera is in an extension process of extending toward the extended position, or that the camera is in a retraction process of extending toward the retracted position.

4. Prior to the step of calculating a difference between the first guided signal and a first reference signal and a difference between the second guided signal and a second reference signal, the position detection method further comprises: acquiring a third induced signal generated by the Hall sensor, and calculating a difference between the acquired third induced signal and a steady-state signal, the third induced signal being an induced signal generated by a third working surface of the Hall sensor sensing the magnetic field of the first magnet, and the steady-state signal being an induced signal generated by the third working surface of the Hall sensor in an environment where the mobile terminal is not affected by an external magnetic field; determining whether the absolute value of the difference is greater than a reference threshold; calculating the difference between the first induced signal and the first reference signal and the difference between the second induced signal and the second reference signal, respectively, if the absolute value of the difference is not greater than the reference threshold value; The method of claim 1 , further comprising:

5. The position detection method further comprises: The method of claim 4, further comprising controlling the mobile terminal to transmit an indication if the absolute value of the difference is greater than the reference threshold.

6. the trigger operation input by the user includes a trigger operation for activating the camera, the first reference signal includes a first extension reference signal, the second reference signal includes a second extension reference signal, the preset threshold includes a first preset threshold, and the first extension reference signal and the second extension reference signal are induction signals generated by the first acting surface and the second acting surface of the Hall sensor, respectively, when the camera is in the extended position; the step of controlling the drive assembly to move the bracket in a preset direction upon receiving a trigger operation from a user includes controlling the drive assembly to move the bracket in a first direction upon receiving the trigger operation input by the user to activate the camera; the step of calculating a difference between the first induced signal and a first reference signal and a difference between the second induced signal and a second reference signal includes the step of calculating a difference between the first induced signal and the first expanded reference signal and a difference between the second induced signal and the second expanded reference signal, determining whether the absolute value of the difference is less than a preset threshold includes determining whether the absolute value of the difference is less than the first preset threshold; 6. The position detection method of claim 1, wherein the step of determining that the camera is in the extended position or the retracted position if the absolute value of the difference is less than the preset threshold comprises the step of determining that the camera is in the extended position if the absolute value of the difference is less than the first preset threshold.

7. the trigger operation input by the user includes a trigger operation for turning off the camera, the first reference signal further includes a first retraction reference signal, the second reference signal further includes a second retraction reference signal, the preset threshold further includes a second preset threshold, and the first retraction reference signal and the second retraction reference signal are induction signals generated by the first acting surface and the second acting surface of the Hall sensor, respectively, when the camera is in the retracted position; the step of controlling the drive assembly to move the bracket in a preset direction upon receiving a trigger operation from a user includes controlling the drive assembly to move the bracket in a second direction upon receiving a trigger operation input by the user to turn off the camera; the step of calculating a difference between the first induced signal and a first reference signal and a difference between the second induced signal and a second reference signal further comprises the step of calculating a difference between the first induced signal and the first receding reference signal and a difference between the second induced signal and the second receding reference signal, determining whether the absolute value of the difference is less than a preset threshold further comprises determining whether the absolute value of the difference is less than the second preset threshold; 7. The position detection method of claim 1, wherein the step of determining that the camera is in the extended position or the retracted position if the absolute value of the difference is less than the preset threshold further comprises the step of determining that the camera is in the retracted position if the absolute value of the difference is less than the second preset threshold.

8. The position detection method further comprises:

7. The method of claim 6, further comprising the steps of: if the absolute value of the difference is not less than the first preset threshold, controlling the bracket to continue moving in the first direction; determining whether the camera is in the extended position; and if the camera is not yet in the extended position, controlling the bracket to move in a second direction such that the camera is in the retracted position.

9. The position detection method further comprises:

8. The method of claim 7, further comprising the steps of: controlling the bracket to continue moving in the second direction if the absolute value of the difference is not less than the second preset threshold; determining whether the camera is in the retracted position; and controlling the drive assembly to stop operation if the camera is not yet in the retracted position.

10. The position detection method further comprises: acquiring a first induced signal and a second induced signal generated by the Hall sensor when the camera is in the extended position; determining whether the first induced signal and the second induced signal are changing; If the first and second induced signals are changing, determining whether the amount of change in the first and second induced signals is greater than a third preset threshold; controlling the drive assembly to move the bracket in a second direction such that the camera is in the retracted position if the amount of change in the first guiding signal and the second guiding signal is greater than the third preset threshold. The method of claim 1 , further comprising:

11. A position detection method applicable to a mobile terminal, the mobile terminal comprising a housing, a circuit board, a bracket, and a camera device, the circuit board, the bracket, and the camera device being arranged in the housing, the housing being provided with an opening, and a receiving cavity communicating with the opening and receiving the camera device, the camera device having a camera and a drive assembly, the camera being arranged on the bracket, the drive assembly being connected to the bracket, the circuit board being provided with a Hall sensor, and the bracket being provided with a first magnet, the position detection method comprising: upon receiving a user trigger operation, controlling the drive assembly to move the bracket in a preset direction; acquiring a first induced signal and a second induced signal generated by the Hall sensor, the first induced signal being an induced signal generated by a first acting surface of the Hall sensor sensing a magnetic field of the first magnet, and the second induced signal being an induced signal generated by a second acting surface of the Hall sensor sensing the magnetic field of the first magnet, the first acting surface and the second acting surface extending in different directions; determining a position state of the camera based on the acquired first guiding signal and the acquired second guiding signal, the position state of the camera including an extended position and a retracted position; Equipped with The position detection method further comprises: acquiring a first induced signal and a second induced signal generated by the Hall sensor when the camera is in the extended position; determining whether the first induced signal and the second induced signal are changing; If the first and second induced signals are changing, determining whether the amount of change in the first and second induced signals is greater than a third preset threshold; controlling the drive assembly to move the bracket in a second direction such that the camera is in the retracted position if the amount of change in the first guiding signal and the second guiding signal is greater than the third preset threshold. A position detection method comprising:

12. A position detection method applied to a mobile terminal, the mobile terminal comprising a housing, a circuit board, a bracket, and a camera device, the circuit board, the bracket, and the camera device being disposed in the housing, the housing being provided with an opening, and a receiving cavity communicating with the opening and receiving the camera device, the camera device having a camera and a drive assembly, the camera being disposed on the bracket, the drive assembly being connected to the bracket, a Hall sensor being provided on the circuit board, and a first magnet being provided on the bracket, the position detection method comprising: upon receiving a user trigger operation, controlling the drive assembly to move the bracket in a preset direction; acquiring a first induced signal and a second induced signal generated by the Hall sensor, the first induced signal being an induced signal generated by a first working surface of the Hall sensor sensing a magnetic field of the first magnet, and the second induced signal being an induced signal generated by a second working surface of the Hall sensor sensing the magnetic field of the first magnet; determining a position state of the camera based on the acquired first guiding signal and the acquired second guiding signal, the position state of the camera including an extended position and a retracted position; Equipped with The position detection method further comprises: acquiring a first induced signal and a second induced signal generated by the Hall sensor when the camera is in the extended position; determining whether the first induced signal and the second induced signal are changing; If the first and second induced signals are changing, determining whether the amount of change in the first and second induced signals is greater than a third preset threshold; controlling the drive assembly to move the bracket in a second direction such that the camera is in the retracted position if the amount of change in the first guiding signal and the second guiding signal is greater than the third preset threshold. A position detection method comprising:

13. Prior to the step of controlling the drive assembly to move the bracket in the second direction such that the camera is in the retracted position, the position detection method further comprises: acquiring a third induced signal generated by the Hall sensor and calculating a difference between the third induced signal and a steady-state signal, the third induced signal being generated by a third active surface of the Hall sensor sensing the magnetic field of the first magnet, and the steady-state signal being an induced signal generated by the third active surface of the Hall sensor in an environment where the mobile terminal is not affected by an external magnetic field; determining whether the absolute value of the difference is greater than a reference threshold; if the absolute value of the difference is not greater than the reference threshold, controlling the drive assembly to move the bracket in the second direction such that the camera is in the retracted position. The method of claim 10 , further comprising:

14. The method of claim 13, further comprising controlling the mobile terminal to generate an indication if the absolute value of the difference is greater than the reference threshold.

15. A position detection mechanism, A first body; a second body spaced apart from the first body and movable relative to the first body; A first magnet disposed in the second body; a Hall sensor disposed on the first body, the Hall sensor including a first working surface and a second working surface extending in different directions; Equipped with the position detection mechanism further includes a second magnet, the second magnet and the first magnet being disposed at an interval in the second body; a line connecting a center point of the first magnet and a center point of the second magnet is substantially parallel to a moving direction of the second body; a north-south axis of the first magnet and a north-south axis of the second magnet are each substantially parallel to a direction of movement of the second body; A position sensing mechanism, wherein adjacent ends of the first magnet and the second magnet are of the same polarity.

16. 16. The position detection mechanism of claim 15, wherein a direction of movement of the first acting surface and a direction of movement of the second body are substantially perpendicular, the second acting surface is substantially perpendicular to the first acting surface, and both the first acting surface and the second acting surface are substantially perpendicular to a surface of the first body on which the Hall sensor is disposed.

17. 17. The position detection mechanism according to claim 15 or 16, wherein the Hall sensor further comprises a third working surface, the direction of extension of which is different from the directions of extension of both the first working surface and the second working surface.

18. 18. The position sensing mechanism of claim 17, wherein the third working surface is substantially perpendicular to the first working surface and the second working surface, respectively.

Citation Information

Patent Citations

  • Camera control method and mobile terminal

    CN107819907A

  • Telescopic camera ascending and descending protection mechanism

    CN108758232A

  • Terminal device and control method

    CN108965660A

  • Camera module and electronic device

    EP3654631A1

  • Position detector, camera shake correction mechanism, and imaging device

    JP2005331399A