Infrared light sensing device, infrared distance measuring method, equipment and storage medium
By incorporating a first capacitor, a second capacitor, a first capacitor, a first capacitor, a first capacitor, a first capacitor, a first capacitor, a first capacitor, a first capacitor, a first capacitor, a first capacitor, a first capacitor, a first transistor, an infrared receiver, and a microcontroller into the infrared light sensing device, significant improvements in the sensitivity and distance sensing capabilities of infrared light detection are achieved.
Patent Information
- Application Number
- CN202411513630.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2044-10-28
AI Technical Summary
In existing infrared ranging methods, the infrared receiver and the infrared transmitter are designed independently in terms of hardware circuitry, which makes the detection process inconvenient.
An infrared light sensing device is used, including a power supply, a first resistor, a second resistor, a third resistor, a fourth resistor, an infrared emitting tube, a first capacitor, a first transistor, an infrared receiving tube, a first capacitor, a first capacitor, a first capacitor, a first transistor, an infrared receiving tube, and a microcontroller. By setting the amplification function of the first transistor, infrared light detection is realized at the transmitting end, eliminating the need for separate infrared receiving and transmitting ends.
This technology enables infrared light detection at the transmitting end, improving the sensitivity of infrared light sensing and the effectiveness of distance sensing, and solving the inconvenience in the infrared ranging process.
Smart Images

Figure CN119716882B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of sensors, in particular to an infrared light sensing device and an infrared ranging method, an electronic device and a storage medium. BACKGROUND
[0002] Infrared ranging technology is a distance measurement method widely used in various fields. Its basic principle is to use the emission and reception of infrared light to calculate the distance between the target object and the sensor. However, the existing infrared ranging method has some deficiencies in the design of hardware circuit, especially in the correlation between the infrared receiving end and the infrared transmitting end.
[0003] In the conventional infrared ranging method, the infrared light sensing device usually includes an infrared receiving end and an infrared transmitting end. The infrared transmitting end is responsible for emitting infrared light pulses or continuous waves, while the infrared receiving end is responsible for receiving the reflected infrared light. Although the two parts are closely related in function, in the hardware circuit logic, they are usually independent circuit modules. The design of independent circuits makes the detection process of infrared ranging inconvenient. SUMMARY
[0004] The embodiments of the present application provide an infrared light sensing device to solve the problem of how to provide an infrared light sensing device that can realize infrared light detection at the infrared transmitting end.
[0005] Correspondingly, the embodiments of the present application also provide an infrared ranging method, an electronic device and a storage medium to ensure the specific application of the above-mentioned device.
[0006] In order to solve the above-mentioned problems, the embodiments of the present application disclose an infrared light sensing device, which comprises a power supply, a first resistor, a second resistor, a third resistor, a fourth resistor, an infrared emitting tube, a first capacitor, a first triode, an infrared receiving tube and a microcontroller.
[0007] The power supply is connected with the first resistor, and the first resistor is connected with the anode of the infrared emitting tube.
[0008] The collector of the first triode is connected between the cathode of the infrared emitting tube, the base of the first triode is connected with the third resistor, and the emitter of the first triode is connected with the fourth resistor.
[0009] The fourth resistor is connected with the infrared receiving tube.
[0010] The collector of the first triode is connected with the first capacitor through the second resistor.
[0011] The collector of the first transistor is connected to the microcontroller through the second resistor, and the base of the first transistor is connected to the microcontroller through the third resistor.
[0012] In an optional embodiment of the present application, the infrared light sensing device further comprises a second transistor.
[0013] The collector of the second transistor is connected to the base of the first transistor, the base of the second transistor is connected to the emitter of the first transistor, and the emitter of the second transistor is grounded.
[0014] In an optional embodiment of the present application, the emitter of the second transistor is connected to a detection diode and / or a detection resistor.
[0015] In an optional embodiment of the present application, there is a fourth corresponding relationship between the resistance value of the fourth resistor and the voltage range of the detection voltage of the second resistor detected by the microcontroller after low-pass filtering.
[0016] The fourth corresponding relationship is an inverse relationship between the resistance value of the fourth resistor and the voltage range of the detection voltage of the second resistor detected by the microcontroller after low-pass filtering.
[0017] In an optional embodiment of the present application, the first transistor and the second transistor are NPN type transistors.
[0018] The present application also discloses an infrared distance measuring method, applied to an infrared light sensing device, the infrared light sensing device comprising at least an infrared emitter tube, an infrared receiver tube, a detection circuit and a microcontroller, the method comprising:
[0019] Controlling the infrared emitter tube to emit infrared light to measure the distance to an object to be measured;
[0020] When the infrared receiver tube receives the infrared light reflected by the object to be measured, enhancing the infrared light emitted by the infrared emitter tube so that the infrared receiver tube receives the enhanced infrared light reflected by the object to be measured;
[0021] Detecting the detection circuit by the microcontroller to obtain a detection voltage, the detection voltage and the intensity of the enhanced infrared light received by the infrared receiver tube having a third corresponding relationship;
[0022] According to the third corresponding relationship, confirming the intensity of the enhanced infrared light received by the infrared receiver tube to obtain a reflected infrared intensity;
[0023] According to a preset algorithm, determining the distance between the object to be measured and the infrared light sensing device according to the reflected infrared intensity.
[0024] In an alternative embodiment of the present application, the detection circuit further comprises a power supply, a first resistor, a second resistor, a third resistor, a fourth resistor, a first capacitor, a first transistor, and a second transistor, the second resistor and the first capacitor form a low-pass filter, and the microcontroller is configured to control the intensity of the infrared light emitted by the infrared emitter tube and detect the filtered voltage of the second resistor.
[0025] In an alternative embodiment of the present application, the second transistor is configured to control the maximum voltage between the fourth resistor and the infrared receiver tube, and there is a first corresponding relationship between the maximum voltage between the fourth resistor and the infrared receiver tube and the maximum sensing distance supported by the infrared sensing device.
[0026] In an alternative embodiment of the present application, the method comprises:
[0027] When the infrared receiver tube does not receive the infrared light, the current provided by the power supply passes through the first resistor, the infrared emitter tube, and the first transistor, and then flows to the ground through the emitter of the first transistor.
[0028] When the infrared receiver tube receives the infrared light, the current provided by the power supply passes through the first resistor, the infrared emitter tube, and the first transistor, and then flows to the fourth resistor and the infrared receiver tube through the emitter of the first transistor.
[0029] In an alternative embodiment of the present application, the method comprises:
[0030] When the infrared receiver tube does not receive the infrared light, the filtered voltage of the second resistor detected by the microcontroller is determined by the voltage of the collector of the first transistor and the voltage of the collector of the second transistor.
[0031] When the infrared receiver tube receives the infrared light, the filtered voltage of the second resistor detected by the microcontroller is determined by the voltage of the collector of the first transistor, the voltage of the fourth resistor, and the voltage of the infrared receiver tube.
[0032] In an alternative embodiment of the present application, when the infrared receiver tube receives the infrared light, there is a second corresponding relationship between the voltage of the infrared receiver tube and the intensity of the received infrared light.
[0033] According to the second correspondence relationship, the third correspondence relationship between the detection voltage of the second resistor detected by the microcontroller after low-pass filtering and the intensity of the received infrared light is used to confirm the intensity of the received infrared light.
[0034] In an optional embodiment of the present application, the second correspondence relationship is an inverse relationship between the voltage of the infrared receiving tube and the intensity of the received infrared light.
[0035] The third correspondence relationship is an inverse relationship between the detection voltage of the second resistor detected by the microcontroller after low-pass filtering and the intensity of the received infrared light.
[0036] In an optional embodiment of the present application, the method comprises:
[0037] When the infrared receiving tube does not receive infrared light, the microcontroller sends a first pulse signal to the base of the first triode through the third resistor, and the first pulse signal is used to make the infrared emitting tube emit infrared light.
[0038] If the infrared receiving tube receives the infrared light, the microcontroller sends a second pulse signal to the base of the first triode through the third resistor, and the second pulse signal is used to make the infrared emitting tube enhance the emitted infrared light; the frequency of the first pulse signal and the frequency of the second pulse signal are both greater than a preset multiple of the cutoff frequency of the low-pass filter.
[0039] In an optional embodiment of the present application, a fourth correspondence relationship exists between the resistance value of the fourth resistor and the voltage range of the detection voltage of the second resistor detected by the microcontroller after low-pass filtering;
[0040] The fourth correspondence relationship is an inverse relationship between the resistance value of the fourth resistor and the voltage range of the detection voltage of the second resistor detected by the microcontroller after low-pass filtering.
[0041] The embodiments of the present application also disclose an electronic device, comprising: a processor; and a memory having executable code stored thereon, when the executable code is executed, causing the processor to perform the infrared distance measurement method in one or more of the embodiments of the present application.
[0042] The embodiments of the present application also disclose one or more machine readable media having executable code stored thereon, when the executable code is executed, causing the processor to perform the infrared distance measurement method in one or more of the embodiments of the present application.
[0043] Compared with the prior art, the embodiments of the present application have the following advantages:
[0044] In the embodiments of the present application, the infrared light sensing device comprises a power supply, a first resistor, a second resistor, a third resistor, a fourth resistor, an infrared emitting tube, a first capacitor, a first triode, an infrared receiving tube and a microcontroller; the power supply is connected with the first resistor, the first resistor is connected with the anode of the infrared emitting tube; the collector of the first triode is connected between the cathode of the infrared emitting tube, the base of the first triode is connected with the third resistor, and the emitter of the first triode is connected with the fourth resistor; the fourth resistor is connected with the infrared receiving tube; the collector of the first triode is connected with the first capacitor through the second resistor; the collector of the first triode is connected with the microcontroller through the second resistor, and the base of the first triode is connected with the microcontroller through the third resistor. The infrared light sensing device provided by the embodiments of the present application can realize infrared light detection at the sending end by setting the first triode and using the amplification function of the first triode, without separately setting independent infrared receiving ends and infrared sending ends, and the infrared light sensing device provided by the embodiments of the present application is sensitive to infrared light and has a significant effect in distance sensing. BRIEF DESCRIPTION OF DRAWINGS
[0045] Figure 1 is a circuit diagram of an infrared light sensing device embodiment of the present application;
[0046] Figure 2 is a step flow chart of an infrared distance measuring method embodiment of the present application;
[0047] Figure 3 is a detection voltage change diagram of an infrared light sensing device embodiment of the present application;
[0048] Figure 4 is an operation flow chart of an infrared light sensing device embodiment of the present application;
[0049] Figure 5 is a structural schematic diagram of the device provided by an embodiment of the present application.
[0050] Among them, VCC: power supply, R1: first resistor, R2: second resistor, R3: third resistor, R4: fourth resistor, LED1: infrared emitting tube, C1: first capacitor, Q1: first triode, Q2: second triode, Q3: infrared receiving tube, MCU: microcontroller, GND: ground. DETAILED DESCRIPTION
[0051] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.
[0052] REFERENCE Figure 1Fig. 1 is a circuit diagram of an infrared light sensing device according to an embodiment of the present application.
[0053] The infrared light sensing device according to an embodiment of the present application comprises a power supply VCC, a first resistor R1, a second resistor R2, a third resistor R3, a fourth resistor R4, an infrared emitting tube LED1, a first capacitor C1, a first transistor Q1, an infrared receiving tube Q3, and a microcontroller MCU.
[0054] In an alternative embodiment, the infrared light sensing device can further comprise a second transistor Q2.
[0055] The power supply VCC is connected to the first resistor R1, and the first resistor R1 is connected to the anode of the infrared emitting tube LED1. The infrared emitting tube LED1 is a light emitting diode (LED) having an anode and a cathode. The power supply VCC is configured to provide power supply for the infrared light sensing device, and the infrared emitting tube LED1 is configured to emit infrared light.
[0056] The first transistor Q1 has a collector, a base, and an emitter. The collector of the first transistor Q1 is connected to the cathode of the infrared emitting tube LED1, the base of the first transistor Q1 is connected to the third resistor R3, and the emitter of the first transistor Q1 is connected to the fourth resistor R4. In this embodiment, the collector of the first transistor Q1 is further connected to the second resistor R2, the base of the first transistor Q1 is further connected to the collector of the second transistor Q2, and the emitter of the first transistor Q1 is further connected to the base of the second transistor Q2.
[0057] The fourth resistor R4 is further connected to the infrared receiving tube Q3, and the other end of the infrared receiving tube Q3 is connected to the ground GND. The infrared receiving tube Q3 can be equivalent to an NPN-type transistor, i.e., the fourth resistor R4 is connected to the collector of the infrared receiving tube Q3, and the emitter of the infrared receiving tube Q3 is connected to the ground GND.
[0058] The collector of the first transistor Q1 is connected to the first capacitor C1 through the second resistor R2, and the second resistor R2 and the first capacitor C1 form a low-pass filter. Specifically, the collector of the first transistor Q1 is connected to one end of the first capacitor C1 through the second resistor R2, and the other end of the first capacitor C1 is connected to the ground GND. The one end of the first capacitor C1 and the second resistor R2 are both connected to the AD port (Analog-to-Digital Converter Interface, ADCI) of the microcontroller MCU, so that the microcontroller MCU can detect the detection voltage at the right end of the second resistor R2 after low-pass filtering.
[0059] In an embodiment, the left end of the second resistor R2 is a pulse wave current, and the right end is a direct current after low-pass filtering. After the pulse wave current is low-pass filtered, the high-frequency signal component is removed, and only the low-frequency signal component and the direct current component are left. Therefore, the current at the right end of the second resistor R2 can be regarded as a direct current, and the microcontroller MCU can directly detect the detection voltage at the right end of the second resistor R2 after low-pass filtering.
[0060] The collector of the first transistor Q1 is connected to the AD port of the microcontroller MCU through the second resistor R2, and the base of the first transistor Q1 is connected to the PWM port (Pulse Width Modulation Interface) of the microcontroller MCU through the third resistor R3. The PWM port is used to send a pulse signal to drive the infrared emitting tube LED1 to emit infrared light.
[0061] The microcontroller MCU in the infrared light sensing device provided by the embodiment is used to control the intensity of the infrared light emitted by the infrared emitting tube LED1 and detect the detection voltage of the second resistor R2 after low-pass filtering.
[0062] Specifically, when the infrared receiving tube Q3 does not receive infrared light, the path from the first transistor Q1 to the fourth resistor R4 to the infrared receiving tube Q3 is not turned on. At this time, the current provided by the power supply VCC passes through the first resistor R1, the infrared emitting tube LED1, and the first transistor Q1, and then flows to the ground GND through the emitter of the first transistor Q1 and the second transistor Q2. At this time, the detection voltage of the right end of the second resistor R2 detected by the microcontroller MCU is determined by the voltage of the collector of the first transistor Q1 and the voltage of the collector of the second transistor Q2.
[0063] In an embodiment, when the infrared receiving tube Q3 does not receive infrared light, the detection voltage of the right end of the second resistor R2 detected by the microcontroller MCU after low-pass filtering can be represented as V q1 +V q2 , wherein V q1 is the voltage of the collector of the first transistor Q1, and V q2 is the voltage of the collector of the second transistor Q2.
[0064] When the infrared receiving tube Q3 receives infrared light, the first transistor Q1 to the fourth resistor R4 to the infrared receiving tube Q3 is turned on, and a voltage is formed between the fourth resistor R4 and the infrared receiving tube Q3. When the emitter voltage of the first transistor Q1 is large, a negative feedback is formed to the first transistor Q1, so that the first transistor Q1 works in an amplification zone. At this time, the detection voltage of the second resistor R2 right end detected by the microcontroller MCU after low-pass filtering is determined by the voltage of the collector of the first transistor Q1, the voltage of the fourth resistor R4 and the voltage of the infrared receiving tube Q3.
[0065] In an embodiment, when the infrared receiving tube Q3 receives infrared light, the detection voltage of the second resistor R2 right end detected by the microcontroller MCU after low-pass filtering can be expressed as V q1 +V R4 +V q3 , wherein V q1 is the voltage of the collector of the first transistor Q1, V R4 is the voltage of the fourth resistor R4, and V q3 is the voltage of the infrared receiving tube Q3.
[0066] Further, when the infrared light received by the infrared receiving tube Q3 is enhanced, the conduction degree of the infrared receiving tube Q3 increases, and the emitter voltage of the first transistor Q1 decreases, so that the collector voltage of the first transistor Q1 also decreases. At this time, since the detection voltage of the second resistor R2 right end detected by the microcontroller MCU after low-pass filtering is actually the voltage of the collector of the first transistor Q1 after low-pass filtering, the voltage detected by the microcontroller MCU also decreases, so that the effect that the infrared light received by the infrared receiving tube Q3 is inversely proportional to the voltage detected by the microcontroller MCU is achieved, and the infrared light intensity is sensed.
[0067] In an embodiment, since the voltage of the infrared receiving tube Q3 decreases after the conduction degree of the infrared receiving tube Q3 increases, the detection voltage V q1 +V R4 +V q3 of the second resistor R2 right end detected by the microcontroller MCU after low-pass filtering will decrease, so that the change of the voltage detected by the microcontroller MCU is used to sense the infrared light intensity at the transmitting end, without the need to separately set an independent infrared receiving end and an infrared transmitting end.
[0068] In an embodiment, when the infrared receiving tube Q3 receives infrared light and senses the maximum, the conduction degree of the infrared receiving tube Q3 reaches the maximum, and the detection voltage of the second resistor R2 right end detected by the microcontroller MCU after low-pass filtering will decrease to the minimum value.
[0069] In the embodiment of the present application, the infrared light sensing device comprises a power supply, a first resistor, a second resistor, a third resistor, a fourth resistor, an infrared emitting tube, a first capacitor, a first triode, an infrared receiving tube and a microcontroller; the power supply is connected with the first resistor, the first resistor is connected with the anode of the infrared emitting tube; the cathode of the infrared emitting tube is connected between the collector of the first triode, the base of the first triode is connected with the third resistor, and the emitter of the first triode is connected with the fourth resistor; the fourth resistor is connected with the infrared receiving tube; the collector of the first triode is connected with the first capacitor through the second resistor; the collector of the first triode is connected with the microcontroller through the second resistor, and the base of the first triode is connected with the microcontroller through the third resistor. The infrared light sensing device provided by the embodiment of the present application can realize infrared light detection at the sending end by setting the first triode and using the amplification function of the first triode, without separately setting independent infrared receiving end and infrared sending end, and the infrared light sensing device provided by the embodiment of the present application is sensitive to infrared light and has a significant effect in distance sensing.
[0070] In an optional embodiment of the present application, the infrared light sensing device further comprises a second triode Q2.
[0071] The collector of the second triode Q2 is connected with the base of the first triode Q1, the base of the second triode Q2 is connected with the emitter of the first triode Q1, and the emitter of the second triode Q2 is grounded GND.
[0072] In the embodiment, the infrared light sensing device can further comprise a second triode Q2. The collector of the second triode Q2 is connected with the base of the first triode Q1, the base of the second triode Q2 is connected with the emitter of the first triode Q1, and the emitter of the second triode Q2 is grounded GND.
[0073] The second triode Q2 controls the maximum voltage between the fourth resistor R4 and the infrared receiving tube Q3, and there is a first corresponding relationship between the maximum voltage between the fourth resistor R4 and the infrared receiving tube Q3 and the maximum sensing distance supported by the infrared light sensing device.
[0074] Specifically, the infrared light sensing device has a maximum sensing distance, and when the to-be-measured distance object exceeds the maximum sensing distance, the infrared light sensing device cannot receive the infrared light reflected by the to-be-measured distance object. The second triode Q2 is used to control the maximum voltage between the fourth resistor R4 and the infrared receiving tube Q3, and since there is a first corresponding relationship between the maximum voltage between the fourth resistor R4 and the infrared receiving tube Q3 and the maximum sensing distance supported by the infrared light sensing device, the second triode Q2 can limit the maximum sensing distance supported by the infrared light sensing device.
[0075] The second triode Q2 is arranged in the infrared light sensing device, so that the maximum sensing distance supported by the infrared light sensing device can be controlled, thereby further facilitating the user to use the infrared light sensing device for distance measurement.
[0076] In an optional embodiment of the present application, the emitter of the second triode is connected with a detection diode and / or a detection resistor.
[0077] In the present embodiment, the emitter of the second triode Q2 is further connected with a diode and / or a detection resistor, so that the maximum sensing distance supported by the infrared light sensing device can be increased, i.e., the maximum distance between the infrared light sensing device and the object to be measured can be increased.
[0078] The second triode Q2 and the diode and / or detection resistor are arranged in the infrared light sensing device, so that the maximum sensing distance supported by the infrared light sensing device can be controlled, thereby further facilitating the user to use the infrared light sensing device for distance measurement.
[0079] In an optional embodiment of the present application, the first triode and the second triode are NPN type triodes.
[0080] The NPN type triode is a common bipolar transistor, which is composed of two N-type semiconductor materials and one P-type semiconductor material. The first triode Q1 and the second triode Q2 in the present embodiment can be NPN type triodes.
[0081] The first triode Q1 and the second triode Q2 are set as NPN type triodes, so that the infrared light detection can be realized at the sending end, and there is no need to separately arrange independent infrared receiving end and infrared sending end.
[0082] In the embodiment of the present application, the infrared light sensing device comprises a power supply, a first resistor, a second resistor, a third resistor, a fourth resistor, an infrared emitting tube, a first capacitor, a first triode, an infrared receiving tube and a microcontroller; the power supply is connected with the first resistor, the first resistor is connected with the anode of the infrared emitting tube; the cathode of the infrared emitting tube is connected between the collector of the first triode and the base of the first triode, the base of the first triode is connected with the third resistor, and the emitter of the first triode is connected with the fourth resistor; the fourth resistor is connected with the infrared receiving tube; the collector of the first triode is connected with the first capacitor through the second resistor; the collector of the first triode is connected with the microcontroller through the second resistor, and the base of the first triode is connected with the microcontroller through the third resistor. The infrared light sensing device provided in the embodiment of the present application can realize infrared light detection at the sending end by setting the first triode and using the amplification function of the first triode, without setting a separate infrared receiving end and an infrared sending end, and the infrared light sensing device provided in the embodiment of the present application is sensitive to infrared light and has a significant effect in distance sensing.
[0083] On the basis of the above-mentioned embodiment, the present embodiment further provides an infrared distance measuring method applied to the infrared light sensing device described in the above-mentioned embodiment.
[0084] Reference Figure 2 The steps of the infrared distance measuring method embodiment of the present application are shown in the flow chart, and specifically include the following steps:
[0085] Step 201: control the infrared emitting tube to emit infrared light to measure the distance to the object to be measured.
[0086] The infrared light sensing device described in the above-mentioned embodiment is used to measure the distance to the object to be measured. The infrared light sensing device at least comprises an infrared emitting tube, an infrared receiving tube, a detection circuit and a microcontroller. The detection circuit comprises a power supply VCC, a first resistor R1, a second resistor R2, a third resistor R3, a fourth resistor R4, an infrared emitting tube LED1, a first capacitor C1, a first triode Q1, a second triode Q2, an infrared receiving tube Q3 and a microcontroller MCU.
[0087] In step 201, the microcontroller MCU sends a first pulse signal to control the infrared emitting tube LED1 to emit infrared light to measure the distance to the object to be measured.
[0088] Step 202: when the infrared receiving tube receives the infrared light reflected by the object to be measured, the infrared light emitted by the infrared emitting tube is enhanced so that the infrared receiving tube receives the enhanced infrared light reflected by the object to be measured.
[0089] In step 202, when the infrared receiving tube Q3 receives the infrared light reflected by the object to be measured, a second pulse signal is sent by the microcontroller MCU to enhance the infrared light emitted by the infrared emitting tube LED1, so that the infrared receiving tube Q3 can receive the enhanced infrared light reflected by the object to be measured.
[0090] In step 203, the microcontroller detects the detection circuit to obtain a detection voltage, and the detection voltage and the intensity of the enhanced infrared light received by the infrared receiving tube have a third corresponding relationship.
[0091] In step 203, the microcontroller MCU detects the detection circuit to obtain a detection voltage, and the detection voltage and the intensity of the enhanced infrared light received by the infrared receiving tube have a third corresponding relationship.
[0092] In step 204, according to the third corresponding relationship, the intensity of the enhanced infrared light received by the infrared receiving tube is determined to obtain the reflected infrared intensity.
[0093] In step 204, according to the third corresponding relationship between the detection voltage and the intensity of the enhanced infrared light received by the infrared receiving tube Q3, the intensity of the enhanced infrared light received at this time can be determined by the detection voltage detected by the microcontroller MCU, and the intensity of the enhanced infrared light received at this time is taken as the reflected infrared intensity. The reflected infrared intensity is the intensity of the infrared light reflected by the object to be measured.
[0094] In step 205, according to a preset algorithm, the distance between the object to be measured and the infrared light sensing device is determined according to the reflected infrared intensity.
[0095] Since the reflected infrared intensity decreases as the distance between the object to be measured and the infrared light sensing device increases, and the detection voltage and the reflected infrared intensity have a third corresponding relationship, the corresponding relationship between the detection voltage and the distance between the object to be measured and the infrared light sensing device can be obtained, and a preset algorithm related to the detection voltage for calculating the distance between the object to be measured and the infrared light sensing device can be obtained.
[0096] In step 205, according to a preset algorithm, the distance between the object to be measured and the infrared light sensing device is determined according to the reflected infrared intensity.
[0097] In the embodiment of the present application, the infrared emitting tube emits infrared light to measure the distance of the object to be measured; when the infrared receiving tube receives the infrared light reflected by the object to be measured, the infrared emitting tube emits enhanced infrared light so that the infrared receiving tube receives the enhanced infrared light reflected by the object to be measured; the detection circuit is detected by the microcontroller to obtain a detection voltage, and the detection voltage and the intensity of the enhanced infrared light received by the infrared receiving tube have a third corresponding relationship; according to the third corresponding relationship, the intensity of the enhanced infrared light received by the infrared receiving tube is confirmed to obtain the reflected infrared intensity; and according to the reflected infrared intensity, the distance between the object to be measured and the infrared light sensing device is determined according to a preset algorithm. The infrared light sensing device is used for distance measurement in the embodiment of the present application, and the infrared light detection can be realized at the sending end, without the need to separately set up an independent infrared receiving end and an infrared sending end for distance measurement, so that the distance measurement process is more convenient, and the infrared light sensing device provided by the embodiment of the present application is sensitive to infrared light and has a significant effect in distance sensing.
[0098] In an optional embodiment of the present application, the detection circuit further includes a power supply, a first resistor, a second resistor, a third resistor, a fourth resistor, a first capacitor, a first triode, a second triode, the second resistor and the first capacitor constitute a low-pass filter, and the microcontroller is used to control the intensity of the infrared light emitted by the infrared emitting tube and detect the detection voltage of the second resistor after low-pass filtering.
[0099] The infrared light sensing device provided by the embodiment of the present application includes a power supply VCC, a first resistor R1, a second resistor R2, a third resistor R3, a fourth resistor R4, an infrared emitting tube LED1, a first capacitor C1, a first triode Q1, a second triode Q2, an infrared receiving tube Q3, and a microcontroller MCU.
[0100] The collector of the first triode Q1 is connected to the first capacitor C1 through the second resistor R2, and the second resistor R2 and the first capacitor C1 constitute a low-pass filter. Specifically, the collector of the first triode Q1 is connected to one end of the first capacitor C1 through the second resistor R2, and one end of the first capacitor C1 and the second resistor R2 are both connected to the AD port of the microcontroller MCU, so that the microcontroller MCU can detect the detection voltage of the right end of the second resistor R2 after low-pass filtering; the other end of the first capacitor C1 is grounded.
[0101] The collector of the first triode Q1 is connected to the AD port of the microcontroller MCU through the second resistor R2, and the base of the first triode Q1 is connected to the PWM port (Pulse Width Modulation Interface, Pulse Width Modulation Interface) of the microcontroller MCU through the third resistor R3, and the PWM port is used to send a pulse signal to drive the infrared emitting tube LED1 to emit infrared light.
[0102] The microcontroller MCU in the infrared light sensing device provided by the embodiment is used for controlling the intensity of the infrared light emitted by the infrared emitting tube LED1 and detecting the detection voltage of the second resistor R2 after low-pass filtering.
[0103] The embodiment of the application achieves the measurement of the intensity of the received infrared light through the change of the voltage by arranging the low-pass filter and the microcontroller MCU in the infrared light sensing device.
[0104] In an optional embodiment of the application, the second transistor is used for controlling the maximum voltage between the fourth resistor and the infrared receiving tube, and the maximum voltage between the fourth resistor and the infrared receiving tube has a first corresponding relationship with the maximum sensing distance supported by the infrared light sensing device.
[0105] In the embodiment, the second transistor Q2 controls the maximum voltage between the fourth resistor R4 and the infrared receiving tube Q3, and the maximum voltage between the fourth resistor R4 and the infrared receiving tube Q3 has a first corresponding relationship with the maximum sensing distance supported by the infrared light sensing device.
[0106] Specifically, the infrared light sensing device has a maximum sensing distance, and when the to-be-measured distance object exceeds the maximum sensing distance, the infrared light sensing device cannot receive the infrared light reflected by the to-be-measured distance object. The second transistor Q2 is used for controlling the maximum voltage between the fourth resistor R4 and the infrared receiving tube Q3, and since the maximum voltage between the fourth resistor R4 and the infrared receiving tube Q3 has a first corresponding relationship with the maximum sensing distance supported by the infrared light sensing device, the second transistor Q2 can limit the maximum sensing distance supported by the infrared light sensing device.
[0107] The embodiment of the application can control the maximum sensing distance supported by the infrared light sensing device by arranging the second transistor Q2 in the infrared light sensing device, thereby further facilitating the user to use the infrared light sensing device for distance measurement.
[0108] In an optional embodiment of the application, the method comprises:
[0109] When the infrared receiving tube does not receive the infrared light, the current provided by the power supply flows to the ground through the emitter of the first transistor after passing through the first resistor, the infrared emitting tube and the first transistor.
[0110] When the infrared receiving tube receives the infrared light, the current provided by the power supply flows to the fourth resistor and the infrared receiving tube through the emitter of the first transistor after passing through the first resistor, the infrared emitting tube and the first transistor.
[0111] In the embodiment, when the infrared receiving tube Q3 does not receive infrared light, the first transistor Q1 to the fourth resistor R4 to the infrared receiving tube Q3 is not turned on. At this time, the current provided by the power supply VCC flows to the ground GND through the first resistor R1, the infrared emitting tube LED1, the first transistor Q1, the emitter of the first transistor Q1, and the second transistor Q2.
[0112] When the infrared receiving tube Q3 receives infrared light, the first transistor Q1 to the fourth resistor R4 to the infrared receiving tube Q3 is turned on, and a voltage is formed between the fourth resistor R4 and the infrared receiving tube Q3. When the voltage at the emitter of the first transistor Q1 is large, a negative feedback is formed on the first transistor Q1, so that the first transistor Q1 works in an amplification zone. At this time, the current provided by the power supply VCC flows to the fourth resistor R4 and the infrared receiving tube Q3 through the first resistor R1, the infrared emitting tube LED1, the first transistor Q1, the emitter of the first transistor Q1, and finally to the ground GND.
[0113] In the embodiment, when the infrared receiving tube Q3 receives infrared light, the first transistor Q1 to the fourth resistor R4 to the infrared receiving tube Q3 is turned on, so that the detection voltage of the second resistor R2 detected by the microcontroller MCU at this time is determined by the voltage at the collector of the first transistor Q1, the voltage at the fourth resistor R4, and the voltage at the infrared receiving tube Q3, and the detection voltage detected by the microcontroller MCU is related to the degree of conduction of the infrared receiving tube Q3, so as to realize the sensing of the intensity of infrared light by the change of the voltage detected by the microcontroller MCU.
[0114] In an optional embodiment of the application, the method comprises:
[0115] When the infrared receiving tube does not receive infrared light, the detection voltage of the second resistor detected by the microcontroller after low-pass filtering is determined by the voltage at the collector of the first transistor and the voltage at the collector of the second transistor;
[0116] When the infrared receiving tube receives the infrared light, the detection voltage of the second resistor detected by the microcontroller after low-pass filtering is determined by the voltage at the collector of the first transistor, the voltage at the fourth resistor, and the voltage at the infrared receiving tube.
[0117] In the embodiment, when the infrared receiving tube Q3 does not receive infrared light, the detection voltage of the second resistor detected by the microcontroller MCU after low-pass filtering is determined by the voltage at the collector of the first transistor Q1 and the voltage at the collector of the second transistor Q2.
[0118] Specifically, the detection voltage of the second resistor R2 detected by the microcontroller MCU after low-pass filtering can be represented as V q1 +V q2 , wherein V q1 is the voltage of the collector of the first transistor Q1, V q2 is the voltage of the collector of the second transistor Q2.
[0119] When the infrared receiving tube Q3 receives infrared light, the detection voltage of the second resistor R2 detected by the microcontroller MCU after low-pass filtering is determined by the voltage of the collector of the first transistor Q1, the voltage of the fourth resistor R4, and the voltage of the infrared receiving tube Q3. When the infrared light received by the infrared receiving tube Q3 is enhanced, the infrared receiving tube Q3 is turned on to a greater extent, the emitter voltage of the first transistor Q1 is reduced, so that the collector voltage of the first transistor Q1 is also reduced, and thus the voltage detected by the microcontroller MCU is also reduced.
[0120] Specifically, the detection voltage of the second resistor R2 detected by the microcontroller MCU after low-pass filtering can be represented as V q1 +V R4 +V q3 , wherein V q1 is the voltage of the collector of the first transistor Q1, V R4 is the voltage of the fourth resistor R4, and V q3 is the voltage of the infrared receiving tube Q3. When the infrared light received by the infrared receiving tube Q3 is enhanced, the voltage of the infrared receiving tube Q3 is reduced, so that the microcontroller MCU can detect the change in voltage.
[0121] The embodiment of the present application can detect the change in voltage through the microcontroller MCU, achieving the effect that the infrared light received by the infrared receiving tube Q3 is inversely proportional to the voltage detected by the microcontroller MCU, and realizing the sensing of the infrared light intensity at the transmitting end without separately setting independent infrared receiving and transmitting ends.
[0122] In an optional embodiment of the present application, when the infrared receiving tube receives the infrared light, there is a second corresponding relationship between the voltage of the infrared receiving tube and the intensity of the received infrared light.
[0123] According to the second corresponding relationship, there is a third corresponding relationship between the detection voltage of the second resistor detected by the microcontroller after low-pass filtering and the intensity of the received infrared light, and the third corresponding relationship is used to confirm the intensity of the received infrared light.
[0124] In the embodiment, when the infrared receiving tube Q3 receives infrared light, there is a second corresponding relationship between the voltage of the infrared receiving tube Q3 and the intensity of the received infrared light.
[0125] Specifically, when the infrared receiving tube Q3 receives infrared light, the infrared receiving tube Q3 increases in conduction degree, and the voltage of the infrared receiving tube Q3 decreases, that is, there is a second corresponding relationship between the voltage of the infrared receiving tube Q3 and the intensity of the received infrared light.
[0126] According to the second corresponding relationship, there is a third corresponding relationship between the detection voltage of the second resistance R2 detected by the microcontroller MCU after low-pass filtering and the intensity of the received infrared light, and the third corresponding relationship is used to confirm the intensity of the received infrared light.
[0127] Specifically, the detection voltage of the right end of the second resistance R2 detected by the microcontroller MCU after low-pass filtering is determined by the voltage of the collector of the first triode Q1, the voltage of the fourth resistance R4, and the voltage of the infrared receiving tube Q3. Since the infrared receiving tube Q3 increases in conduction degree when the infrared receiving tube Q3 receives infrared light, the voltage of the infrared receiving tube Q3 decreases, so the detection voltage of the right end of the second resistance R2 detected by the microcontroller MCU after low-pass filtering will decrease, that is, there is a third corresponding relationship between the detection voltage of the second resistance R2 detected by the microcontroller MCU after low-pass filtering and the intensity of the received infrared light. Thus, the intensity of the received infrared light can be confirmed according to the third corresponding relationship.
[0128] In an optional embodiment, the third corresponding relationship between the detection voltage of the second resistance R2 detected by the microcontroller MCU after low-pass filtering and the intensity of the received infrared light can be calculated in advance, so that after the microcontroller MCU detects the detection voltage, the intensity of the received infrared light corresponding to the detection voltage can be determined according to the third corresponding relationship, and the distance between the to-be-measured distance object and the infrared light sensing device can be calculated according to the intensity of the received infrared light.
[0129] The embodiment of the application can detect the change of the voltage by the microcontroller MCU, since there is a third corresponding relationship between the intensity of the received infrared light received by the infrared receiving tube Q3 and the voltage detected by the microcontroller MCU, the intensity of the received infrared light is measured by the change of the voltage.
[0130] In an optional embodiment of the application, the second corresponding relationship is an inverse relationship between the voltage of the infrared receiving tube and the intensity of the received infrared light.
[0131] The third corresponding relationship is an inverse relationship between the detection voltage of the second resistance detected by the microcontroller after low-pass filtering and the intensity of the received infrared light.
[0132] In the embodiment, the second corresponding relationship is a reverse proportional relationship between the voltage of the infrared receiving tube Q3 and the intensity of the received infrared light, and the third corresponding relationship is a reverse proportional relationship between the detection voltage of the second resistor R2 detected by the microcontroller MCU after low-pass filtering and the intensity of the received infrared light.
[0133] Referring to Figure 3 is a detection voltage change diagram of an infrared light sensing device embodiment of the application.
[0134] Figure 3 The simulation results of the infrared light sensing device according to the embodiment of the application are shown in Figure 3 The change of the detection voltage of the second resistor R2 detected by the microcontroller MCU after low-pass filtering is shown in Figure 3 In the figure, the horizontal axis represents time, and each grid of the horizontal axis represents 20 milliseconds; the vertical axis represents the detection voltage, and each grid of the vertical axis represents 5 volts (V).
[0135] As Figure 3 shown, when the infrared receiving tube Q3 receives the maximum infrared light and senses the maximum infrared light, the conduction degree of the infrared receiving tube Q3 reaches the maximum, and the detection voltage of the right end of the second resistor R2 detected by the microcontroller MCU after low-pass filtering will decrease to the minimum, Figure 3 which is 5V in the figure.
[0136] When the infrared receiving tube Q3 does not sense the infrared light, the detection voltage of the right end of the second resistor R2 detected by the microcontroller MCU after low-pass filtering will gradually rise, and after about 10 milliseconds, it will rise to the maximum, Figure 3 which is about 10V in the figure.
[0137] When the infrared receiving tube Q3 senses the infrared light again, the detection voltage of the right end of the second resistor R2 detected by the microcontroller MCU after low-pass filtering will gradually decrease, and the degree of decrease will increase with the increase of the intensity of the infrared light sensed by the infrared receiving tube Q3, and finally decrease to the minimum.
[0138] In the embodiment of the application, the detection voltage of the second resistor R2 detected by the microcontroller MCU after low-pass filtering is in a reverse proportional relationship with the intensity of the received infrared light, and the intensity of the received infrared light is measured by the change of the voltage.
[0139] In an optional embodiment of the application, the method comprises:
[0140] When the infrared receiving tube does not receive the infrared light, the microcontroller sends a first pulse signal to the base of the first triode through the third resistor, and the first pulse signal is used to make the infrared emitting tube emit infrared light.
[0141] If the infrared receiving tube receives the infrared light, the microcontroller sends a second pulse signal to the base of the first triode through the third resistor, and the second pulse signal is used to enhance the emission of infrared light by the infrared emitting tube; the frequency of the first pulse signal and the frequency of the second pulse signal are both greater than the cutoff frequency of the low-pass filter by a preset multiple.
[0142] In the embodiment, when the infrared receiving tube Q3 does not receive infrared light, the microcontroller MCU sends a first pulse signal to the base of the first triode Q1 through the third resistor R3, and the first pulse signal is used to make the infrared emitting tube LED1 emit infrared light. When the infrared receiving tube Q3 does not receive infrared light, using a low-power pulse signal can reduce power consumption, so the infrared light sensing device in the embodiment is in low-power standby when it does not receive infrared light.
[0143] If the infrared receiving tube Q3 receives infrared light, the microcontroller MCU sends a second pulse signal to the base of the first triode Q1 through the third resistor R3, and the second pulse signal is used to enhance the emission of infrared light by the infrared emitting tube LED1. When the infrared receiving tube Q3 receives infrared light, the detection voltage of the second resistor R2 detected by the microcontroller MCU after low-pass filtering will decrease slightly, at which time the microcontroller MCU sends a continuous pulse signal to make the infrared emitting tube LED1 enhance the emission of infrared light. If the detection voltage detected by the microcontroller MCU further decreases, it can be confirmed that the infrared receiving tube Q3 receives infrared light.
[0144] In one embodiment, the first pulse signal is a low-power pulse signal, and the second pulse signal is a continuous pulse signal.
[0145] Referring to Figure 4 is an operation flowchart of an infrared light sensing device embodiment of the application.
[0146] As Figure 4 shown, when the infrared receiving tube Q3 does not receive infrared light, the microcontroller MCU does not detect feedback, and the microcontroller MCU sends a low-power driving signal to the base of the first triode Q1 through the third resistor R3.
[0147] If the microcontroller MCU detects feedback, a continuous driving signal is provided, and signal confirmation is performed. If the detection voltage detected by the microcontroller MCU further decreases, it can be confirmed that the infrared receiving tube Q3 receives infrared light, not an interference signal, and a response is performed; if the detection voltage detected by the microcontroller MCU does not continue to decrease, it can be confirmed that the infrared receiving tube Q3 receives an interference signal, and the microcontroller MCU resumes sending a low-power driving signal.
[0148] The infrared light sensing device in the embodiment of the application is in low-power standby when no infrared light is received, and confirms the infrared signal when there is infrared light feedback, thereby avoiding false response caused by other interference signals and reducing power consumption in standby.
[0149] In the embodiment, the frequency of the first pulse signal and the frequency of the second pulse signal provided by the microcontroller MCU are both greater than the cutoff frequency of the low-pass filter by a preset multiple.
[0150] The higher the frequency of the pulse signal sent by the microcontroller MCU to the base of the first transistor Q1 through the third resistor R3, the more the signal attenuates after the low-pass filter, so that the influence of the intensity of the infrared light received by the infrared receiving tube Q3 on the change of the detection voltage can be amplified, that is, the change of the intensity of the infrared light received by the infrared receiving tube Q3 is the same, and the change of the detection voltage under the high-frequency pulse signal will be greater.
[0151] In an embodiment, the frequency of the first pulse signal and the frequency of the second pulse signal provided by the microcontroller MCU can both be greater than the cutoff frequency of the low-pass filter by 5 times.
[0152] In the embodiment of the application, the frequency of the pulse signal sent by the microcontroller MCU to the base of the first transistor Q1 through the third resistor R3 is set, so that the influence of the intensity of the infrared light received by the infrared receiving tube Q3 on the change of the detection voltage is amplified, and the infrared light sensing device is more sensitive to the infrared light.
[0153] In an optional embodiment of the application, there is a fourth corresponding relationship between the resistance value of the fourth resistor and the voltage range of the detection voltage of the second resistor detected by the microcontroller after low-pass filtering.
[0154] The fourth corresponding relationship is an inverse relationship between the resistance value of the fourth resistor and the voltage range of the detection voltage of the second resistor detected by the microcontroller after low-pass filtering.
[0155] In the embodiment, there is a fourth corresponding relationship between the resistance value of the fourth resistor R4 and the voltage range of the detection voltage of the second resistor R2 detected by the microcontroller MCU after low-pass filtering, and the fourth corresponding relationship is an inverse relationship between the resistance value of the fourth resistor R4 and the voltage range of the detection voltage of the second resistor R2 detected by the microcontroller MCU after low-pass filtering. That is, when the resistance value of the fourth resistor R4 increases, the voltage range of the detection voltage decreases, thereby reducing the detection sensitivity of the infrared light sensing device.
[0156] In an example, the resistance value of the fourth resistor R4 can be set to the interval of 100-1000Ω (ohms).
[0157] The embodiment of the present application can adjust the detection sensitivity of the infrared light sensing device by adjusting the resistance value of the fourth resistor R4, thereby making the actual use of the user more convenient.
[0158] In the embodiment of the present application, the infrared emitting tube emits infrared light to measure the distance of the object to be measured; when the infrared receiving tube receives the infrared light reflected by the object to be measured, the infrared light emitted by the infrared emitting tube is enhanced, so that the infrared receiving tube receives the enhanced infrared light reflected by the object to be measured; the detection circuit is detected by the microcontroller to obtain a detection voltage, and the detection voltage and the intensity of the enhanced infrared light received by the infrared receiving tube have a third corresponding relationship; according to the third corresponding relationship, the intensity of the enhanced infrared light received by the infrared receiving tube is confirmed to obtain the reflected infrared intensity; and according to the reflected infrared intensity, the distance between the object to be measured and the infrared light sensing device is determined according to a preset algorithm. The embodiment of the present application uses the infrared light sensing device to measure the distance, and the infrared light detection can be realized at the sending end, without the need to separately set up an independent infrared receiving end and an infrared sending end for distance measurement, so that the distance measurement process is more convenient, and the infrared light sensing device provided by the embodiment of the present application is sensitive to infrared light, and has a significant effect in distance sensing.
[0159] It should be noted that, for the method embodiments, in order to simply describe, they are all described as a series of action combinations, but those skilled in the art should know that the embodiment of the present application is not limited to the order of the actions described, because according to the embodiment of the present application, certain steps can be performed in other order or at the same time. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions involved are not necessarily required by the embodiment of the present application.
[0160] The embodiment of the present application also provides a non-volatile readable storage medium, the storage medium stores one or more modules (programs), when the one or more modules are applied to a device, the device can execute instructions of each method step in the embodiment of the present application.
[0161] The embodiment of the present application provides one or more machine readable media, which store instructions, when executed by one or more processors, make an electronic device execute the method described in one or more of the above embodiments. In the embodiment of the present application, the electronic device includes terminal devices, servers (clusters) and various types of devices.
[0162] The embodiment of the present application can be implemented as a device configured in a desired manner using any appropriate hardware, firmware, software, or any combination thereof, which can include terminal devices, servers (clusters) and electronic devices. Figure 5An exemplary apparatus 500 that can be used to implement various embodiments described in the present application is shown schematically.
[0163] For one embodiment, Figure 5 An exemplary apparatus 500 is shown having one or more processors 502, a control module (chipset) 504 coupled to at least one of the processor(s) 502, a memory 506 coupled to the control module 504, a non-volatile memory (NVM) / storage device 508 coupled to the control module 504, one or more input / output devices 510 coupled to the control module 504, and a network interface 512 coupled to the control module 504.
[0164] The processor(s) 502 can include one or more single core or multicore processors that can include any combination of general-purpose processors or dedicated processors (e.g., graphics processors, application processors, baseband processors, etc.). In some embodiments, the apparatus 500 can be capable of functioning as a terminal device, a server (cluster), etc. as described in the embodiments of the present application.
[0165] In some embodiments, the apparatus 500 can include one or more computer readable media (e.g., the memory 506 or the NVM / storage device 508) having instructions 514 and one or more processors 502 that are in communication with the one or more computer readable media and configured to execute the instructions 514 to implement modules to perform the actions described in the present disclosure.
[0166] For one embodiment, the control module 504 can include any suitable interface controllers to provide for any suitable interface to at least one of the processor(s) 502 and / or any suitable device or component in communication with the control module 504.
[0167] The control module 504 can include a memory controller module to provide an interface to the memory 506. The memory controller module can be a hardware module, a software module, and / or a firmware module.
[0168] The memory 506 can be used, for example, to load and store data and / or instructions 514 for the apparatus 500. For one embodiment, the memory 506 can include any suitable volatile memory, such as suitable DRAM. In some embodiments, the memory 506 can include double data rate type four synchronous dynamic random access memory (DDR4 SDRAM).
[0169] For one embodiment, the control module 504 can include one or more input / output controllers to provide an interface to the NVM / storage device 508 and the input / output device(s) 510.
[0170] For example, NVM / storage 508 can be used to store data and / or instructions 514. NVM / storage 508 can include any suitable non-volatile memory (e.g., flash memory) and / or can include any suitable non-volatile storage device(s) (e.g., hard disk drive(s) (HDD(s)), compact disk (CD) drive(s), and / or digital versatile disk (DVD) drive(s)).
[0171] NVM / storage 508 can include storage resources that are physically part of the device on which the apparatus 500 is installed or that is accessed remotely and / or via a network by the device. For example, NVM / storage 508 can be accessed via input / output device(s) 510 through a network.
[0172] Input / output device(s) 510 can provide an interface between apparatus 500 and any suitable device for the receipt of data and / or the output of data. Input / output device(s) 510 can include communication components, audio components, sensor components, and / or the like. Network interface 512 can provide an interface between apparatus 500 and one or more networks, and apparatus 500 can wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, such as to access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, and / or the like, or a combination thereof.
[0173] For one embodiment, at least one of processor(s) 502 can be packaged together with logic of one or more controllers of control module 504, such as a memory controller module. For one embodiment, at least one of processor(s) 502 can be packaged together with logic of one or more controllers of control module 504 to form a system in a package (SiP). For one embodiment, at least one of processor(s) 502 can be integrated on the same die with logic of one or more controllers of control module 504. For one embodiment, at least one of processor(s) 502 can be integrated on the same die with logic of one or more controllers of control module 504 to form a system on a chip (SoC).
[0174] In various embodiments, the apparatus 500 can be, but is not limited to, a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet, a netbook, etc.) or the like. In various embodiments, the apparatus 500 can have more or fewer components, and / or different architectures. For example, in some embodiments, the apparatus 500 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including touch screen displays), non-removable memory ports, multiple antennas, graphics chips, application specific integrated circuits (ASICs), and speakers.
[0175] In the detection device, a master control chip can be used as a processor or a control module, sensor data, position information, etc. are stored in a memory or NVM / storage device, a sensor group can be used as an input / output device, and a communication interface can include a network interface.
[0176] For the apparatus embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts are described in the method embodiment.
[0177] Each embodiment in the specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can be referred to each other.
[0178] The embodiments of the present application are described with reference to flowcharts and / or block diagrams according to the method, terminal device (system), and computer program product of the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable infrared ranging terminal device processor to produce a machine, so that the instructions executed by the computer or other programmable infrared ranging terminal device processor produce an apparatus for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one flow or multiple flows and / or blocks Figure 1 The apparatus for implementing the functions specified in one block or multiple blocks.
[0179] These computer program instructions can also be stored in a computer readable memory that can guide the computer or other programmable infrared ranging terminal device to work in a specific way, so that the instructions stored in the computer readable memory produce a manufactured product including instruction apparatus, which implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one flow or multiple flows and / or blocks Figure 1 The apparatus for implementing the functions specified in one block or multiple blocks.
[0180] These computer program instructions can also be loaded into a computer or other programmable infrared distance measuring terminal device to cause a series of operational steps to be performed on the computer or other programmable terminal device to produce a computer-implemented process such that the instructions which execute on the computer or other programmable terminal device provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks Figure 1 one or more flowcharts and / or blocks
[0181] Although the preferred embodiments of the application have been described, those skilled in the art will be able to make additional changes and modifications to these embodiments once they have the benefit of the present disclosure. Accordingly, it is intended to embrace all such changes and modifications in the scope of the application.
[0182] Finally, it should be noted that the terms "first" and "second" and the like are used merely to distinguish one element from another, and do not necessarily indicate a physical or chronological order of such elements. Also, the terms "comprises", "comprising", or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the presence of additional identical elements in the process, method, article, or apparatus that comprises the element.
[0183] The above provides an infrared light sensing device and an infrared distance measuring method, an electronic device and a storage medium, and the principles and implementation manners of the present application are described by using specific examples. The above description of the embodiments is only used to help understand the method and its core idea of the present application. For those skilled in the art, according to the idea of the present application, the specific implementation manner and application range can be changed, and the above description of the present application should not be understood as a limitation.
Claims
1. An infrared light sensing device, characterized by comprising: The infrared light sensing device comprises a power supply, a first resistor, a second resistor, a third resistor, a fourth resistor, an infrared emitting tube, a first capacitor, a first triode, an infrared receiving tube and a microcontroller; The power supply is connected with the first resistor, and the first resistor is connected with the anode of the infrared emitting tube; The collector of the first triode is connected between the cathode of the infrared emitting tube, the base of the first triode is connected with the third resistor, and the emitter of the first triode is connected with the fourth resistor; The fourth resistor is connected with the infrared receiving tube; The collector of the first triode is connected with the first capacitor through the second resistor; The collector of the first triode is connected with the microcontroller through the second resistor, and the base of the first triode is connected with the microcontroller through the third resistor.
2. The infrared light sensing device of claim 1, wherein, The infrared light sensing device further comprises a second triode; The collector of the second triode is connected with the base of the first triode, the base of the second triode is connected with the emitter of the first triode, and the emitter of the second triode is grounded.
3. The infrared light sensing device of claim 2, wherein, The emitter of the second triode is connected with a detection diode and / or a detection resistor.
4. The infrared light sensing device of claim 2, wherein, The first triode and the second triode are NPN type triodes.
5. An infrared distance measuring method, characterized by, The method is applied to the infrared light sensing device as claimed in any one of claims 1-4, the infrared light sensing device at least comprises an infrared emitting tube, an infrared receiving tube, a detection circuit and a microcontroller, and the method comprises: controlling the infrared emitting tube to emit infrared light to measure the distance of a to-be-measured object; when the infrared receiving tube receives the infrared light reflected by the to-be-measured object, enhancing the infrared light emitted by the infrared emitting tube so that the infrared receiving tube receives the enhanced infrared light reflected by the to-be-measured object; detecting the detection circuit by the microcontroller to obtain a detection voltage, the detection voltage and the intensity of the enhanced infrared light received by the infrared receiving tube have a third corresponding relationship; according to the third corresponding relationship, confirming the intensity of the enhanced infrared light received by the infrared receiving tube to obtain a reflected infrared intensity; according to the reflected infrared intensity, determining the distance between the to-be-measured object and the infrared light sensing device according to a preset algorithm.
6. The infrared ranging method of claim 5, wherein, The detection circuit further comprises a power supply, a first resistor, a second resistor, a third resistor, a fourth resistor, a first capacitor, a first triode and a second triode, the second resistor and the first capacitor constitute a low-pass filter, and the microcontroller is used for controlling the intensity of the infrared light emitted by the infrared emitting tube and detecting the detection voltage of the second resistor after low-pass filtering.
7. The infrared ranging method of claim 6, wherein, The second triode is used for controlling the maximum voltage between the fourth resistor and the infrared receiving tube, and the maximum voltage between the fourth resistor and the infrared receiving tube and the maximum sensing distance supported by the infrared light sensing device have a first corresponding relationship.
8. The infrared ranging method of claim 6, wherein, When the infrared receiving tube does not receive infrared light, the current provided by the power supply passes through the first resistor, the infrared emitting tube and the first triode, and then flows to the ground through the emitter of the first triode. When the infrared receiving tube receives the infrared light, the current provided by the power supply passes through the first resistor, the infrared emitting tube and the first transistor, and then the current flows to the fourth resistor and the infrared receiving tube through the emitter of the first transistor.
9. The infrared ranging method according to claim 8, characterized in that, Comprising: When the infrared receiving tube does not receive infrared light, the low-pass filtered detection voltage of the second resistor detected by the microcontroller is determined by the voltage of the collector of the first transistor and the voltage of the collector of the second transistor; When the infrared receiving tube receives the infrared light, the low-pass filtered detection voltage of the second resistor detected by the microcontroller is determined by the voltage of the collector of the first transistor, the voltage of the fourth resistor and the voltage of the infrared receiving tube.
10. The infrared ranging method of claim 9, wherein, When the infrared receiving tube receives the infrared light, there is a second corresponding relationship between the voltage of the infrared receiving tube and the intensity of the received infrared light; According to the second corresponding relationship, there is a third corresponding relationship between the low-pass filtered detection voltage of the second resistor detected by the microcontroller and the intensity of the received infrared light, and the third corresponding relationship is used to confirm the intensity of the received infrared light.
11. The infrared ranging method of claim 10, wherein, The second corresponding relationship is an inverse relationship between the voltage of the infrared receiving tube and the intensity of the received infrared light; The third corresponding relationship is an inverse relationship between the low-pass filtered detection voltage of the second resistor detected by the microcontroller and the intensity of the received infrared light.
12. The infrared ranging method of claim 6, wherein, Comprising: When the infrared receiving tube does not receive infrared light, the microcontroller sends a first pulse signal to the base of the first transistor through the third resistor, and the first pulse signal is used to make the infrared emitting tube emit infrared light; If the infrared receiving tube receives the infrared light, the microcontroller sends a second pulse signal to the base of the first transistor through the third resistor, and the second pulse signal is used to make the infrared emitting tube enhance the emission of infrared light; the frequency of the first pulse signal and the frequency of the second pulse signal are both greater than a preset multiple of the cutoff frequency of the low-pass filter.
13. The infrared ranging method of claim 6, wherein, There is a fourth corresponding relationship between the resistance value of the fourth resistor and the voltage range of the low-pass filtered detection voltage of the second resistor detected by the microcontroller; The fourth corresponding relationship is an inverse relationship between the resistance value of the fourth resistor and the voltage range of the low-pass filtered detection voltage of the second resistor detected by the microcontroller.
14. An electronic device, comprising: Comprising: a processor; and a memory having stored thereon executable code that, when executed, causes the processor to perform the infrared ranging method of any one of claims 5-13.
15. One or more machine-readable media having stored thereon executable code that, when executed, causes a processor to perform the infrared ranging method of any one of claims 5-13.
Citation Information
Patent Citations
Laser emitting circuit, laser receiving circuit, distance calculating circuit and equipment thereof
CN104714220A
High-precision adjustable ranging circuit based on infrared tube
CN109738882A