Distance detection method based on optical sensor and intelligent device
By performing frequency domain conversion and amplitude-frequency information analysis on the reflected light data of smart devices, the problem of the optical distance sensing chip being disturbed by ambient light and screen light is solved, the accuracy of distance detection and anti-interference ability are improved, and the requirements for emitted light intensity and equipment power consumption are reduced.
Patent Information
- Application Number
- CN202510503770.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2045-04-22
AI Technical Summary
The existing optical distance sensing chips are greatly disturbed by ambient light and screen light, and have high requirements for the intensity of infrared emitted light, resulting in low detection accuracy and damage to the screen.
By emitting the emitted light with set parameters under the screen of the smart device and frequency domain conversion of multiple reflected light data, amplitude and frequency information is obtained. According to the amplitude corresponding to the set frequency in the amplitude information, whether the smart device is far away or close, effectively blocking the interfering light information of other frequencies in the environment.
It improves the anti-interference ability and sensitivity of distance detection, reduces the requirements for emitted light intensity, helps reduce the power consumption and cost of smart devices, and reduces damage to the screen.
Smart Images

Figure CN120028801A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of distance measurement technology, and in particular, to a distance detection method and intelligent device based on an optical sensor. Background Art
[0002] The optical distance sensor chip is an indispensable component in smart terminals such as mobile phones and tablets. In smart phones, it is usually placed in the narrow slit at the top of the phone screen, or directly placed below the screen. The working principle of the optical distance sensor is as follows: Figure 1 As shown in the figure, it works based on the infrared light reflection principle. When an object (such as a face) approaches the sensor, the infrared light is reflected back and received by the sensor, and the distance between the object and the sensor is determined by measuring the intensity of the reflected light. When the distance is less than a certain set value, the sensor triggers a corresponding action, such as turning off the screen. The application scenarios of the optical distance sensing chip include call prevention, intelligent screen light control, pocket mode and false touch protection, etc.
[0003] The distance detection function senses nearby objects through infrared emission and detection. The integration process is divided into two stages, such as Figure 2 As shown, the B stage integrates the background light, and the A stage controls the IR emmiter to emit infrared light and integrates the reflected light at the same time. The integration of the A stage includes the background light and the IR reflected light. The reflected light data P_Data is obtained by subtracting the two-stage integration. In a distance detection process, the two integration stages are repeated many times, and the multiple results are accumulated as the final output, namely P_DATA in formula (2). If P_DATA is greater than the upper limit value, it means that the object is far away; if P_DATA is less than the lower limit threshold, it means that the object is close.
[0004] (1) (2) Since the light needs to pass through the screen twice, the loss is as high as 99%. Combined with the interference of ambient light, the detection accuracy is not high. In order to improve the signal-to-noise ratio, certain requirements are required for the intensity of the infrared emission light. However, strong light shining on one point for a long time will damage the screen and affect the life of the screen.
[0005] In addition, the traditional detection method is easily affected by the light of the screen. In order to avoid the interference of the screen light, the detection can only be performed before a new frame signal is refreshed and the screen is not lit. The screen refresh signal Vsync is required for synchronization, such as Figure 3 As shown, VCSEL light emission and circuit integration can only be performed in a certain period between two Vsync signals. Summary of the invention
[0006] The purpose of the embodiments of the present application is to provide a distance detection method and intelligent device based on a light sensor, so as to solve the problem that the existing light distance sensing chip is greatly disturbed by ambient light and screen light and has high requirements on the intensity of infrared emission light.
[0007] The present invention provides a distance detection method based on an optical sensor, including: Emitting light with set parameters under the screen of the smart device; wherein the set parameters include a set frequency; Receive optical signals under the screen of smart devices; According to the optical signal, a series of reflected light data is obtained; Perform frequency domain transformation on m reflected light data to obtain amplitude-frequency information; where m is a positive power of 2; According to the amplitude corresponding to the set frequency in the amplitude-frequency information, it is determined whether the smart device is far away or close.
[0008] In the above technical solution, the frequency domain transformation is performed on multiple reflected light data to obtain amplitude-frequency information, and the distance of the smart device is judged 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. This embodiment effectively shields the interference light information of other frequencies in the environment by only focusing on the amplitude of a specific frequency point, improves the anti-interference ability of distance detection, and can more accurately extract the information of the interaction between the emitted light and the object, thereby improving the sensitivity of distance detection. In addition, due to the improvement of anti-interference ability and sensitivity, this solution reduces the intensity requirements of the emitted light, which helps to reduce the power consumption and cost of smart devices.
[0009] In some optional implementations, judging whether the smart device is far away or close 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 the second threshold, the smart device is approaching; If the amplitude corresponding to the set frequency in the amplitude-frequency information is less than the first threshold, the smart device moves away; The second threshold is greater than or equal to the first threshold.
[0010] In the above technical solution, the first threshold is a lower amplitude threshold, which is used to determine whether the smart device is far away from the object (or 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 smart device and the object (or human body) is far. The second threshold is a higher amplitude threshold, which is used to determine whether the smart device is close to the object (or 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 smart device and the object (or human body) is close, that is, the smart device is approaching the object (or human body).
[0011] 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; According to the amplitude corresponding to the set frequency in the amplitude-frequency information, it is judged whether the smart device is far away or close, including: If the amplitudes corresponding to the n different frequencies in the amplitude-frequency information are all greater than their respective corresponding second thresholds, then the smart device is close; 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.
[0012] 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, which further reduces 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 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, a judgment of approaching or moving away is 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.
[0013] 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; According to the amplitude corresponding to the set frequency in the amplitude-frequency information, it is judged whether the smart device is far away or close, including: 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 amplitudes of the corresponding emitted light; If the amplitude evaluation value is greater than a fourth threshold, the smart device is approaching; If the amplitude evaluation value is less than the third threshold, the smart device moves away; The fourth threshold is greater than or equal to the third threshold.
[0014] In the above technical solution, the amplitudes corresponding to n different frequencies are weighted and summed to obtain an amplitude evaluation value. The weight here is determined according to the amplitude of the corresponding emitted light, that is, the larger the amplitude of the emitted light, the larger the corresponding weight. This weighting method can ensure that in the summation process, the frequency that contributes more to the detection has a greater influence, and the frequency of the emitted light and the single luminous intensity can be flexibly configured in different application scenarios to adjust the detection distance range. If the amplitude evaluation value is greater than the fourth threshold, it is considered that the smart device is approaching the object. If the amplitude evaluation value is less than the third threshold, it is considered that the smart device is moving away from the object. This embodiment can more comprehensively consider the reflected light signal intensity of all frequencies by weighted summation, thereby more accurately reflecting the change in the distance between the smart device and the object. Since the degree of environmental interference may be different for emitted light of different frequencies, the weighted summation method can reduce the impact of severe interference on the overall judgment of a single frequency, thereby improving the robustness of the system.
[0015] 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, certain frequencies of emitted light may be more susceptible to interference, and the impact of interference can be reduced by reducing the weights of these frequencies.
[0016] Different third and fourth thresholds may be set for different screen transmittances. In applications with relatively low screen transmittances, the third and fourth thresholds are set to relatively small values; in applications with relatively high screen transmittances, the third and fourth thresholds are set to relatively large values.
[0017] In some optional embodiments, the emission light with set parameters includes: a plurality of emission lights with set frequencies and the same phase; Each emitted light is emitted from a different position under the screen.
[0018] In the above technical solution, multiple emitted lights with set frequencies and the same phase are used. These emitted lights are emitted from different positions under the screen. By dispersing the intensity and position of the emitted lights, the damage to a single point on the screen is reduced, while ensuring the accuracy and reliability of distance detection.
[0019] In some optional embodiments, the emission light with set parameters includes: multiple emission lights with different phases; wherein the frequency of the multiple emission lights with different phases is less than the set frequency, and after the multiple emission lights with different phases are superimposed, they are equivalent to the emission light with the set frequency, and each emission light is emitted from a different position under the screen.
[0020] In the above technical solution, multiple emission lights with different phases and lower than the set frequency are used. These emission lights are emitted from different positions under the screen. The intensity and position of the emission lights are dispersed to different positions under the screen, reducing the damage to a single point on the screen. After multiple emission lights with different phases are superimposed in space, they can produce an emission light effect equivalent to the set frequency, thereby ensuring the detection effect while further reducing the damage to the screen by reducing the frequency of the emission light.
[0021] In some optional embodiments, the emission light with set parameters includes: emission light of different wavelength bands; According to the amplitude corresponding to the set frequency in the amplitude-frequency information, it is judged whether the smart device is far away or close, including: According to the amplitude corresponding to the set frequency in the amplitude-frequency information of the optical signal of different bands, it is judged whether the smart device is far away or close.
[0022] In the above technical solution, the transmitting device adopts multiple light sources of different bands, and correspondingly, the receiving device adopts multiple photodiodes of corresponding bands, which can obtain light signals corresponding to different bands. The light signals of different bands are converted into reflected light data of different bands respectively. The reflected light data of different bands are respectively transformed in the frequency domain to obtain the amplitude-frequency information of different bands. According to the amplitude of the target frequency in the amplitude-frequency information of different bands, it is judged whether the smart device is far away or close. This embodiment uses multiple channels to detect the distance based on frequency domain changes on the light signals of different bands at the same time, which can further reduce the interference of ambient light.
[0023] In some optional implementations, a series of reflected light data is obtained according to the optical signal, including: Integrate each stage of the optical signal to obtain the charge amount of each stage; the length of the stage is the length of a single pulse; Convert the amount of charge in each stage into a digital signal for each stage; Two adjacent stages form a group. In each group, the digital signals of the two stages are subtracted to obtain a reflected light data.
[0024] 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. The background light integration stage is when the transmitted light is not emitted, and the receiving device receives the background light. At this time, the received light signal is integrated to obtain the charge amount of the background light integration stage. The reflected light integration stage is when the transmitted light is emitted, and the receiving device receives the background light and the reflected light. At this time, the received light signal is integrated to obtain the charge amount of the reflected light integration stage. The charge amount of the background light integration stage is converted into a background light digital signal, and the charge amount of the reflected light integration stage is converted into a reflected light digital signal; the background light digital signal and the reflected light digital signal of the adjacent integration stages are subtracted, that is, the influence of the background light on the reflected light measurement is eliminated, and the reflected light data is extracted. The size of the reflected light data reflects the reflection intensity of the target object to the emitted light, which can be used to judge the distance between the smart device and the target object.
[0025] In some optional implementations, the charge amount in each stage is converted into a digital signal in each stage, including: Using a programmable gain amplifier, the charge is converted into an analog voltage signal; An analog-to-digital converter is used to convert the analog voltage signal into a digital signal.
[0026] In the above technical solution, after the integration stage, the amount of charge output by the integrator represents the intensity of the light signal. In order to convert these charges 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 intensity of the background light and 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.
[0027] The analog voltage signal amplified by the PGA is sent to the analog-to-digital converter (ADC) for digitization. The resolution of the ADC determines the accuracy of the converted digital signal. A high-resolution ADC can provide a more accurate digital signal, allowing for more sophisticated analysis and processing of the optical signal.
[0028] An intelligent device provided in an embodiment of the present application includes: a transmitting device, a receiving device, a processor and a memory; The transmitting device is used to: transmit a light with set parameters under the screen of the smart device; wherein the set parameters include a set frequency; The receiving device is used to: receive optical signals under the screen of the smart 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: According to the optical signal, a series of reflected light data is obtained; Perform frequency domain transformation on m reflected light data to obtain amplitude-frequency information; where m is a positive power of 2; According to the amplitude corresponding to the set frequency in the amplitude-frequency information, it is determined whether the smart device is far away or close. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0030] Figure 1 This is a schematic diagram of the working principle of the optical distance sensing chip; Figure 2 Schematic diagram of the integration process of the optical distance sensing chip; Figure 3 It is the timing diagram of VCSEL light emission and Vsync signal; Figure 4 A flow chart of the steps of a distance detection method based on an optical sensor provided in an embodiment of the present application; Figure 5 A schematic diagram of the integration process of the distance detection method provided in an embodiment of the present application; Figure 6 A flowchart of distance detection performed by a smart device provided in an embodiment of the present application; Figure 7 A schematic diagram of screen damage caused by different emission light configurations provided in an embodiment of the present application; Figure 8 The first emission light waveform diagram provided in the embodiment of the present application; Fig. 9 A second emission light waveform diagram provided in an embodiment of the present application; Fig.10 This is a third emission light waveform diagram provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0032] Please refer to Figure 4 , Figure 4 A flow chart of the steps of a distance detection method based on an optical sensor provided in an embodiment of the present application includes: Step S1, emitting light with set parameters under the screen of the smart device; wherein the set parameters include a set frequency; Step S2, receiving a light signal under the screen of the smart device; wherein, the screen of the smart device emits light with set parameters outward, and at the same time, the screen of the smart device receives reflected light and ambient light reflected by an object or a human body.
[0033] Step S3, obtaining a series of reflected light data according to the optical signal; Step S4, performing frequency domain transformation on the m reflected light data to obtain amplitude-frequency information; wherein m is a positive power of 2; Step S5: judging whether the smart device is far away or close according to the amplitude corresponding to the set frequency in the amplitude-frequency information.
[0034] Among them, the amplitude corresponding to the set frequency in the amplitude-frequency information is negatively correlated with the distance between the smart device and the object or human body, that is, the higher the amplitude corresponding to the set frequency in the amplitude-frequency information, the closer the distance between the smart device and the object or human body; the lower the amplitude corresponding to the set frequency in the amplitude-frequency information, the farther the distance between the smart device and the object or human body. Frequency domain transformation can use fast Fourier transform (FFT), discrete Fourier transform (DFT), short-time Fourier transform (STFT), wavelet transform (WaveletTransform), etc.
[0035] Specifically, the above steps 3-5 of processing the optical signal can be implemented by a digital circuit or a computer software program.
[0036] For example, the method is implemented by a computer software program, specifically comprising: The processor controls the transmitting device to transmit the transmission light with the set parameters; at the same time, the sensor receives the light signal. The processor processes the light signal, including: obtaining a series of reflected light data according to the light signal; performing frequency domain transformation on the m reflected light data to obtain amplitude-frequency information; judging whether the smart device is far away or close according to the amplitude corresponding to the set frequency in the amplitude-frequency information.
[0037] In the embodiment of the present application, the frequency domain transformation is performed on multiple reflected light data to obtain amplitude-frequency information, and the distance of the smart device is judged 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. By focusing only on the amplitude of a specific frequency point, this embodiment effectively shields the interference light information of other frequencies in the environment, improves the anti-interference ability of distance detection, and can more accurately extract the information of the interaction between the emitted light and the object, thereby improving the sensitivity of distance detection. In addition, due to the improvement of anti-interference ability and sensitivity, this solution reduces the intensity requirements of the emitted light, which helps to reduce the power consumption and cost of smart devices.
[0038] In some optional implementations, judging whether the smart device is far away or close 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 the second threshold, the smart device is approaching; If the amplitude corresponding to the set frequency in the amplitude-frequency information is less than the first threshold, the smart device moves away; The second threshold is greater than or equal to the first threshold.
[0039] In the embodiment of the present application, the first threshold is a lower amplitude threshold, which is used to determine whether the smart device is far away from the object (or 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 smart device and the object (or human body) is far. The second threshold is a higher amplitude threshold, which is used to determine whether the smart device is close to the object (or 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 smart device and the object (or human body) is close, that is, the smart device is approaching the object (or human body).
[0040] 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; According to the amplitude corresponding to the set frequency in the amplitude-frequency information, it is judged whether the smart device is far away or close, including: If the amplitudes corresponding to the n different frequencies in the amplitude-frequency information are all greater than their respective corresponding second thresholds, then the smart device is close; 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.
[0041] In the embodiment of the present application, during configuration, emission lights of multiple frequencies 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 emission light of a certain frequency is interfered by flickering light, the emission 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, a judgment of approaching or moving away is 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.
[0042] 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; According to the amplitude corresponding to the set frequency in the amplitude-frequency information, it is judged whether the smart device is far away or close, including: 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 amplitudes of the corresponding emitted light; If the amplitude evaluation value is greater than a fourth threshold, the smart device is approaching; If the amplitude evaluation value is less than the third threshold, the smart device moves away; The fourth threshold is greater than or equal to the third threshold.
[0043] In an embodiment of the present application, the amplitudes corresponding to n different frequencies are weighted and summed to obtain an amplitude evaluation value. The weight here is determined according to the amplitude of the corresponding emitted light, that is, the larger the amplitude of the emitted light, the larger the corresponding weight. This weighting method can ensure that in the summation process, the frequency that contributes more to the detection has a greater influence, and the frequency of the emitted light and the single luminous intensity can be flexibly configured in different application scenarios to adjust the detection distance range. If the amplitude evaluation value is greater than the fourth threshold, it is considered that the smart device is approaching the object. If the amplitude evaluation value is less than the third threshold, it is considered that the smart device is moving away from the object. This embodiment can more comprehensively consider the reflected light signal intensity of all frequencies by weighted summation, thereby more accurately reflecting the change in the distance between the smart device and the object. Since the degree of environmental interference may be different for emitted light of different frequencies, the weighted summation method can reduce the impact of severe interference on the overall judgment of a single frequency, thereby improving the robustness of the system.
[0044] Specifically, the transmitting light circuit may include two transmitting light units, which transmit light of different frequencies. The transmitting light circuit may also include three transmitting light units, which transmit light of different frequencies. Even if the received light of one frequency is interfered by the external ambient light, since the present solution performs weighted summation of the amplitudes of the three frequencies, it is possible to weaken the influence of the external ambient light interference, thereby making a judgment of approaching or moving away. In a preferred embodiment, the transmitting light circuit includes four or more transmitting light units, which respectively transmit light of different frequencies.
[0045] 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, certain frequencies of emitted light may be more susceptible to interference, and the impact of interference can be reduced by reducing the weights of these frequencies.
[0046] For different screen transmittances, different third thresholds and fourth thresholds can be set. In applications with relatively low screen transmittance, the third threshold and the fourth threshold are set to smaller values; in applications with relatively high screen transmittance, the third threshold and the fourth threshold are set to larger values.
[0047] In some alternative embodiments, the emitted light of the set parameters includes: emitted lights with multiple set frequencies and the same phase; wherein, each emitted light is emitted from a different position under the screen.
[0048] In the embodiments of the present application, emitted lights with multiple set frequencies and the same phase are adopted. These emitted lights are emitted from different positions under the screen. By dispersing the intensity and position of the emitted lights, the damage to a single point on the screen is reduced, while ensuring the accuracy and reliability of distance detection.
[0049] In some alternative embodiments, the emitted light of the set parameters includes: emitted lights with different phases; wherein, the frequencies of the emitted lights with different phases are less than the set frequency, and after the 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.
[0050] In the embodiments of the present application, emitted lights with multiple frequencies lower than the set frequency and different phases are adopted. These emitted lights are emitted from different positions under the screen. The intensity and position of the emitted lights are dispersed to different positions under the screen, reducing the damage to a single point on the screen. After the emitted lights with different phases are superimposed in space, they can produce the effect of the emitted light with 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.
[0051] In some alternative embodiments, the emitted light of the set parameters includes: emitted lights with different bands; 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.
[0052] In the embodiments of the present application, the emitting device adopts light sources with multiple different bands. Correspondingly, the receiving device adopts photodiodes with multiple corresponding bands, and these photodiodes can obtain optical signals corresponding to different bands. The optical signals with different bands are respectively converted into reflected light data with different bands. The reflected light data with different bands are respectively subjected to frequency-domain transformation to obtain amplitude-frequency information with different bands. Judging whether the intelligent device is far away or approaching according to the amplitude of the target frequency in the amplitude-frequency information with different bands. In this embodiment, through multiple channels, the distance detection based on the frequency-domain change is simultaneously performed on the optical signals with different bands, which can further reduce the interference of ambient light.
[0053] Please refer to Figure 7 , Figure 7 Schematic diagram of screen damage caused by different emission light configurations provided in an embodiment of the present application.
[0054] The first emission is Figure 8 The emitted light shown is emitted from a unique point under the screen. In this embodiment, a VCSEL emits light of 1 kHz frequency. Since this solution adopts distance detection based on frequency domain transformation, the intensity requirement of the emitted light is relatively low, which can reduce damage to the unique point under the screen.
[0055] The second emission is Fig. 9 As shown in the figure, four emission lights are emitted from four points under the screen respectively. In this embodiment, four 1 kHz frequency lights can be emitted through one or more VCSELs, and the intensity of each emission light can be further reduced, thereby further reducing damage to the screen.
[0056] The third emission light is Fig.10 As shown, four emitted lights are emitted from four points under the screen respectively, and the frequency of each emitted light is 0.5KHz, which further reduces the damage to the screen.
[0057] In some optional implementations, a series of reflected light data is obtained according to the optical signal, specifically including: Integrate each stage of the optical signal to obtain the charge amount of each stage; the length of the stage is the length of a single pulse; Convert the amount of charge in each stage into a digital signal for each stage; Two adjacent stages form a group. In each group, the digital signals of the two stages are subtracted to obtain a reflected light data.
[0058] In the embodiment of the present application, the two stages in each group may be two background light integration stages, or may be one background light integration stage and one reflected light integration stage. The background light integration stage is when the transmitted light is not emitted, and the receiving device receives the background light. At this time, the received light signal is integrated to obtain the charge amount of the background light integration stage. The reflected light integration stage is when the transmitted light is emitted, and the receiving device receives the background light and the reflected light. At this time, the received light signal is integrated to obtain the charge amount of the reflected light integration stage. The charge amount of the background light integration stage is converted into a background light digital signal, and the charge amount of the reflected light integration stage is converted into a reflected light digital signal; the background light digital signal and the reflected light digital signal of the adjacent integration stages are subtracted, that is, the influence of the background light on the reflected light measurement is eliminated, and the reflected light data is extracted. The size of the reflected light data reflects the reflection intensity of the target object to the emitted light, which can be used to determine the distance between the smart device and the target object.
[0059] Please refer to Figure 5 , Figure 5 This is a schematic diagram of the integration process of the distance detection method provided in the embodiment of the present application. The emission 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 stages B3 and A3, 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 is:
[0060] in, is the digital signal of the Ai stage, It is the digital signal of Bi phase.
[0061] Subsequent Perform FFT frequency domain transform, that is: FFT_output=abs(fft(P_Data)).
[0062] In some optional implementations, the charge amount in each stage is converted into a digital signal in each stage, including: Using a programmable gain amplifier, the charge is converted into an analog voltage signal; An analog-to-digital converter is used to convert the analog voltage signal into a digital signal.
[0063] In an embodiment of the present application, after the integration phase is completed, the amount of charge output by the integrator represents the intensity of the light signal. In order 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 to 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; when the reflected light is weak, the gain can be increased to improve the signal-to-noise ratio of the signal.
[0064] The analog voltage signal amplified by the PGA is sent to the analog-to-digital converter (ADC) for digitization. The resolution of the ADC determines the accuracy of the converted digital signal. A high-resolution ADC can provide a more accurate digital signal, allowing for more sophisticated analysis and processing of the optical signal.
[0065] Please refer to Figure 6 , Figure 6 A distance detection workflow diagram of a smart device provided in an embodiment of the present application, wherein the smart device includes: a transmitting device, a receiving device, a processor and a memory.
[0066] The transmitting device is used to transmit light with set parameters under the screen of the smart device, wherein the set parameters include a set frequency. The receiving device is used to receive light signals under the screen of the smart device.
[0067] 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: a series of reflected light data is obtained according to the optical signal; m reflected light data are transformed in the frequency domain to obtain amplitude-frequency information; wherein m is a positive power of 2; and whether the smart device is far away or close is determined according to the amplitude corresponding to the set frequency in the amplitude-frequency information.
[0068] 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 schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0069] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0070] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0071] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0072] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. 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: include: Emitting light with set parameters under the screen of the smart device; wherein the set parameters include a set frequency; Receiving an optical signal under the screen of the smart device; Obtaining a series of reflected light data according to the optical signal; Performing frequency domain transformation on the m reflected light data to obtain amplitude-frequency information; wherein m is a positive power of 2; Whether the smart device is far away or close is determined according to the amplitude corresponding to the set frequency in the amplitude-frequency information.
2. The method according to claim 1, characterized in that The determining, according to the amplitude corresponding to the set frequency in the amplitude-frequency information, whether the smart device is far away from or close to the smart device comprises: If the amplitude corresponding to the set frequency in the amplitude-frequency information is greater than a second threshold, the smart device is approaching; If the amplitude corresponding to the set frequency in the amplitude-frequency information is less than a first threshold, the smart device moves away; The second threshold is greater than or equal to the first threshold.
3. The method according to claim 1, characterized in that The emission light with set parameters includes: n emission lights with different frequencies, where n is greater than or equal to 2; The determining, according to the amplitude corresponding to the set frequency in the amplitude-frequency information, whether the smart device is far away from or close to the smart device comprises: If the amplitudes corresponding to the n different frequencies in the amplitude-frequency information are all greater than their respective corresponding second thresholds, then the smart device is close; If the amplitudes corresponding to the n different frequencies in the amplitude-frequency information are all smaller than their respective corresponding first thresholds, the smart device moves away.
4. The method according to claim 1, characterized in that The emission light with set parameters includes: n emission lights with different frequencies, where n is greater than or equal to 2; The determining, according to the amplitude corresponding to the set frequency in the amplitude-frequency information, whether the smart device is far away from or close to the smart device comprises: 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 amplitudes of the corresponding emitted light; If the amplitude evaluation value is greater than a fourth threshold, the smart device is approaching; If the amplitude evaluation value is less than a third threshold, the smart device moves away; The fourth threshold is greater than or equal to the third threshold.
5. The method according to claim 1, characterized in that The emission light with set parameters includes: a plurality of emission lights with set frequencies and the same phase; Each emitted light is emitted from a different position under the screen.
6. The method according to claim 1, characterized in that The emission light with set parameters includes: multiple emission lights with different phases; wherein the frequency of the multiple emission lights with different phases is less than the set frequency, and after the multiple emission lights with different phases are superimposed, they are equivalent to the emission light with the set frequency, and each emission light is emitted from a different position under the screen.
7. The method according to claim 1, characterized in that The emission light with set parameters includes: emission light of different wavelength bands; The determining, according to the amplitude corresponding to the set frequency in the amplitude-frequency information, whether the smart device is far away from or close to the smart device comprises: Whether the smart device is far away or close is determined according to the amplitude corresponding to the set frequency in the amplitude-frequency information of the optical signals in different bands.
8. The method according to claim 1, characterized in that The step of obtaining a series of reflected light data according to the optical signal includes: Integrate each stage of the optical signal to obtain the charge amount of each stage; wherein the length of the stage is the length of a single pulse; Convert the amount of charge in each stage into a digital signal for each stage; Two adjacent stages form a group. In each group, the digital signals of the two stages are subtracted to obtain a reflected light data.
9. The method according to claim 8, characterized in that The step of converting the charge amount of each stage into a digital signal of each stage includes: Using a programmable gain amplifier, converting the charge into an analog voltage signal; The analog voltage signal is converted into a digital signal using an analog-to-digital converter.
10. A smart device, characterized in that: include: Transmitter, receiver, processor and memory; The transmitting device is used to: transmit light with set parameters under the screen of the smart device; wherein the set parameters include a set frequency; The receiving device is used to: receive an optical signal under the screen of the smart 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 frequency domain transformation on the m reflected light data to obtain amplitude-frequency information; wherein m is a positive power of 2; Whether the smart device is far away or close is determined according to the amplitude corresponding to the set frequency in the amplitude-frequency information.
Citation Information
Patent Citations
Multifunctional wall knocking and roof sounding detector based on sound wave detection
CN109187747A
Life detection device, method and system
CN112386237A
Detection method and detection system for acquiring distance information
CN115267808A
Method of measuring absolute distance
RU2738876C1
Method of controlling display screen states, and apparatus
US20180211634A1