A distance detection method based on an optical sensor and an intelligent device
By emitting light with set parameters under the screen of the smart device, performing frequency domain conversion and amplitude and frequency information processing, the problem that the optical distance sensing chip is susceptible to interference from ambient light and screen light is solved, and the detection sensitivity and anti-interference ability are achieved, reducing the emitted light intensity requirements and equipment power consumption.
Patent Information
- Application Number
- CN202510503770.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-04-22
AI Technical Summary
The existing optical distance sensing chips are susceptible to ambient light and screen light interference, have low detection accuracy, and have high requirements for infrared emitted light intensity, which affects the screen life.
The distance detection method based on the light sensor is adopted, by emitting the emitted light with set parameters under the screen of the intelligent device, receiving the optical signal, and frequency domain conversion of multiple reflected light data, amplitude and frequency information is obtained, and the device is judged from the amplitude of the set frequency, and anti-interference ability and sensitivity are improved by multi-frequency points and weighted summing.
Effectively shield interfering light information from other frequencies in the environment, improve the sensitivity and accuracy of distance detection, reduce the intensity requirements of emitted light, reduce damage to the screen, and reduce power consumption and cost.
Smart Images

Figure CN120028801B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of ranging technology, and in particular, to a distance detection method and an intelligent device based on an optical sensor. Background Art
[0002] The optical distance sensing chip is an essential component in intelligent terminals such as mobile phones and tablets. In a smart phone, it is usually placed in the narrow slot at the top of the phone screen or directly under the screen. The working principle of the optical distance sensor is as Figure 1 shown, and it works based on the infrared light reflection principle. When an object (such as a human face) approaches the sensor, the infrared light is reflected back and received by the sensor. By measuring the intensity of the reflected light, the distance between the object and the sensor is determined. When the distance is less than a certain set value, the sensor will trigger corresponding actions, such as turning off the screen. The application scenarios of the optical distance sensing chip include call anti-mis-touch, intelligent screen-on control, pocket mode, and mis-touch protection.
[0003] The distance detection function senses nearby objects through infrared emission and detection. The integration process is divided into two stages, as Figure 2 shown. In stage B, the background light is integrated. In stage A, the IR emitter emits infrared light, and at the same time, the reflected light is integrated. The integration in stage A includes the background light and the IR reflected light. By subtracting the two-stage integrations, the data of the reflected light, P_Data, is obtained. During a distance detection process, the two integration stages are repeated multiple times, and the multiple results are accumulated as the final output, that is, P_DATA in formula (2). If P_DATA is greater than the upper limit value, it indicates that the object is far away; if P_DATA is less than the lower threshold value, it means the object is approaching.
[0004] (1)
[0005] (2)
[0006] Since the light needs to pass through the screen twice, the loss is as high as 99%. Coupled with the interference of ambient light, the detection accuracy is not high. To improve the signal-to-noise ratio, certain requirements are imposed on the intensity of the infrared emitted light. However, long-term strong light irradiation on a single point damages the screen and affects the screen life.
[0007] Moreover, the traditional detection method is easily affected by the screen light. To avoid the interference of the screen light, the detection can only be performed during the period when the screen is not lit before the refresh of a new frame signal, and it requires synchronization with the screen refresh signal Vsync. As Figure 3 shown, the VCSEL emission and circuit integration can only be carried out during a certain time period between two Vsync signals. Summary of the Invention
[0008] The objective of the embodiments of this application is to provide a distance detection method and an intelligent device based on a light sensor, so as to solve the problems that existing optical distance sensing chips are greatly interfered by ambient light and screen light and have high requirements for the intensity of infrared emitted light.
[0009] A distance detection method based on a light sensor provided by the embodiments of this application includes:
[0010] Emitting emitted light with set parameters under the screen of the intelligent device; where the set parameters include a set frequency;
[0011] Receiving an optical signal under the screen of the intelligent device;
[0012] Obtaining a series of reflected light data according to the optical signal;
[0013] Performing a frequency-domain transformation on m reflected light data to obtain amplitude-frequency information; where m is a positive power of 2;
[0014] Judging whether the intelligent device is moving away from or approaching according to the amplitude corresponding to the set frequency in the amplitude-frequency information.
[0015] In the above technical solution, by performing a frequency-domain transformation on multiple reflected light data to obtain amplitude-frequency information, and judging the distance of the intelligent device according to the amplitude corresponding to the set frequency in the amplitude-frequency information, where the set frequency is the frequency of the emitted light. In this embodiment, by only paying attention to the amplitude of a specific frequency point, the interference light information of other frequencies in the environment is effectively shielded, the anti-interference ability of distance detection is improved, the information of the interaction between the emitted light and the object can be extracted more accurately, and thus the sensitivity of distance detection is improved. Moreover, due to the improvement of the anti-interference ability and sensitivity, the requirements for the intensity of the emitted light in this solution are reduced, which helps to reduce the power consumption and cost of the intelligent device.
[0016] In some optional embodiments, judging whether the intelligent device is moving away from or approaching according to the amplitude corresponding to the set frequency in the amplitude-frequency information includes:
[0017] If the amplitude corresponding to the set frequency in the amplitude-frequency information is greater than a second threshold, the intelligent device is approaching;
[0018] If the amplitude corresponding to the set frequency in the amplitude-frequency information is less than a first threshold, the intelligent device is moving away;
[0019] Where the second threshold is greater than or equal to the first threshold.
[0020] In the above technical solution, the first threshold is a lower amplitude threshold used to determine whether the smart device is far from an object (or a person). When the amplitude corresponding to the set frequency in the amplitude-frequency information is lower than this threshold, it can be considered that the distance between the smart device and the object (or person) is relatively far. The second threshold is a higher amplitude threshold used to determine whether the smart device is close to the object (or person). When the amplitude corresponding to the set frequency in the amplitude-frequency information is higher than this threshold, it can be considered that the distance between the smart device and the object (or person) is relatively close, that is, the smart device is approaching the object (or person).
[0021] In some optional embodiments, the emission light with set parameters includes: n emission lights of different frequencies, where n is greater than or equal to 2;
[0022] Based on the amplitude corresponding to the frequency set in the amplitude-frequency information, determine whether the smart device is far away or close, including:
[0023] If the amplitudes corresponding to the n different frequencies in the amplitude-frequency information are all greater than their respective second thresholds, the smart devices are close;
[0024] If the amplitudes corresponding to the n different frequencies in the amplitude-frequency information are all smaller than their respective first thresholds, the smart device moves away.
[0025] In the above technical solution, during configuration, multiple frequencies of emitted light are configured. In the subsequent threshold judgment step, only when the amplitudes corresponding to the multiple frequencies are greater than the respective corresponding second thresholds, the smart device is considered to be approaching, or only when the amplitudes corresponding to the multiple frequencies are less than the respective corresponding first thresholds, the smart device is considered to be far away, further reducing the interference of flickering light of specific frequencies in the environment. Among them, these thresholds can be the same or different. Because even if the emitted light of a certain frequency is interfered with by flickering light, the emitted light of other frequencies can still provide accurate information. Only when the amplitudes of all frequencies are greater than or less than their respective thresholds will a judgment of approaching or moving away be made. This embodiment provides a multi-frequency detection method, which improves the anti-interference ability and reliability of the system by increasing the redundancy of information. The multi-frequency detection method can also adjust the frequency and threshold size according to actual needs to adapt to different application scenarios and object types.
[0026] In some optional embodiments, the emission light with set parameters includes: n emission lights of different frequencies, where n is greater than or equal to 2;
[0027] Based on the amplitude corresponding to the frequency set in the amplitude-frequency information, determine whether the smart device is far away or close, including:
[0028] The amplitudes corresponding to n different frequencies are weighted and summed to obtain an amplitude evaluation value; wherein the weights corresponding to different frequencies are positively correlated with the amplitude of the corresponding emitted light;
[0029] If the amplitude evaluation value is greater than the fourth threshold value, the intelligent device is approaching;
[0030] If the amplitude evaluation value is less than the third threshold value, the intelligent device is moving away;
[0031] Among them, the fourth threshold value is greater than or equal to the third threshold value.
[0032] In the above technical solution, the amplitudes corresponding to n different frequencies are weighted and summed to obtain the amplitude evaluation value. The weights here are determined according to the amplitudes of the corresponding emitted light, that is, the greater the amplitude of the emitted light, the greater the corresponding weight. This weighting method can ensure that in the summation process, the frequencies that contribute more to the detection have a greater influence. In different application scenarios, the frequency of the emitted light and the single emission intensity can be flexibly configured to adjust the detection distance range. If the amplitude evaluation value is greater than the fourth threshold value, it is considered that the intelligent device is approaching the object. If the amplitude evaluation value is less than the third threshold value, it is considered that the intelligent device is moving away from the object. In this embodiment, through the method of weighted summation, the reflected light signal intensities of all frequencies can be more comprehensively considered, so as to more accurately reflect the distance change between the intelligent device and the object. Since the degrees of environmental interference on the emitted light of different frequencies may be different, the method of weighted summation can reduce the influence of a single frequency being severely interfered on the overall judgment and improve the robustness of the system.
[0033] In addition, the weights can be adjusted according to actual needs to adapt to different application scenarios and object types. For example, in certain specific environments, the emitted light of certain frequencies may be more susceptible to interference. At this time, the influence of interference can be reduced by reducing the weights of these frequencies.
[0034] For different screen transmittances, different third threshold values and fourth threshold values can be set. In applications with relatively low screen transmittance, the third threshold value and the fourth threshold value are set to smaller values; in applications with relatively high screen transmittance, the third threshold value and the fourth threshold value are set to larger values.
[0035] In some alternative embodiments, the emitted light of the set parameters includes: emitted light of multiple set frequencies and the same phase;
[0036] Among them, each emitted light is emitted from different positions under the screen.
[0037] In the above technical solution, emitted light of multiple set frequencies and the same phase is used. These emitted lights are emitted from different positions under the screen. By dispersing the intensity and position of the emitted light, the damage to a single point on the screen can be reduced, while ensuring the accuracy and reliability of distance detection.
[0038] In some alternative embodiments, the emitted light with set parameters includes: multiple emitted lights with different phases; wherein, the frequencies of the multiple emitted lights with different phases are less than the set frequency, and after the multiple emitted lights with different phases are superimposed, they are equivalent to the emitted light with the set frequency, and each emitted light is emitted from a different position under the screen.
[0039] In the above technical solution, multiple emitted lights with frequencies lower than the set frequency and different phases are used. These emitted lights are emitted from different positions under the screen, and the intensity and position of the emitted light are dispersed to different positions under the screen, reducing the damage to a single point on the screen. After the multiple emitted lights with different phases are superimposed in space, they can produce the effect of emitted light equivalent to the set frequency, so that while ensuring the detection effect, by reducing the frequency of the emitted light, the damage to the screen is further reduced.
[0040] In some alternative embodiments, the emitted light with set parameters includes: emitted lights with different wavelength bands;
[0041] Judging whether the intelligent device is far away or approaching according to the amplitude value corresponding to the set frequency in the amplitude-frequency information includes:
[0042] Judging whether the intelligent device is far away or approaching according to the amplitude value corresponding to the set frequency in the amplitude-frequency information of the optical signals with different wavelength bands.
[0043] In the above technical solution, the transmitting device uses multiple light sources with different wavelength bands. Correspondingly, the receiving device uses multiple photodiodes corresponding to the wavelength bands. These photodiodes can obtain optical signals corresponding to different wavelength bands. The optical signals with different wavelength bands are respectively converted into reflected light data with different wavelength bands. The reflected light data with different wavelength bands are respectively subjected to frequency domain transformation to obtain amplitude-frequency information with different wavelength bands. Judging whether the intelligent device is far away or approaching according to the amplitude value of the target frequency in the amplitude-frequency information with different wavelength bands. In this embodiment, the distance detection based on the frequency domain change is simultaneously performed on the optical signals with different wavelength bands through multiple channels, which can further reduce the interference of ambient light.
[0044] In some alternative embodiments, obtaining a series of reflected light data according to the optical signal includes:
[0045] Integrating each stage in the optical signal respectively to obtain the charge quantity of each stage; wherein, the length of the stage is the length of a single pulse;
[0046] Converting the charge quantity of each stage into digital signals of each stage respectively;
[0047] Taking two adjacent stages as a group, and in each group, subtracting the digital signals of the two stages to obtain a reflected light data.
[0048] In the above technical solution, the two stages in each group may be two background light integration stages, or one background light integration stage and one reflected light integration stage. In the background light integration stage, when the emitted light is not emitted, the receiving device receives the background light. At this time, the received optical signal is integrated to obtain the charge amount in the background light integration stage. The reflected light integration stage is when the emitted light is emitted, and the receiving device receives the background light and the reflected light. At this time, the received optical signal is integrated to obtain the charge amount in the reflected light integration stage. The charge amount in the background light integration stage is converted into a background light digital signal, and the charge amount in the reflected light integration stage is converted into a reflected light digital signal; the background light digital signal and the reflected light digital signal in adjacent integration stages are subtracted, that is, the influence of the background light on the measurement of the reflected light is eliminated, and the reflected light data is extracted. The magnitude of the reflected light data reflects the reflection intensity of the target object on the emitted light, and thus can be used to judge the distance between the intelligent device and the target object.
[0049] In some alternative embodiments, converting the charge amount in each stage into a digital signal for each stage includes:
[0050] Using a programmable gain amplifier to convert the charge amount into an analog voltage signal;
[0051] Using an analog-to-digital converter to convert the analog voltage signal into a digital signal.
[0052] In the above technical solution, after the integration stage ends, the charge amount output by the integrator represents the intensity of the optical signal. To convert these charge amounts into analog voltage signals that can be used for subsequent processing, a programmable gain amplifier (PGA) is used. The PGA can adjust the gain as needed to ensure that the converted analog voltage signal is within the input range of the ADC and avoid signal saturation or distortion. The gain of the PGA can be dynamically adjusted according to the intensities of the background light and the reflected light. For example, when the background light is strong, the gain can be appropriately reduced to avoid signal saturation; when the reflected light is weak, the gain can be increased to improve the signal-to-noise ratio of the signal.
[0053] The analog voltage signal amplified by the PGA is sent to an analog-to-digital converter (ADC) for digitization processing. The resolution of the ADC determines the accuracy of the converted digital signal. A high-resolution ADC can provide a more accurate digital signal, thereby allowing for a more refined analysis and processing of the optical signal.
[0054] An intelligent device provided by an embodiment of the present application includes: a transmitting device, a receiving device, a processor, and a memory;
[0055] The transmitting device is configured to: emit emitted light with set parameters under the screen of the intelligent device; wherein, the set parameters include a set frequency;
[0056] The receiving device is configured to: receive an optical signal under the screen of the smart device;
[0057] The memory stores machine-readable instructions executable by the processor. When the machine-readable instructions are executed by the processor, the following method is performed:
[0058] Based on the optical signal, a series of reflected light data is obtained;
[0059] Perform a frequency-domain transformation on m pieces of reflected light data to obtain amplitude-frequency information; where m is a positive power of 2;
[0060] Based on the amplitude corresponding to the set frequency in the amplitude-frequency information, determine whether the smart device is moving away or approaching. Description of the Drawings
[0061] To more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments of the present application. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation of the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0062] Figure 1 It is a schematic diagram of the working principle of the optical distance sensing chip;
[0063] Figure 2 It is a schematic diagram of the integration process of the optical distance sensing chip;
[0064] Figure 3 It is a timing diagram of VCSEL emission and Vsync signal;
[0065] Figure 4 It is a flowchart of the steps of a distance detection method based on an optical sensor provided by an embodiment of the present application;
[0066] Figure 5 It is a schematic diagram of the integration process of the distance detection method provided by an embodiment of the present application;
[0067] Figure 6 It is a flowchart of the distance detection operation of the smart device provided by an embodiment of the present application;
[0068] Figure 7 It is a schematic diagram of the damage to the screen caused by different emission light configurations provided by an embodiment of the present application;
[0069] Figure 8 It is the first emission light waveform diagram provided by an embodiment of the present application;
[0070] Figure 9 It is the second emission light waveform diagram provided by an embodiment of the present application;
[0071] Figure 10 The third transmitted light waveform diagram provided by the embodiment of the present application. Detailed implementation manners
[0072] Next, the technical solutions in the embodiments of the present application will be described with reference to the accompanying drawings in the embodiments of the present application.
[0073] Please refer to Figure 4 , Figure 4 A flowchart of the steps of a distance detection method based on an optical sensor provided by the embodiment of the present application, including:
[0074] Step S1: Transmit transmitted light with set parameters under the screen of the intelligent device; wherein, the set parameters include a set frequency.
[0075] Step S2: Receive an optical signal under the screen of the intelligent device; wherein, the intelligent device transmits transmitted light with set parameters outward under the screen, and at the same time, receives the reflected light and ambient light reflected by the transmitted light after passing through an object or a human body under the screen of the intelligent device.
[0076] Step S3: Obtain a series of reflected light data according to the optical signal.
[0077] Step S4: Perform frequency domain transformation on m reflected light data to obtain amplitude-frequency information; wherein, m is a positive power of 2.
[0078] Step S5: Determine whether the intelligent device is moving away from or approaching according to the amplitude corresponding to the set frequency in the amplitude-frequency information.
[0079] Among them, the amplitude corresponding to the set frequency in the amplitude-frequency information is negatively correlated with the distance between the intelligent device and the object or the human body, that is, the higher the amplitude corresponding to the set frequency in the amplitude-frequency information, the closer the intelligent device is to the object or the human body; the lower the amplitude corresponding to the set frequency in the amplitude-frequency information, the farther the intelligent device is from the object or the human body. The frequency domain transformation can adopt fast Fourier transform (FFT), discrete Fourier transform (DFT), short-time Fourier transform (STFT), wavelet transform (Wavelet Transform), etc.
[0080] Specifically, steps 3-5 for processing the optical signal can be implemented by a digital circuit or by a computer software program.
[0081] For example, when implementing this method through a computer software program, it specifically includes:
[0082] The processor controls the transmitting device to emit transmitted light with set parameters; meanwhile, the sensor receives the optical signal. The processor processes the optical signal, including: obtaining a series of reflected light data based on the optical signal; performing frequency-domain transformation on the m reflected light data to obtain amplitude-frequency information; and judging whether the intelligent device is moving away from or approaching based on the amplitude corresponding to the set frequency in the amplitude-frequency information.
[0083] In the embodiments of the present application, by performing frequency-domain transformation on multiple reflected light data to obtain amplitude-frequency information, and judging the distance of the intelligent device based on the amplitude corresponding to the set frequency in the amplitude-frequency information, where the set frequency is the frequency of the transmitted light. In this embodiment, by only focusing on the amplitude of specific frequency points, the interference light information of other frequencies in the environment is effectively shielded, the anti-interference ability of distance detection is improved, the information of the interaction between the transmitted light and the object can be extracted more accurately, thereby improving the sensitivity of distance detection. Moreover, due to the improvement of the anti-interference ability and sensitivity, the requirement for the intensity of the transmitted light in this solution is reduced, which helps to reduce the power consumption and cost of the intelligent device.
[0084] In some alternative embodiments, judging whether the intelligent device is moving away from or approaching based on the amplitude corresponding to the set frequency in the amplitude-frequency information includes:
[0085] If the amplitude corresponding to the set frequency in the amplitude-frequency information is greater than the second threshold, the intelligent device is approaching;
[0086] If the amplitude corresponding to the set frequency in the amplitude-frequency information is less than the first threshold, the intelligent device is moving away;
[0087] wherein, the second threshold is greater than or equal to the first threshold.
[0088] In the embodiments of the present application, the first threshold is a relatively low amplitude threshold for judging whether the intelligent device is moving away from an object (or a human body). When the amplitude corresponding to the set frequency in the amplitude-frequency information is lower than this threshold, it can be considered that the distance between the intelligent device and the object (or the human body) is relatively far. The second threshold is a relatively high amplitude threshold for judging whether the intelligent device is approaching an object (or a human body). When the amplitude corresponding to the set frequency in the amplitude-frequency information is higher than this threshold, it can be considered that the distance between the intelligent device and the object (or the human body) is relatively close, that is, the intelligent device is approaching the object (or the human body).
[0089] In some alternative embodiments, the transmitted light with set parameters includes: transmitted lights of n different frequencies, where n is greater than or equal to 2;
[0090] Judging whether the intelligent device is moving away from or approaching based on the amplitude corresponding to the set frequency in the amplitude-frequency information includes:
[0091] If the amplitudes corresponding to the n different frequencies in the amplitude-frequency information are all greater than their respective second thresholds, the intelligent device is approaching;
[0092] If the amplitudes corresponding to n different frequencies in the amplitude-frequency information are all less than their respective first thresholds, the intelligent device moves away.
[0093] In the embodiments of the present application, during configuration, the emitted light of multiple frequency points is configured. Subsequently, in the threshold judgment step, only when the amplitudes corresponding to multiple frequency points are all greater than their respective second thresholds, is it considered that the intelligent device is approaching, or, only when the amplitudes corresponding to multiple frequency points are all less than their respective first thresholds, is it considered that the intelligent device is moving away, further reducing the interference of specific-frequency flickering light in the environment. Among them, these thresholds can be the same or different. Because even if the emitted light of a certain frequency is interfered by the flickering light, the emitted light of other frequencies can still provide accurate information. Only when the amplitudes of all frequencies are all greater than or all less than their respective thresholds, will a judgment of approaching or moving away be made. This embodiment provides a multi-frequency point detection method, which improves the anti-interference ability and reliability of the system by increasing the redundancy of information. The multi-frequency point detection method can also adjust the frequencies and thresholds according to actual needs to adapt to different application scenarios and object types.
[0094] In some optional embodiments, the emitted light of the set parameters includes: the emitted light of n different frequencies, where n is greater than or equal to 2;
[0095] Judging whether the intelligent device is moving away or approaching according to the amplitude corresponding to the set frequency in the amplitude-frequency information includes:
[0096] Performing a weighted sum of the amplitudes corresponding to n different frequencies to obtain an amplitude evaluation value; among them, the weights corresponding to different frequencies are positively correlated with the amplitudes of the corresponding emitted light;
[0097] If the amplitude evaluation value is greater than the fourth threshold, the intelligent device is approaching;
[0098] If the amplitude evaluation value is less than the third threshold, the intelligent device is moving away;
[0099] Among them, the fourth threshold is greater than or equal to the third threshold.
[0100] In the embodiments of the present application, the amplitudes corresponding to n different frequencies are weighted and summed to obtain an amplitude evaluation value. Here, the weights are determined according to the amplitudes of the corresponding emitted light, that is, the greater the amplitude of the emitted light, the greater the corresponding weight. This weighting method can ensure that in the summation process, the frequencies that contribute more to the detection have a greater influence. In different application scenarios, the frequency of the emitted light and the single emission intensity can be flexibly configured to adjust the detection distance range. If the amplitude evaluation value is greater than the fourth threshold, it is considered that the intelligent device is approaching the object. If the amplitude evaluation value is less than the third threshold, it is considered that the intelligent device is moving away from the object. Through the method of weighted summation in this embodiment, the intensity of the reflected light signals of all frequencies can be more comprehensively considered, so as to more accurately reflect the distance change between the intelligent device and the object. Since the emitted light of different frequencies may be affected by environmental interference to different degrees, the method of weighted summation can reduce the influence of a single frequency being severely interfered on the overall judgment and improve the robustness of the system.
[0101] Specifically, the emitted light circuit may include 2 emitted light units, and these 2 emitted light units emit emitted light of different frequencies. The emitted light circuit may also include 3 emitted light units, and these 3 emitted light units emit emitted light of different frequencies. Even if the received light of one of the frequencies is interfered by external ambient light, since this solution comprehensively weights and sums the amplitudes of 3 frequencies, the influence of external ambient light interference can be weakened, so as to make a judgment of approaching or moving away. In a preferred embodiment, the emitted light circuit includes 4 or more emitted light units, and these emitted light units respectively emit emitted light of different frequencies.
[0102] In addition, the weights can be adjusted according to actual needs to adapt to different application scenarios and object types. For example, in certain specific environments, the emitted light of certain frequencies may be more easily interfered. At this time, the influence of interference can be reduced by reducing the weights of these frequencies.
[0103] For different screen transmittances, different third thresholds and fourth thresholds can be set. In applications with a relatively low screen transmittance, the third threshold and the fourth threshold are set to smaller values; in applications with a relatively high screen transmittance, the third threshold and the fourth threshold are set to larger values.
[0104] In some alternative embodiments, the emitted light with set parameters includes: emitted light of multiple set frequencies and the same phase;
[0105] Among them, each emitted light is emitted from different positions under the screen.
[0106] In the embodiments of the present application, emitted light of multiple set frequencies and the same phase is used. These emitted lights are emitted from different positions under the screen. By dispersing the intensity and position of the emitted light, the damage to a single point on the screen can be reduced, while ensuring the accuracy and reliability of distance detection.
[0107] In some alternative embodiments, the emitted light with set parameters includes: multiple emitted lights with different phases; wherein, the frequencies of the multiple emitted lights with different phases are less than the set frequency, and after the multiple emitted lights with different phases are superimposed, they are equivalent to the emitted light with the set frequency, and each emitted light is emitted from a different position under the screen.
[0108] In the embodiments of the present application, multiple emitted lights with frequencies lower than the set frequency and different phases are used. These emitted lights are emitted from different positions under the screen, and the intensity and position of the emitted light are dispersed to different positions under the screen, reducing the damage to a single point on the screen. After the multiple emitted lights with different phases are superimposed in space, they can produce an effect equivalent to the emitted light with the set frequency, so that while ensuring the detection effect, the damage to the screen is further reduced by reducing the frequency of the emitted light.
[0109] In some alternative embodiments, the emitted light with set parameters includes: emitted lights with different wavelength bands;
[0110] Judging whether the intelligent device is far away from or approaching according to the amplitude corresponding to the set frequency in the amplitude-frequency information includes:
[0111] Judging whether the intelligent device is far away from or approaching according to the amplitude corresponding to the set frequency in the amplitude-frequency information of the optical signals with different wavelength bands.
[0112] In the embodiments of the present application, the transmitting device uses multiple light sources with different wavelength bands. Correspondingly, the receiving device uses multiple photodiodes corresponding to the wavelength bands. These photodiodes can obtain optical signals corresponding to different wavelength bands. The optical signals with different wavelength bands are respectively converted into reflected light data with different wavelength bands. The reflected light data with different wavelength bands are respectively subjected to frequency-domain transformation to obtain amplitude-frequency information with different wavelength bands. Judging whether the intelligent device is far away from or approaching according to the amplitude of the target frequency in the amplitude-frequency information with different wavelength bands. In this embodiment, the distance detection based on the frequency-domain change is simultaneously performed on the optical signals with different wavelength bands through multiple channels, which can further reduce the interference of ambient light.
[0113] Please refer to Figure 7 , Figure 7 which is a schematic diagram of the damage to the screen by different emitted light configurations provided by the embodiments of the present application.
[0114] The first type of emitted light is Figure 8 the emitted light shown in the figure. This emitted light is emitted from a single point under the screen. In this embodiment, a VCSEL emits light with a frequency of 1 kHz. Since this solution uses distance detection based on frequency-domain transformation, the requirement for the intensity of the emitted light is relatively low, and the damage to the single point under the screen can be reduced.
[0115] The second type of emitted light is Figure 9The emitted light shown emits four emitted lights from four points under the screen respectively. In this embodiment, one or more VCSELs can be used to emit four lights with a frequency of 1 kHz, and the intensity of each emitted light can be further reduced, thereby further reducing the damage to the screen.
[0116] The third emitted light is Figure 10 The emitted light shown emits four emitted lights from four points under the screen respectively. The frequency of each emitted light is 0.5 kHz, which further reduces the damage to the screen.
[0117] In some alternative embodiments, a series of reflected light data is obtained according to the optical signal, specifically including:
[0118] Integrate each stage in the optical signal separately to obtain the charge quantity of each stage; wherein, the length of the stage is the length of a single pulse.
[0119] Convert the charge quantity of each stage into a digital signal of each stage respectively.
[0120] Take two adjacent stages as a group. In each group, subtract the digital signals of the two stages to obtain a reflected light data.
[0121] In the embodiments of the present application, the two stages in each group may be two background light integration stages, or one background light integration stage and one reflected light integration stage. The background light integration stage is when the emitted light is not emitted and the receiving device receives the background light. At this time, the received optical signal is integrated to obtain the charge quantity of the background light integration stage. The reflected light integration stage is when the emitted light is emitted and the receiving device receives the background light and the reflected light. At this time, the received optical signal is integrated to obtain the charge quantity of the reflected light integration stage. Convert the charge quantity of the background light integration stage into a background light digital signal, and convert the charge quantity of the reflected light integration stage into a reflected light digital signal; subtract the background light digital signal and the reflected light digital signal of adjacent integration stages, that is, eliminate the influence of the background light on the measurement of the reflected light, and extract the reflected light data. The magnitude of the reflected light data reflects the reflection intensity of the target object to the emitted light, and can thus be used to determine the distance between the intelligent device and the target object.
[0122] Please refer to Figure 5 , Figure 5 is a schematic diagram of the integration process of the distance detection method provided by the embodiments of the present application. The emitted light VCSEL_ON in this embodiment has two frequency points. The P1 group includes the background light integration stage B1 and the reflected light integration stage A1, the P2 group includes the background light integration stage B2 and the reflected light integration stage A2, the P3 group includes the background light integration stage B3 and A3, and the P2 group includes two background light integration stages B4 and A4, and so on. Then the reflected light data corresponding to the Pi group:
[0123]
[0124] Wherein, is the digital signal in the Ai stage, is the digital signal in the Bi stage.
[0125] Subsequently, perform FFT frequency domain transformation on i.e., FFT_output = abs(fft(P_Data)).
[0126] In some alternative embodiments, converting the charge quantity of each stage into digital signals of each stage respectively includes:
[0127] Using a programmable gain amplifier to convert the charge quantity into an analog voltage signal;
[0128] Using an analog-to-digital converter to convert the analog voltage signal into a digital signal.
[0129] In the embodiments of the present application, after the integration stage ends, the charge quantity output by the integrator represents the intensity of the optical signal. To convert these charge quantities into analog voltage signals that can be used for subsequent processing, a programmable gain amplifier (PGA) is used. The PGA can adjust the gain as needed, so as to ensure that the converted analog voltage signal is within the input range of the ADC and avoid signal saturation or distortion. The gain of the PGA can be dynamically adjusted according to the intensity of the background light and the reflected light. For example, when the background light is strong, the gain can be appropriately reduced to avoid signal saturation; while when the reflected light is weak, the gain can be increased to improve the signal-to-noise ratio of the signal.
[0130] The analog voltage signal amplified by the PGA is sent to an analog-to-digital converter (ADC) for digitization processing. The resolution of the ADC determines the accuracy of the converted digital signal. A high-resolution ADC can provide a more accurate digital signal, thereby allowing for a more refined analysis and processing of the optical signal.
[0131] Please refer to Figure 6 , Figure 6 which is a flowchart of the distance detection operation of an intelligent device provided by the embodiments of the present application. Among them, the intelligent device includes: a transmitting device, a receiving device, a processor, and a memory.
[0132] The transmitting device is used for: emitting transmitted light with set parameters under the screen of the intelligent device; wherein, the set parameters include a set frequency. The receiving device is used for: receiving an optical signal under the screen of the intelligent device.
[0133] The memory stores machine-readable instructions executable by a processor. When the machine-readable instructions are executed by the processor, the following method is performed: obtaining a series of reflected light data according to an optical signal; performing a frequency-domain transformation on m pieces of reflected light data to obtain amplitude-frequency information; where m is a positive power of 2; and determining whether the intelligent device is moving away from or approaching according to the amplitude corresponding to a set frequency in the amplitude-frequency information.
[0134] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For another example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some communication interfaces. The indirect coupling or communication connection of the devices or units can be in an electrical, mechanical or other form.
[0135] In addition, the units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0136] Furthermore, in each embodiment of the present application, the various functional modules can be integrated together to form an independent part, or each module can exist alone, or two or more modules can be integrated to form an independent part.
[0137] In this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0138] The above are only the embodiments of the present application and are not used to limit the protection scope of the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A distance detection method based on an optical sensor, characterized in that, Including: Emitting light with set parameters under the screen of the intelligent device; wherein, the set parameters include a set frequency; Receiving an optical signal under the screen of the intelligent device; Obtaining a series of reflected light data according to the optical signal; Performing frequency-domain transformation on m of the reflected light data to obtain amplitude-frequency information; where m is a positive power of 2; Judging whether the intelligent device is far away or approaching according to the amplitude corresponding to the set frequency in the amplitude-frequency information; The emitted light with the set parameters includes: multiple emitted lights with different phases; wherein, the frequencies of the multiple emitted lights with different phases are less than the set frequency, and after the multiple emitted lights with different phases are superimposed, they are equivalent to the emitted light with the set frequency, and each emitted light is emitted from a different position under the screen.
2. The method according to claim 1, wherein The judging whether the intelligent device is far away or approaching according to the amplitude corresponding to the set frequency in the amplitude-frequency information includes: If the amplitude corresponding to the set frequency in the amplitude-frequency information is greater than a second threshold, then the intelligent device is approaching; If the amplitude corresponding to the set frequency in the amplitude-frequency information is less than a first threshold, then the intelligent device is far away; Wherein, the second threshold is greater than or equal to the first threshold.
3. The method according to claim 1, wherein The emitted light with the set parameters includes: n emitted lights with different frequencies, where n is greater than or equal to 2; The judging whether the intelligent device is far away or approaching according to the amplitude corresponding to the set frequency in the amplitude-frequency information includes: If the amplitudes corresponding to the n different frequencies in the amplitude-frequency information are all greater than their respective second thresholds, then the intelligent device is approaching; If the amplitudes corresponding to the n different frequencies in the amplitude-frequency information are all less than their respective first thresholds, then the intelligent device is far away.
4. The method according to claim 1, wherein The emitted light with the set parameters includes: n emitted lights with different frequencies, where n is greater than or equal to 2; The judging whether the intelligent device is far away or approaching according to the amplitude corresponding to the set frequency in the amplitude-frequency information includes: Performing weighted summation on the amplitudes corresponding to the n different frequencies to obtain an amplitude evaluation value; wherein, the weights corresponding to the different frequencies are positively correlated with the amplitudes of the corresponding emitted lights; If the amplitude evaluation value is greater than a fourth threshold, then the intelligent device is approaching; If the amplitude evaluation value is less than a third threshold, then the intelligent device is far away; Wherein, the fourth threshold is greater than or equal to the third threshold.
5. The method according to claim 1, characterized in that, The emitted light with the set parameters includes: multiple emitted lights with the same phase and set frequencies; Wherein, each emitted light is emitted from a different position under the screen.
6. The method according to claim 1, wherein The emitted light with the set parameters includes: emitted lights with different bands; The judging whether the intelligent device is far away or approaching according to the amplitude corresponding to the set frequency in the amplitude-frequency information includes: Judging whether the intelligent device is far away or approaching according to the amplitude corresponding to the set frequency in the amplitude-frequency information of the optical signals with different bands.
7. The method according to claim 1, wherein The obtaining a series of reflected light data according to the optical signal includes: Integrating each stage in the optical signal respectively to obtain the charge amount of each stage; wherein, the length of the stage is the length of a single pulse; Converting the charge amount of each stage into a digital signal of each stage respectively; Taking two adjacent stages as a group, and in each group, taking the difference between the digital signals of the two stages to obtain a reflected light data.
8. The method according to claim 7, wherein Converting the electric charge of each stage into a digital signal for each stage respectively includes: Using a programmable gain amplifier to convert the electric charge into an analog voltage signal; Using an analog-to-digital converter to convert the analog voltage signal into a digital signal.
9. An intelligent device, characterized in that, It includes: A transmitting device, a receiving device, a processor, and a memory; The transmitting device is configured to: emit transmitting light with set parameters under the screen of the intelligent device; wherein, the set parameters include a set frequency; the transmitting light with the set parameters includes: multiple transmitting lights with different phases; wherein, the frequencies of the multiple transmitting lights with different phases are less than the set frequency, and after the multiple transmitting lights with different phases are superimposed, they are equivalent to the transmitting light with the set frequency, and each transmitting light is emitted from a different position under the screen; The receiving device is configured to: receive an optical signal under the screen of the intelligent device; The memory stores machine-readable instructions executable by the processor, and when the machine-readable instructions are executed by the processor, the following method is performed: Obtaining a series of reflected light data according to the optical signal; Performing a frequency-domain transformation on m pieces of the reflected light data to obtain amplitude-frequency information; wherein, m is a positive power of 2; Judging whether the intelligent device is far away from or approaching according to the amplitude corresponding to the set frequency in the amplitude-frequency information.
Citation Information
Patent Citations
Method of measuring absolute distance
RU2738876C1
Method of controlling display screen states, and apparatus
US20180211634A1