A close-range optical detection circuit, method, and chip
The close-range optical detection circuit optimized by the LDO voltage regulator circuit and adaptive algorithm solves the problems of high hardware cost, low detection accuracy and susceptibility to interference of traditional solutions, and realizes high-precision and low-power optical detection.
Patent Information
- Application Number
- CN202110974997.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-24
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2041-08-24
AI Technical Summary
Traditional close-range optical detection solutions have problems such as high hardware cost, high development cost, low detection accuracy, susceptibility to external interference, and failure under strong light.
The system uses a combination of LDO voltage regulator circuit, light collection module and processing module, including photosensitive circuit, sampling circuit, amplification circuit, ADC converter and digital processing integrated circuit. It adjusts the image exposure time and LED lamp driving current through adaptive algorithm to achieve time-sharing sampling and intermittent detection.
It improves the anti-interference ability, photosensitivity accuracy and photosensitivity of optical detection, reduces power consumption, reduces costs, and can adapt to different application environments.
Smart Images

Figure CN113568060B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of integrated circuits, and in particular to a close-range optical detection circuit, method, and chip. Background Art
[0002] At present, the application of optical proximity sensors has become popular, such as mobile phone screen switches, Bluetooth headset in-ear detection, sensor faucets, and car trunk sensor switches, etc., and is widely used in most home appliances, mobile phone and computer peripherals and industrial control fields.
[0003] Traditional short-range applications are mainly based on MCU solutions, such as Figure 1 As shown, the control timing is as follows Figure 2 As shown, before each image detection, an image reset is performed, and the sampler samples the environment image value (P0) once, resets again, turns on the LED light, samples the environment plus LED exposure image value (P1), and sets the distance sensing threshold (P th ), if P1-P0>P th , then the target object is judged to be close to the sensor. This solution has the following problems: (1) The use of peripheral components plus MCU increases hardware and processing costs; (2) The detection function is controlled by the MCU solution, which increases the solution development cost and prolongs the promotion cycle; (3) The reset voltage of the photosensitive unit is easily affected by external interference, resulting in low detection accuracy and difficulty in longer-distance or graded distance detection; (4) The image value is easily saturated in strong light, resulting in detection failure.
[0004] In addition, there is a common image photosensor sampling circuit, such as Figure 3 As shown, N0 is the image reset tube, N1 is the source follower tube, when the image is reset, the voltage at the negative terminal node of the photosensitive diode is (VDD–V th ), in order to enable the source follower tube N1 to follow the source, it is necessary to ensure that the node voltage is greater than the threshold voltage V during image sampling. th , the dynamic range of the node voltage can be obtained as V th ~(VDD–V th ), and in order to obtain the difference between the LED exposure and non-exposure images, the exposure time must be set within a reasonable range. However, due to the complex environment of close-range detection applications, especially when used under strong light, in order to ensure that the node voltage is not lower than V th , the exposure time must be shortened, and if the difference between LED exposure and non-exposure images is to be obtained, a larger LED exposure current is required. Therefore, an external driver tube must be sampled, which increases the hardware cost. The increase in current will also lead to an increase in overall power consumption. Summary of the Invention
[0005] In view of the defects in the prior art, the present application provides a close-range optical detection circuit, method and chip.
[0006] In a first aspect, a close-range optical detection circuit includes an LDO voltage stabilizing circuit, a light collecting module, and a processing module. The light collecting module includes a light sensing circuit and a sampling circuit, and the processing module includes an amplifying circuit, an ADC converter, and a digital processing integrated circuit. The LDO voltage stabilizing circuit is connected with the light sensing circuit and the sampling circuit, the sampling circuit is connected with the amplifying circuit, the amplifying circuit is connected with the ADC converter, and the digital processing integrated circuit is connected with the LDO voltage stabilizing circuit, the amplifying circuit, and the ADC converter respectively.
[0007] Further, the LDO voltage stabilizing circuit includes an LDO voltage stabilizer and an image reset tube, the light sensing circuit includes a light emitting diode and a variable capacitor, the LDO voltage stabilizer is connected with the image reset tube, the image reset tube is connected with a negative electrode end of the light emitting diode and a positive electrode end of the variable capacitor, a positive electrode end of the light emitting diode is grounded, and a negative electrode end of the variable capacitor is grounded.
[0008] Further, the sampling mode of the sampling circuit is single-channel time-sharing sampling, and the sampling circuit includes a first sampler and a second sampler.
[0009] Further, the amplifying circuit includes an operational amplifier and a switching circuit, the switching circuit is connected in parallel between a reverse input end and an output end of the operational amplifier, the switching circuit includes a first switch and a second switch, and the first switch and the second switch are connected in parallel.
[0010] Further,
[0011] When the first switch is on and the second switch is off, the operational amplifier serves as a voltage follower;
[0012] When the first switch is off and the second switch is on, the operational amplifier serves as a differential amplifier.
[0013] In a second aspect, a close-range optical detection method includes the following steps:
[0014] The digital processing integrated circuit configures an image exposure time and a driving current of an external LED lamp to perform conventional ambient light detection;
[0015] The light collecting module samples a conventional ambient light image and obtains a first image value, and the digital processing integrated circuit adjusts and configures an LDO voltage stabilizer output voltage and a variable capacitor value to control an ADC conversion value of the first image value to be within a range of an ADC converter range;
[0016] The digital processing integrated circuit adjusts the gain of the operational amplifier according to the configuration value of the variable capacitor to meet the sensing capability of the external LED light during exposure;
[0017] The lighting module samples the ambient light image exposed by the LED light and obtains a second image value. If the ADC conversion value of the second image value is greater than the set distance sensing threshold, it is determined that an object is approaching;
[0018] The first image value is a normal ambient light sampling image voltage value, and the second image value is an ambient light sampling image voltage value under LED light exposure.
[0019] Furthermore,
[0020] When sampling a normal ambient light image, the first switch is turned on and the second switch is turned off, and the operational amplifier acts as a voltage follower;
[0021] When sampling the ambient light image exposed by the LED light, the first switch is disconnected and the second switch is connected, and the operational amplifier is a differential amplifier.
[0022] Furthermore, it also includes resetting the image through an image reset tube before each sampling, and the sampling time and reset time are both set by a digital processing integrated circuit.
[0023] Furthermore, it also includes entering a dormant state after the detection is completed, and waiting until the end of the cycle to perform the next detection again, so as to achieve intermittent detection.
[0024] In a third aspect, a short-range optical detection chip comprises the short-range optical detection circuit described in the first aspect.
[0025] The beneficial effects of the present invention are: significantly improving the anti-interference ability, photosensitivity accuracy and photosensitivity of optical detection, adapting to different application environments through adaptive algorithms, and realizing intermittent detection, reducing power consumption and costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly describes the drawings required for the specific embodiments or the description of the prior art. Similar elements or parts are generally identified by similar reference numerals throughout the drawings. Elements or parts in the drawings are not necessarily drawn to scale.
[0027] Figure 1 A schematic diagram of a conventional proximity sensor provided as background technology for the present invention;
[0028] Figure 2 The conventional close-range sensing control timing diagram provided as the background technology of the present invention;
[0029] Figure 3 The schematic diagram of the image photosensor sampling circuit provided as the background technology of the present invention;
[0030] Figure 4 This is a module block diagram of a close-range optical detection circuit provided in Example 1 of the present invention;
[0031] Figure 5 A schematic diagram of a short-range optical detection circuit provided in Example 1 of the present invention;
[0032] Figure 6 A sampling timing diagram of a close-range optical detection circuit provided in the first embodiment of the present invention;
[0033] Figure 7 A low-power detection cycle diagram of a short-range optical detection circuit provided in the first embodiment of the present invention;
[0034] Figure 8 This is a flow chart of a close-range optical detection method provided in Example 2 of the present invention. DETAILED DESCRIPTION
[0035] The following embodiments of the technical solution of the present invention will be described in detail with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention and are therefore only examples and are not intended to limit the scope of protection of the present invention.
[0036] It should be noted that, unless otherwise specified, the technical or scientific terms used in this application should have the common meanings understood by those skilled in the art to which the present invention belongs.
[0037] Example 1
[0038] like Figure 4 As shown, a close-range optical detection circuit includes an LDO voltage regulator circuit, a light collection module and a processing module. The light collection module includes a photosensitive circuit and a sampling circuit. The processing module includes an amplifier circuit, an ADC converter and a digital processing integrated circuit. The LDO voltage regulator circuit is connected to the photosensitive circuit and the sampling circuit, the sampling circuit is connected to the amplifier circuit, the amplifier circuit is connected to the ADC converter, and the digital processing integrated circuit is respectively connected to the LDO voltage regulator circuit, the amplifier circuit and the ADC converter.
[0039] like Figure 5 As shown, the LDO voltage regulator circuit includes an LDO voltage regulator U1 and an image reset tube P0, the photosensitive circuit includes a light-emitting diode D1 and a variable capacitor C0, the LDO voltage regulator U1 is connected to the image reset tube P0, the image reset tube P0 is connected to the negative terminal of the light-emitting diode D1 and the positive terminal of the variable capacitor C0, the positive terminal of the light-emitting diode D1 is grounded, and the negative terminal of the variable capacitor C0 is grounded.
[0040] By incorporating an LDO voltage regulator U1 into the circuit, the output voltage of the LDO regulator U1 effectively suppresses interference or ripple in the external power supply, ensuring that the voltage of the lighting module remains consistent each time it is charged, thereby eliminating interference from the power supply portion of the circuit. The image reset transistor P0 is used to reset the image according to a time sequence, and its reset time is controlled by the digital processing integrated circuit U2. Adding a variable capacitor C0 at the image output position can filter out some optical noise and suppress strong light. Furthermore, increasing the value of the variable capacitor C0 can increase the charge storage in the circuit, extending the discharge time to meet the chip processing time.
[0041] Furthermore, the amplification circuit includes an operational amplifier U3 and a switching circuit. The switching circuit is connected in parallel between the inverting input and output of the operational amplifier U3. The switching circuit includes a first switch K1 and a second switch K2, with the first switch K1 and the second switch K2 being connected in parallel. The sampling circuit includes a first sampler SMP1 and a second sampler SMP2, with the first sampler SMP1 and the second sampler SMP2 being connected in parallel. The sampling circuit performs single-channel time-sharing sampling of image exposure through the first sampler SMP1 and the second sampler SMP2.
[0042] The amplification circuit further includes a first resistor R1, the sampling circuit further includes a first capacitor C1 and a second capacitor C2, and the switch circuit further includes a second resistor R2. The positive terminal of the first capacitor C1 is connected to one end of the first sampler SMP1 and the non-inverting input terminal of the operational amplifier U3, the negative terminal of the first capacitor C1 is grounded, the positive terminal of the second capacitor C2 is connected to one end of the second sampler SMP2 and the first end of the first resistor R1, the negative terminal of the second capacitor C2 is grounded, the other end of the first sampler SMP1 and the other end of the second sampler SMP2 are respectively connected to the positive terminal of the variable capacitor C0, the second end of the first resistor R1 is connected to the first end of the second resistor R2 and one end of the first switch K1, the second end of the second resistor R2 is connected to one end of the second switch K2, and the second end of the first resistor R1 is also connected to the inverting input terminal of the operational amplifier.
[0043] Specifically, before performing close-range optical detection, the image exposure time and the driving current of the external LED lamp are configured through the digital processing integrated circuit U2 according to the power consumption requirements. After the configuration is completed, the image is sampled in time-sharing mode. Figure 6In the sampling sequence shown, the image reset tube P0 will first reset the image before each sampling. After the reset is completed, the normal ambient light image is sampled through the light-emitting diode D1 and the first sampler SMP1 to obtain the first image value, that is, the normal ambient light sampled image voltage value. At this time, the first switch K1 is turned on and the second switch K2 is turned off. The operational amplifier U3 is a voltage follower. The ADC converter U4 performs ADC conversion on the collected first image value to obtain the normal ambient light ADC conversion value. The digital processing integrated circuit U2 uses a digital algorithm to adjust the output voltage of the LDO regulator U1 and the value of the variable capacitor CO, so that the normal ambient light ADC conversion value is within the range of the ADC converter U4. The output voltage of the LDO regulator U1 and the configuration value of the variable capacitor CO are obtained at the same time. After the conventional ambient light sampling is completed, the reset image tube P0 is reset again to prepare for the ambient light image sampling under the exposure of the LED light.
[0044] The LDO regulator U1 and the variable capacitor CO are configured. At this time, the first switch K1 is disconnected and the second switch K2 is connected. The operational amplifier U3 acts as a differential amplifier with a gain of A. d =R2 / R1, the digital processing integrated circuit U2 adjusts the gain of the differential amplifier U3 according to the configuration value of the variable capacitor CO to meet the sensing capability of the LED light during exposure.
[0045] After the LED light exposure sensing capability is met, the ambient light image under LED light exposure is sampled by the second sampler SMP2 according to the sampling timing, and a second image value, that is, the voltage value of the ambient light sampled image under LED light exposure is obtained. The second image value is sent to the differential amplifier U3 for differential amplification, and then the voltage is converted by the ADC converter U4 to obtain the ambient light ADC conversion value under LED light exposure. When the ambient light ADC conversion value under LED light exposure is greater than the set distance sensing threshold P th , it is determined that a target object is approaching.
[0046] Furthermore, if Figure 7 As shown, the close-range optical detection circuit can also set the detection cycle according to the operation time through the digital processing integrated circuit U2. When a detection is completed, the circuit enters the sleep state and waits until the next detection cycle is completed to achieve low-power detection. For example, assuming that the circuit consumes 1mA when detecting and 1uA when sleeping, the detection time is 1mS, and the sleep cycle is 100mS, the average power consumption of the chip is:
[0047] Iavg=(1mA*1mS+1uA*100mS) / 100mS=11uA
[0048] If the sleep time is not set during the detection cycle, the average power consumption of the chip is:
[0049] Iavg=[1mA*(100+1)mS)] / 100mS=1010uA
[0050] It can be seen that by setting the detection period to perform intermittent periodic detection, power consumption can be greatly reduced, thus achieving low-power detection.
[0051] In actual application, different distance sensing thresholds P can be set according to the distance sensing requirements. th , to detect the different degrees of proximity of the target object. At the same time, due to the complex external environment, false triggering may occur, so multiple tests will be performed to ensure accuracy.
[0052] Example 2
[0053] like Figure 8 As shown, a close-range optical detection method comprises the following steps:
[0054] S1: The digital processing integrated circuit configures the image exposure time and the drive current of the external LED lamp for conventional ambient light detection;
[0055] Specifically, before performing close-range optical detection, the image exposure time and the driving current of the external LED lamp are configured according to power consumption requirements through the digital processing integrated circuit U2.
[0056] S2: The lighting module samples the normal ambient light image and obtains the first image value. The digital processing integrated circuit adjusts the LDO regulator output voltage and the variable capacitor value to control the ADC conversion value of the first image value to be within the ADC converter range. within the scope;
[0057] Specifically, after the image exposure time and the driving current of the external LED lamp are configured, the image is sampled in time. Figure 6 In the sampling sequence shown, the image reset tube P0 will first reset the image before each sampling. After the reset is completed, the normal ambient light image is sampled through the light-emitting diode D1 and the first sampler SMP1 to obtain the first image value, that is, the normal ambient light sampled image voltage value. At this time, the first switch K1 is turned on and the second switch K2 is turned off. The operational amplifier U3 is a voltage follower. The ADC converter U4 performs ADC conversion on the collected first image value to obtain the normal ambient light ADC conversion value. The digital processing integrated circuit U2 uses a digital algorithm to adjust the output voltage of the LDO regulator U1 and the value of the variable capacitor CO, so that the normal ambient light ADC conversion value is within the range of the ADC converter U4. The range, while getting the configuration value of the LDO voltage regulator U1 output voltage and variable capacitor CO. The conventional ambient light sampling is completed, and the reset image tube P0 is reset again to prepare for the ambient light image sampling under the LED lamp exposure.
[0058] S3: The digital processing integrated circuit adjusts the gain of the operational amplifier according to the configuration value of the variable capacitor to meet the sensing capability under the external LED lamp exposure;
[0059] Specifically, the LDO voltage regulator U1 and the variable capacitor CO are configured, at this time, the first switch K1 is turned off, the second switch K2 is turned on, and the operational amplifier U3 works as a differential amplifier, and its gain is A d =R2 / R1, and the digital processing integrated circuit U2 adjusts the gain of the differential amplifier U3 according to the configuration value of the variable capacitor CO to meet the sensing capability under the LED lamp exposure.
[0060] S4: The light module samples the ambient light image under the LED lamp exposure and obtains a second image value, and if the ADC conversion value of the second image value is greater than the set distance sensing threshold, it is determined that there is an object close to;
[0061] Specifically, after meeting the sensing capability under the LED lamp exposure, the second sampler SMP2 samples the ambient light image under the LED lamp exposure according to the sampling time sequence, and obtains a second image value, that is, the ambient light sampling image voltage value under the LED lamp exposure. The second image value is sent to the differential amplifier U3 for differential amplification, and then the voltage conversion is performed through the ADC converter U4 to obtain the ambient light ADC conversion value under the LED lamp exposure, and when the ambient light ADC conversion value under the LED lamp exposure is greater than the set distance sensing threshold P th , it is determined that there is a target object close to.
[0062] Further, as Figure 7 shown, the close-range optical detection circuit can also set a detection period through the digital processing integrated circuit U2 according to the operation time, and when one detection is completed, the circuit enters a sleep state, and waits for a period to be completed before entering the next detection, so as to realize the function of low-power consumption detection. For example, assuming that the power consumption of the circuit during detection is 1mA, the power consumption during sleep is 1uA, the detection time is 1mS, and the sleep period is 100mS, at this time, the average power consumption of the chip is:
[0063] Iavg=(1mA*1mS+1uA*100mS) / 100mS=11uA
[0064] And if there is no sleep time set in the detection period, the average power consumption of the chip is:
[0065] Iavg=[1mA*(100+1)mS)] / 100mS=1010uA
[0066] It can be seen that the intermittent period detection by setting the detection period can greatly reduce power consumption and realize low-power detection.
[0067] In practical application, different distance sensing thresholds P can be set according to distance sensing requirements to detect different degrees of approach of the target object. th At the same time, due to the complexity of the external environment, false triggering may occur, so multiple detections are performed to ensure accuracy.
[0068] Embodiment Three
[0069] A close-range optical detection chip, comprising the close-range optical detection circuit.
[0070] For brevity, the embodiments part does not mention the corresponding content in the foregoing embodiments.
[0071] The present application significantly improves the optical detection anti-interference ability, photosensitive precision and photosensitive capacity, and can adapt to different application environments through adaptive algorithm, and can also realize intermittent detection, reduce power consumption and reduce cost.
[0072] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application, and they should be covered in the scope of the claims and the description of the present application.
Claims
1. A short-range optical detection circuit, characterized in that: It includes an LDO voltage regulator circuit, a lighting module and a processing module. The lighting module includes a photosensitive circuit and a sampling circuit. The processing module includes an amplifier circuit, an ADC converter and a digital processing integrated circuit. The LDO voltage regulator circuit is connected to the photosensitive circuit and the sampling circuit. The sampling circuit is connected to the amplifier circuit. The amplifier circuit is connected to the ADC converter. The digital processing integrated circuit is connected to the LDO voltage regulator circuit, the amplifier circuit and the ADC converter respectively. The LDO voltage stabilization circuit includes an LDO voltage regulator and an image reset tube, the photosensitive circuit includes a light emitting diode and a variable capacitor, the LDO voltage regulator is connected to the image reset tube, the image reset tube is connected to the negative terminal of the light emitting diode and the positive terminal of the variable capacitor, the positive terminal of the light emitting diode is grounded, and the negative terminal of the variable capacitor is grounded; The image reset tube is used to reset the image in a timed manner, and its reset time is controlled by the digital processing integrated circuit. A variable capacitor is added at the image output position to filter out some light noise and suppress strong light. At the same time, by increasing the value of the variable capacitor, the charge storage in the circuit is increased, making the discharge time longer to meet the chip processing time. The amplifying circuit includes an operational amplifier and a switching circuit, wherein the switching circuit is connected in parallel between the inverting input terminal and the output terminal of the operational amplifier, and the switching circuit includes a first switch and a second switch, wherein the first switch is connected in parallel with the second switch; The digital processing integrated circuit adjusts the gain of the differential amplifier according to the configuration value of the variable capacitor to meet the sensing capability of the LED light during exposure; When the first switch is on and the second switch is off, the operational amplifier acts as a voltage follower; When the first switch is off and the second switch is on, the operational amplifier functions as a differential amplifier.
2. The short-range optical detection circuit according to claim 1, characterized in that: The sampling circuit adopts single-channel time-sharing sampling, and includes a first sampler and a second sampler, wherein the first sampler and the second sampler are connected in parallel.
3. A close-range optical detection method, characterized in that: The short-range optical detection circuit according to claim 1 comprises the following steps: The digital processing integrated circuit configures the image exposure time and the driving current of the external LED lamp to perform conventional ambient light detection; The lighting module samples the normal ambient light image and obtains the first image value. The digital processing integrated circuit adjusts the LDO regulator output voltage and the variable capacitor value to control the ADC conversion value of the first image value to be within the ADC converter range. ~ within the scope; The digital processing integrated circuit adjusts the gain of the operational amplifier according to the configuration value of the variable capacitor to meet the sensing capability of the external LED light during exposure; The lighting module samples the ambient light image exposed by the LED light and obtains a second image value. If the ADC conversion value of the second image value is greater than the set distance sensing threshold, it is determined that an object is approaching; The first image value is a voltage value of a normal ambient light sampled image, and the second image value is a voltage value of an ambient light sampled image under LED light exposure; When sampling a normal ambient light image, the first switch is turned on and the second switch is turned off, and the operational amplifier acts as a voltage follower; When sampling the ambient light image exposed by the LED light, the first switch is disconnected and the second switch is connected, and the operational amplifier is a differential amplifier.
4. The close-range optical detection method according to claim 3, characterized in that: It also includes resetting the image through an image reset tube before each sampling, and the sampling time and reset time are both set by a digital processing integrated circuit.
5. The close-range optical detection method according to claim 4, characterized in that: It also includes entering a dormant state after the detection is completed, and waiting until the cycle is completed before performing the next detection to achieve intermittent detection.
6. A close-range optical detection chip, characterized in that: The invention comprises the short-range optical detection circuit according to any one of claims 1 to 2.
Citation Information
Patent Citations
Integrating Circuit and Proximity Detection Chip
CN104865563B
Full screen and mobile terminal
CN110111733A
Close-range optical detection circuit and chip
CN215910660U