Device adjustment method, electronic device, and computer-readable storage medium
By calculating the theoretical movement distance of the optical engine and detecting the actual movement distance using the Hall effect sensor module, the problem of inaccurate optical engine adjustment in VR devices was solved, enabling independent adjustment and a thinner device, thus improving user experience and motor lifespan.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2024-12-04
- Publication Date
- 2026-06-05
AI Technical Summary
Existing VR devices suffer from motor malfunctions and optical engine lag when adjusting the optical engine position, causing the optical engine to fail to match the user's interpupillary distance and affecting the user experience.
By calculating the theoretical movement distance of the optical engine and detecting the actual movement distance using a Hall effect detection module, it is determined whether the optical engine is properly adjusted, enabling independent adjustment of the left and right optical engines, reducing equipment costs and ensuring the equipment is lightweight and thin.
It improves the accuracy of optical-mechanical adjustment and user experience, reduces equipment costs and power consumption, and extends the service life of motors.
Smart Images

Figure CN122151352A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a device adjustment method, electronic device, and computer-readable storage medium. Background Technology
[0002] With the continuous development and advancement of science and technology, Virtual Reality (VR) devices are increasingly being used in daily life. To enable VR devices to adapt to different users' needs regarding Inner Pupil Distance (IPD), the position of the optical engine needs to be adjusted according to the user's wearing requirements. Since adjusting the optical engine is usually driven by a motor to move it horizontally, problems such as motor malfunctions and optical engine jamming may occur, leading to abnormal optical engine adjustment and a failure to match the user's IPD. Therefore, accurately detecting whether the optical engine adjustment matches the user's IPD is a problem that urgently needs to be solved. Summary of the Invention
[0003] This application provides a device adjustment method, an electronic device, and a computer-readable storage medium. It can determine whether the optical engine is properly adjusted based on the theoretical movement distance of the optical engine and the actual movement distance detected by the Hall effect detection module. This allows for accurate detection of whether the adjustment of the optical engine matches the user's interpupillary distance, which is beneficial for improving the intelligence of the electronic device.
[0004] In a first aspect, embodiments of this application provide a device adjustment method applicable to electronic devices. The method includes: obtaining a first set of detection distances corresponding to a first optical engine when the electronic device is worn in the correct posture; the first optical engine is any optical engine included in the electronic device, and the first set of detection distances includes eyeball offset distance and optical engine offset distance; determining a reference movement distance of the first optical engine based on the first set of detection distances, and adjusting the position of the first optical engine according to the reference movement distance; obtaining a target movement distance of the first optical engine detected by a Hall effect detection module; determining the adjustment result of the first optical engine based on the target movement distance and the reference movement distance; and using the adjustment result of the first optical engine to indicate whether the first optical engine is properly adjusted. Therefore, in this technical solution, the electronic device can calculate the theoretical movement distance (i.e., the reference movement distance) of the optical engine and detect the actual movement distance (i.e., the target movement distance) of the optical engine through a Hall effect detection module. By determining whether the optical engine is properly adjusted based on the theoretical movement distance and the target movement distance, it can accurately detect whether the adjustment of the optical engine matches the user's interpupillary distance, which is beneficial for improving the intelligence of the electronic device and enhancing the user experience. Meanwhile, the above solution enables independent adjustment of the left and right optical engines, making it more likely that the adjustment of the optical engines will match the user's interpupillary distance. The left and right optical engines can share the same Hall detection module, which can reduce equipment costs, lighten equipment weight, and ensure the thinness and lightness of the equipment.
[0005] In conjunction with the first aspect, in one possible approach, determining the reference movement distance of the first optical engine based on the first set of detection distances includes: determining the offset difference between the optical engine offset distance and the eyeball offset distance; the eyeball offset distance is the distance between the center of the first eyeball corresponding to the first optical engine and the preset center plane of the electronic device, and the optical engine offset distance is the distance between the center of the first optical engine and the preset center plane; obtaining the remaining travel of the first motor; the remaining travel of the first motor includes the remaining travel in a first direction and the remaining travel in a second direction, and the first motor is used to adjust the position of the first optical engine; determining the remaining travel in a target direction from the remaining travel in the first direction and the remaining travel in the second direction based on the offset difference; and determining the reference movement distance of the first optical engine based on the offset difference and the remaining travel in the target direction. It can be seen that in this technical solution, the offset difference provides an accurate offset reference for adjusting the position of the optical engine, while the maximum adjustable distance of the motor in the direction to be moved is determined by the remaining travel in the target direction, and the theoretical movement distance of the optical engine is determined based on the offset difference and the remaining travel in the target direction, ensuring that the motor can achieve the best adjustment effect within a limited adjustment distance.
[0006] In conjunction with the first aspect, in one possible approach, determining the reference movement distance of the first optical engine based on the offset difference and the remaining travel in the target direction includes: determining the offset difference as the reference movement distance of the first optical engine when the remaining travel in the target direction is greater than or equal to the offset difference; and determining the remaining travel in the target direction as the reference movement distance of the first optical engine when the remaining travel in the target direction is less than the offset difference. Therefore, in this technical solution, when the offset difference is greater than or equal to the maximum adjustable distance, the optical engine is adjusted according to the maximum adjustable distance, thereby maximizing the match with the user's interpupillary distance and improving the user experience. When the offset difference is less than the maximum adjustable distance, the optical engine is adjusted according to the offset difference, ensuring that the calculated theoretical movement distance of the optical engine matches the user's interpupillary distance, thus improving the accuracy of subsequent optical engine position adjustments.
[0007] In conjunction with the first aspect, in one possible approach, the method further includes: performing the step of obtaining the remaining stroke of the first motor when the offset difference is not within the first error range. It is evident that in this technical solution, by limiting optomechanical adjustment to only be performed when the offset difference is not within the error range, frequent optomechanical adjustment operations are reduced while ensuring a good user experience. This avoids unnecessary optomechanical adjustments due to minor offset differences, reduces user waiting time, lowers device power consumption, and extends motor lifespan.
[0008] In conjunction with the first aspect, in one possible approach, the Hall detection module includes a Hall sensor and a magnet; the target movement distance of the first optomechanism detected by the Hall detection module is acquired; the acquisition of the target movement distance of the first optomechanism detected by the Hall detection module includes: detecting a first magnetic flux density and a second magnetic flux density of the magnet through the Hall sensor; the first magnetic flux density is the magnetic flux density detected without position adjustment of the first optomechanism, and the second magnetic flux density is the magnetic flux density detected with position adjustment of the first optomechanism; the target movement distance of the first optomechanism is determined based on the first magnetic flux density and the second magnetic flux density. It can be seen that in this technical solution, by detecting the magnetic flux density before and after position adjustment using the Hall detection module, the actual movement distance of the optomechanism can be accurately calculated, providing a basis for subsequent detection of whether the optomechanism has been properly adjusted.
[0009] In conjunction with the first aspect, in one possible approach, determining the adjustment result of the first optical engine based on the target movement distance and the reference movement distance includes: acquiring the distance difference between the target movement distance and the reference movement distance; if the distance difference is within a second error range, determining the adjustment result of the first optical engine as a first adjustment result; the first adjustment result is used to indicate that the first optical engine is properly adjusted; if the distance difference is not within the second error range, determining the adjustment result of the first optical engine as a second adjustment result; the second adjustment result is used to indicate that the first optical engine is not properly adjusted. It is evident that in this technical solution, by comparing the distance difference and the second error range, it is possible to accurately determine whether the optical engine is properly adjusted. Furthermore, introducing the second error range can avoid frequent adjustments of the optical engine without affecting the user's visual experience, thus helping to extend the service life of the motor.
[0010] In conjunction with the first aspect, in one possible approach, the method further includes: when the adjustment result of the first optical engine is the second adjustment result, acquiring a second detection distance set corresponding to the first optical engine; the second detection distance set includes the current eyeball offset distance and the current optical engine offset distance, and the second adjustment result is used to indicate that the first optical engine is not properly adjusted; determining a new reference movement distance for the first optical engine based on the second detection distance set, and adjusting the position of the first optical engine according to the new reference movement distance; acquiring a new target movement distance for the first optical engine detected by the Hall detection module; and determining a new adjustment result for the first optical engine based on the new target movement distance and the new reference movement distance. It is evident that in this technical solution, the electronic device can adapt to frequent changes in the user's wearing posture, ensuring that the user's visual effect is not affected by changes in wearing posture, thus improving the device's position adjustment accuracy, adaptability, and user experience.
[0011] In conjunction with the first aspect, in one possible approach, the above method further includes: determining the adjustment result of the first optomechanism as the third adjustment result when the adjustment stop condition is met; the third adjustment result is used to indicate that the adjustment of the first optomechanism has failed; wherein, the adjustment stop condition includes one or more of the following: detecting that the operating current of the first motor corresponding to the first optomechanism is greater than a current threshold, or that the number of adjustments by the first optomechanism is greater than or equal to a number threshold. It is evident that in this technical solution, by detecting the number threshold, the system can be prevented from falling into an infinite loop of position adjustment, avoiding resource waste and performance failures, thereby improving the stability and reliability of the system. By detecting the operating current, further damage to the motor can be avoided, extending the motor's service life, reducing maintenance and replacement costs, improving the system's intelligence level, and facilitating fault diagnosis and maintenance.
[0012] In conjunction with the first aspect, in one possible approach, the method further includes: acquiring a third set of detection distances corresponding to the second optical engine; the second optical engine is any optical engine other than the first optical engine included in the electronic device; the third set of detection distances includes the eyeball offset distance corresponding to the second optical engine and the optical engine offset distance corresponding to the second optical engine; determining a reference movement distance of the second optical engine based on the third set of detection distances, and adjusting the position of the second optical engine according to the reference movement distance; acquiring the target movement distance of the second optical engine detected by the Hall effect detection module; determining the adjustment result of the second optical engine based on the target movement distance and the reference movement distance of the second optical engine, and determining the interpupillary distance adjustment result of the electronic device based on the adjustment result of the first optical engine and the adjustment result of the second optical engine. Therefore, in this technical solution, after the left optical engine is adjusted to its position, the position of the right optical engine is adjusted, thereby achieving automated interpupillary distance adjustment and enabling independent adjustment of the left and right optical engines.
[0013] In conjunction with the first aspect, in one possible approach, the Hall detection module adopts either a first configuration or a second configuration. The first configuration involves the Hall detection module comprising one Hall sensor and two magnets. The Hall sensor is located on a preset central plane of the electronic device, and the two magnets are fixedly connected to corresponding optomechanical components within the electronic device. The second configuration involves the Hall detection module comprising two Hall sensors and one magnet. The magnet is located on a preset central plane of the electronic device, and the two Hall sensors are fixedly connected to corresponding optomechanical components within the electronic device. Therefore, this technical solution provides diverse Hall detection module configuration options. The system can select the appropriate Hall detection module configuration according to different application scenarios and requirements, improving the system's adaptability and versatility, while ensuring high reusability of the Hall detection module.
[0014] In conjunction with the first aspect, in one possible approach, the method further includes: acquiring the hardware configuration information of the Hall sensor module; when the hardware configuration information indicates that the Hall sensor module adopts a first configuration mode, executing the steps of acquiring the first detection distance set corresponding to the first optical engine and the third detection distance set corresponding to the optical engine to be adjusted in a preset order; when the hardware configuration information indicates that the Hall sensor module adopts a second configuration mode, executing the steps of acquiring the first detection distance set corresponding to the first optical engine and the third detection distance set corresponding to the optical engine to be adjusted in parallel. It is evident that in this technical solution, determining the adjustment order of the left and right optical engines (e.g., sequentially or simultaneously) based on the hardware configuration information of the Hall sensor module can avoid the problem of inaccurate measurement of the actual movement distance caused by the movement of the optical engines affecting the magnetic field strength. Furthermore, for the two optical engine adjustment methods, simultaneous adjustment of the optical engines can improve the efficiency of optical engine position adjustment, reduce user waiting time, and improve user experience; sequential adjustment of the optical engines can ensure the accuracy of optical engine position adjustment, thereby improving user experience; and selecting an appropriate adjustment strategy based on the configuration mode of the Hall sensor module improves the flexibility and adaptability of the system, ensuring the best adjustment effect.
[0015] Secondly, this application provides an electronic device comprising: one or more processors, a memory, a display screen, at least two optical engines, a Hall effect detection module, and an interpupillary distance adjustment module; the memory is coupled to the one or more processors, and the memory is used to store computer program code, the computer program code including computer instructions, the one or more processors calling the computer instructions to cause the electronic device to execute: when the electronic device is worn in the correct posture, acquiring a first set of detection distances corresponding to a first optical engine; the first optical engine is any one of the optical engines included in the electronic device, the first set of detection distances includes eyeball offset distance and optical engine offset distance; determining a reference movement distance of the first optical engine according to the first set of detection distances, and adjusting the position of the first optical engine according to the reference movement distance; acquiring a target movement distance of the first optical engine detected by the Hall effect detection module; determining the adjustment result of the first optical engine according to the target movement distance and the reference movement distance; the adjustment result of the first optical engine is used to indicate whether the first optical engine is adjusted in place.
[0016] In conjunction with the second aspect, in one possible manner, the one or more processors invoke the computer instructions to cause the electronic device to perform: determining the offset difference between the optical engine offset distance and the eyeball offset distance; the eyeball offset distance is the distance between the center of the first eyeball corresponding to the first optical engine and a preset center plane of the electronic device, and the optical engine offset distance is the distance between the center of the first optical engine and the preset center plane; obtaining the remaining travel of the first motor; the remaining travel of the first motor includes a remaining travel in a first direction and a remaining travel in a second direction, the first motor being used to adjust the position of the first optical engine; determining the remaining travel in a target direction from the remaining travel in the first direction and the remaining travel in the second direction based on the offset difference; and determining a reference movement distance of the first optical engine based on the offset difference and the remaining travel in the target direction.
[0017] In conjunction with the second aspect, in one possible manner, the one or more processors invoke the computer instructions to cause the electronic device to perform: if the remaining travel in the target direction is greater than or equal to the offset difference, determining the offset difference as the reference travel distance of the first optical engine; if the remaining travel in the target direction is less than the offset difference, determining the remaining travel in the target direction as the reference travel distance of the first optical engine.
[0018] In conjunction with the second aspect, in one possible manner, the one or more processors invoke the computer instructions to cause the electronic device to perform the step of obtaining the remaining stroke of the first motor if the offset difference is not within the first error range.
[0019] In conjunction with the second aspect, in one possible manner, the one or more processors invoke the computer instructions to cause the electronic device to perform: detecting a first magnetic field strength and a second magnetic field strength of a magnet by a Hall sensor; the first magnetic field strength being detected without position adjustment of the first optomechanical unit, and the second magnetic field strength being detected with position adjustment of the first optomechanical unit; and determining the target movement distance of the first optomechanical unit based on the first magnetic field strength and the second magnetic field strength.
[0020] In conjunction with the second aspect, in one possible manner, the one or more processors invoke the computer instructions to cause the electronic device to perform: acquiring the distance difference between the target moving distance and the reference moving distance; if the distance difference is within a second error range, determining the adjustment result of the first optical engine as a first adjustment result; the first adjustment result is used to indicate that the first optical engine is properly adjusted; if the distance difference is not within the second error range, determining the adjustment result of the first optical engine as a second adjustment result; the second adjustment result is used to indicate that the first optical engine is not properly adjusted.
[0021] In conjunction with the second aspect, in one possible manner, the one or more processors invoke the computer instructions to cause the electronic device to perform: if the adjustment result of the first optical engine is the second adjustment result, acquire a second set of detection distances corresponding to the first optical engine; the second set of detection distances includes the eyeball offset distance at the current moment and the optical engine offset distance at the current moment, and the second adjustment result is used to indicate that the first optical engine is not properly adjusted; determine a new reference movement distance of the first optical engine based on the second set of detection distances, and adjust the position of the first optical engine according to the new reference movement distance; acquire a new target movement distance of the first optical engine detected by the Hall detection module; and determine a new adjustment result of the first optical engine based on the new target movement distance and the new reference movement distance.
[0022] In conjunction with the second aspect, in one possible manner, the one or more processors invoke the computer instructions to cause the electronic device to perform: if the adjustment stop condition is met, determine the adjustment result of the first optomechanism as a third adjustment result; the third adjustment result is used to indicate that the adjustment of the first optomechanism has failed; wherein the adjustment stop condition includes one or more of the following: detecting that the operating current of the first motor corresponding to the first optomechanism is greater than a current threshold, or the number of adjustments of the first optomechanism is greater than or equal to a number threshold.
[0023] In conjunction with the second aspect, in one possible manner, the one or more processors invoke the computer instructions to cause the electronic device to perform: acquiring a third set of detection distances corresponding to the second optical engine; the second optical engine is any optical engine other than the first optical engine included in the electronic device, and the third set of detection distances includes the eyeball offset distance corresponding to the second optical engine and the optical engine offset distance corresponding to the second optical engine; determining a reference movement distance of the second optical engine based on the third set of detection distances, and adjusting the position of the second optical engine according to the reference movement distance of the second optical engine; acquiring the target movement distance of the second optical engine detected by the Hall detection module; determining the adjustment result of the second optical engine based on the target movement distance of the second optical engine and the reference movement distance of the second optical engine, and determining the interpupillary distance adjustment result of the electronic device based on the adjustment result of the first optical engine and the adjustment result of the second optical engine.
[0024] In conjunction with the second aspect, in one possible approach, the Hall detection module adopts either a first configuration or a second configuration. The first configuration involves the Hall detection module comprising a Hall sensor and two magnets, with the Hall sensor located on a preset center plane of the electronic device and the two magnets fixedly connected to corresponding optomechanical components in the electronic device. The second configuration involves the Hall detection module comprising two Hall sensors and one magnet, with the magnet located on a preset center plane of the electronic device and the two Hall sensors fixedly connected to corresponding optomechanical components in the electronic device.
[0025] In conjunction with the second aspect, in one possible manner, the one or more processors invoke the computer instructions to cause the electronic device to perform: acquiring hardware configuration information of the Hall detection module; if the hardware configuration information indicates that the Hall detection module adopts a first configuration mode, performing the steps of acquiring a first detection distance set corresponding to a first optical engine and acquiring a third detection distance set corresponding to an optical engine to be adjusted in a preset order; if the hardware configuration information indicates that the Hall detection module adopts a second configuration mode, performing the steps of acquiring the first detection distance set corresponding to the first optical engine and acquiring the third detection distance set corresponding to an optical engine to be adjusted in parallel.
[0026] Thirdly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect above.
[0027] Fourthly, this application provides a chip system coupled to a memory, the chip system being used to read and execute a computer program stored in the memory to implement the method described in the first aspect above.
[0028] Fifthly, this application provides a computer program product containing instructions that, when run on an electronic device, cause the electronic device to perform the method described in the first aspect. Attached Figure Description
[0029] Figure 1 This is a schematic diagram of the basic structure of an electronic device provided in an embodiment of this application;
[0030] Figure 2 This is a schematic diagram of the basic structure of another electronic device provided in an embodiment of this application;
[0031] Figure 3 A schematic diagram illustrating a detection distance provided in an embodiment of this application;
[0032] Figure 4 A schematic flowchart illustrating a device adjustment method provided in an embodiment of this application;
[0033] Figure 5 A schematic diagram of a device interpupillary distance adjustment process provided in an embodiment of this application;
[0034] Figure 6 A flowchart of an optomechanical position adjustment provided in an embodiment of this application;
[0035] Figure 7 A schematic diagram of the software structure of an electronic device provided in an embodiment of this application;
[0036] Figure 8This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0037] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0038] The terms "first," "second," "third," etc., used in the embodiments of this application are to distinguish different objects, rather than to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, it may include a series of steps or units, or optionally, steps or units not listed, or other steps or units inherent to these processes, methods, products, or devices. The terms "one embodiment" or "some embodiments," etc., mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of the embodiments of this application, do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized.
[0039] In the embodiments of this application, the words "exemplary," "for example," or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplary," "for example," or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the words "exemplary," "for example," or "for instance" is intended to present the relevant concepts in a specific manner.
[0040] Furthermore, "at least one" refers to one or more, while "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b, and c, where a, b, and c can be single or multiple.
[0041] The term "user interface (UI)" used in the following embodiments of this application refers to the medium interface through which an application or operating system interacts and exchanges information with the user. It realizes the conversion between the internal form of information and the form that the user can accept. The user interface is source code written in a specific computer language such as Java or Extensible Markup Language (XML). The interface source code is parsed and rendered on the electronic device, ultimately presenting content that the user can recognize. A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be visible interface elements such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets displayed on the screen of an electronic device.
[0042] The following section first introduces the terminology used in the embodiments of this application.
[0043] I. Hall Sensor: A Hall sensor is a sensor based on the Hall effect, which detects the strength and direction of a magnetic field. Magnets generate stable magnetic fields. When the distance between the Hall sensor and the magnet changes, the magnetic field strength also changes accordingly. By measuring the change in magnetic field strength, the distance between the magnet and the Hall sensor can be deduced.
[0044] II. Optical Engine: The optical engine is the optical module in a VR device, including the left and right optical engines, which are mainly responsible for converting image or video signals into the user's visual experience. The optical engine typically includes the following core components: display screen (usually using a high-resolution, low-latency display panel, such as an OLED screen or an LCD screen) and lens system (composed of one or more sets of lenses, used to focus the image on the display screen onto the user's eyes, while adjusting the image size and distortion).
[0045] To enable VR devices to adapt to different users' interpupillary distance (IPD) requirements, the position of the optical engine needs to be adjusted according to the user's wearing needs. Since optical engine adjustment is typically driven by motors to move the optical engine horizontally, issues such as motor malfunctions and VR device optical engine stuttering can occur, leading to abnormal optical engine adjustment and a failure to match the user's IPD. Furthermore, current optical engine adjustment solutions mainly employ non-independent adjustment, such as using one motor to drive two motors to adjust the left and right optical engines of the VR device. This means that the left and right optical engines can only move inward or outward simultaneously. This adjustment method cannot precisely adjust independently according to each user's IPD, resulting in a mismatch between the optical engine adjustment and the user's IPD, thus preventing the user from obtaining an ideal user experience and finding the most suitable optical engine position for their visual experience. Simultaneously, due to the non-independent adjustment mechanism, if mechanical stuttering or other abnormalities occur, it may be difficult to individually detect and repair a particular optical engine, leading to maintenance difficulties and increased maintenance costs.
[0046] Based on this, the device adjustment method provided in this application can be applied to the use scenarios of electronic devices such as VR devices, Augmented Reality (AR) devices, Mixed Reality (MR) devices, and Extended Reality (XR) devices. Subsequent embodiments will use VR devices as an example. For any optical engine in the VR device, this application determines the theoretical movement distance of the optical engine (denoted as the reference movement distance) based on the eyeball offset distance and the optical engine offset distance, and adjusts the position of the optical engine according to the reference movement distance. A Hall effect detection module is used to detect the actual movement distance of the optical engine (denoted as the target movement distance), and the reference movement distance and the target movement distance are compared to determine whether the optical engine is properly adjusted, thereby accurately detecting whether the adjustment of the optical engine matches the user's interpupillary distance. The above scheme can calculate the reference movement distance for each optical engine in the VR device separately and adjust the position of each optical engine according to the reference movement distance, thereby achieving independent adjustment of the left and right optical engines, making it more likely that the adjustment of the optical engines matches the user's interpupillary distance. Meanwhile, the optomechanical components in electronic devices can share the same Hall effect detection module, which can reduce equipment costs, lighten equipment weight, and ensure that the equipment is thin and light.
[0047] The following will combine Figure 1 This section introduces the basic structure and functions of electronic devices.
[0048] Figure 1 This is a schematic diagram of the basic structure of an electronic device provided in an embodiment of this application. Specifically, the electronic device may refer to a VR device. Figure 1As shown, the VR device mainly includes: a left optical engine, a right optical engine, an interpupillary distance adjustment module, a Hall effect detection module, a motherboard, and a VR shell. The left and right optical engines are respectively assembled on the VR device and can move left and right. The interpupillary distance adjustment module is connected to the left and right optical engines and can control the left and right movement distances of both the left and right optical engines. The motherboard is fixed to the VR device in a relatively fixed position.
[0049] The Hall effect detection module can be configured in two different ways, referred to as the first configuration and the second configuration, respectively. The hardware required for each configuration differs. In the first configuration, the Hall effect detection module includes one Hall sensor and two magnets. Figure 1 The Hall effect detection module shown in the image adopts the first configuration, in which magnet 1 and magnet 2 are fixed on the left and right optical engines respectively, and are close to the preset center plane of the VR device (wherein, the preset center plane refers to a plane perpendicular to the VR device that can divide the VR device into the left and right optical engine parts, and the position of the preset center plane is as follows). Figure 1 (As shown).
[0050] The Hall sensor 1 is positioned on a preset central plane, with its relative position to magnets 1 and 2 centered. Simultaneously, the Hall sensor 1 maintains a certain height relative to magnets 1 and 2 to prevent collisions between magnets 1 and 2 and the Hall sensor 1 during the left and right movement of the left and right optical engines. The Hall sensor 1 can be directly fixed to the motherboard or connected to the motherboard in other ways, such as via a flexible printed circuit board (FPC), or fixed to a motherboard bracket or other relatively fixed structures. The positional relationship between the Hall sensor 1 and the magnets remains consistent with the above description.
[0051] In the second configuration, the Hall detection module includes two Hall sensors and a magnet, such as Figure 2 As shown, Figure 2 This is a schematic diagram of the basic structure of another electronic device provided in an embodiment of this application. Figure 2 The Hall sensor module shown in the image employs a second configuration. Compared to the first configuration, this second configuration can be seen as replacing the original magnets 1 and 2 with Hall sensor 2 and Hall sensor 3, respectively, and replacing the original Hall sensor 1 with magnet 3. In this case, Hall sensor 2 and Hall sensor 3 are fixed on the left and right optical engines, respectively, and are close to the preset center plane of the VR device.
[0052] Magnet 3 is positioned on a preset central plane, with its relative position to Hall sensors 2 and 3 centered. Simultaneously, magnet 3 maintains a certain height relative to Hall sensors 2 and 3 to prevent collisions during the left and right movement of the left and right optical engines. Similarly, magnet 3 can be directly fixed to the motherboard or connected to the motherboard in other ways, such as via a flexible circuit board.
[0053] To determine the reference movement distance required by the optomechanical theory, multiple detection distances need to be analyzed and calculated. Based on this, Figure 3 This is a schematic diagram of a detection distance provided in an embodiment of this application. The following will be combined with... Figure 3 The method for determining the reference shift distance required by the optical-mechanical theory is explained:
[0054] In some embodiments, the VR device can begin adjusting the position of the optical engines once it detects that the user's VR device is worn in the correct posture. Specifically, the VR device can adjust the left optical engine first, then the right optical engine, or vice versa, or adjust both the left and right optical engines simultaneously. The order of optical engine adjustment can be preset by the VR device or selected by the VR device based on its hardware configuration information.
[0055] The adjustment method for the left optical unit will be explained below:
[0056] In some embodiments, taking the VR device prioritizing the adjustment of the left optical engine position as an example, the VR device can first obtain the eyeball offset distance and optical engine offset distance corresponding to the left optical engine. The eyeball offset distance corresponding to the left optical engine refers to the distance obtained by the VR device through monocular interpupillary distance measurement of the user's left eye, which is the distance between the center of the left eye (to be measured) and the preset center plane of the electronic device. For example, the eyeball offset distance corresponding to the left optical engine can be... Figure 3 The parameter d1 in the text refers to the optical engine offset distance corresponding to the left optical engine, which is the distance between the center of the left optical engine (i.e., the optical axis of the left optical engine) and the preset center plane. For example, the optical engine offset distance corresponding to the left optical engine could be... Figure 3 The parameter D1 in the text.
[0057] In some embodiments, after obtaining the eyeball offset distance and the optical engine offset distance corresponding to the left optical engine, the VR device can calculate the offset difference between the optical engine offset distance and the eyeball offset distance. The offset difference can be, for example, [missing information - likely related to an optical engine offset distance or an eyeball offset distance]. Figure 3The parameter Z1 (where Z1 = D1 - d1) is used to define the position of the left optical engine relative to the left eye. A larger Z1 (e.g., Z1 = 5cm) indicates a more outward position of the left optical engine relative to the left eye, requiring the engine to be moved inward. A smaller Z1 (e.g., Z1 = -5cm) indicates a more inward position of the left optical engine relative to the left eye, requiring the engine to be moved outward. If Z1 equals 0, the position of the left optical engine is perfectly matched to the user's left eye, and the VR device does not need to adjust its position. It should be noted that "inward" in the above embodiments refers to the direction of the left optical engine toward the preset center plane of the VR device, while "outward" refers to the opposite direction.
[0058] In some embodiments, after obtaining the offset difference, the VR device can determine whether the left optical sensor needs position adjustment based on the offset difference. When the offset difference is within the error range (e.g., the error range can be [0-δ, 0+δ], where δ can take values of 0cm, 0.1cm, 0.25cm, etc.), it is considered that the position of the left optical sensor already meets the user's requirement for interpupillary distance, and in this case, the position of the left optical sensor does not need to be adjusted; instead, the process proceeds to the subsequent adjustment of the right optical sensor position. When the offset difference is not within the preset error range, it is considered that the position of the left optical sensor does not meet the user's requirement for interpupillary distance, and in this case, the position of the left optical sensor needs to be adjusted.
[0059] In some embodiments, when the position of the left optical engine needs to be adjusted, the VR device acquires the remaining travel of the left motor used to adjust the position of the left optical engine. The remaining travel of the left motor includes the remaining travel in two directions, namely the remaining travel in the direction closer to the preset center plane (e.g., Figure 3 The parameter X2), the remaining travel distance in the direction away from the preset center plane (e.g. Figure 3 (Parameter X1 in the text). Then, the VR device determines the reference movement distance of the left optical engine based on the offset difference and the remaining travel of the left motor.
[0060] In some embodiments, the VR device can determine the remaining travel in the target direction from the remaining travel in two directions based on the sign of the offset difference. The target direction refers to the direction of movement. For example, when the offset difference is not within the error range [0-δ, 0+δ] and is positive, the remaining travel in the direction towards the preset center plane can be used as the remaining travel in the target direction. Figure 3 The parameter X2 is used as the remaining travel in the target direction. When the offset difference is not within the error range [0-δ, 0+δ] and is negative, then the remaining travel in the direction away from the preset center plane can be used as the remaining travel in the target direction. For example, Figure 3 The parameter X1 is used as the remaining travel distance in the target direction.
[0061] In some embodiments, after determining the remaining travel in the target direction, the VR device can determine the reference movement distance of the left optical engine from the offset difference and the remaining travel in the target direction. For example, when the remaining travel in the target direction is greater than or equal to the offset difference, the offset difference can be used as the reference movement distance of the left optical engine. For instance, if the remaining travel in the target direction is X2, and X2 is greater than or equal to Z1, then Z1 is used as the reference movement distance of the left optical engine. When the remaining travel in the target direction is less than the offset difference, the remaining travel in the target direction can be used as the reference movement distance of the left optical engine. For instance, if X2 is less than Z1, then X2 is used as the reference movement distance of the left optical engine.
[0062] This is because the remaining travel distance in the target direction is the remaining adjustable travel distance of the optical engine in that direction (i.e., the maximum distance it can move). If the offset difference is greater than or equal to the remaining travel distance in the target direction, then the left optical engine can only move according to the remaining travel distance in the target direction at most. This allows the VR device to match the user's interpupillary distance to the greatest extent possible, maximizing the user experience. If the offset difference is less than the remaining travel distance in the target direction, then the left optical engine can move according to the offset difference. This ensures that the calculated theoretical distance that the optical engine needs to move matches the user's interpupillary distance.
[0063] In some embodiments, after determining the reference movement distance of the left optical unit, the VR device can adjust the position of the left optical unit according to the reference movement distance. For example, the VR device can control the movement of the left optical unit using a motor-driven method. The left motor controlling the movement of the left optical unit can be connected to the left optical unit via gears. To achieve precise distance control, a stepper motor or servo motor can be used, combined with pulse signals for control.
[0064] Taking a stepper motor as an example, assuming the stepper motor's step angle is 1.8 degrees, and the optical engine moves 0.1 cm for each revolution of the motor, if the calculated reference movement distance is 1 cm, then the motor needs to rotate 10 times, corresponding to a rotation degree of 3600 degrees. Therefore, the stepper motor needs to execute 2000 steps. Based on this, 2000 pulse signals need to be sent to the stepper motor to precisely control the stepper motor to drive the optical engine to the specified position.
[0065] The above embodiments describe a method for adjusting the position of the left optical engine. However, considering that optical engine adjustment is usually achieved by motor drive, problems such as motor failure and VR device optical engine lag may occur, leading to abnormal optical engine adjustment. Therefore, it is necessary to further verify the actual movement distance of the left optical engine to determine whether the left optical engine is properly adjusted. The verification method for the actual movement distance of the left optical engine will be explained below:
[0066] In some embodiments, the VR device can utilize a Hall effect detection module to detect the target movement distance of the left optical unit. Specifically, the Hall effect detection module includes a Hall sensor and a magnet. When the position of the left optical unit is not adjusted, the Hall sensor can detect a first magnetic field strength of the magnet. When the position of the left optical unit is adjusted, the Hall sensor can detect a second magnetic field strength of the magnet. The target movement distance of the left optical unit can be calculated based on the first and second magnetic field strengths.
[0067] For example, assuming the magnetic field generated by the magnet is non-linearly distributed, a calibration curve can be used to establish the relationship between position and magnetic field strength. For instance, the calibration curve can indicate the magnetic field strength corresponding to the Hall sensor at different magnet positions. Figure 1 Taking the Hall effect detection module shown in the diagram as an example, before adjusting the position of the left optical engine, Hall sensor 1 detects the magnetic field strength of magnet 1 as w1. After adjusting the position of the left optical engine, Hall sensor 1 detects the magnetic field strength of magnet 1 as w2. Then, the position information corresponding to w1 and w2 is retrieved from the calibration curve, and the target movement distance of the left optical engine is calculated using the position information corresponding to w1 and w2. Figure 2 Taking the Hall effect detection module shown in the example, before adjusting the position of the left optical engine, Hall sensor 2 detects the magnetic field strength of magnet 3 as w3. After adjusting the position of the left optical engine, Hall sensor 2 detects the magnetic field strength of magnet 3 as w4. Then, the position information corresponding to w3 and w4 is retrieved from the calibration curve, and the target movement distance of the left optical engine is calculated using the position information corresponding to w3 and w4. The above method of determining the target movement distance based on the Hall effect detection module is only an example. Other feasible methods can also be used to determine the target movement distance, which will not be elaborated here.
[0068] In some embodiments, after obtaining the target movement distance of the left optical engine, the VR device can determine whether the left optical engine is properly adjusted by comparing the target movement distance with a reference movement distance. Specifically, the VR device can calculate the distance difference between the target movement distance and the reference movement distance. If the distance difference is within the error range (e.g., the error range can be [0-δ, 0+δ]), it is determined that the left optical engine is properly adjusted; if the distance difference is not within the error range, it is determined that the left optical engine is not properly adjusted.
[0069] If the distance difference is within the error range, the VR device can proceed to the subsequent adjustment process of the right optical engine.
[0070] If the distance difference is not within the error range, the VR device can readjust the position of the left optical engine to ensure user experience. Considering that adjusting the left optical engine may take a long time, and the user's wearing posture may slightly change if the previous adjustment was not completed correctly (e.g., the VR device moves slightly left or right relative to the user's eyes), the VR device can measure the current eyeball offset distance and the current optical engine offset distance. Based on these measurements, a new reference movement distance for the left optical engine is determined, and the left optical engine is readjusted according to this new reference movement distance. The VR device then acquires the new target movement distance of the left optical engine detected by the Hall effect sensor module, and determines the new adjustment result based on this new target movement distance and the new reference movement distance. This method can adapt to frequent changes in the user's wearing posture, ensuring that the user's visual experience is not affected by these changes, thus improving the VR device's position adjustment accuracy, adaptability, and user experience.
[0071] The specific implementation method for readjusting the position of the left optical machine can be found in the description of the position adjustment of the left optical machine in the previous embodiment, and will not be repeated here.
[0072] In some embodiments, developers can pre-set a threshold for the number of adjustments made to the left optical sensor (i.e., the maximum number of adjustments). After each adjustment of the left optical sensor, the VR device checks if it is properly adjusted. If not, it checks if the number of adjustments made is greater than or equal to the threshold. If the number of adjustments is less than the threshold, the left optical sensor is readjusted. If the number of adjustments is greater than or equal to the threshold, the adjustment of the left optical sensor is stopped. In this case, the VR device has at least two subsequent processing flows: first, it enters the adjustment flow for the right optical sensor; second, it outputs a prompt message indicating that the left optical sensor adjustment failed (or it can directly output a prompt message indicating that the VR device's interpupillary distance adjustment failed). This method, by setting a threshold, prevents the system from getting stuck in an infinite loop of position adjustment, avoiding resource waste and performance failures, thereby improving system stability and reliability. By outputting a prompt message indicating adjustment failure, clear feedback is provided to the user, allowing them to understand the current adjustment status and avoiding confusion and discomfort during the waiting process.
[0073] In some embodiments, problems such as motor overload, motor malfunction, or external interference can cause a sudden increase in the operating current of the left motor. Therefore, when the VR device detects that the operating current of the left motor corresponding to the left optical engine exceeds a current threshold, it can determine that the left optical engine adjustment has failed and output a corresponding prompt message. This method avoids further damage to the motor, extends its service life, reduces maintenance and replacement costs, improves the system's intelligence level, and facilitates fault diagnosis and maintenance. In another approach, the VR device can also determine that the left optical engine adjustment has failed and output a corresponding prompt message when it detects that the operating voltage of the left motor corresponding to the left optical engine exceeds a voltage threshold; this will not be elaborated upon here.
[0074] In some embodiments, the Hall effect detection module detects the target movement distance of the left optical camera in at least two of the following ways:
[0075] In the first method, the target movement distance of the left optical engine can be detected by the Hall effect sensor module after adjusting the position of the left optical engine according to the reference movement distance. Specifically, after the VR device determines the reference movement distance of the left optical engine, it drives the left motor to move the left optical engine according to the reference movement distance (for example, calculating the number of pulse signals to be sent based on the reference movement distance, and then continuously sending that number of pulse signals to the motor to drive the movement of the left optical engine). Since the motor and optical engine work together, there may be a lack of synchronization. Therefore, after the left optical engine completes its position adjustment (i.e., after the position adjustment stops), the Hall effect sensor module determines the target movement distance of the left optical engine, and then subsequently determines whether the left optical engine has been adjusted to the correct position by comparing the target movement distance with the reference movement distance.
[0076] It should be noted that VR devices can preset a waiting time threshold. When the duration of the left optical engine's position adjustment exceeds the waiting time threshold, the Hall effect detection module begins to determine the target movement distance of the left optical engine without having to wait for the position adjustment to complete. This reduces the impact of mechanical jamming (such as the optical engine lens being blocked by foreign objects), improves the system's adaptability to various abnormal situations, avoids equipment damage caused by prolonged adjustment, and extends the equipment's lifespan.
[0077] The second method involves using a Hall effect sensor to detect the target movement distance of the left optical engine in real time. Specifically, after the VR device determines the reference movement distance of the left optical engine, it drives the left motor to continuously move the engine (e.g., continuously sending pulse signals to the motor to drive its movement). Simultaneously, the Hall effect sensor continuously monitors the target movement distance of the left optical engine. When the target movement distance equals the reference movement distance, it stops sending pulse signals to the motor, thus stopping the engine's movement. This method eliminates the need to wait for position adjustment to complete before calculating the target movement distance, enabling rapid, real-time position adjustment. The immediate cessation of pulse signal transmission to the motor when the target movement distance equals the reference movement distance avoids unnecessary resource consumption.
[0078] Based on the two methods provided in the embodiments of this application, the system can be flexibly selected according to specific application scenarios and needs, thereby improving the system's flexibility and selectivity.
[0079] The adjustment method for the right optical machine will be explained below:
[0080] In some embodiments, the VR device can adjust the position of the right optical machine after adjusting the position of the left optical machine; alternatively, the VR device can prioritize adjusting the position of the right optical machine before adjusting the position of the left optical machine; or the VR device can adjust the positions of both the left and right optical machines simultaneously. This embodiment uses adjusting the left optical machine first, followed by the right optical machine, as an example. The method for adjusting the position of the right optical machine is as follows:
[0081] The VR device can first obtain the eyeball offset distance and optical engine offset distance corresponding to the right optical engine. The eyeball offset distance corresponding to the right optical engine refers to the distance obtained by the VR device through monocular interpupillary distance measurement of the user's right eye. In other words, it refers to the distance between the center of the right eye (to be measured) and the preset center plane of the electronic device. For example, the eyeball offset distance corresponding to the right optical engine could be... Figure 3 The parameter d2 in the text refers to the optical engine offset distance corresponding to the right optical engine, which is the distance between the center of the right optical engine (i.e., the optical axis of the right optical engine) and the preset center plane. For example, the optical engine offset distance corresponding to the right optical engine could be... Figure 3 The parameter D2 in the text.
[0082] In some embodiments, after obtaining the eyeball offset distance and the optical engine offset distance corresponding to the right optical engine, the VR device can calculate the offset difference between the optical engine offset distance corresponding to the right optical engine and the eyeball offset distance. The offset difference can be, for example, [missing information - likely a specific type of offset]. Figure 3The parameter Z2 (where Z2 = D2 - d2) indicates that the larger the parameter Z2 is (e.g., Z2 = 5cm), the further out the right optical engine is relative to the right eye. In this case, the optical engine needs to be moved inward. The smaller the parameter Z2 is (e.g., Z2 = -5cm), the further in the right optical engine is relative to the right eye. In this case, the optical engine needs to be moved outward. If the parameter Z2 is equal to 0, it means that the position of the right optical engine matches the user's right eye. In this case, the VR device does not need to adjust the position of the right optical engine.
[0083] In some embodiments, after obtaining the offset difference, the VR device can determine whether the right optical engine needs position adjustment based on the offset difference. When the offset difference is within the error range (e.g., the error range can be [0-δ, 0+δ], where δ can take values of 0cm, 0.1cm, 0.25cm, etc.), it is considered that the position of the right optical engine already meets the user's interpupillary distance requirement, and in this case, no position adjustment of the right optical engine is required. At this point, it is considered that the position adjustments of the left and right optical engines are complete, and the interpupillary distance adjustment of the VR device is also complete. When the offset difference is outside the preset error range, it is considered that the position of the right optical engine does not meet the user's interpupillary distance requirement, and in this case, the position adjustment of the right optical engine is required.
[0084] In some embodiments, when the position of the right optical engine needs to be adjusted, the VR device acquires the remaining travel of the right motor used to adjust the position of the right optical engine. The remaining travel of the right motor includes the remaining travel in two directions, namely the remaining travel in the direction closer to the preset center plane (e.g., Figure 3 Parameter X3), the remaining travel distance in the direction away from the preset center plane (e.g. Figure 3 (Parameter X4 in the text). Then, the VR device determines the reference movement distance of the right optical engine based on the offset difference and the remaining travel of the right motor.
[0085] In some embodiments, the VR device can determine the remaining travel in the target direction from the remaining travel in two directions based on the sign of the offset difference. The target direction refers to the direction of movement. For example, when the offset difference is not within the error range [0-δ, 0+δ] and is positive, then the remaining travel in the direction towards the preset center plane (such as parameter X3) can be used as the remaining travel in the target direction. When the offset difference is not within the error range [0-δ, 0+δ] and is negative, then the remaining travel in the direction away from the preset center plane (such as parameter X4) can be used as the remaining travel in the target direction.
[0086] In some embodiments, after determining the remaining travel in the target direction, the VR device can determine the reference movement distance of the right optical engine from the offset difference and the remaining travel in the target direction. For example, when the remaining travel in the target direction is greater than or equal to the offset difference, the offset difference can be used as the reference movement distance of the right optical engine. For instance, if the remaining travel in the target direction is X3, and X3 is greater than or equal to Z2, then Z2 is used as the reference movement distance of the right optical engine. When the remaining travel in the target direction is less than the offset difference, the remaining travel in the target direction can be used as the reference movement distance of the right optical engine. For instance, if X3 is less than Z2, then X3 is used as the reference movement distance of the right optical engine.
[0087] In some embodiments, after determining the reference movement distance of the right optical engine, the VR device can adjust the position of the right optical engine according to the reference movement distance. For example, the VR device can control the movement of the right optical engine using a motor-driven method. The right motor controlling the movement of the right optical engine can be connected to the right optical engine via gears. To achieve precise distance control, a stepper motor or servo motor can be used, combined with pulse signals for control.
[0088] In some embodiments, the VR device can determine the interpupillary distance (IPD) adjustment result based on the adjustment results of the left and right optical engines. For example, the IPD adjustment failure can be determined when either the left or right optical engine fails to adjust, or when both the left and right optical engines fail to adjust. In other embodiments, the VR device can directly determine the IPD adjustment failure when the left optical engine fails to adjust, without needing to adjust the right optical engine.
[0089] In some embodiments, when the Hall detection module is configured in the second way (including two Hall sensors and a magnet), the relative position of the magnet remains unchanged, while the relative position of the two Hall sensors changes with the movement of the optical engine. However, the movement of the two Hall sensors does not affect the magnetic field strength. Therefore, in this case, the VR device can simultaneously adjust the positions of the left and right optical engines without affecting the Hall detection module's detection of the actual movement distance of the left and right optical engines. By simultaneously adjusting the positions of the left and right optical engines, the efficiency of optical engine position adjustment can be improved, user waiting time can be reduced, and the user experience can be enhanced.
[0090] With the Hall effect detection module in its first configuration (including one Hall sensor and two magnets), the relative position of the Hall sensor remains constant, while the relative position of the two magnets moves accordingly with the movement of the optical engine. Therefore, if the positions of the left and right optical engines are adjusted simultaneously, the relative positions of the two magnets will change at the same time. This prevents the Hall sensor from detecting the actual movement distance of the two optical engines, leading to inaccurate or failed adjustments, thus affecting the user experience. Therefore, in this case, the VR device can adjust the positions of the left and right optical engines in a preset order (e.g., adjust the left optical engine first, then the right). This ensures the accuracy of the optical engine position adjustment and improves the user experience.
[0091] Based on this, the VR device can obtain the configuration of the Hall sensor module. If it uses two Hall sensors and one magnet, the optical engine position can be adjusted simultaneously or in a preset order. If it uses one Hall sensor and two magnets, the optical engine position can be adjusted in a preset order. This method allows the VR device to select an appropriate adjustment strategy based on the Hall sensor module's configuration, improving the system's flexibility and adaptability and ensuring optimal adjustment results. The adjustment strategy can be freely set by the user on the VR device or preset in a configuration file at the factory, ensuring the versatility of the VR device's optical engine adjustment functions.
[0092] In this embodiment, the left and right optical engines can be adjusted independently and share the same Hall detection module (i.e., share a set of Hall detection systems). Compared to using separate Hall detection modules for the left and right optical engines (i.e., the VR device includes Hall detection systems corresponding to the left and right optical engines respectively), this reduces the number of components (such as Hall sensors and magnets), lowers equipment costs, and reduces equipment weight, which helps to improve the thinness and compactness of the device. At the same time, it can reduce system power consumption, system space occupation, and redundancy.
[0093] Based on the user interface described above, the device adjustment method provided in the embodiments of this application is described below. Please refer to... Figure 4 , Figure 4 This is a flowchart illustrating a device adjustment method provided in an embodiment of this application. The method may include, but is not limited to, the following steps S401-S408:
[0094] S401. When the electronic device is worn in the correct posture, obtain the first set of detection distances corresponding to the first optical engine. The first optical engine is any optical engine included in the electronic device, and the first set of detection distances includes the eyeball offset distance and the optical engine offset distance.
[0095] In this context, "electronic device" can refer to a VR device, "first optical engine" can refer to the left optical engine in the VR device, and "second optical engine" can refer to the right optical engine in the VR device; conversely, "first optical engine" can also refer to the right optical engine in the VR device, and "second optical engine" can refer to the left optical engine in the VR device. "Eyeball offset distance" refers to the distance between the center of the first eyeball corresponding to the first optical engine and the preset center plane of the electronic device. "Optical engine offset distance" refers to the distance between the center of the first optical engine and the preset center plane.
[0096] S402. Determine the reference moving distance of the first optical engine based on the first detection distance set, and adjust the position of the first optical engine according to the reference moving distance.
[0097] The reference moving distance of the first optical engine can refer to the theoretically required moving distance of the left optical engine. After determining the reference moving distance, the electronic device can adjust the position of the first optical engine according to the reference moving distance. For example, it can drive the left motor to output a pulse signal with an adjustment distance equal to the reference moving distance to achieve the position adjustment of the first optical engine.
[0098] In some embodiments, the implementation steps for determining the reference movement distance of the first optical engine based on the first detection distance set can be as follows: The electronic device first determines the offset difference between the optical engine offset distance and the eyeball offset distance, and obtains the remaining travel of the first motor (such as the left motor) used to adjust the position of the first optical engine; the electronic device then determines the remaining travel in the first direction (such as the remaining travel in the direction close to the preset center plane, for example, it can be...) based on the offset difference. Figure 3 The parameter X2) and the remaining travel in the second direction (such as the remaining travel in the direction away from the preset center plane, for example, could be... Figure 3 In the parameter X1), the remaining travel distance in the target direction is determined; the electronic device then determines the reference travel distance of the first optical engine based on the offset difference and the remaining travel distance in the target direction.
[0099] In the above embodiments, the electronic device can determine the remaining travel in the first direction as the remaining travel in the target direction when the offset difference is greater than a first preset value, wherein the first preset value is greater than or equal to 0. The electronic device can also determine the remaining travel in the second direction as the remaining travel in the target direction when the offset difference is less than a second preset value, wherein the second preset value is less than 0.
[0100] In the above embodiments, the electronic device can determine the offset difference as the reference moving distance of the first optical engine when the remaining travel in the target direction is greater than or equal to the offset difference; and determine the remaining travel in the target direction as the reference moving distance of the first optical engine when the remaining travel in the target direction is less than the offset difference.
[0101] In the above embodiments, after determining the offset difference between the optical engine offset distance and the eyeball offset distance, the electronic device can determine whether the offset difference is within a first error range. Only if the offset difference is not within the first error range will the step of obtaining the remaining stroke of the first motor be executed; if the offset difference is within the first error range, the position of the first optical engine does not need to be adjusted, and the adjustment process of the second optical engine can be directly initiated. The first error range can be determined by a first preset value and a second preset value. For example, if the first preset value is δ and the second preset value is -δ, the first error range can be [0-δ, 0+δ].
[0102] S403. Obtain the target movement distance of the first optical engine detected by the Hall detection module.
[0103] In some embodiments, the electronic device can detect a first magnetic field strength and a second magnetic field strength of a magnet using a Hall sensor, and then determine the target movement distance of the first optomechanical device based on the first magnetic field strength and the second magnetic field strength. The first magnetic field strength is the magnetic field strength detected without position adjustment of the first optomechanical device, and the second magnetic field strength is the magnetic field strength detected with position adjustment of the first optomechanical device.
[0104] S404. Determine the adjustment result of the first optical engine based on the target movement distance and the reference movement distance; the adjustment result of the first optical engine is used to indicate whether the first optical engine is adjusted in place.
[0105] In some embodiments, the electronic device can acquire the distance difference between the target moving distance and the reference moving distance; if the distance difference is within a second error range, the adjustment result of the first optical engine is determined as the first adjustment result (indicating that the first optical engine is properly adjusted); if the distance difference is not within the second error range, the adjustment result of the first optical engine is determined as the second adjustment result (indicating that the first optical engine is not properly adjusted). The second error range and the first error range may be the same or different.
[0106] In some embodiments, if the adjustment result of the first optical engine is a second adjustment result (i.e., the first optical engine is not properly adjusted), the electronic device can acquire a second set of detection distances corresponding to the first optical engine. The second set of detection distances includes the eyeball offset distance and the optical engine offset distance at the current moment. The second adjustment result is used to indicate that the first optical engine is not properly adjusted. The electronic device then determines a new reference movement distance of the first optical engine based on the second set of detection distances and adjusts the position of the first optical engine according to the new reference movement distance. The electronic device then acquires a new target movement distance of the first optical engine detected by the Hall detection module and determines a new adjustment result of the first optical engine based on the new target movement distance and the new reference movement distance.
[0107] In some embodiments, the electronic device may determine the adjustment result of the first optical engine as a third adjustment result if it detects that the operating current of the first motor corresponding to the first optical engine is greater than the current threshold, or if it detects that the number of adjustments of the first optical engine is greater than or equal to the number of adjustments threshold to meet the adjustment stop condition. The third adjustment result is used to indicate that the adjustment of the first optical engine has failed.
[0108] The above steps S402-S404 introduced the adjustment method of the left optical machine. The adjustment method of the right optical machine will be explained in steps S405-S408 below. The specific adjustment method of the right optical machine can be referred to the relevant description of the adjustment method of the left optical machine in steps S402-S404.
[0109] S405. With the first optical engine adjusted to the correct position, acquire the third detection distance set corresponding to the second optical engine.
[0110] The second optical engine is any optical engine other than the first optical engine among the optical engines included in the electronic device. The third detection distance set includes the eyeball offset distance corresponding to the second optical engine and the optical engine offset distance corresponding to the second optical engine.
[0111] S406. Determine the reference moving distance of the second optical engine based on the third detection distance set, and adjust the position of the second optical engine according to the reference moving distance of the second optical engine.
[0112] S407. Obtain the target movement distance of the second optical engine detected by the Hall detection module.
[0113] S408. Based on the target movement distance of the second optical engine and the reference movement distance of the second optical engine, determine the adjustment result of the second optical engine, and based on the adjustment result of the first optical engine and the adjustment result of the second optical engine, determine the interpupillary distance adjustment result of the electronic device.
[0114] In some embodiments, the electronic device may acquire the hardware configuration information of the Hall detection module during initialization (e.g., power-on). If the hardware configuration information indicates that the Hall detection module adopts a first configuration mode, the steps of acquiring the first detection distance set corresponding to the first optical engine and acquiring the third detection distance set corresponding to the optical engine to be adjusted are executed in a preset order. If the hardware configuration information indicates that the Hall detection module adopts a second configuration mode, the steps of acquiring the first detection distance set corresponding to the first optical engine and acquiring the third detection distance set corresponding to the optical engine to be adjusted can be executed in parallel, or the two steps can be executed in a preset order.
[0115] The specific implementation methods of the above steps S401-S408 can be found in the relevant descriptions in the foregoing method embodiments, and will not be repeated here.
[0116] The following will combine Figure 3 and Figure 5 The device adjustment method provided in the embodiments of this application will be illustrated through examples. Figure 5 This is a schematic flowchart illustrating device interpupillary distance adjustment according to an embodiment of this application. The device interpupillary distance adjustment method may include, but is not limited to, the following steps S501-S524:
[0117] S501. The eye-tracking system determines that the wearing posture is correct.
[0118] When the eye-tracking system determines that the user's VR device wearing posture is correct, step S502 is executed. If the system determines that the user's VR device wearing posture is incorrect, a prompt message can be output to remind the user to adjust their posture. The prompt message can be displayed in the VR device's image, audio, or other forms of feedback. The left and right optical units can each correspond to a separate eye-tracking system; for example, the left optical unit corresponds to... Figure 3 The eye-tracking system 1 in the middle, the right optical machine corresponds to Figure 3 The eye-tracking system 2 in the middle. It should be noted that the left and right optical machines can also share the same eye-tracking system, which will not be elaborated here.
[0119] S502. Enter the left optical machine adjustment and calculate Z1 = D1 - d1.
[0120] Where Z1 is the offset difference between the optical engine offset distance (D1) corresponding to the left optical engine and the eyeball offset distance (d1) of the left eye.
[0121] S503. Determine Z1∈[0-δ,0+δ]? .
[0122] Where [0-δ, 0+δ] is the preset error range. When Z1∈[0-δ, 0+δ] is satisfied, step S512 is executed; when Z1∈[0-δ, 0+δ] is not satisfied, step S504 is executed.
[0123] S504. Determine if Z1 > 0?
[0124] If Z1>0 is satisfied, proceed to step S505; if Z1>0 is not satisfied, proceed to step S508.
[0125] S505. Determine if X2 > Z1?
[0126] Where X2 is the remaining stroke of the left motor in the direction close to the preset center plane. When X2>Z1, proceed to step S506; when X2>Z1 is not satisfied, proceed to step S507.
[0127] S506. Adjust the position of the left optical machine according to Z1.
[0128] S507. Adjust the position of the left optical machine according to X2.
[0129] S508. Determine if X1 > Z1?
[0130] Where X1 is the remaining stroke of the left motor in the direction away from the preset center plane. When X1>Z1, execute step S509; when X1>Z1 is not satisfied, execute step S510.
[0131] S509. Adjust the position of the left optical machine according to Z1.
[0132] S510. Adjust the position of the left optical machine according to X1.
[0133] S511. The Hall effect detection module determines that the difference between the target movement distance and the reference movement distance of the left optical machine is less than the error range.
[0134] When the difference between the target movement distance (i.e., the actual movement distance) and the reference movement distance (theoretical movement distance) of the left optical machine is less than the error range, step S512 is executed.
[0135] S512. Ensure the left optical machine is properly adjusted.
[0136] S513. Enter the right optical engine adjustment and calculate Z2 = D2 - d2.
[0137] Where Z2 is the offset difference between the optical engine offset distance (D2) corresponding to the right optical engine and the eyeball offset distance (d2) of the right eye.
[0138] S514. Determine if Z2∈[0-δ,0+δ]?
[0139] If Z2∈[0-δ,0+δ] is satisfied, proceed to step S523; if Z2∈[0-δ,0+δ] is not satisfied, proceed to step S515.
[0140] S515. Determine if Z2 > 0?
[0141] If Z2>0 is satisfied, proceed to step S516; if Z2>0 is not satisfied, proceed to step S519.
[0142] S516. Determine if X3 > Z2?
[0143] Where X3 is the remaining travel distance of the right motor in the direction close to the preset center plane. If X3>Z2, proceed to step S517; if X3>Z2, proceed to step S518.
[0144] S517. Adjust the position of the left optical machine according to Z2.
[0145] S518. Adjust the position of the left optical machine according to X3.
[0146] S519. Determine if X4 > Z2?
[0147] Where X4 is the remaining travel distance of the right motor away from the preset center plane. If X4>Z2, proceed to step S520; if X4>Z2, proceed to step S521.
[0148] S520. Adjust the position of the left optical machine according to Z2.
[0149] S521. Adjust the position of the left optical machine according to X4.
[0150] S522. The Hall effect detection module determines that the difference between the target movement distance and the reference movement distance of the right optical camera is less than the error range.
[0151] When the difference between the target movement distance (i.e., the actual movement distance) and the reference movement distance (theoretical movement distance) of the right optical machine is less than the error range, step S523 is executed.
[0152] S523. Ensure the right optical machine is properly adjusted.
[0153] S524. Complete device interpupillary distance adjustment and enter the main interface.
[0154] After the VR device completes the interpupillary distance adjustment, the user can enter the main interface (user interface). The specific implementation of the above steps S501-S524 can be found in the relevant descriptions in the foregoing method embodiments, and will not be repeated here.
[0155] The following section will describe the process of optical engine position adjustment performed by an electronic device, focusing on the interaction of its internal modules. Taking the position adjustment of any single optical engine as an example... Figure 6 As shown, Figure 6 A flowchart for optical-mechanical position adjustment provided in this application embodiment may include, but is not limited to, the following steps:
[0156] S601. Press and hold the function key.
[0157] Users can long-press the function key on the VR device used for interpupillary distance (IPD) adjustment to enter the IPD adjustment process. It should be noted that long-pressing the function key is not always necessary; for example, the VR device can automatically adjust IPD during the initialization process after powering on.
[0158] S602. Determine if the wearing posture is correct.
[0159] S603. Send the eyeball offset distance of the left eye and the eyeball offset distance of the right eye.
[0160] In steps S602-S603 above, the eye-tracking system in the VR device can determine whether the user's wearing posture is correct. When the wearing posture is determined to be correct, the system measures the eyeball offset distance of the user's left eye and the eyeball offset distance of the right eye, and sends the eyeball offset distance of the left eye and the eyeball offset distance of the right eye to the interpupillary distance adjustment module.
[0161] S604. Determine the reference moving distance of the left optical unit.
[0162] The interpupillary distance adjustment module can obtain the optical engine offset distance of the left optical engine, and then determine the reference movement distance of the left optical engine based on the eyeball offset distance of the left eye and the optical engine offset distance of the left optical engine.
[0163] S605. Drive the left motor to adjust the position of the left optical machine according to the reference moving distance of the left optical machine.
[0164] The interpupillary distance adjustment module includes a motor drive module. Therefore, the interpupillary distance adjustment module can send drive information (such as sending a pulse signal to the left motor) to the motor drive module so that the motor drive module can adjust the position of the left optical machine according to the reference movement distance of the left optical machine.
[0165] S606. Real-time detection of the target movement distance of the left optical unit.
[0166] S607. When the target movement distance of the left optical machine matches the reference movement distance, output a stop adjustment signal for the left optical machine.
[0167] In steps S606-S607 above, the Hall effect detection module detects the target movement distance of the left optical camera in real time. When the target movement distance of the left optical camera matches the reference movement distance (matching can mean that the distance difference is less than the error range), it outputs a left optical camera stop adjustment signal to the motor drive module, thereby completing the adjustment of the left optical camera. For example, the Hall effect detection module can output a left optical camera stop adjustment signal to the motor drive module, and then the motor drive module can send a stop pulse signal to the left optical camera.
[0168] S608. Determine the reference movement distance of the right optical unit.
[0169] The interpupillary distance adjustment module can obtain the optical engine offset distance of the right optical engine, and then determine the reference movement distance of the right optical engine based on the eyeball offset distance of the right eye and the optical engine offset distance of the right optical engine.
[0170] S609. Drive the right motor to adjust the position of the right optical machine according to the reference moving distance of the right optical machine.
[0171] The interpupillary distance adjustment module includes a motor drive module. Therefore, the interpupillary distance adjustment module can send drive information (such as sending a pulse signal to the right motor) to the motor drive module so that the motor drive module can adjust the position of the right optical machine according to the reference movement distance of the right optical machine.
[0172] S610. Real-time detection of the target movement distance of the right optical unit.
[0173] S611. When the target movement distance of the right optical engine matches the reference movement distance, output a stop adjustment signal for the right optical engine.
[0174] In steps S610-S611 above, the Hall detection module detects the target movement distance of the right optical machine in real time. When the target movement distance of the right optical machine matches the reference movement distance (matching can mean that the distance difference is less than the error range), the module outputs a right optical machine stop adjustment signal to the motor drive module, thereby completing the adjustment of the right optical machine.
[0175] S612. Enter the main interface.
[0176] After both the left and right optical engines are adjusted, users can enter the main interface and begin using the VR device normally.
[0177] The specific implementation of steps S601-S612 can be found in the relevant descriptions in the foregoing method embodiments, and will not be repeated here.
[0178] The software architecture of electronic devices will be introduced below, such as... Figure 7 As shown, Figure 7 This is a schematic diagram of the software structure of an electronic device provided in an embodiment of this application. The software structure of the electronic device is a layered architecture, containing several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system consists of, from top to bottom, the application layer, the application framework layer, and the kernel layer, etc.
[0179] The application layer may include a series of application packages, such as camera, gallery, video playback, live streaming, map, calendar, and music applications. In this embodiment, the application layer may also include display and interpupillary distance adjustment applications. The display application can be used to control the user interface to output VR visual content, and the interpupillary distance adjustment application is used to adjust the position of the optical engine and detect whether the optical engine is properly adjusted.
[0180] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes a set of predefined functions.
[0181] The application framework layer can include a window manager, a view system, a notification manager, etc. The window manager manages window applications; it can obtain the screen size, determine if a status bar is present, lock the screen, and capture screenshots, among other things.
[0182] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views; for example, a display interface including a text notification icon can include views for displaying text and views for displaying images.
[0183] The notification manager allows applications to display notification information in the status bar. It can be used to convey informational messages and can disappear automatically after a short time without user interaction.
[0184] In this embodiment, the application framework layer may further include a virtual reality framework module, an interpupillary distance adjustment module, a motor drive module, a Hall effect detection module, and an eye-tracking module.
[0185] The virtual reality framework module is used to obtain view information from the application and, based on the view information provided by the application, output VR visual content to the virtual screen, which then displays the VR visual content to the user.
[0186] The interpupillary distance adjustment module can be used to adjust the position of the optical engine and detect whether the optical engine is adjusted to the correct position. The motor drive module can be used to adjust the position of each optical engine in the VR device according to the reference movement distance after determining the reference movement distance of the optical engine. The Hall effect detection module can be used to detect the actual movement distance of the optical engine (such as the target movement distance mentioned above) when the optical engine is adjusted in position.
[0187] The eye-tracking module can be used to detect whether the VR device is worn correctly, and when the wearing posture is correct, measure the distance of eyeball offset and send it to the interpupillary distance adjustment module for further processing.
[0188] The kernel layer is the layer between hardware and software. The kernel layer includes at least display drivers, camera drivers, audio drivers, sensor drivers, and motor drivers.
[0189] It should be noted that the functional modules included in the above software structure are merely exemplary and do not constitute a specific limitation on the mobile phone software architecture of this application. In other embodiments, the functional modules included in the above software structure may be more or fewer, and this application does not impose any limitations on this. Although the embodiments of this application use the Android system as an example for illustration, its basic principles are equally applicable to electronic devices based on operating systems such as iOS or Windows.
[0190] It should be understood that in the embodiments of this application, the electronic device may be a wearable device, a virtual reality (VR) device, an augmented reality (AR) device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, a personal digital assistant (PDA), etc., and the embodiments of this application are not limited thereto.
[0191] For example, the hardware structure of the electronic device in the embodiments of this application will be described below.
[0192] like Figure 8 As shown, the electronic device may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, a Hall effect sensor 180N, etc.
[0193] In this embodiment, the electronic device may further include an optical engine 122, a Hall effect detection module 123, and an interpupillary distance adjustment module 124. The optical engine 122 is used to display VR visual content to the user, and there may be multiple optical engines 122, such as a left optical engine and a right optical engine for the electronic device. The Hall effect detection module 123 is used to detect the actual movement distance (such as the target movement distance mentioned above) of the optical engine when its position is adjusted. The interpupillary distance adjustment module is used to adjust the position of the optical engine and detect whether the optical engine is properly adjusted.
[0194] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0195] An NPU (Neural Processing Unit) is a neural network computing processor that, by borrowing from the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, rapidly processes input information and can continuously learn on its own. NPUs can enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding. In this embodiment, the NPU can be used to implement the eye-tracking function provided by the eye-tracking module to determine whether the user's wearing posture is correct.
[0196] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0197] Electronic devices implement display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0198] The wireless communication function of electronic devices can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0199] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.
[0200] The mobile communication module 150 can provide solutions for wireless communication applications including 2G / 3G / 4G / 5G in electronic devices. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0201] The wireless communication module 160 can provide solutions for wireless communication applications in electronic devices, including wireless local area networks (WLAN) (such as WiFi), Bluetooth (BT), BLE broadcasting, global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR). The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signal, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0202] Electronic devices implement display functions through GPUs, displays 194, and application processors. A GPU is a microprocessor for image processing, connecting the displays 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering, such as rendering VR visual content. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0203] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device may include one or N displays 194, where N is a positive integer greater than 1. In this embodiment, display screen 194 may specifically refer to a virtual display screen, which can be placed in the left and right optical engines of the VR device for displaying VR visual content to the user.
[0204] Touch sensor 180K, also known as a "touch panel," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touch screen." Touch sensor 180K detects touch operations applied to or near it. Touch sensor 180K can transmit the detected touch operation to the application processor to determine the touch event type. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of the electronic device, in a different position than display screen 194. In this embodiment, touch sensor 180K can be used to detect user actions that trigger interpupillary distance adjustment functions, such as a long press on the interpupillary distance adjustment function key. Hall sensor 180N is used for Hall distance detection. Through Hall sensor 180N, the actual movement distance of the optical engine can be detected when the optical engine is adjusting its position.
[0205] It is understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0206] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive).
[0207] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0208] The steps in the method of this application embodiment can be adjusted, combined, or deleted according to actual needs.
[0209] The modules in the device of this application embodiment can be merged, divided, and deleted according to actual needs.
[0210] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: flash drive, ROM, RAM, disk or optical disk, etc.
[0211] The above-disclosed embodiments are merely one preferred embodiment of this application and only a part of the embodiments of this application. They should not be construed as limiting the scope of the claims of this application.
Claims
1. A method for adjusting equipment, characterized in that, Applied to electronic devices, the method includes: When the electronic device is worn in the correct posture, a first set of detection distances corresponding to the first optical engine is obtained; the first optical engine is any optical engine included in the electronic device, and the first set of detection distances includes eyeball offset distance and optical engine offset distance; The reference moving distance of the first optical engine is determined based on the first detection distance set, and the position of the first optical engine is adjusted according to the reference moving distance; Obtain the target movement distance of the first optomechanical unit detected by the Hall effect detection module; The adjustment result of the first optical engine is determined based on the target moving distance and the reference moving distance; the adjustment result of the first optical engine is used to indicate whether the first optical engine is adjusted in place.
2. The method as described in claim 1, characterized in that, Determining the reference movement distance of the first optical engine based on the first detection distance set includes: Determine the offset difference between the optical engine offset distance and the eyeball offset distance; the eyeball offset distance is the distance between the center of the first eyeball corresponding to the first optical engine and the preset center plane of the electronic device, and the optical engine offset distance is the distance between the center of the first optical engine and the preset center plane; Obtain the remaining travel of the first motor; the remaining travel of the first motor includes the remaining travel in the first direction and the remaining travel in the second direction, and the first motor is used to adjust the position of the first optical engine; The remaining travel in the target direction is determined from the remaining travel in the first direction and the remaining travel in the second direction based on the offset difference; The reference travel distance of the first optical engine is determined based on the offset difference and the remaining travel distance in the target direction.
3. The method as described in claim 2, characterized in that, Determining the reference travel distance of the first optical engine based on the offset difference and the remaining travel distance in the target direction includes: If the remaining travel distance in the target direction is greater than or equal to the offset difference, the offset difference is determined as the reference travel distance of the first optical engine; If the remaining travel distance in the target direction is less than the offset difference, the remaining travel distance in the target direction is determined as the reference travel distance of the first optical engine.
4. The method as described in claim 2, characterized in that, The method further includes: If the offset difference is not within the first error range, the step of obtaining the remaining stroke of the first motor is performed.
5. The method according to any one of claims 1-4, characterized in that, The Hall detection module includes a Hall sensor and a magnet; acquiring the target movement distance of the first optomechanical system detected by the Hall detection module includes: The Hall sensor detects a first magnetic field strength and a second magnetic field strength of the magnet; the first magnetic field strength is the magnetic field strength detected without adjusting the position of the first optomechanical unit, and the second magnetic field strength is the magnetic field strength detected with the position of the first optomechanical unit adjusted. The target movement distance of the first optical engine is determined based on the first magnetic field strength and the second magnetic field strength.
6. The method according to any one of claims 1-4, characterized in that, Determining the adjustment result of the first optical engine based on the target moving distance and the reference moving distance includes: Obtain the distance difference between the target movement distance and the reference movement distance; If the distance difference is within the second error range, the adjustment result of the first optical engine is determined as the first adjustment result; the first adjustment result is used to indicate that the first optical engine has been adjusted to the correct position. If the distance difference is not within the second error range, the adjustment result of the first optical engine is determined as the second adjustment result; the second adjustment result is used to indicate that the first optical engine has not been adjusted properly.
7. The method according to any one of claims 1-4, characterized in that, The method further includes: If the adjustment result of the first optical engine is the second adjustment result, a second detection distance set corresponding to the first optical engine is obtained; the second detection distance set includes the eyeball offset distance and the optical engine offset distance at the current moment, and the second adjustment result is used to indicate that the first optical engine has not been adjusted properly; A new reference moving distance for the first optical engine is determined based on the second set of detection distances, and the position of the first optical engine is adjusted according to the new reference moving distance. Obtain the new target movement distance of the first optomechanic detected by the Hall detection module; Based on the new target movement distance and the new reference movement distance, a new adjustment result for the first optical engine is determined.
8. The method according to any one of claims 1-4, characterized in that, The method further includes: If the adjustment stop condition is met, the adjustment result of the first optical engine is determined to be the third adjustment result; the third adjustment result is used to indicate that the adjustment of the first optical engine has failed. The adjustment stopping conditions include one or more of the following: detecting that the operating current of the first motor corresponding to the first optical engine is greater than the current threshold, or the adjustment number of the first optical engine is greater than or equal to the number threshold.
9. The method according to any one of claims 1-4, characterized in that, The method further includes: Obtain the third detection distance set corresponding to the second optical engine; the second optical engine is any optical engine other than the first optical engine included in the electronic device, and the third detection distance set includes the eyeball offset distance corresponding to the second optical engine and the optical engine offset distance corresponding to the second optical engine; The reference moving distance of the second optical engine is determined according to the third set of detection distances, and the position of the second optical engine is adjusted according to the reference moving distance of the second optical engine; The target movement distance of the second optomechanic detected by the Hall detection module is obtained; Based on the target moving distance and the reference moving distance of the second optical engine, the adjustment result of the second optical engine is determined, and based on the adjustment result of the first optical engine and the adjustment result of the second optical engine, the interpupillary distance adjustment result of the electronic device is determined.
10. The method as described in claim 9, characterized in that, The Hall detection module adopts a first configuration or a second configuration. In the first configuration, the Hall detection module includes a Hall sensor and two magnets. The Hall sensor is located on a preset center plane of the electronic device, and the two magnets are respectively fixedly connected to the corresponding optomechanisms in the electronic device. In the second configuration, the Hall detection module includes two Hall sensors and one magnet. The magnet is located on a preset center plane of the electronic device, and the two Hall sensors are respectively fixedly connected to the corresponding optomechanisms in the electronic device.
11. The method as described in claim 10, characterized in that, The method further includes: Obtain the hardware configuration information of the Hall effect detection module; When the hardware configuration information indicates that the Hall detection module adopts the first configuration method, the steps of obtaining the first detection distance set corresponding to the first optical engine and obtaining the third detection distance set corresponding to the optical engine to be adjusted are executed in a preset order. When the hardware configuration information indicates that the Hall detection module adopts the second configuration method, the steps of obtaining the first detection distance set corresponding to the first optical engine and obtaining the third detection distance set corresponding to the optical engine to be adjusted are executed in parallel.
12. An electronic device, characterized in that, The electronic device includes: one or more processors, a memory, a display screen, at least two optomechanical systems, a Hall effect detection module, and an interpupillary distance adjustment module; the memory is used to store program code; the processor is used to run the program code, causing the electronic device to implement the method as described in any one of claims 1-11.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1-11.