Infrared detection device and method

By adjusting the duty cycle and power of the infrared module and combining it with a self-learning strategy, the problem of inconsistent detection performance of smart door locks in different environments has been solved. This has enabled accurate human trajectory judgment and reduced false triggering, resulting in a highly sensitive and low-power infrared detection device.

CN115791704BActive Publication Date: 2025-11-25SHENZHEN NATIONZ ELECTRONIC COMMERCE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211370348.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-03
Publication Date
2025-11-25
Estimated Expiration
2042-11-03

AI Technical Summary

Technical Problem

The infrared modules of existing smart door locks cannot accurately determine the trajectory of human movement, resulting in the main control being opened unnecessarily multiple times. Furthermore, the detection performance is inconsistent in different environments, making it prone to false triggering and exhibiting poor adaptability.

Method used

By outputting control signals with different duty cycles through the microcontroller unit, the power of the infrared emitting module is adjusted. Combined with the reflected light signal from the receiving module, the ambient reflectivity is detected in real time, and the signal parameters are adjusted through a self-learning strategy to adapt to environmental changes.

Benefits of technology

It achieves consistent detection performance under different background environments, accurately judges human movement trajectory, reduces false wake-ups, and has strong anti-interference ability, high sensitivity, safety and reliability, and low cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115791704B_ABST
    Figure CN115791704B_ABST
Patent Text Reader

Abstract

The application provides an infrared detection device and method. The infrared detection method is used for a micro control unit of the infrared detection device. The infrared detection device further comprises a transmitting module and a receiving module. The infrared detection method comprises the following steps: outputting two control signals with different duty cycles according to the reflectivity of an environment, controlling the transmitting module to generate light with different powers, determining the reflectivity of the detection environment according to whether the receiving module receives reflected light generated by the light with different powers, and determining whether the environment changes according to the reflectivity of the detection environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of infrared detection application technology, and more specifically, to an infrared detection device and method. Background Technology

[0002] The infrared modules currently used in smart door locks output control signals to the smart door lock master controller whenever a human body approaches, leaves, or passes by quickly. However, they cannot accurately determine the human body's movement trajectory as needed, resulting in the master controller being activated unnecessarily multiple times.

[0003] Furthermore, smart locks have poor adaptability to different environments: their detection performance varies in different scenarios, such as differences in background wall color (e.g., black vs. white), hallway width, ambient lighting (e.g., day vs. night), or changes in the background wall after the door is opened or closed. For example, in low-light conditions, the infrared module may misdetect reflected light, causing the smart lock to trigger the main control multiple times, thus failing to achieve accurate door opening control.

[0004] Therefore, there is a need for an infrared detection device and method that can effectively and accurately detect the movement trajectory of a human body, thereby enabling the door lock master control to be activated on demand; at the same time, it meets the requirements of simple manufacturing and low cost; and with low power consumption, it has the characteristics of strong anti-interference ability, high sensitivity, and safety and reliability.

[0005] The information disclosed in the background section is only intended to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0006] To address the aforementioned problems, this application proposes an infrared detection device and method.

[0007] According to a first aspect of this application, an infrared detection method is proposed for a microcontroller unit of an infrared detection device, the infrared detection device further comprising a transmitting module and a receiving module, the infrared detection method comprising:

[0008] Based on the ambient reflectivity, two control signals with different duty cycles are output to control the transmitting module to generate light of different powers. The reflectivity of the detection environment is determined based on whether the receiving module receives the reflected light generated by the light of different powers.

[0009] The environmental conditions are determined based on the reflectivity of the detected environment.

[0010] According to some embodiments, the step of outputting two control signals with different duty cycles based on the environmental reflectivity to control the transmitting module to generate light of different powers, and determining the reflectivity of the detection environment based on whether the receiving module receives the reflected light generated by the light of different powers, includes:

[0011] The microcontroller sets a first ambient reflectivity and outputs two control signals with different duty cycles centered on the first ambient reflectivity and with a first gradient.

[0012] The transmitting module generates light of different powers with control signals of different duty cycles of the first gradient. When the receiving module receives the reflected light of one power and generates a reflection signal, and does not receive the reflected light of the other power, the microcontroller determines the second ambient reflectivity.

[0013] According to some embodiments, it also includes:

[0014] The microcontroller unit is centered on the second environmental reflectivity and outputs two control signals with different duty cycles using the second gradient.

[0015] The transmitting module generates light of different powers with control signals of different duty cycles of the second gradient. The receiving module receives the reflected light of one power and generates a reflection signal. If the receiving module does not receive the reflected light of the other power, the microcontroller determines the third ambient reflectivity.

[0016] Wherein, the first gradient is greater than the second gradient.

[0017] According to some embodiments, it also includes:

[0018] The microcontroller unit is centered on the third environmental reflectivity and outputs two control signals with different duty cycles using the third gradient.

[0019] The transmitting module generates light of different powers with control signals of different duty cycles of the third gradient. When the receiving module receives the reflected light of one power and generates a reflection signal, and does not receive the reflected light of the other power, the microcontroller determines the reflectivity of the detection environment.

[0020] The second gradient is greater than the third gradient.

[0021] According to some embodiments, it also includes:

[0022] When the receiving modules receive reflected light from two different powers and generate reflection signals, the microcontroller determines the fourth ambient reflectivity.

[0023] The microcontroller unit centers on the fourth environmental reflectivity and outputs two control signals with different duty cycles according to the corresponding gradient.

[0024] According to some embodiments, determining whether the environment has changed based on the reflectivity of the detection environment includes:

[0025] The microcontroller unit is centered on the reflectivity of the detection environment and outputs two control signals with different duty cycles using a fourth gradient.

[0026] The transmitting module generates light of different powers with control signals of different duty cycles of the fourth gradient. When the receiving module receives the reflected light of one power and generates a reflection signal, and does not receive the reflected light of the other power, the microcontroller determines the real-time reflectivity of the environment.

[0027] If the real-time reflectivity of the environment is greater than the second threshold and less than the third threshold, it is determined that the environment has not changed.

[0028] According to some embodiments, determining whether the environment has changed based on the reflectivity of the detection environment further includes:

[0029] If the real-time environmental reflectance is greater than a first threshold and less than a second threshold, or greater than a third threshold and less than a fourth threshold, and the duration of stable real-time environmental reflectance is greater than a first time, then the real-time environmental reflectance is replaced with the reflectance of the detected environment.

[0030] The first threshold, the second threshold, the third threshold, and the fourth threshold are determined based on the reflectivity of the detection environment.

[0031] According to some embodiments, determining whether the environment has changed based on the reflectivity of the detection environment further includes:

[0032] If the duration for which the real-time environmental reflectivity is less than the first threshold is greater than a second time, or if the duration for which the real-time environmental reflectivity is stable is greater than a third time, it is determined that an object is approaching, and the real-time environmental reflectivity is replaced with the reflectivity of the detected environment.

[0033] According to some embodiments, determining whether the environment has changed based on the reflectivity of the detection environment further includes:

[0034] If the real-time reflectivity of the environment is greater than the fourth threshold, it is determined that the object is moving away.

[0035] The fourth threshold is determined based on the reflectivity of the replaced detection environment.

[0036] According to a second aspect of this application, an infrared detection device is provided, the infrared detection device comprising: a microcontroller unit, a transmitting module, and a receiving module, wherein:

[0037] The transmitting module is connected to the microcontroller unit and is used to receive the first control signal and generate light of different powers.

[0038] The receiving module is connected to the microcontroller unit and is used to receive reflected light from light of different powers and transmit the reflected signal to the microcontroller unit.

[0039] The microcontroller unit is used to perform the infrared detection method as described in any one of the first aspects.

[0040] According to some embodiments, a power supply module is also included, which is connected to the microcontroller and the receiving module, and is used to supply power to the receiving module according to a second control signal from the microcontroller.

[0041] According to some embodiments, the transmitting module includes an infrared LED, a first transistor, a first resistor, a second resistor, a first capacitor, and a second capacitor, wherein:

[0042] The emitter of the first transistor is grounded, and the collector is connected to the output terminal of the infrared LED.

[0043] One end of the second capacitor is connected to the collector of the first transistor, and the other end is grounded;

[0044] One end of the second resistor is connected to the power supply, and the other end is connected to the input terminal of the infrared LED;

[0045] One end of the first capacitor is grounded, and the other end is connected to the input terminal of the infrared LED;

[0046] One end of the first resistor is connected to the base of the first transistor, and the other end is connected to the microcontroller unit. The first control signal issued by the microcontroller unit is used to control the first transistor to turn on or off, thereby changing the emission power of the infrared LED.

[0047] According to some embodiments, the receiving module includes an infrared receiving module, a third resistor, a fourth resistor, and a third capacitor, wherein:

[0048] One end of the fourth resistor is connected to the operating power supply, and the other end is connected to the output signal terminal of the infrared receiving module;

[0049] One end of the third resistor is connected to the operating power supply, and the other end is connected to the voltage source terminal of the infrared receiving module;

[0050] One end of the third capacitor is connected to the voltage source terminal of the infrared receiving module, and the other end is grounded;

[0051] The output signal terminal of the infrared receiving module is connected to the microcontroller unit. The infrared receiving module receives reflected light of different powers and transmits the reflected signal to the microcontroller unit.

[0052] According to some embodiments, the infrared detection device further includes a power supply chip for providing voltage support to the infrared receiving module.

[0053] According to some embodiments, the power supply module includes a second field-effect transistor, a third transistor, a fifth resistor, a sixth resistor, and a seventh resistor, wherein:

[0054] One end of the fifth resistor is connected to the microcontroller unit, and the other end is connected to the base of the third transistor. It is used to receive the second control signal sent by the microcontroller unit and control the third transistor to be turned on or off.

[0055] The collector of the third transistor is connected to the gate of the second field-effect transistor, and the emitter of the third transistor is grounded.

[0056] The drain of the second field-effect transistor is connected to the power supply, and the source is connected to the operating power supply.

[0057] One end of the sixth resistor is connected to the drain of the second field-effect transistor, and the other end is connected to the gate of the second field-effect transistor;

[0058] One end of the seventh resistor is connected to the drain of the second field-effect transistor, and the other end is connected to the source of the second field-effect transistor.

[0059] This application proposes an infrared detection method that effectively and accurately detects the reflectivity of the environment through calibration and fine-tuning. It also incorporates a self-learning strategy to automatically adjust the signal parameters of the infrared emitter based on changes in the environment, thereby adapting to these changes and solving the problem of inconsistent detection performance under different background environments. This method can determine the movement trajectory of the human body and achieve the function of waking up the door lock master control on demand, thus solving the problem of false wake-up due to unwanted interference signals within the monitoring area.

[0060] This application proposes an infrared detection device, including a microcontroller unit, an infrared emitting diode, and an infrared receiving module. The infrared detection device is simple to manufacture and low in cost; moreover, it has the advantages of strong anti-interference ability, high sensitivity, and safety and reliability with low power consumption.

[0061] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit this application. Attached Figure Description

[0062] The above and other objects, features, and advantages of this application will become more apparent from the detailed description of exemplary embodiments with reference to the accompanying drawings. The drawings described below are merely some embodiments of this application and are not intended to limit the scope of this application.

[0063] Figure 1 A schematic diagram of an infrared detection device of an exemplary embodiment is shown;

[0064] Figure 2 A schematic diagram of the transmitter module structure is shown in an exemplary embodiment;

[0065] Figure 3 A schematic diagram of the receiving module structure of an exemplary embodiment is shown;

[0066] Figure 4 A schematic diagram of a power module structure of an exemplary embodiment is shown;

[0067] Figure 5 A flowchart illustrating an exemplary embodiment of an infrared detection device detection method is shown. Detailed Implementation

[0068] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, they are provided so that this application will be thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted.

[0069] The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced without one or more of these specific details, or other methods, components, materials, devices, etc. In these cases, well-known structures, methods, devices, implementations, materials, or operations will not be shown or described in detail.

[0070] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0071] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0072] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of exemplary embodiments, and the modules or processes in the drawings are not necessarily essential for implementing this application, and therefore cannot be used to limit the scope of protection of this application.

[0073] Currently, infrared modules used in door locks mainly include reflective sensing modules, through-beam sensing modules, and pyroelectric infrared detection modules. This application focuses on the research of reflective sensing modules, which are integrated components that combine infrared emission and reception functions. Internally, they include infrared emission, reception, signal amplification, and processing, enabling non-contact detection of obstacles within a certain range and conversion into control signal output.

[0074] Figure 1 A schematic diagram of an infrared detection device of an exemplary embodiment is shown.

[0075] like Figure 1 As shown, the infrared detection device includes a microcontroller unit (MCU), a transmitting module 101, a receiving module 103, and a power supply module 105. The MCU is connected to the transmitting module 101, the receiving module 103, and the power supply module 105, and outputs control signals to turn the transmitting module 101 and the power supply module 105 on or off. The receiving module 103 receives reflected light from the environment relative to the light emitted by the transmitting module 101. The MCU receives the reflectivity signal from the receiving module 103 and analyzes whether the environment has changed.

[0076] Figure 2 A schematic diagram of the transmitter module structure of an exemplary embodiment is shown.

[0077] like Figure 2As shown, the transmitting module includes an infrared LED D14, a first transistor Q1, a first resistor R1, a second resistor R2, a first capacitor C2, and a second capacitor C3. Specifically: one end of the first resistor R1 is connected to the base of the first transistor Q1, and the other end 201 is connected to the microcontroller unit (MCU) to receive control signals from the MCU and control the first transistor Q1 to turn on or off; the emitter of the first transistor Q1 is grounded, and its collector is connected to the output terminal of the infrared LED D14; one end of the second capacitor C3 is connected to the collector of the first transistor Q1, and the other end is grounded; one end of the second resistor R2 is connected to the power supply VCC (3.3V), and the other end is connected to the input terminal of the infrared LED D14; one end of the first capacitor C2 is grounded, and the other end is connected to the input terminal of the infrared LED D14.

[0078] According to an example embodiment, the first transistor Q1 in this application includes an NPN transistor. When the microcontroller unit (MCU) outputs a high level, the first transistor Q1 is turned on.

[0079] According to the example embodiment, the microcontroller unit (MCU) controls the duty cycle of the output signal, that is, changes the high level of the output, to change the emission power of the infrared LED D14.

[0080] Figure 3 A schematic diagram of the receiving module structure of an exemplary embodiment is shown.

[0081] like Figure 3 As shown, the receiving module includes an infrared receiving module D15, a third resistor R3, a fourth resistor R7, and a third capacitor C1. One end of the fourth resistor R7 is connected to the power supply VCC_IR, and the other end is connected to the output signal terminal 151 of the infrared receiving module D15. One end of the third resistor R3 is connected to the power supply terminal VCC_IR, and the other end is connected to the voltage source terminal 153 of the infrared receiving module D15. One end of the third capacitor C1 is connected to the voltage source terminal 153 of the infrared receiving module D15, and the other end is grounded. The output signal terminal 151 of the infrared receiving module D15 is connected to terminal 301 for connection to the microcontroller unit (MCU), transmitting reflectivity signals to the MCU to analyze whether environmental changes have occurred.

[0082] According to the example embodiment, the receiving module also includes a power supply chip D11 for providing power support to the infrared receiving module D15. The power supply chip D11 has four terminals: the first terminal 1 and the second terminal 2 are grounded, the third terminal 3 is connected to the output signal terminal 151 of the infrared receiving module D15, and the fourth terminal 4 is connected to the voltage source terminal 153 of the infrared receiving module D15.

[0083] According to the example embodiment, the infrared receiving module D15 receives the light emitted by the infrared LED D14 and then reflected. The microcontroller unit (MCU) can determine whether the environment has changed based on the change in the intensity of the reflected light.

[0084] Figure 4 A schematic diagram of a power module structure of an exemplary embodiment is shown.

[0085] like Figure 4 As shown, the power supply module includes a second field-effect transistor Q2, a third transistor Q3, a fifth resistor R5, a sixth resistor R6, and a seventh resistor R4. Specifically: one end of the fifth resistor R5 is connected to the microcontroller unit (MCU) via terminal 401 to receive control signals from the MCU, and the other end is connected to the base of the third transistor Q3; the collector of the third transistor Q3 is connected to the gate of the second field-effect transistor Q2, and the emitter of the third transistor Q3 is grounded; the drain of the second field-effect transistor Q2 is connected to the power supply VCC3.3V, and the source is connected to the power output terminal VCC_IR; one end of the sixth resistor is connected to the drain of the second field-effect transistor Q2, and the other end is connected to the gate of the second field-effect transistor Q2; one end of the seventh resistor R4 is connected to the drain of the second field-effect transistor Q2, and the other end is connected to the source of the second field-effect transistor Q2.

[0086] According to the example embodiment, the power module is used to power the receiving module. The microcontroller unit (MCU) outputs a high level, the third transistor Q3 is turned on, the second field-effect transistor Q2 is turned on to ground, and the power output terminal outputs voltage VCC_IR, so the receiving module is powered on and working.

[0087] According to the example embodiment, the third transistor Q3 in this application is an NPN transistor.

[0088] According to the example embodiment, the second field-effect transistor Q2 in this application is a PMOS transistor.

[0089] According to the example embodiment, when the microcontroller unit (MCU) inputs a low level, the first transistor Q1 is turned off, and the infrared LED D14 does not work; the third transistor Q3 is turned off, the power supply module does not output voltage, and the receiving module does not work.

[0090] This application proposes an infrared detection device for smart door locks, including a microcontroller unit, an infrared emitting tube, and an infrared receiving module. The infrared detection device is simple to manufacture and low in cost; moreover, it has the advantages of strong anti-interference ability, high sensitivity, and safety and reliability with low power consumption.

[0091] Figure 5 A flowchart illustrating an exemplary embodiment of an infrared detection device detection method is shown.

[0092] S101, the microcontroller outputs control signals.

[0093] According to the example embodiment, the microcontroller unit (MCU) outputs control signals with different duty cycles to change the emission power of the infrared LED D14.

[0094] According to some embodiments, the transmit power corresponds to different duty cycles of the control signal. The control signal is divided into N levels according to the duty cycle. The microcontroller unit (MCU) sends the first cycle number of any level of control signal in each group and sends the set number of groups of that level of control signal.

[0095] According to some embodiments, for example, the transmit power level is divided into 100 levels, then the microcontroller unit (MCU) transmits control signals of a certain level, each group consists of 15 cycles, one high and low level is one cycle, and 3 groups are sent each time, that is, 15*3 cycles, and the interval time between each group of control signals can be set by the user.

[0096] S102, Determine the reflectivity of the detection environment.

[0097] According to the example embodiment, when an object approaches the detection range, the infrared light emitted by the infrared LED D14 is reflected by the object. When the intensity of the reflected light reaches the threshold of the integrated receiving module, the infrared receiving module D15 can receive the reflected light, and the receiving module can sense whether an object is approaching.

[0098] According to some embodiments, when the microcontroller unit (MCU) is in a scan cycle, the preset control signal levels are 25 and 26 respectively. When the power of the infrared LED D14 is 25, the receiving module shows "no" signal; when the power of the infrared LED D14 is 26, the receiving module shows "yes" signal. At this time, the current reflectivity can be considered to be (25+26) / 2 = 25.5.

[0099] According to an example embodiment, the microcontroller unit (MCU) obtains the reflectivity of the environment through both corrective adjustment and fine-tuning adjustment.

[0100] According to the example embodiment, the corrective adjustment uses a large-span power adjustment and a successive approximation method to quickly obtain the accurate reflectivity of the detection environment within a certain number of adjustments.

[0101] According to some embodiments, the corrective adjustment includes multi-gradient adjustment. In this application, a first gradient adjustment, a second gradient adjustment, and a third gradient adjustment are used as examples, but it is not limited to this. The first gradient is greater than the second gradient, which is greater than the third gradient.

[0102] The microcontroller unit (MCU) first outputs a pair of control signals with different duty cycles, centered on a first ambient reflectivity and using a first gradient. The transmitting module generates light of different powers using the control signals with different duty cycles of the first gradient. The receiving module receives the reflected light from one power source and generates a reflection signal, while not receiving the reflected light from the other power source. When the MCU detects a "present" or "absent" reflection from the receiving module, it determines a second ambient reflectivity. The MCU then outputs a pair of control signals with different duty cycles, centered on the second ambient reflectivity and using a second gradient. The transmitting module generates light of different powers using the control signals with different duty cycles of the second gradient. The receiving module receives the reflected light from one power source and generates a reflection signal, while not receiving the reflected light from the other power source. When the MCU detects a "present" or "absent" reflection from the receiving module, it determines a third ambient reflectivity. The MCU then outputs a pair of control signals with different duty cycles, centered on the third ambient reflectivity and using a third gradient. The transmitting module generates light of different powers using the control signals with different duty cycles of the third gradient. The receiving module receives the reflected light from one power source and generates a reflection signal, while not receiving the reflected light from the other power source, thus determining the reflectivity of the detection environment.

[0103] According to some embodiments, taking the control signal divided into 100 duty cycle levels and the correction adjustment with 3 levels of gradient adjustment as an example, namely ±2, ±6, and ±10: The microcontroller unit (MCU) first sets the reflection power of the detection environment to 50 and outputs a pair of control signals with different duty cycles: First, the first gradient, namely the ±10 gradient, outputs control signals with duty cycles of 40 and 60 to control the emission power of the infrared LED D14. If the infrared receiver module D15 detects the reflected light and feeds back the reflected signal to the MCU, then the MCU adjusts the reflectivity of the detection environment to 45 and adjusts the output control signals with duty cycles of 35 and 55.

[0104] If the microcontroller unit (MCU) does not detect reflected power when the corresponding control signal has a duty cycle of 35, the MCU will adjust to the second gradient. At this time, when the reflectivity of the detection environment is set to 40, the adjustment level gradient is ±6, that is, the MCU will output control signals with duty cycles of 34 and 46. If the MCU does not detect reflected signal when the corresponding control signal has a duty cycle of 34, the MCU will adjust the reflectivity of the detection environment to 37.

[0105] When the microcontroller unit (MCU) is adjusted to the third gradient, and the reflectivity of the detection environment is set to 37, the adjustment level is ±2. The MCU outputs control signals with duty cycles of 35 and 39. If the MCU does not detect the reflected signal when the corresponding control signal has a duty cycle of 35, the MCU adjusts the reflectivity of the detection environment to 37.

[0106] If the microcontroller unit (MCU) detects a reflected signal when the corresponding control signal has a duty cycle of 35, it adjusts the reflectivity to 36 and outputs control signals with duty cycles of 34 and 38 until the MCU obtains a "present" or "absent" reflected signal from the receiving module, thus determining the reflectivity of the detection environment.

[0107] According to an example embodiment, the infrared detection device quickly obtains the final determined reflectivity of the detection environment through calibration.

[0108] S103, microcontroller unit fine-tuning output control signal.

[0109] According to the example embodiment, the microcontroller unit (MCU) changes the duty cycle of the control signal output by the MCU, centered on the reflectivity of the detection environment obtained in S102.

[0110] According to the example embodiment, the microcontroller unit (MCU) performs a regular scan using the fourth gradient based on the reflectivity of the detection environment obtained by the calibration formula, outputs a control signal with the corresponding duty cycle, and monitors the reflection signal of the infrared receiving module D15 to determine whether reflected light is received and to determine the corresponding reflectivity.

[0111] According to the example embodiment, the fourth gradient is less than the third gradient.

[0112] According to some embodiments, if the third gradient is 2, then the fourth gradient is 1.

[0113] S104, judging environmental changes based on reflectivity.

[0114] According to the example embodiment, the fine-tuning adjustment is based on the known reflectivity of the detection environment, and presets four sets of reflectivities: A, B, C, and D, where A... <B<C<D。

[0115] According to some embodiments, assuming the reflectivity of the detection environment obtained by the calibration is 50, the values ​​corresponding to ABCD can be set as: 45, 48, 52, 55; this application is only using this as an example.

[0116] According to some embodiments, the microcontroller unit (MCU) performs a regular scan using a gradient of positive and negative 1, that is, it outputs control signals with duty cycles of 49 and 51 to control the infrared LED D14, while the MCU monitors the output signal of the infrared receiver module D15.

[0117] According to some embodiments, the microcontroller unit (MCU) determines the environment based on the reflectivity as follows: when the reflectivity is between B and C, it is determined that the environment has not changed; when the reflectivity is between A and B, the environmental reflectivity is slowly fine-tuned; when the reflectivity is between C and D, the environmental reflectivity is slowly fine-tuned; when the reflectivity < A, it is determined that an object is approaching, and the calibration mode is executed; when the reflectivity > D, it is determined that an object is moving away, and the calibration mode is executed.

[0118] According to some embodiments, for example, when the microcontroller unit (MCU) receives control signals with duty cycles of 49 and 51, and both receive the output signal of the infrared receiving module D15; then control signals with duty cycles of 48 and 50 are output. If for the control signal with a duty cycle of 48, the MCU does not detect the reflected power, it is determined that the reflectivity of the environment at this time is 49, which is between B and C, and it is determined that the environment has not changed.

[0119] This application proposes an infrared detection method for an intelligent door lock. Through the calibration mode and the fine-tuning mode, it effectively and accurately detects the reflectivity of the environment, adds a self-learning strategy, automatically adjusts the signal parameters of the infrared emitting tube according to the changes in the environment, and then adapts to the changes in the environment, solves the problem of poor consistency in detection performance under different background environments, determines the movement trajectory of the human body, achieves the function of waking up the door lock main control as needed, and solves the problem of false wake-up of non-desired interference signals in the monitored area.

[0120] According to some embodiments, the detection scenarios of the infrared detection device include a conventional detection scenario: when the reflectivity is always between A and D, it is considered that the environment has not changed, and the microcontroller unit (MCU) does not trigger a wake-up signal to the main control.

[0121] According to some embodiments, when the reflectivity is between A and B or between C and D, and the duration during which the reflectivity remains stable without change exceeds a first time, the reflectivity of the detected environment is updated to the reflectivity obtained at this time.

[0122] According to some embodiments, the detection scenarios further include an object approaching scenario: when an object suddenly approaches, the reflectivity of the environment will show a state of < A. At this time, the microcontroller unit (MCU) does not immediately trigger a wake-up signal to the main control, but instead goes to S101, quickly obtains the current environmental reflectivity through the calibration mode, and determines whether the duration during which the current environmental reflectivity is lower than the A value exceeds a second time.

[0123] According to the exemplary embodiments, the object approaching scenario detection mechanism further includes an object approaching confirmation mechanism: when the object is stable within the detection range, the reflectivity changes relatively smoothly. If it is determined that the duration during which the current environmental reflectivity is lower than the A value exceeds a second time, the microcontroller unit (MCU) determines that an object is approaching and triggers a wake-up signal to the main control.

[0124] According to some embodiments, the object approach scene detection mechanism also includes an object approach confirmation mechanism: when the object is stable within the detection range, the reflectivity changes relatively smoothly. If the reflectivity of the current environment does not change within a third time period, it is determined that an object is approaching, and the microcontroller unit (MCU) immediately triggers a wake-up signal to the main controller.

[0125] According to some embodiments, the third time is shorter than the second time.

[0126] According to the example embodiment, the object approach scene detection mechanism also includes a pedestrian filtering mechanism: when an object passes through the detection range of the infrared detection device, the reflectivity detected by the infrared detection device changes continuously in real time. If the reflectivity of the current environment is lower than the value A for no longer than the second time, it is considered that an object has passed by. The microcontroller unit (MCU) does not trigger a wake-up signal to the main controller, does not adjust the reflectivity of the detection environment, and switches the detection scene to the normal detection scene state.

[0127] According to the example embodiment, if the reflectivity of the current environment is lower than the value A for a period of time exceeding a second time, the microcontroller unit (MCU) redetermines the reflectivity of the detection environment and redetermines the corresponding ABCD based on the reflectivity of the detection environment.

[0128] According to the example embodiment, if the reflectivity of the current environment is 30, which is lower than the value A, and A is set to 45, and the duration of the reflectivity of the current environment being lower than A exceeds 2 seconds, then the microcontroller unit determines that an object is approaching, and re-determines the reflectivity of the detection environment to be 30, and re-determines the values ​​of ABCD to be 25, 28, 32, and 35.

[0129] According to some embodiments, the detection scenario also includes a background change scenario: In this application, taking the use of an infrared detection device in the field of smart door locks as an example: In a background change scenario: After the door lock is closed, before the infrared detection device is started again, the object may still remain within the detection range of the infrared detection device. At this time, the microcontroller unit (MCU) does not immediately trigger a wake-up signal to the main controller, but instead switches to S101, quickly obtains the reflectivity of the current detection environment through calibration, and switches the detection scenario to a regular detection scenario.

[0130] According to some embodiments, the detection scenario also includes an object moving away scenario: the microcontroller unit (MCU) quickly obtains the reflectivity of the current detection environment through a correction method, adjusts the corresponding ABCD values, and increases the reflectivity of the real-time environment when the object moves away. If the reflectivity of the current detection environment obtained by the MCU is greater than D, it is determined that the object is moving away, and the process proceeds to S101 to readjust the reflectivity of the detection environment.

[0131] According to some embodiments, taking the microcontroller unit (MCU) replacing the values ​​of ABCD with 25, 28, 32, and 35 as an example, if the object moves away and the detected real-time environmental reflectivity is greater than 35, then the MCU determines that the object is moving away, re-determines the reflectivity of the detected environment, and re-replaces the values ​​of ABCD.

[0132] According to some embodiments, due to environmental influences, reflectivity cannot always remain between BC; more often, it falls between AB or CD. In such cases, the microcontroller unit (MCU) adjusts the center reflectivity based on the actual situation, outputting control signals with different duty cycles.

[0133] According to some embodiments, this application also proposes a method for detecting the stability of an infrared detection device, used to detect whether the infrared detection device is normal, including: setting the scanning cycle of the microcontroller unit as a first cycle, continuing for a fourth time, and if the detection error of the receiving module for a fixed reflective object is less than the positive or negative first level, it indicates that the infrared detection device is stable.

[0134] For example, if the current infrared detection device has a reflection power of 25.5, and the microcontroller is set to a scanning cycle of 100ms, that is, the microcontroller sends a pair of control signals with different duty cycles every 100ms for a duration of 10s. If the microcontroller determines that the reflection power of the detection environment of the infrared detection device is maintained within 23.5-27.5 throughout the process, then the infrared detection device is considered to be stable.

[0135] According to some embodiments, the infrared detection device proposed in this application can be used in the field of smart door locks, but it can also be used in the field of security monitoring, corridor light control, smart toilet flushing control, sensor faucets and other places where infrared detection devices are used. This application only takes the field of smart door locks as an example, but it is not limited thereto.

[0136] It should be clearly understood that this application describes how specific examples are formed and used, but this application is not limited to any details of these examples. Rather, based on the teachings of the disclosure of this application, these principles can be applied to many other embodiments.

[0137] Furthermore, it should be noted that the above figures are merely illustrative representations of the processes included in the method according to exemplary embodiments of this application, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0138] Exemplary embodiments of this application have been specifically shown and described above. It should be understood that this application is not limited to the detailed structures, arrangements, or implementation methods described herein; rather, this application is intended to cover various modifications and equivalent arrangements contained within the spirit and scope of the appended claims.

Claims

1. An infrared detection method, characterized in that, A microcontroller unit for an infrared detection device, the infrared detection device further comprising a transmitting module and a receiving module, the infrared detection method comprising: Based on the environmental reflectivity, two control signals with different duty cycles are output to control the transmitting module to generate light of different powers. The reflectivity of the detection environment is determined based on whether the receiving module receives the reflected light generated by the different power light, including: The microcontroller sets a first ambient reflectivity and outputs two control signals with different duty cycles centered on the first ambient reflectivity and with a first gradient. The transmitting module generates light of different powers with control signals of different duty cycles of the first gradient. When the receiving module receives the reflected light of one power and generates a reflection signal, and does not receive the reflected light of the other power, the microcontroller determines the second ambient reflectivity. The microcontroller unit is centered on the second environmental reflectivity and outputs two control signals with different duty cycles using the second gradient. The transmitting module generates light of different powers with control signals of different duty cycles of the second gradient. The receiving module receives the reflected light of one power and generates a reflection signal. If the receiving module does not receive the reflected light of the other power, the microcontroller determines the third ambient reflectivity. The microcontroller unit is centered on the third environmental reflectivity and outputs two control signals with different duty cycles using the third gradient. The transmitting module generates light of different powers with control signals of different duty cycles of the third gradient. When the receiving module receives the reflected light of one power and generates a reflection signal, and does not receive the reflected light of the other power, the microcontroller determines the reflectivity of the detection environment. Wherein, the first gradient is greater than the second gradient, and the second gradient is greater than the third gradient; The environmental conditions are determined based on the reflectivity of the detected environment.

2. The infrared detection method as described in claim 1, characterized in that, Also includes: When the receiving modules receive reflected light from two different powers and generate reflection signals, the microcontroller determines the fourth ambient reflectivity. The microcontroller unit, centered on the fourth environmental reflectivity, outputs two control signals with different duty cycles at corresponding gradients, including: When the microcontroller outputs control signals with different duty cycles at the first gradient, and the receiving module receives reflected light from two different powers and generates reflected signals, the microcontroller outputs control signals with two different duty cycles at the first gradient, centered on the fourth environmental reflectivity. When the microcontroller outputs control signals with different duty cycles at the second gradient, and the receiving module receives reflected light from two different powers and generates reflected signals, the microcontroller outputs control signals with two different duty cycles at the second gradient, centered on the fourth ambient reflectivity. When the microcontroller outputs control signals with different duty cycles at the third gradient, and the receiving module receives reflected light from two different powers and generates reflected signals, the microcontroller outputs control signals with two different duty cycles at the third gradient, centered on the fourth ambient reflectivity.

3. The infrared detection method as described in claim 1, characterized in that, The step of determining whether the environment has changed based on the reflectivity of the detection environment includes: The microcontroller unit is centered on the reflectivity of the detection environment and outputs two control signals with different duty cycles using a fourth gradient. The transmitting module generates light of different powers with control signals of different duty cycles of the fourth gradient. When the receiving module receives the reflected light of one power and generates a reflection signal, and does not receive the reflected light of the other power, the microcontroller determines the real-time reflectivity of the environment. If the real-time reflectivity of the environment is greater than the second threshold and less than the third threshold, it is determined that the environment has not changed.

4. The infrared detection method as described in claim 3, characterized in that, The step of determining whether the environment has changed based on the reflectivity of the detection environment also includes: If the real-time environmental reflectance is greater than a first threshold and less than a second threshold, or greater than a third threshold and less than a fourth threshold, and the duration of stable real-time environmental reflectance is greater than a first time, then the real-time environmental reflectance is replaced with the reflectance of the detected environment. The first threshold, the second threshold, the third threshold, and the fourth threshold are determined based on the reflectivity of the detection environment.

5. The infrared detection method as described in claim 4, characterized in that, The step of determining whether the environment has changed based on the reflectivity of the detection environment also includes: If the duration for which the real-time environmental reflectivity is less than the first threshold is greater than a second time, or if the duration for which the real-time environmental reflectivity is stable is greater than a third time, it is determined that an object is approaching, and the real-time environmental reflectivity is replaced with the reflectivity of the detected environment.

6. The infrared detection method as described in claim 5, characterized in that, The step of determining whether the environment has changed based on the reflectivity of the detection environment also includes: If the real-time reflectivity of the environment is greater than the fourth threshold, it is determined that the object is moving away. The fourth threshold is determined based on the reflectivity of the replaced detection environment.

7. An infrared detection device, characterized in that, The infrared detection device includes: a microcontroller unit, a transmitting module, and a receiving module, wherein: The transmitting module is connected to the microcontroller unit and is used to receive the first control signal and generate light of different powers. The receiving module is connected to the microcontroller unit and is used to receive reflected light from light of different powers and transmit the reflected signal to the microcontroller unit. The microcontroller unit is used to perform the infrared detection method as described in any one of claims 1-6.

8. The infrared detection device as described in claim 7, characterized in that, It also includes a power supply module, which is connected to the microcontroller and the receiving module, and is used to supply power to the receiving module according to the second control signal of the microcontroller.

9. The infrared detection device as described in claim 7, characterized in that, The transmitting module includes an infrared LED, a first transistor, a first resistor, a second resistor, a first capacitor, and a second capacitor, wherein: The emitter of the first transistor is grounded, and the collector is connected to the output terminal of the infrared LED. One end of the second capacitor is connected to the collector of the first transistor, and the other end is grounded; One end of the second resistor is connected to the power supply, and the other end is connected to the input terminal of the infrared LED; One end of the first capacitor is grounded, and the other end is connected to the input terminal of the infrared LED; One end of the first resistor is connected to the base of the first transistor, and the other end is connected to the microcontroller unit. The first control signal issued by the microcontroller unit is used to control the first transistor to turn on or off, thereby changing the emission power of the infrared LED.

10. The infrared detection device as described in claim 7, characterized in that, The receiving module includes an infrared receiving module, a third resistor, a fourth resistor, and a third capacitor, wherein: One end of the fourth resistor is connected to the operating power supply, and the other end is connected to the output signal terminal of the infrared receiving module; One end of the third resistor is connected to the operating power supply, and the other end is connected to the voltage source terminal of the infrared receiving module; One end of the third capacitor is connected to the voltage source terminal of the infrared receiving module, and the other end is grounded; The output signal terminal of the infrared receiving module is connected to the microcontroller unit. The infrared receiving module receives reflected light of different powers and transmits the reflected signal to the microcontroller unit.

11. The infrared detection device as described in claim 10, characterized in that, The infrared detection device also includes a power supply chip for providing voltage support to the infrared receiving module.

12. The infrared detection device as described in claim 8, characterized in that, The power supply module includes a second field-effect transistor, a third transistor, a fifth resistor, a sixth resistor, and a seventh resistor, wherein: One end of the fifth resistor is connected to the microcontroller unit, and the other end is connected to the base of the third transistor. It is used to receive the second control signal sent by the microcontroller unit and control the third transistor to be turned on or off. The collector of the third transistor is connected to the gate of the second field-effect transistor, and the emitter of the third transistor is grounded. The drain of the second field-effect transistor is connected to the power supply, and the source is connected to the operating power supply. One end of the sixth resistor is connected to the drain of the second field-effect transistor, and the other end is connected to the gate of the second field-effect transistor; One end of the seventh resistor is connected to the drain of the second field-effect transistor, and the other end is connected to the source of the second field-effect transistor.

Citation Information

Patent Citations

  • Environment self-adaption method based on infrared distance sensing device

    CN111207782A