CN110307775A - Position detection method of slide-out assembly, detection assembly and electronic device - Google Patents
- ️Tue Oct 08 2019
技术领域technical field
本发明涉及电子技术领域,尤其涉及一种滑出组件的位置检测方法、检测组件及电子装置。The present invention relates to the field of electronic technology, and in particular, to a position detection method of a slide-out component, a detection component and an electronic device.
背景技术Background technique
为了提高用户体验,手机的屏占比越来越大,甚至已经有人提出全面屏的设计,如此,如何设置和使用原来设置在前面板上的前置相机成为亟待解决的问题。In order to improve the user experience, the screen ratio of mobile phones is getting larger and larger, and some people have even proposed a full-screen design. Therefore, how to set and use the front camera that was originally set on the front panel has become an urgent problem to be solved.
发明内容SUMMARY OF THE INVENTION
本发明提供一种滑出组件的位置检测方法、检测组件及电子装置。The invention provides a position detection method of a sliding-out component, a detection component and an electronic device.
本发明公开了一种滑出组件的位置检测方法。所述滑出组件用于电子装置,所述电子装置包括本体和检测组件,所述滑出组件用于在收容于所述本体的第一位置和自所述本体露出的第二位置之间滑动,所述检测组件包括磁场产生元件和霍尔元件,所述磁场产生元件和所述霍尔元件分别固定在所述本体和所述滑出组件上,所述霍尔元件包括第一霍尔元件和第二霍尔元件,所述第一霍尔元件和所述第二霍尔元件在所述滑出组件的滑动方向上间隔设置,所述位置检测方法包括步骤:The invention discloses a method for detecting the position of a sliding-out component. The slide-out assembly is used in an electronic device, the electronic device includes a body and a detection assembly, and the slide-out assembly is used for sliding between a first position accommodated in the body and a second position exposed from the body , the detection assembly includes a magnetic field generating element and a Hall element, the magnetic field generating element and the Hall element are respectively fixed on the body and the slide-out assembly, and the Hall element includes a first Hall element and a second Hall element, the first Hall element and the second Hall element are arranged at intervals in the sliding direction of the slide-out assembly, and the position detection method includes the steps:
接收所述第一霍尔元件输出的第一待选信号值和所述第二霍尔元件输出的第二待选信号值;receiving the first candidate signal value output by the first Hall element and the second candidate signal value output by the second Hall element;
从所述第一待选信号值和所述第二待选信号值中选出检测信号值;和selecting a detected signal value from the first candidate signal value and the second candidate signal value; and
根据所述检测信号值确定所述滑出组件相对于所述本体的当前相对位置。The current relative position of the slide-out assembly relative to the body is determined according to the detection signal value.
本发明公开了一种检测组件。所述检测组件用于检测滑出组件的位置,所述滑出组件用于电子装置,所述电子装置包括本体,所述滑出组件用于在收容于所述本体的第一位置和自所述本体露出的第二位置之间滑动,所述检测组件包括磁场产生元件和霍尔元件,所述磁场产生元件和所述霍尔元件分别固定在所述本体和所述滑出组件上,所述霍尔元件包括第一霍尔元件和第二霍尔元件,所述第一霍尔元件和所述第二霍尔元件在所述滑出组件的滑动方向上间隔设置,所述检测组件包括处理器,所述处理器用于:The invention discloses a detection component. The detection component is used for detecting the position of the sliding-out component, and the sliding-out component is used for an electronic device, and the electronic device includes a body, and the sliding-out component is used for detecting the position of the sliding-out component in the first position accommodated in the body and from the Sliding between the exposed second positions of the body, the detection assembly includes a magnetic field generating element and a Hall element, and the magnetic field generating element and the Hall element are respectively fixed on the body and the sliding-out assembly, so The hall element includes a first hall element and a second hall element, the first hall element and the second hall element are arranged at intervals in the sliding direction of the slide-out assembly, and the detection assembly includes a processor for:
接收所述第一霍尔元件输出的第一待选信号值和所述第二霍尔元件输出的第二待选信号值;receiving the first candidate signal value output by the first Hall element and the second candidate signal value output by the second Hall element;
从所述第一待选信号值和所述第二待选信号值中选出检测信号值;和selecting a detected signal value from the first candidate signal value and the second candidate signal value; and
根据所述检测信号值确定所述滑出组件相对于所述本体的当前相对位置。The current relative position of the slide-out assembly relative to the body is determined according to the detection signal value.
本发明公开了一种电子装置。所述电子装置包括:The invention discloses an electronic device. The electronic device includes:
本体;ontology;
滑出组件,所述滑出组件用于在收容于所述本体的第一位置和自所述本体露出的第二位置之间滑动;和a slide-out assembly for sliding between a first position housed in the body and a second position exposed from the body; and
检测组件,所述检测组件用于检测所述滑出组件的位置,所述检测组件包括磁场产生元件、霍尔元件和处理器,所述磁场产生元件和所述霍尔元件分别固定在所述本体和所述滑出组件上,所述霍尔元件包括第一霍尔元件和第二霍尔元件,所述第一霍尔元件和所述第二霍尔元件在所述滑出组件的滑动方向上间隔设置,所述处理器用于:接收所述第一霍尔元件输出的第一待选信号值和所述第二霍尔元件输出的第二待选信号值;从所述第一待选信号值和所述第二待选信号值中选出检测信号值;和根据所述检测信号值确定所述滑出组件相对于所述本体的当前相对位置。a detection component, the detection component is used for detecting the position of the sliding-out component, the detection component includes a magnetic field generating element, a hall element and a processor, and the magnetic field generating element and the hall element are respectively fixed on the On the body and the slide-out assembly, the Hall element includes a first Hall element and a second Hall element, and the first Hall element and the second Hall element slide on the slide-out assembly spaced in the direction, the processor is configured to: receive the first candidate signal value output by the first Hall element and the second candidate signal value output by the second Hall element; selecting a detection signal value from the selection signal value and the second candidate signal value; and determining the current relative position of the slide-out assembly relative to the body according to the detection signal value.
本发明实施方式的滑出组件的位置检测方法,检测组件和电子装置利用磁场产生元件和两个霍尔元件确定滑出组件的当前相对位置,在前置相机等功能器件承载在滑出组件上时,可以实时地且更加精确地检测滑出组件的状态,从而确定功能器件的位置。In the method for detecting the position of the slide-out assembly according to the embodiment of the present invention, the detection assembly and the electronic device use a magnetic field generating element and two Hall elements to determine the current relative position of the slide-out assembly, and functional devices such as a front camera are carried on the slide-out assembly. , the state of the slide-out assembly can be detected in real time and more accurately, thereby determining the position of the functional device.
本发明的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。Additional aspects and advantages of the present invention will be set forth, in part, from the following description, and in part will be apparent from the following description, or may be learned by practice of the invention.
附图说明Description of drawings
本发明的上述和/或附加的方面和优点从结合下面附图对实施方式的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of embodiments taken in conjunction with the accompanying drawings, wherein:
图1是本发明实施方式的电子装置在第二位置时的状态示意图;1 is a schematic diagram of a state of an electronic device according to an embodiment of the present invention when it is in a second position;
图2是本发明实施方式的电子装置在第一位置时的状态示意图;FIG. 2 is a schematic diagram of the state of the electronic device according to the embodiment of the present invention when it is in a first position;
图3是本发明实施方式的电子装置在第三位置时的状态示意图;3 is a schematic diagram of the state of the electronic device according to the embodiment of the present invention when it is in a third position;
图4是本发明实施方式的检测组件的结构示意图;4 is a schematic structural diagram of a detection assembly according to an embodiment of the present invention;
图5是本发明实施方式的电子装置的使用场景图;5 is a usage scene diagram of an electronic device according to an embodiment of the present invention;
图6是本发明实施方式的电子装置的另一使用场景图;FIG. 6 is another usage scenario diagram of the electronic device according to the embodiment of the present invention;
图7是本发明实施方式的电子装置的结构示意图;7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
图8是本发明实施方式的位置检测方法的流程示意图;8 is a schematic flowchart of a position detection method according to an embodiment of the present invention;
图9是本发明实施方式的标定相对位置与预设信号值的关系曲线示意图;9 is a schematic diagram of a relationship curve between a calibrated relative position and a preset signal value according to an embodiment of the present invention;
图10是本发明实施方式的位置检测方法的另一流程示意图。FIG. 10 is another schematic flowchart of a position detection method according to an embodiment of the present invention.
主要元件符号说明:Description of main component symbols:
电子装置100、本体10、壳体12、显示组件14、盖板142、滑槽16、凹槽162、滑出组件20、承载件22、螺纹孔24、转动丝杆26、检测组件30、磁场产生元件32、霍尔元件34、第一霍尔元件342、第二霍尔元件344、处理器36、功能器件40、前置相机42、听筒44、驱动装置50、驱动电机52、第一位置A、第二位置B、第三位置C、第一关系曲线a、第二关系曲线b。Electronic device 100 , body 10 , casing 12 , display assembly 14 , cover plate 142 , chute 16 , groove 162 , slide-out assembly 20 , carrier 22 , threaded hole 24 , rotating screw 26 , detection assembly 30 , magnetic field Generation element 32, Hall element 34, first Hall element 342, second Hall element 344, processor 36, functional device 40, front camera 42, earpiece 44, drive device 50, drive motor 52, first position A, second position B, third position C, first relationship curve a, second relationship curve b.
具体实施方式Detailed ways
下面详细描述本发明的实施方式,所述实施方式的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施方式是示例性的,仅用于解释本发明,而不能理解为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary, only used to explain the present invention, and should not be construed as a limitation of the present invention.
在本发明的描述中,需要理解的是,术语“中心”、“纵向”、“横向”、“长度”、“宽度”、“厚度”、“上”、“下”、“前”、“后”、“左”、“右”、“竖直”、“水平”、“顶”、“底”、“内”、“外”、“顺时针”、“逆时针”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本发明的限制。此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个所述特征。在本发明的描述中,“多个”的含义是两个或两个以上,除非另有明确具体的限定。In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", " rear, left, right, vertical, horizontal, top, bottom, inside, outside, clockwise, counterclockwise, etc., or The positional relationship is based on the orientation or positional relationship shown in the accompanying drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, Therefore, it should not be construed as a limitation of the present invention. In addition, the terms "first" and "second" are only used for descriptive purposes, and should not be construed as indicating or implying relative importance or implying the number of indicated technical features. Thus, features defined as "first", "second" may expressly or implicitly include one or more of said features. In the description of the present invention, "plurality" means two or more, unless otherwise expressly and specifically defined.
在本发明的描述中,需要说明的是,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接或可以相互通讯;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通或两个元件的相互作用关系。对于本领域的普通技术人员而言,可以根据具体情况理解上述术语在本发明中的具体含义。In the description of the present invention, it should be noted that the terms "installed", "connected" and "connected" should be understood in a broad sense, unless otherwise expressly specified and limited, for example, it may be a fixed connection or a detachable connection Connection, or integral connection; it can be mechanical connection, electrical connection or can communicate with each other; it can be directly connected or indirectly connected through an intermediate medium, it can be the internal communication of two elements or the interaction of two elements relation. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.
在本发明中,除非另有明确的规定和限定,第一特征在第二特征之“上”或之“下”可以包括第一和第二特征直接接触,也可以包括第一和第二特征不是直接接触而是通过它们之间的另外的特征接触。而且,第一特征在第二特征“之上”、“上方”和“上面”包括第一特征在第二特征正上方和斜上方,或仅仅表示第一特征水平高度高于第二特征。第一特征在第二特征“之下”、“下方”和“下面”包括第一特征在第二特征正下方和斜下方,或仅仅表示第一特征水平高度小于第二特征。In the present invention, unless otherwise expressly specified and limited, a first feature "on" or "under" a second feature may include the first and second features in direct contact, or may include the first and second features Not directly but through additional features between them. Also, the first feature being "above", "over" and "above" the second feature includes the first feature being directly above and obliquely above the second feature, or simply means that the first feature is level higher than the second feature. The first feature is "below", "below" and "below" the second feature includes the first feature being directly below and diagonally below the second feature, or simply means that the first feature has a lower level than the second feature.
下文的公开提供了许多不同的实施方式或例子用来实现本发明的不同结构。为了简化本发明的公开,下文中对特定例子的部件和设置进行描述。当然,它们仅仅为示例,并且目的不在于限制本发明。此外,本发明可以在不同例子中重复参考数字和/或参考字母,这种重复是为了简化和清楚的目的,其本身不指示所讨论各种实施方式和/或设置之间的关系。此外,本发明提供了的各种特定的工艺和材料的例子,但是本领域普通技术人员可以意识到其他工艺的应用和/或其他材料的使用。The following disclosure provides many different embodiments or examples for implementing different structures of the present invention. In order to simplify the disclosure of the present invention, the components and arrangements of specific examples are described below. Of course, they are only examples and are not intended to limit the invention. Furthermore, the present disclosure may repeat reference numerals and/or reference letters in different instances for the purpose of simplicity and clarity and not in itself indicative of a relationship between the various embodiments and/or arrangements discussed. In addition, the present disclosure provides examples of various specific processes and materials, but one of ordinary skill in the art will recognize the application of other processes and/or the use of other materials.
请参阅图1至图4,本发明实施方式的电子装置100包括本体10、滑出组件20和检测组件30。滑出组件20用于在收容于本体10的第一位置A和自本体10露出的第二位置B之间滑动。检测组件30用于检测滑出组件20的位置,检测组件30包括磁场产生元件32、霍尔元件34和处理器36,磁场产生元件32和霍尔元件34分别固定在本体10和滑出组件20上,霍尔元件34包括第一霍尔元件342和第二霍尔元件344,第一霍尔元件342和第二霍尔元件344在滑出组件20的滑动方向上间隔设置,处理器36用于接收第一霍尔元件342输出的第一待选信号值和第二霍尔元件344输出的第二待选信号值;从第一待选信号值和第二待选信号值中选出检测信号值;和根据检测信号值确定滑出组件20相对于本体10的当前相对位置。值得注意的是,此处“磁场产生元件32和霍尔元件34分别固定在本体10和滑出组件20上”包括两种情况,一是磁场产生元件32固定在本体10上,第一霍尔元件342和第二霍尔元件344固定在滑出组件20上,二是磁场产生元件32固定在滑出组件20上,第一霍尔元件342和第二霍尔元件344固定在本体10上。也即是说,只要磁场产生元件32与第一霍尔元件342和第二霍尔元件344可以产生相对运动,不对磁场产生元件32和霍尔元件34的具体位置做限制。Referring to FIGS. 1 to 4 , the electronic device 100 according to the embodiment of the present invention includes a main body 10 , a slide-out component 20 and a detection component 30 . The slide-out assembly 20 is used for sliding between a first position A accommodated in the body 10 and a second position B exposed from the body 10 . The detection assembly 30 is used to detect the position of the slide-out assembly 20. The detection assembly 30 includes a magnetic field generating element 32, a Hall element 34 and a processor 36. The magnetic field generating element 32 and the Hall element 34 are respectively fixed on the body 10 and the sliding-out assembly 20. On the other hand, the Hall element 34 includes a first Hall element 342 and a second Hall element 344. The first Hall element 342 and the second Hall element 344 are spaced apart in the sliding direction of the slide-out assembly 20. The processor 36 uses In order to receive the first candidate signal value output by the first Hall element 342 and the second candidate signal value output by the second Hall element 344; select and detect from the first candidate signal value and the second candidate signal value and determining the current relative position of the slide-out assembly 20 relative to the body 10 according to the detected signal value. It is worth noting that "the magnetic field generating element 32 and the Hall element 34 are respectively fixed on the body 10 and the slide-out assembly 20" here, including two cases, one is that the magnetic field generating element 32 is fixed on the body 10, the first Hall The element 342 and the second Hall element 344 are fixed on the slide-out assembly 20 , the second is that the magnetic field generating element 32 is fixed on the slide-out assembly 20 , and the first Hall element 342 and the second Hall element 344 are fixed on the body 10 . That is to say, as long as the magnetic field generating element 32 and the first Hall element 342 and the second Hall element 344 can move relative to each other, the specific positions of the magnetic field generating element 32 and the Hall element 34 are not limited.
在某些实施方式中,本体10形成有滑槽16,滑出组件20在第一位置A时收容于滑槽16内。如此,可以使得滑出组件20通过滑槽16在第一位置A和第二位置B之间滑动。In some embodiments, the body 10 is formed with a chute 16 , and the slide-out assembly 20 is accommodated in the chute 16 when the slide-out assembly 20 is in the first position A. As shown in FIG. In this way, the slide-out assembly 20 can be slid between the first position A and the second position B through the chute 16 .
具体地,本体10包括壳体12和显示组件14,壳体12和显示组件14组合在一起构成封闭式结构。滑槽16开设在壳体12,从而实现滑出组件20的滑回与滑出。可以理解,滑槽16可以开设在壳体12的任意一条侧边。优选地,滑槽16开设在壳体12的顶边。如此可以符合用户的使用习惯。Specifically, the body 10 includes a casing 12 and a display assembly 14, and the casing 12 and the display assembly 14 are combined together to form a closed structure. The chute 16 is opened in the housing 12 so as to realize the sliding back and sliding out of the sliding-out assembly 20 . It can be understood that the chute 16 can be provided on any side of the housing 12 . Preferably, the chute 16 is opened on the top edge of the housing 12 . This can conform to the user's usage habits.
显示组件14包括触控面板(图未示)和盖板142。触控面板包括显示模组(图未示)和设置在显示模组上的触控层(图未示)。显示模组例如为液晶显示模组(LCD Module,LCM),当然,显示模组也可以为柔性的显示模组。触控层用于接收用户的触控输入,以产生用于控制显示模组显示的内容的信号和控制滑出组件20滑动的信号。The display assembly 14 includes a touch panel (not shown) and a cover 142 . The touch panel includes a display module (not shown) and a touch layer (not shown) disposed on the display module. The display module is, for example, a liquid crystal display module (LCD Module, LCM). Of course, the display module can also be a flexible display module. The touch layer is used for receiving a user's touch input to generate a signal for controlling the content displayed by the display module and a signal for controlling the sliding of the slide-out component 20 .
盖板142的材料可以由玻璃、陶瓷或蓝宝石等透光材料制成。由于盖板142由于作为电子装置100的输入零件,盖板142经常受到碰撞或刮划等接触。例如,用户将电子装置100放入口袋时,盖板142可能被用户口袋中的钥匙刮划而损伤。因此,盖板142的材料可以采用硬度较大的材料,例如以上的蓝宝石材料。或者在盖板142的表面形成硬化层以提高盖板142的抗刮能力。The material of the cover plate 142 may be made of transparent materials such as glass, ceramics or sapphire. Since the cover plate 142 is an input part of the electronic device 100, the cover plate 142 is often subjected to contact such as bumps or scratches. For example, when a user puts the electronic device 100 into a pocket, the cover 142 may be scratched and damaged by a key in the user's pocket. Therefore, the material of the cover plate 142 may be a material with relatively high hardness, such as the above sapphire material. Alternatively, a hardened layer may be formed on the surface of the cover plate 142 to improve the scratch resistance of the cover plate 142 .
触控面板与盖板142例如通过光学胶(Optically Clear Adhesive,OCA)粘接固定在一起,光学胶不仅粘接固定触控面板及盖板142,还可以透过触控面板发出的光线。The touch panel and the cover 142 are bonded and fixed together by, for example, Optical Clear Adhesive (OCA). The optical adhesive not only bonds and fixes the touch panel and the cover 142 , but also transmits light emitted by the touch panel.
请参阅图5,在某些实施方式中,电子装置100包括前置相机42,滑出组件20包括承载件22,前置相机42设置在承载件22上。如此,前置相机42可以随着滑出组件20滑动。当然,可以将用户打开前置相机42和关闭前置相机42作为触发信号,也即是说,当用户打开前置相机42时,触发滑出组件20滑出,当用户关闭前置相机42时,触发滑出组件20滑回。如此用户只需依照现有的习惯打开或关闭前置相机,而无需针对滑出组件20进行另外的操作,可以方便用户的使用。Referring to FIG. 5 , in some embodiments, the electronic device 100 includes a front camera 42 , the slide-out assembly 20 includes a carrier 22 , and the front camera 42 is disposed on the carrier 22 . In this way, the front camera 42 can slide with the slide-out assembly 20 . Of course, the user can open the front camera 42 and close the front camera 42 as the trigger signal, that is, when the user opens the front camera 42, the slide-out component 20 is triggered to slide out, and when the user closes the front camera 42 , trigger the slide-out assembly 20 to slide back. In this way, the user only needs to open or close the front camera according to the existing habits, and does not need to perform another operation on the slide-out assembly 20, which can be convenient for the user to use.
除前置相机42之外,承载件22上也可以承载其他的功能器件40,功能器件40比如为光线传感器、接近传感器和听筒44等,如图1所示。这些功能器件40可以根据用户的输入随着滑出组件20的滑出而从本体10露出从而正常工作,也可以根据用户的输入随着滑出组件20的滑回而收容在本体10内。如此,可以尽量少地在显示组件14上设置通孔,有利于满足电子装置100全面屏的设计需求。In addition to the front camera 42 , the carrier 22 may also carry other functional devices 40 , such as a light sensor, a proximity sensor, an earpiece 44 , etc., as shown in FIG. 1 . These functional devices 40 can be exposed from the body 10 as the slide-out assembly 20 slides out according to the user's input to work normally, or can be accommodated in the body 10 as the slide-out assembly 20 slides back according to the user's input. In this way, the display assembly 14 can be provided with as few through holes as possible, which is beneficial to meet the design requirements of the full screen of the electronic device 100 .
具体地,当承载件22上承载有光线传感器时,可以将光线传感器设置在承载件22的顶部,也即是说,当滑出组件20完全收容于滑槽16内时,光线传感器依旧可以从承载件22的顶部露出,从而实时感应光线。Specifically, when the light sensor is carried on the carrier 22, the light sensor can be arranged on the top of the carrier 22, that is to say, when the slide-out assembly 20 is completely accommodated in the chute 16, the light sensor can still be removed from the The top of the carrier 22 is exposed to sense light in real time.
请参阅图6,当承载件22上承载有接近传感器和听筒44时,可以将用户接听电话和挂断电话作为触发信号,也即是说,当用户接听电话时,触发滑出组件20滑出,当用户挂断电话时,触发滑出组件20滑回。如此用户只需依照现有的习惯接听或挂断电话,而无需针对滑出组件20进行另外的操作,可以方便用户的使用。Referring to FIG. 6 , when the carrier 22 carries the proximity sensor and the receiver 44, the user can answer the call and hang up the call as a trigger signal, that is to say, when the user answers the call, the sliding-out component 20 is triggered to slide out , when the user hangs up the phone, the slide-out component 20 is triggered to slide back. In this way, the user only needs to answer or hang up the phone according to the existing habits, and does not need to perform another operation on the slide-out assembly 20, which can facilitate the use of the user.
可以理解,多个功能器件40可以承载在同一个承载件22上,也可以承载在多个承载件上。当多个功能器件40承载在同一个承载件22上时,多个功能器件40可以纵向排列,处理器36可以通过控制滑出组件20滑出的距离控制设置在承载件22下部的功能器件40是否露出。当多个功能器件40承载在同多个承载件22上时,处理器36可以通过控制某个承载件22的滑动从而选择需要露出的功能器件40。如此,可以给用户提供多种滑出的形式,使得用户可以根据不同的场景和需求进行选择。It can be understood that a plurality of functional devices 40 may be carried on the same carrier 22, or may be carried on multiple carriers. When a plurality of functional devices 40 are carried on the same carrier 22, the plurality of functional devices 40 can be arranged longitudinally, and the processor 36 can control the functional devices 40 disposed at the lower part of the carrier 22 by controlling the sliding distance of the slide-out assembly 20. whether exposed. When multiple functional devices 40 are carried on the same multiple carriers 22 , the processor 36 can select the functional device 40 to be exposed by controlling the sliding of a certain carrier 22 . In this way, a variety of slide-out forms can be provided to the user, so that the user can choose according to different scenarios and needs.
请参阅图7,在某些实施方式中,滑出组件20包括设置在承载件22中部的螺纹孔24和与螺纹孔24配合的转动丝杆26。滑槽16包括与螺纹孔24相对设置且位于滑槽16底部的凹槽162。电子装置100包括设置在凹槽162的驱动装置50。驱动装置50包括与处理器36连接的驱动电机52和与转动丝杆26的底部连接的输出轴(图未示)。Referring to FIG. 7 , in some embodiments, the slide-out assembly 20 includes a threaded hole 24 disposed in the middle of the carrier 22 and a rotating screw 26 matched with the threaded hole 24 . The chute 16 includes a groove 162 disposed opposite the threaded hole 24 and located at the bottom of the chute 16 . The electronic device 100 includes the driving device 50 disposed in the groove 162 . The drive device 50 includes a drive motor 52 connected to the processor 36 and an output shaft (not shown) connected to the bottom of the rotating screw 26 .
可以理解,处理器36可以通过控制驱动电机52来控制滑出组件20的滑动。当用户命令滑出组件20从第一位置A向第二位置B滑动时,处理器36控制驱动电机52正转,从而使得输出轴带动转动丝杆26在螺纹孔24内转动,进而使得滑出组件20从第一位置A向第二位置B滑动。当用户命令滑出组件20从第二位置B向第一位置A滑动时,处理器36控制驱动电机52反转,从而使得输出轴带动转动丝杆26在螺纹孔24内转动,进而使得滑出组件20从第二位置B向第一位置A滑动。值得注意的是,此处的“从第一位置A向第二位置B”和“从第二位置B向第一位置A”是指滑动的方向,而不是指滑动的起点和终点。It will be appreciated that the processor 36 may control the sliding of the slide-out assembly 20 by controlling the drive motor 52 . When the user commands the slide-out assembly 20 to slide from the first position A to the second position B, the processor 36 controls the drive motor 52 to rotate forward, so that the output shaft drives the rotating screw 26 to rotate in the threaded hole 24, thereby making the slide-out The assembly 20 slides from the first position A to the second position B. When the user commands the slide-out assembly 20 to slide from the second position B to the first position A, the processor 36 controls the drive motor 52 to reverse, so that the output shaft drives the rotating screw 26 to rotate in the threaded hole 24, thereby making the slide-out The assembly 20 slides from the second position B to the first position A. It is worth noting that "from the first position A to the second position B" and "from the second position B to the first position A" here refer to the direction of sliding, rather than the starting point and end point of the sliding.
本发明实施方式的电子装置100利用霍尔元件34和磁场产生元件32确定滑出组件20的当前相对位置,在前置相机等功能器件40承载在滑出组件20上时,可以实时地检测滑出组件20的状态,从而确定功能器件40的位置。The electronic device 100 according to the embodiment of the present invention uses the Hall element 34 and the magnetic field generating element 32 to determine the current relative position of the slide-out assembly 20 . The state of the assembly 20 is obtained to determine the position of the functional device 40 .
另外,由于霍尔元件34包括在滑出组件20的滑动方向上间隔设置的第一霍尔元件342和第二霍尔元件344,可以在第一霍尔元件342输出的第一待选信号值和第二霍尔元件344输出的第二待选信号值中选择更加精确的作为检测信号值。如此,可以使得对滑出组件20的位置的检测精度更高、抗干扰更强。In addition, since the hall element 34 includes the first hall element 342 and the second hall element 344 arranged at intervals in the sliding direction of the slide-out assembly 20 , the value of the first candidate signal output by the first hall element 342 can be A more accurate detection signal value is selected from the second candidate signal value output by the second Hall element 344 . In this way, the detection accuracy of the position of the slide-out assembly 20 can be higher, and the anti-interference can be stronger.
可以理解,前置相机42等功能器件40需要自本体10露出,否则无法正常工作。本发明实施方式的电子装置100通过在滑出组件上承载功能器件40,使得功能器件40在不需要工作时收容在本体10内,在需要工作时随着滑出组件20从本体10露出。如此,无需在显示组件14上开设用以露出前置相机42等功能器件40的通孔,从而增大屏占比,进而提高用户的体验。It can be understood that the functional devices 40 such as the front camera 42 need to be exposed from the main body 10 , otherwise they cannot work normally. The electronic device 100 according to the embodiment of the present invention carries the functional device 40 on the slide-out assembly, so that the functional device 40 is accommodated in the body 10 when it does not need to work, and is exposed from the body 10 along with the slide-out assembly 20 when it needs to work. In this way, there is no need to open a through hole on the display assembly 14 for exposing the functional device 40 such as the front camera 42, thereby increasing the screen ratio and improving the user experience.
请参阅图8,本发明提供了一种滑出组件的位置检测方法。本发明实施方式的滑出组件的位置检测方法可以用于检测本发明实施方式的电子装置100的滑出组件20的位置。Referring to FIG. 8 , the present invention provides a method for detecting the position of the slide-out assembly. The method for detecting the position of the slide-out assembly according to the embodiment of the present invention can be used to detect the position of the slide-out assembly 20 of the electronic device 100 according to the embodiment of the present invention.
电子装置100包括本体10和检测组件30,滑出组件20用于在收容于本体10的第一位置A和自本体10露出的第二位置B之间滑动,检测组件30包括磁场产生元件32和霍尔元件34,磁场产生元件32和霍尔元件34分别固定在本体10和滑出组件20上,霍尔元件34包括第一霍尔元件342和第二霍尔元件344,第一霍尔元件342和第二霍尔元件344在滑出组件20的滑动方向上间隔设置,位置检测方法包括步骤:The electronic device 100 includes a main body 10 and a detection assembly 30. The slide-out assembly 20 is used for sliding between a first position A accommodated in the main body 10 and a second position B exposed from the main body 10. The detection assembly 30 includes a magnetic field generating element 32 and The Hall element 34, the magnetic field generating element 32 and the Hall element 34 are respectively fixed on the body 10 and the slide-out assembly 20. The Hall element 34 includes a first Hall element 342 and a second Hall element 344. The first Hall element 342 and the second Hall element 344 are arranged at intervals in the sliding direction of the slide-out assembly 20, and the position detection method includes the steps:
S12:接收第一霍尔元件342输出的第一待选信号值和第二霍尔元件344输出的第二待选信号值;S12: Receive the first candidate signal value output by the first Hall element 342 and the second candidate signal value output by the second Hall element 344;
S13:从第一待选信号值和第二待选信号值中选出检测信号值;和S13: select the detection signal value from the first candidate signal value and the second candidate signal value; and
S14:根据检测信号值确定滑出组件20相对于本体10的当前相对位置。S14: Determine the current relative position of the slide-out assembly 20 relative to the body 10 according to the detection signal value.
请参阅图4,本发明提供了一种检测组件30。检测组件30包括处理器36,处理器36用于接收第一霍尔元件342输出的第一待选信号值和第二霍尔元件344输出的第二待选信号值;从第一待选信号值和第二待选信号值中选出检测信号值;和根据检测信号值确定滑出组件20相对于本体10的当前相对位置。Referring to FIG. 4 , the present invention provides a detection assembly 30 . The detection assembly 30 includes a processor 36, and the processor 36 is configured to receive the first candidate signal value output by the first Hall element 342 and the second candidate signal value output by the second Hall element 344; The detection signal value is selected from the value and the second candidate signal value; and the current relative position of the slide-out assembly 20 relative to the body 10 is determined according to the detection signal value.
本发明实施方式的滑出组件的位置检测方法和检测组件30,利用霍尔元件34和磁场产生元件32确定滑出组件20的当前相对位置,在前置相机等功能器件40承载在滑出组件20上时,可以实时地检测滑出组件20的状态,从而确定功能器件40的位置。The method for detecting the position of the slide-out assembly and the detection assembly 30 according to the embodiment of the present invention utilize the Hall element 34 and the magnetic field generating element 32 to determine the current relative position of the slide-out assembly 20, and the functional devices 40 such as the front camera are carried on the slide-out assembly. When the slide-out assembly 20 is on, the state of the slide-out assembly 20 can be detected in real time, so as to determine the position of the functional device 40 .
另外,由于霍尔元件34包括在滑出组件20的滑动方向上间隔设置的第一霍尔元件342和第二霍尔元件344,可以在第一霍尔元件342输出的第一待选信号值和第二霍尔元件344输出的第二待选信号值中选择更加精确的作为检测信号值。如此,可以使得对滑出组件20的位置的检测精度更高、抗干扰更强。In addition, since the hall element 34 includes the first hall element 342 and the second hall element 344 arranged at intervals in the sliding direction of the slide-out assembly 20 , the value of the first candidate signal output by the first hall element 342 can be A more accurate detection signal value is selected from the second candidate signal value output by the second Hall element 344 . In this way, the detection accuracy of the position of the slide-out assembly 20 can be higher, and the anti-interference can be stronger.
本发明实施方式的滑出组件的位置检测方法和检测组件30的工作原理主要是基于霍尔元件34的特性,即霍尔元件34可以感应磁场产生元件32产生的磁场,并根据感应到的磁场强度输出相应的信号。由于磁场强度与相对磁场产生元件32的位置相关,所以可以通过霍尔元件34输出的信号确定霍尔元件34与磁场产生元件32的相对位置。在一个例子中,检测信号值为磁场强度值。另外,由于磁场产生元件32和霍尔元件34分别固定在本体10和滑出组件20上,磁场产生元件32和霍尔元件34可以随着滑出组件20的运动产生相对运动,因而,可以通过确定霍尔元件34与磁场产生元件32的相对位置间接地确定滑出组件20相对于本体10的位置。如此,可以简单方便地实时检测滑出组件20的状态。The method for detecting the position of the slide-out component and the working principle of the detecting component 30 according to the embodiment of the present invention are mainly based on the characteristics of the Hall element 34, that is, the Hall element 34 can sense the magnetic field generated by the magnetic field generating element 32, and according to the sensed magnetic field The intensity outputs the corresponding signal. Since the magnetic field strength is related to the relative position of the magnetic field generating element 32 , the relative position of the Hall element 34 and the magnetic field generating element 32 can be determined by the signal output by the Hall element 34 . In one example, the detection signal value is a magnetic field strength value. In addition, since the magnetic field generating element 32 and the Hall element 34 are respectively fixed on the body 10 and the slide-out assembly 20, the magnetic field generating element 32 and the Hall element 34 can generate relative motion with the movement of the slide-out assembly 20. Determining the relative position of the Hall element 34 and the magnetic field generating element 32 indirectly determines the position of the slide-out assembly 20 relative to the body 10 . In this way, the state of the slide-out assembly 20 can be detected in real time simply and conveniently.
另外,在仅设置一个霍尔元件的情况下,磁场产生元件32与霍尔元件距离较远时,磁场强度较弱,容易被干扰。而在设置两个霍尔元件的情况下,可以通过选择距离磁场产生元件32较近的霍尔元件来缓解或解决这个问题。具体而言,当磁场产生元件32与第一霍尔元件342的距离较近时,采用第一霍尔元件342输出的第一待选信号值作为检测信号值;当磁场产生元件32与第二霍尔元件344的距离较近时,采用第二霍尔元件344输出的第二待选信号值作为检测信号值。如此,可以实现对滑出组件20的定位更加精确,抗干扰更强。In addition, in the case where only one Hall element is provided, when the distance between the magnetic field generating element 32 and the Hall element is relatively long, the magnetic field strength is weak and easily disturbed. In the case of disposing two Hall elements, this problem can be alleviated or solved by selecting the Hall element closer to the magnetic field generating element 32 . Specifically, when the distance between the magnetic field generating element 32 and the first Hall element 342 is relatively close, the first candidate signal value output by the first Hall element 342 is used as the detection signal value; When the distance between the Hall elements 344 is relatively short, the second candidate signal value output by the second Hall element 344 is used as the detection signal value. In this way, more precise positioning of the slide-out assembly 20 and stronger anti-interference can be achieved.
在某些实施方式中,步骤S13包括:In some embodiments, step S13 includes:
选择第一待选信号值和第二待选信号值中的较大值作为检测信号值。The larger value of the first candidate signal value and the second candidate signal value is selected as the detection signal value.
在某些实施方式中,处理器36用于选择第一待选信号值和第二待选信号值中的较大值作为检测信号值。In some embodiments, the processor 36 is configured to select the larger value of the first candidate signal value and the second candidate signal value as the detection signal value.
由于磁场产生元件32与第一霍尔元件342的距离较近时,第一待选信号值比第二待选信号值大;磁场产生元件32与第二霍尔元件344的距离较近时,第二待选信号值比第一待选信号值大。选择第一待选信号值和第二待选信号值中的较大值作为检测信号值可以实现如前所述的当磁场产生元件32与第一霍尔元件342的距离较近时,采用第一霍尔元件342输出的第一待选信号值作为检测信号值;当磁场产生元件32与第二霍尔元件344的距离较近时,采用第二霍尔元件344输出的第二待选信号值作为检测信号值。如此,可以实现对滑出组件20的定位更加精确,抗干扰更强。When the distance between the magnetic field generating element 32 and the first Hall element 342 is relatively close, the value of the first candidate signal is greater than the value of the second candidate signal; when the distance between the magnetic field generating element 32 and the second Hall element 344 is relatively short, The value of the second candidate signal is greater than the value of the first candidate signal. Selecting the larger value of the first candidate signal value and the second candidate signal value as the detection signal value can realize that when the distance between the magnetic field generating element 32 and the first Hall element 342 is close, the first The first candidate signal value output by a Hall element 342 is used as the detection signal value; when the distance between the magnetic field generating element 32 and the second Hall element 344 is relatively close, the second candidate signal output by the second Hall element 344 is used value as the heartbeat value. In this way, more precise positioning of the slide-out assembly 20 and stronger anti-interference can be achieved.
在某些实施方式中,步骤S14包括:In some embodiments, step S14 includes:
读取查询数据库,查询数据库包括多个预设信号值和多个标定相对位置,每个预设信号值与一个标定相对位置对应;和reading a query database, the query database includes a plurality of preset signal values and a plurality of calibrated relative positions, each preset signal value corresponding to a calibrated relative position; and
采用检测信号值查询查询数据库以得到当前相对位置。The query database is queried using the heartbeat value to obtain the current relative position.
在某些实施方式中,处理器36用于读取查询数据库,查询数据库包括多个预设信号值和多个标定相对位置,每个预设信号值与一个标定相对位置对应;和采用检测信号值查询查询数据库以得到当前相对位置。In some embodiments, the processor 36 is configured to read a query database, the query database includes a plurality of preset signal values and a plurality of calibrated relative positions, each preset signal value corresponding to a calibrated relative position; and using the detection signal The value query queries the database to get the current relative position.
由于每个预设信号值与一个标定相对位置对应,也即是说,每个预设信号值对应的有且仅有一个对应的标定相对位置。如此,可以根据检测信号值在查询数据库中读取与检测信号值相关的数据,从而实现根据检测信号值确定当前相对位置。Since each preset signal value corresponds to one calibrated relative position, that is to say, each preset signal value corresponds to one and only one corresponding calibrated relative position. In this way, the data related to the detection signal value can be read in the query database according to the detection signal value, so that the current relative position can be determined according to the detection signal value.
需要指出的是,由于存在两个霍尔元件,有可能出现当滑出组件20处于某个位置时将第一霍尔元件342输出的作为检测信号值的第一待选信号值和当滑出组件20处于另一个位置时第二霍尔元件344输出的作为检测信号值的第二待选信号值相等。因而,需要在从第一待选信号值和第二待选信号值中选出检测信号值的同时,记录检测信号值是来自于第一霍尔元件342还是第二霍尔元件344,并在采用检测信号值查询查询数据库以得到当前相对位置的步骤中,查询与输出检测信号值的霍尔元件相关的数据。在一个例子中,查询数据库包括第一关系表和第二关系表,第一关系表存储有第一待选信号和与第一待选信号对应的标定相对位置,第二关系表存储有第二待选信号和与第二待选信号对应的标定相对位置。当选取第一霍尔元件342输出的第一待选信号值作为检测信号值时,在采用检测信号值查询查询数据库以得到当前相对位置的步骤中,采用检测信号值查询查询数据库中的第一关系表以获得滑出组件20的当前相对位置。当选取第二霍尔元件342输出的第二待选信号值作为检测信号值时,在采用检测信号值查询查询数据库以得到当前相对位置的步骤中,采用检测信号值查询查询数据库中的第二关系表以获得滑出组件20的当前相对位置。It should be pointed out that due to the existence of two Hall elements, it is possible that when the slide-out assembly 20 is in a certain position, the first candidate signal value output by the first Hall element 342 as the detection signal value and the When the component 20 is in another position, the value of the second candidate signal output by the second Hall element 344 as the detection signal value is the same. Therefore, it is necessary to record whether the detection signal value comes from the first Hall element 342 or the second Hall element 344 while selecting the detection signal value from the first candidate signal value and the second candidate signal value, and at the same time In the step of using the detection signal value to query the query database to obtain the current relative position, the data related to the Hall element outputting the detection signal value is queried. In one example, the query database includes a first relationship table and a second relationship table, the first relationship table stores the first candidate signal and the calibrated relative position corresponding to the first candidate signal, and the second relationship table stores the second relationship table. The candidate signal and the calibrated relative position corresponding to the second candidate signal. When the first candidate signal value output by the first Hall element 342 is selected as the detection signal value, in the step of using the detection signal value to query the query database to obtain the current relative position, the detection signal value is used to query the first query database. relationship table to obtain the current relative position of the slide-out assembly 20. When the second candidate signal value output by the second Hall element 342 is selected as the detection signal value, in the step of using the detection signal value to query the query database to obtain the current relative position, the detection signal value is used to query the second query database. relationship table to obtain the current relative position of the slide-out assembly 20.
在某些实施方式中,位置检测方法包括:In certain embodiments, the location detection method includes:
将滑出组件20滑动到多个标定相对位置;和sliding the slide-out assembly 20 to a plurality of calibrated relative positions; and
获取霍尔元件34对应每个标定相对位置输出的检测信号值作为对应标定相对位置的预设信号值。The detection signal value output by the Hall element 34 corresponding to each calibrated relative position is obtained as a preset signal value corresponding to the calibrated relative position.
在某些实施方式中,处理器36用于:将滑出组件20滑动到多个标定相对位置;和获取霍尔元件34对应每个标定相对位置输出的检测信号值作为对应标定相对位置的预设信号值。In some embodiments, the processor 36 is used to: slide the slide-out assembly 20 to a plurality of calibrated relative positions; and obtain the detection signal value output by the Hall element 34 corresponding to each calibrated relative position as a preset corresponding to the calibrated relative position Set the signal value.
通过记录标定相对位置和在该标定相对位置时霍尔元件34输出的检测信号值,可以得到滑出组件20所处的位置与霍尔元件34输出的检测信号的对应关系。如此,在后续的位置检测的过程中,只要得到霍尔元件34输出的检测信号值,便可以通过该步骤确定的对应关系来反向推导出滑出组件20相对于本体10的当前相对位置。By recording the calibration relative position and the detection signal value output by the Hall element 34 at the calibration relative position, the corresponding relationship between the position of the slide-out assembly 20 and the detection signal output by the Hall element 34 can be obtained. In this way, in the subsequent position detection process, as long as the detection signal value output by the Hall element 34 is obtained, the current relative position of the slide-out assembly 20 relative to the body 10 can be reversely deduced through the corresponding relationship determined in this step.
请参阅图9,在某些实施方式中,位置检测方法包括:Referring to FIG. 9, in some embodiments, the position detection method includes:
将多个预设信号值和多个标定相对位置关联成查询表或者拟合成关系曲线。Multiple preset signal values and multiple calibrated relative positions are associated into a look-up table or fitted into a relationship curve.
在某些实施方式中,处理器36用于将多个预设信号值和多个标定相对位置关联成查询表或者拟合成关系曲线。In some embodiments, the processor 36 is configured to associate a plurality of preset signal values and a plurality of calibrated relative positions into a look-up table or fit a relational curve.
如此,在方便保存和查询的同时,使得滑出组件20的标定相对位置与霍尔元件34输出的作为预设信号值的检测信号值的对应关系更加精确。可以理解,在实际的检测过程中,滑出组件20不一定刚好滑动到标定相对位置上,也有可能滑动到两个标定相对位置之间,此时,直接采用与标定相对位置对应的预设信号值并不精确。当然,可以采用这两个标定相对位置的平均值或者按照权重综合这两个标定相对位置来计算滑出组件20的当前相对位置。不过,考虑到预设信号值不一定是线性变化的,更优选的是,将多个预设信号值和多个标定相对位置拟合成关系曲线。如此,可以尽可能地保证依据多个预设信号值和多个标定相对位置确定的当前相对位置的精确度。In this way, the corresponding relationship between the calibrated relative position of the slide-out assembly 20 and the detection signal value output by the Hall element 34 as the preset signal value is made more accurate while saving and querying conveniently. It can be understood that in the actual detection process, the slide-out assembly 20 does not necessarily slide to the calibrated relative position, but may also slide to the two calibrated relative positions. In this case, the preset signal corresponding to the calibrated relative position is directly used. The value is not precise. Of course, the current relative position of the slide-out assembly 20 may be calculated by using the average value of the two calibrated relative positions or by combining the two calibrated relative positions according to weights. However, considering that the preset signal values do not necessarily change linearly, it is more preferable to fit multiple preset signal values and multiple calibrated relative positions into a relationship curve. In this way, the accuracy of the current relative position determined according to the multiple preset signal values and the multiple calibrated relative positions can be guaranteed as much as possible.
请注意,在从第一待选信号值和第二待选信号值中选出检测信号值的同时,需要记录检测信号值是来自于第一霍尔元件342还是第二霍尔元件344,并在采用检测信号值查询查询数据库以得到当前相对位置的步骤中,查询与输出检测信号值的霍尔元件相关的数据。在一个例子中,如图9所示,关系曲线包括第一关系曲线a和第二关系曲线b,第一关系曲线a表示第一霍尔元件342输出的第一待选信号值随标定相对位置的变化而变化的情况;第二关系曲线b表示第二霍尔元件344输出的第二待选信号值随标定相对位置的变化而变化的情况。当选取第一霍尔元件342输出的第一待选信号值作为检测信号值时,在采用检测信号值查询查询数据库以得到当前相对位置的步骤中,采用检测信号值查询查询数据库中的第一关系曲线a以获得滑出组件20的当前相对位置。当选取第二霍尔元件344输出的第二待选信号值作为检测信号值时,在采用检测信号值查询查询数据库以得到当前相对位置的步骤中,采用检测信号值查询查询数据库中的第二关系曲线b以获得滑出组件20的当前相对位置。另外,横轴上标注的A表示图2中滑出组件20完全收容于滑槽16时的相对位置,即第一位置A;B表示图1中滑出组件20从滑槽16完全滑出时的相对位置,即第二位置B;C表示图3中滑出组件20从滑槽16滑出一半时的相对位置,即第三位置C。Please note that when the detection signal value is selected from the first candidate signal value and the second candidate signal value, it is necessary to record whether the detection signal value comes from the first Hall element 342 or the second Hall element 344, and In the step of using the detection signal value to query the query database to obtain the current relative position, the data related to the Hall element outputting the detection signal value is queried. In one example, as shown in FIG. 9 , the relationship curve includes a first relationship curve a and a second relationship curve b, and the first relationship curve a represents the relative position of the first candidate signal output by the first Hall element 342 with the calibration The second relationship curve b represents the situation that the value of the second candidate signal output by the second Hall element 344 changes with the change of the calibrated relative position. When the first candidate signal value output by the first Hall element 342 is selected as the detection signal value, in the step of using the detection signal value to query the query database to obtain the current relative position, the detection signal value is used to query the first query database. The relationship curve a is used to obtain the current relative position of the slide-out assembly 20 . When the second candidate signal value output by the second Hall element 344 is selected as the detection signal value, in the step of using the detection signal value to query the query database to obtain the current relative position, the detection signal value is used to query the second query database. The relationship curve b is used to obtain the current relative position of the slide-out assembly 20 . In addition, A marked on the horizontal axis represents the relative position when the slide-out assembly 20 is completely accommodated in the chute 16 in FIG. 2 , that is, the first position A; B indicates when the slide-out assembly 20 is completely slid out from the chute 16 in FIG. 1 The relative position of , that is, the second position B; C represents the relative position when the slide-out assembly 20 slides out halfway from the chute 16 in FIG. 3 , that is, the third position C.
请参阅图10,在某些实施方式中,位置检测方法包括:Referring to FIG. 10, in some embodiments, the position detection method includes:
S16:接收第一用户输入;和S16: Receive a first user input; and
S18:根据第一用户输入控制滑出组件20向预定位置滑动。S18: Control the slide-out assembly 20 to slide to a predetermined position according to the first user input.
在某些实施方式中,处理器36用于接收第一用户输入;和根据第一用户输入控制滑出组件20向预定位置滑动。In some embodiments, the processor 36 is configured to receive a first user input; and control the slide-out assembly 20 to slide toward a predetermined position according to the first user input.
如此,实现滑出组件20的滑动。如前所述,处理器36可以根据用户输入通过控制驱动电机52来控制滑出组件20的滑动。当处理器接收到第一用户输入时,处理器36控制控制驱动电机52正转或反转,从而使得输出轴带动转动丝杆26在螺纹孔24内转动,进而使得滑出组件20向预定位置滑动。In this way, the sliding of the slide-out assembly 20 is achieved. As previously discussed, the processor 36 may control the sliding of the slide-out assembly 20 by controlling the drive motor 52 according to user input. When the processor receives the first user input, the processor 36 controls and controls the drive motor 52 to rotate forward or reverse, so that the output shaft drives the rotating screw 26 to rotate in the threaded hole 24, thereby causing the slide-out assembly 20 to move to the predetermined position slide.
当然,也可以设定触发信号使得处理器36控制滑出组件20在特定情况下运动。比如,当承载件22上承载有接近传感器和听筒44时,可以将用户接听电话和挂断电话作为触发信号。也即是说,当用户接听电话时,触发滑出组件20自动滑出,当用户挂断电话时,触发滑出组件20自动滑回。总而言之,滑出组件20的滑动可以基于用户的操作,也可以在特定情况下自动发生。当然,用户可以设置具体在哪些情况下自动滑动或者关闭自动滑动。Of course, the trigger signal can also be set so that the processor 36 controls the slide-out assembly 20 to move under certain conditions. For example, when the carrier 22 carries the proximity sensor and the handset 44, the user can answer and hang up the phone as a trigger signal. That is to say, when the user answers the call, the slide-out component 20 is triggered to slide out automatically, and when the user hangs up the call, the slide-out component 20 is triggered to slide back automatically. In summary, the sliding of the slide-out assembly 20 may be based on user actions, or may occur automatically under certain circumstances. Of course, the user can set specific circumstances under which automatic sliding is performed or automatic sliding is turned off.
在某些实施方式中,位置检测方法包括:In certain embodiments, the location detection method includes:
S20:判断滑出组件20是否滑到预定位置;和S20: judging whether the slide-out assembly 20 slides to a predetermined position; and
S22:当滑出组件20没有滑到预定位置时,输出报警信号。S22: When the slide-out assembly 20 does not slide to the predetermined position, output an alarm signal.
在某些实施方式中,处理器36用于判断滑出组件20是否滑到预定位置;和当滑出组件20没有滑到预定位置时,输出报警信号。In some embodiments, the processor 36 is configured to determine whether the slide-out assembly 20 slides to a predetermined position; and when the slide-out assembly 20 does not slide to the predetermined position, output an alarm signal.
如此,可以提示用户介入,避免滑出组件20或本体10由于没有滑到预定位置而影响功能或损坏。In this way, the user can be prompted to intervene to prevent the slide-out assembly 20 or the body 10 from being affected or damaged because the slide-out assembly 20 does not slide to the predetermined position.
可以理解,由于现实情况的复杂性,滑出组件20有可能出现卡顿等无法滑到预定位置的情况。而如果不对异常情况进行判断和报警,则无法排除引起异常的障碍。另外,当滑出组件20卡顿且长时间没有排除障碍时,驱动电机52会持续运转,从而引起滑出组件20或本体10的损坏。报警机制的设定可以在出现异常时,处理器36及时进行相应的操作,比如关闭驱动电机52,避免滑出组件20或本体10的损坏。It can be understood that, due to the complexity of the actual situation, the slide-out assembly 20 may be stuck and cannot be slid to the predetermined position. However, if the abnormal situation is not judged and alarmed, the obstacle that causes the abnormality cannot be eliminated. In addition, when the slide-out assembly 20 is stuck and the obstacle is not removed for a long time, the driving motor 52 will continue to run, thereby causing damage to the slide-out assembly 20 or the body 10 . The setting of the alarm mechanism enables the processor 36 to perform corresponding operations in time when an abnormality occurs, such as turning off the drive motor 52 to avoid damage to the slide-out assembly 20 or the body 10 .
在某些实施方式中,步骤S20包括:In some embodiments, step S20 includes:
在预设时间内接收霍尔元件34输出的多个检测信号值;Receive a plurality of detection signal values output by the Hall element 34 within a preset time;
根据预定位置确定与预定位置对应的预定信号值;determining a predetermined signal value corresponding to the predetermined position according to the predetermined position;
判断预定信号值与多个检测信号值是否一致;和determining whether a predetermined signal value is consistent with a plurality of detected signal values; and
当预定信号值与多个检测信号值不一致时,判断滑出组件20没有滑到预定位置。When the predetermined signal value does not coincide with the plurality of detection signal values, it is determined that the slide-out assembly 20 does not slide to the predetermined position.
在某些实施方式中,处理器36用于:在预设时间内接收霍尔元件34输出的多个检测信号值;根据预定位置确定与预定位置对应的预定信号值;判断预定信号值与多个检测信号值是否一致;和当预定信号值与多个检测信号值不一致时,判断滑出组件20没有滑到预定位置。In some embodiments, the processor 36 is configured to: receive multiple detection signal values output by the Hall element 34 within a preset time; determine a predetermined signal value corresponding to the predetermined position according to the predetermined position; determine whether the predetermined signal value is related to the multiple detection signal values. Whether each detection signal value is consistent; and when the predetermined signal value is inconsistent with a plurality of detection signal values, it is determined that the slide-out assembly 20 does not slide to the predetermined position.
如此,实现对滑出组件20是否滑到预定位置的判断。In this way, it is possible to determine whether the slide-out assembly 20 slides to a predetermined position.
可以理解,在预设时间内多个检测信号值一致时,滑出组件20的状态为静止,静止状态可能由两种情况导致,一种情况是滑出组件20已经滑动到了预定位置从而正常停止滑动,另一种情况是滑出组件20没有滑动到预定位置从而异常停止滑动。通过对多个一致的检测信号值与预定位置对应的预定信号值比对,可以判断滑出组件20是否滑动到了预定位置,从而确定是否发生了异常情况。It can be understood that when the values of the multiple detection signals are consistent within the preset time, the state of the slide-out assembly 20 is static, and the static state may be caused by two situations. One is that the slide-out assembly 20 has been slid to a predetermined position and thus stops normally. Another case is that the slide-out assembly 20 does not slide to a predetermined position and thus stops sliding abnormally. By comparing a plurality of consistent detection signal values with the predetermined signal values corresponding to the predetermined positions, it can be determined whether the slide-out assembly 20 has slid to the predetermined position, so as to determine whether an abnormal situation has occurred.
当然,也可以先根据多个一致的检测信号值确定滑出组件20的当前相对位置,再比当前相对位置与预定位置,从而判断滑出组件20是否滑动到了预定位置并确定是否发生了异常情况。Of course, it is also possible to first determine the current relative position of the slide-out assembly 20 according to multiple consistent detection signal values, and then compare the current relative position with the predetermined position, so as to determine whether the slide-out assembly 20 has slipped to the predetermined position and determine whether an abnormal situation has occurred. .
在某些实施方式中,位置检测方法包括:In certain embodiments, the location detection method includes:
接收第二用户输入;和receiving a second user input; and
根据第二用户输入控制滑出组件20由当前相对位置滑动到预定位置。The slide-out assembly 20 is controlled to slide from the current relative position to the predetermined position according to the second user input.
在某些实施方式中,处理器36用于接收第二用户输入;和根据第二用户输入控制滑出组件20由当前相对位置滑动到预定位置。In some embodiments, the processor 36 is configured to receive a second user input; and control the slide-out assembly 20 to slide from the current relative position to a predetermined position according to the second user input.
如此,可以在滑出组件20没有滑到预定位置的情况下,用户介入排除障碍后,将滑出组件20从出现异常的当前相对位置继续滑动到预定位置。In this way, if the slide-out assembly 20 does not slide to the predetermined position, after the user intervenes to remove the obstacle, the slide-out assembly 20 can be continued to slide from the current relative position where the abnormality occurs to the predetermined position.
在某些实施方式中,位置检测方法包括:In certain embodiments, the location detection method includes:
接受第三用户输入;和accept third user input; and
根据第三用户输入控制滑出组件20由当前相对位置滑动到第一位置A。The slide-out assembly 20 is controlled to slide from the current relative position to the first position A according to the third user input.
在某些实施方式中,处理器36用于接收第三用户输入;和根据第三用户输入控制滑出组件20由当前相对位置滑动到第一位置A。In some embodiments, the processor 36 is configured to receive a third user input; and control the slide-out assembly 20 to slide from the current relative position to the first position A according to the third user input.
如此,可以在滑出组件20没有滑到预定位置的情况下,用户介入排除障碍后,将滑出组件20从出现异常的当前相对位置滑动到第一位置A,实现重置。In this way, when the slide-out assembly 20 does not slide to the predetermined position, after the user intervenes to remove the obstacle, the slide-out assembly 20 can be slid from the current relative position where the abnormality occurs to the first position A to realize reset.
在实际的操作中,可以在面板组件14上显示以上两种方式的图标,用户可以通过面板组件14对两种方式进行选择。也即是说,在出现异常后,用户可以选择从出现异常的当前相对位置继续滑动到预设位置,或者滑动到第一位置A。In actual operation, the icons of the above two methods can be displayed on the panel component 14 , and the user can select the two methods through the panel component 14 . That is to say, after the abnormality occurs, the user can choose to continue to slide from the current relative position where the abnormality occurs to the preset position, or slide to the first position A.
在本说明书的描述中,参考术语“一个实施方式”、“某些实施方式”、“示意性实施方式”、“示例”、“具体示例”、或“一些示例”等的描述意指结合实施方式或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施方式或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施方式或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施方式或示例中以合适的方式结合。In the description of this specification, reference to the description of the terms "one embodiment", "some embodiments", "exemplary embodiment", "example", "specific example", or "some examples", etc., are intended to be combined with the implementation A particular feature, structure, material or characteristic described by way or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
尽管已经示出和描述了本发明的实施方式,本领域的普通技术人员可以理解:在不脱离本发明的原理和宗旨的情况下可以对这些实施方式进行多种变化、修改、替换和变型,本发明的范围由权利要求及其等同物限定。Although embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that various changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, The scope of the invention is defined by the claims and their equivalents.