Gesture control circuit based on infrared pair tube and implementation method thereof
By combining infrared signal acquisition and control circuits with filtering and current limiting circuits, the difference between the default voltage and the trigger voltage is used to determine object occlusion, thus solving the problem of misjudgment by infrared photodiodes under strong light and external infrared signal interference, and achieving efficient anti-interference gesture detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HENGDIAN GRP TOSPO LIGHTING
- Filing Date
- 2022-06-23
- Publication Date
- 2026-07-03
AI Technical Summary
Existing infrared gesture detection products are prone to misjudgment and malfunction under strong light and external infrared signal interference.
An infrared signal acquisition circuit and an infrared signal control circuit are adopted, including chip U1, infrared receiver IR1 and infrared transmitter IR2. Combined with filter capacitor and current limiting resistor, the object occlusion is judged by the difference between the default voltage and the trigger voltage. The cyclic output level mode is set and multiple sets of data are collected for average calculation to reduce the impact of interference.
It improves the ability to resist strong light and external infrared signal interference, ensuring the accuracy and reliability of gesture detection.
Smart Images

Figure CN115097542B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of infrared detection technology, specifically relating to a gesture control circuit based on infrared photodiodes and its implementation method. Background Technology
[0002] An infrared pair is a general term for an infrared emitter and receiver used together. The infrared emitter and receiver are placed side-by-side. When an object blocks the view of the infrared pair, the object reflects the infrared light emitted by the emitter, and the receiver receives this reflected light, increasing the current. Based on this characteristic, infrared pairs can be used to detect hand gestures.
[0003] Most products on the market that detect hand gestures using infrared photodiodes rely on the conduction current generated when an object blocks the photodiode to determine if there is an obstruction in front of it. Therefore, they are prone to misjudgment when there is interference from other infrared signals. At the same time, when the ambient light is strong, the change in conduction current after an object blocks the photodiode is not obvious, which will cause the function of detecting hand gestures to fail.
[0004] Therefore, the existing technology has the following shortcomings:
[0005] 1. Strong ambient light can cause the gesture detection function to fail.
[0006] 2. It is easily interfered with by external infrared signals, such as infrared remote controls and mobile phones. Summary of the Invention
[0007] The purpose of this invention is to provide a gesture control circuit based on infrared photodiodes to solve the problems mentioned in the background section. The gesture control circuit based on infrared photodiodes provided by this invention has the characteristics of resisting strong light interference and external infrared signal interference.
[0008] Another objective of this invention is to provide a method for implementing a gesture control circuit based on an infrared pair.
[0009] To achieve the above objectives, the present invention provides the following technical solution: a gesture control circuit based on infrared transistors, comprising an infrared signal acquisition circuit and an infrared signal control circuit, wherein the infrared signal control circuit includes a chip U1, the infrared signal acquisition circuit includes an infrared receiver IR1 and an infrared transmitter IR2, pin 4 of the infrared receiver IR1 is connected to a resistor R2 and pin 7 of the chip U1 respectively, the other end of the resistor R2 is connected to the VCC terminal, pin 3 of the infrared receiver IR1 is connected to the GND terminal, pin 1 of the infrared transmitter IR2 is connected to a resistor R1, the other end of the resistor R1 is connected to the VCC terminal, pin 2 of the infrared transmitter IR2 is connected to pin 3 of a transistor Q1, pin 1 of the transistor Q1 is connected to the GND terminal, pin 2 of the transistor Q1 is connected to a resistor R4, and the other end of the resistor R4 is connected to pin 6 of the chip U1.
[0010] To further facilitate filtering, pin 1 of chip U1 is connected to the VCC terminal, pin 8 of chip U1 is connected to the GND terminal, and a capacitor C3 is connected between pin 1 and pin 8 of chip U1.
[0011] To further facilitate filtering, a capacitor C1 is connected between pins 3 and 4 of the infrared receiver IR1.
[0012] To further limit current and filter the signal, pin 1 of the infrared emitting diode IR2 is connected to resistor R3, the other end of resistor R3 is connected to capacitor C2, and the other end of capacitor C2 is connected to GND.
[0013] In order to clamp pin 2 of transistor Q1 to a low level and at the same time limit current, pin 2 of transistor Q1 is further connected to resistor R5, and the other end of resistor R5 is connected to GND.
[0014] Furthermore, in this invention, the method for implementing a gesture control circuit based on an infrared photodiode includes the following steps:
[0015] (a) Set pin 6 of chip U1 to cycle through low and high levels;
[0016] (ii) When pin 6 of chip U1 outputs a low level, the voltage across the infrared receiver tube IR1 collected by pin 7 of chip U1 is defined as the default voltage value. When pin 6 of chip U1 outputs a high level, the voltage across the infrared receiver tube IR1 collected by pin 7 of chip U1 is defined as the trigger voltage value.
[0017] (III) Set the trigger threshold and define that when the default voltage value minus the trigger voltage value is greater than the trigger threshold, there is an object blocking the infrared emitting tube IR2, and the chip U1 performs the corresponding action.
[0018] (iv) Set the release threshold. Define that when chip U1 performs an action and the default voltage value minus the trigger voltage value is less than the release threshold, there is no object blocking the infrared emitting tube IR2, and the action ends.
[0019] In order to effectively reduce the influence of other infrared devices on the infrared pair tube, further, in step (1), the duration of the low level output of pin 6 of chip U1 is longer than the duration of the high level.
[0020] In order to avoid interference from certain infrared signals with specific patterns and thus minimize the impact of other infrared devices on the infrared tube, in step (1), the way in which pin 6 of chip U1 outputs low and high levels in a cycle is as follows: the cycle is performed by alternating between low and high levels several times, wherein the duration of the low level increases sequentially within one cycle, while the duration of the high level remains unchanged.
[0021] In order to obtain the default voltage value and trigger voltage value more accurately by collecting multiple sets of data and calculating the average value, thereby improving the anti-interference capability, further, in step (ii), when pin 6 of chip U1 outputs a low level, pin 7 of chip U1 collects the voltage across the infrared receiver tube IR1 several times and takes the average value as the default voltage value. When pin 6 of chip U1 outputs a high level, pin 7 of chip U1 collects the voltage across the infrared receiver tube IR1 several times and takes the average value as the trigger voltage value.
[0022] In order to reduce the impact of level signal fluctuations and obtain the default voltage value and trigger voltage value more accurately, in step (ii), after the level output of pin 6 of chip U1 switches, pin 7 of chip U1 starts to collect the voltage across the infrared receiver tube IR1 after a few milliseconds.
[0023] Compared with the prior art, the beneficial effects of the present invention are:
[0024] 1. This invention determines whether there is an object blocking the infrared diode by the difference between the default voltage and the trigger voltage. Therefore, when the ambient light changes, the default voltage and the trigger voltage will change equally, and the difference will not change significantly, thus having strong anti-interference ability.
[0025] 2. The chip U1 of this invention outputs regular low and high levels at pin 6, and the duration of the high level is minimized, which can effectively reduce the influence of other infrared devices on the infrared pair tube.
[0026] 3. In this invention, the duration of the low level increases sequentially within a cycle, which can avoid certain regular infrared signal interference, thereby minimizing the impact of other infrared devices on the infrared pair tube.
[0027] 4. By collecting multiple sets of data and calculating the average value, this invention can more accurately obtain the default voltage value and the trigger voltage value, thereby improving the anti-interference capability.
[0028] 5. After each level flip, the present invention collects the voltage across the infrared receiver tube IR1 through pin 7 of chip U1 after a period of time, thereby reducing the influence of level signal fluctuations and obtaining the default voltage value and trigger voltage value more accurately. Attached Figure Description
[0029] Figure 1 The circuit of this invention;
[0030] Figure 2 This is a circuit diagram of the infrared signal acquisition circuit of the present invention;
[0031] Figure 3 This is a circuit diagram of the infrared signal control circuit of the present invention; Detailed Implementation
[0032] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0033] Example 1
[0034] Please see Figure 1-3 The present invention provides the following technical solution: a gesture control circuit based on infrared transistors, comprising an infrared signal acquisition circuit and an infrared signal control circuit, wherein the infrared signal control circuit includes a chip U1, pins 3 and 4 of the chip U1 are control signal output terminals, the infrared signal acquisition circuit includes an infrared receiver IR1 and an infrared emitter IR2, pin 4 of the infrared receiver IR1 is connected to a resistor R2 and pin 7 of the chip U1 respectively, the other end of the resistor R2 is connected to a 5V power supply, pin 3 of the infrared receiver IR1 is connected to the GND terminal, pin 1 of the infrared emitter IR2 is connected to a resistor R1, the other end of the resistor R1 is connected to a 5V power supply, pin 2 of the infrared emitter IR2 is connected to pin 3 of a transistor Q1, pin 1 of the transistor Q1 is connected to the GND terminal, pin 2 of the transistor Q1 is connected to a resistor R4, and the other end of the resistor R4 is connected to pin 6 of the chip U1.
[0035] Specifically, pin 1 of chip U1 is connected to a 5V power supply, pin 8 of chip U1 is connected to the GND terminal, and a capacitor C3 is connected between pin 1 and pin 8 of chip U1.
[0036] By adopting the above technical solution, capacitor C3 plays a filtering role.
[0037] Specifically, a capacitor C1 is connected between pins 3 and 4 of the infrared receiver IR1.
[0038] By adopting the above technical solution, capacitor C1 plays a filtering role.
[0039] Specifically, pin 1 of the infrared emitting diode IR2 is also connected to resistor R3, the other end of resistor R3 is connected to capacitor C2, and the other end of capacitor C2 is connected to GND.
[0040] By adopting the above technical solution, resistor R3 plays the role of current limiting, and capacitor C2 plays the role of filtering.
[0041] Specifically, pin 2 of transistor Q1 is also connected to resistor R5, and the other end of resistor R5 is connected to GND.
[0042] By adopting the above technical solution, resistor R5 clamps pin 2 of transistor Q1 to a low level, while also limiting current.
[0043] Example 2
[0044] Furthermore, the implementation method of the gesture control circuit based on infrared photodiodes according to the present invention includes the following steps:
[0045] (a) Set pin 6 of chip U1 to cycle through a low level for 1ms and a high level for 1ms;
[0046] (ii) When pin 6 of chip U1 outputs a low level, the voltage across the infrared receiver tube IR1 collected by pin 7 of chip U1 is defined as the default voltage value (hdata). When pin 6 of chip U1 outputs a high level, the voltage across the infrared receiver tube IR1 collected by pin 7 of chip U1 is defined as the trigger voltage value (ldata).
[0047] (III) Set the trigger threshold (sdata), and define that when hdata-ldata>sdata, there is an object blocking the infrared emitter IR2, and chip U1 will perform the corresponding action.
[0048] (iv) Set the release threshold (rdata), which defines that when chip U1 performs an action and hdata-ldata<rdata, there is no object blocking the infrared emitter IR2, the action ends.
[0049] Specifically, when pin 6 of chip U1 outputs a high level, transistor Q1 is in the conducting state, and infrared emitting diode IR2 is in the working state, emitting infrared light; conversely, when pin 6 of chip U1 outputs a low level, transistor Q1 is in the cut-off state, and infrared emitting diode IR2 is in the standby state, stopping emitting infrared light.
[0050] Specifically, when the infrared emitting diode IR2 is in standby mode, the infrared receiving diode IR1 receives infrared light from the current environment, and the voltage on the infrared receiving diode IR1 in this state is defined as the default voltage; when the infrared emitting diode IR2 is in working mode, the voltage on the infrared receiving diode IR1 in this state is defined as the trigger voltage.
[0051] Specifically, when there is no object obstructing the infrared emitter, the difference between the trigger voltage and the default voltage is not significant. When there is an object obstructing the infrared emitter, the object will reflect the infrared light emitted by the infrared emitter IR2, and the infrared receiver IR1 will receive this reflected light. The conduction current will increase, and the voltage on the infrared receiver IR1 will decrease. A difference will be generated between the trigger voltage and the default voltage. This difference can be used to determine whether there is an object obstructing the infrared emitter.
[0052] By adopting the above technical solution, the difference between the default voltage and the trigger voltage is used to determine whether there is an object blocking the infrared diode. Therefore, when the ambient light changes, the default voltage and the trigger voltage will change equally, and the difference will not change significantly, resulting in strong anti-interference capability.
[0053] Example 3
[0054] The difference between this embodiment and embodiment 2 is that, specifically, in step (1), the 6th pin of chip U1 is set to output a low level for 5ms and a high level for 1ms in a loop.
[0055] By adopting the above technical solution, since common infrared light-emitting devices on the market, such as remote controls and mobile phones, emit infrared light signals with fixed time intervals, the output of pin 6 of chip U1 is a regular low level and a high level, and the duration of the high level is minimized, which can effectively reduce the influence of other infrared devices on the infrared pair tube.
[0056] Example 4
[0057] The difference between this embodiment and embodiment 2 is that, specifically, in step (1), the way to set the 6th pin of chip U1 to output low and high levels in a cycle is as follows: 5ms low level - 1ms high level - 7ms low level - 1ms high level - 9ms low level - 1ms high level as one cycle.
[0058] Specifically, the voltage value on the infrared receiving tube IR1 is read by the 7th pin of chip U1 within the time range of 0 - 5 ms in each cycle, and this value is defined as the first default voltage value (hdata1); the voltage value on the infrared receiving tube IR1 is read by the 7th pin of chip U1 within the time range of 5 - 6 ms in each cycle, and this value is defined as the first trigger voltage value (ldata1). The voltage value on the infrared receiving tube IR1 is read by the 7th pin of chip U1 within the time range of 6 - 13 ms in each cycle, and this value is defined as the second default voltage value (hdata2); the voltage value on the infrared receiving tube IR1 is read by the 7th pin of chip U1 within the time range of 13 - 14 ms in each cycle, and this value is defined as the second trigger voltage value (ldata2). The voltage value on the infrared receiving tube IR1 is read by the 7th pin of chip U1 within the time range of 14 - 23 ms in each cycle, and this value is defined as the third default voltage value (hdata3); after the voltage value on the infrared receiving tube IR1 is read by the 7th pin of chip U1 within the time range of 23 - 24 ms in each cycle, this value is defined as the third trigger voltage (ldata3).
[0059] When hdata1 - ldata1 > sdata & hdata2 - ldata2 > sdata & hdata3 - ldata3 > sdata, that is, when the differences between the three groups of trigger voltage values and the default voltage values are all greater than the trigger threshold, it is determined that there is an object blocking above the infrared emitting tube IR2, and chip U1 performs the corresponding action.
[0060] When hdata1 - ldata1 < rdata & hdata2 - ldata2 < rdata & hdata3 - ldata3 < rdata, that is, when the differences between the three groups of trigger voltage values and the default voltage values are all less than the release threshold, and on the premise that chip U1 has already performed a valid gesture receiving action once, it is determined that there is no object blocking above the infrared emitting tube IR2, that is, the previous valid gesture action has been released.
[0061] By adopting the above technical solution, the duration of the low level in one cycle increases successively, which can avoid the interference of some specific regular infrared signals, thereby minimizing the influence of other infrared devices on the infrared pair tube to the greatest extent.
[0062] Embodiment 5
[0063] The difference between this embodiment and Embodiment 2 is as follows: Specifically, in step (2), when the 6th pin of chip U1 outputs a low level, the voltage across the infrared receiving tube IR1 is collected by the 7th pin of chip U1 several times and the average value is taken as the default voltage value; when the 6th pin of chip U1 outputs a high level, the voltage across the infrared receiving tube IR1 is collected by the 7th pin of chip U1 several times and the average value is taken as the trigger voltage value.
[0064] Specifically, as applied in Example 3, pin 7 of chip U1 reads the voltage value on infrared receiver IR1 10 times at 0.5ms intervals within the 0-5ms time of each cycle and takes the average value, which is defined as the default voltage value (hdata). At 5.4ms and 5.8ms of each cycle, the voltage value on infrared receiver IR1 is read twice and the average value is taken, which is defined as the trigger voltage value (ldata).
[0065] By adopting the above technical solution and calculating the average value of multiple sets of data, the default voltage value and trigger voltage value can be obtained more accurately, thereby improving the anti-interference capability.
[0066] Example 6
[0067] The difference between this embodiment and embodiment 2 is that, specifically, in step (ii), after the level output of pin 6 of chip U1 switches, pin 7 of chip U1 starts to collect the voltage across the infrared receiver tube IR1 after a few milliseconds.
[0068] Specifically, as applied in Example 4, pin 7 of chip U1 reads the voltage value of infrared receiver IR1 10 times at 0.2ms intervals within 3-5ms of each cycle and takes the average value, defining this value as the first default voltage value (hdata1); pin 7 of chip U1 reads the voltage value of infrared receiver IR1 twice at 5.6ms and 5.8ms of each cycle and takes the average value, defining this value as the first trigger voltage value (ldata1). Pin 7 of chip U1 reads the voltage value of infrared receiver IR1 10 times at 0.2ms intervals within 11-13ms of each cycle and takes the average value, defining this value as the second default voltage value (hdata2); pin 7 of chip U1 reads the voltage value of infrared receiver IR1 twice at 13.6ms and 13.8ms of each cycle and takes the average value, defining this value as the second trigger voltage value (ldata2). Pin 7 of chip U1 reads the voltage value of infrared receiver IR1 10 times at 0.2ms intervals during the 21-23ms time of each cycle and takes the average value, which is defined as the third default voltage value (hdata3); Pin 7 of chip U1 reads the voltage value of infrared receiver IR1 twice at 23.6ms and 23.8ms of each cycle and takes the average value, which is defined as the third trigger voltage (ldata3).
[0069] When hdata1-ldata1>sdata&hdata2-ldata2>sdata&hdata3-ldata3>sdata, meaning the difference between the three sets of trigger voltage values and the default voltage value is greater than the trigger threshold, it is determined that there is an object blocking the infrared emitting tube IR2 above, and the chip U1 executes the corresponding action.
[0070] When hdata1 - ldata1 < rdata & hdata2 - ldata2 < rdata & hdata3 - ldata3 < rdata, that is, the differences between the three sets of trigger voltage values and the default voltage value are all less than the release threshold, and on the premise that the chip U1 has already executed a valid received gesture action, it is determined that there is no object blocking above the infrared emitting diode IR2, that is, the previous valid gesture action has been released.
[0071] By adopting the above technical solution, since the level signal may be unstable within a period of time after the 6th pin of the chip U1 flips the level, therefore, after each level flip, after a period of time, the voltage across the infrared receiving diode IR1 is collected through the 7th pin of the chip U1, so as to reduce the influence of the level signal fluctuation and obtain the default voltage value and the trigger voltage value more accurately.
[0072] In this application, the infrared pair tube is selected as the ITR20001 / T type sold by Everlight Electronics Co., Ltd.; the chip U1 is selected as the PL51T020 type sold by Suzhou Juyuan Microelectronics Co., Ltd.
[0073] In summary, the present invention determines whether there is an object blocking above the infrared pair tube through the difference between the default voltage and the trigger voltage. Therefore, when the ambient light changes, the default voltage and the trigger voltage will change equally, and the difference will not change significantly, so the anti-interference ability is strong; the 6th pin of the chip U1 of the present invention outputs regular low levels and high levels, and the duration of the high level is minimized as much as possible, which can effectively reduce the influence of other infrared devices on the infrared pair tube; in one cycle of the present invention, the duration of the low level increases in sequence, which can avoid the interference of some specific regular infrared signals, thereby minimizing the influence of other infrared devices on the infrared pair tube; the present invention calculates the average value by collecting multiple sets of data, which can obtain the default voltage value and the trigger voltage value more accurately, thereby improving the anti-interference ability; after each level flip, after a period of time, the voltage across the infrared receiving diode IR1 is collected through the 7th pin of the chip U1, so as to reduce the influence of the level signal fluctuation and obtain the default voltage value and the trigger voltage value more accurately.
[0074] Although the embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that various changes, modifications, substitutions and variations can be made in these embodiments without departing from the principle and spirit of the present invention, and the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A gesture control circuit based on infrared photodiodes, characterized in that: The system includes an infrared signal acquisition circuit and an infrared signal control circuit. The infrared signal control circuit includes a chip U1. The infrared signal acquisition circuit includes an infrared receiver IR1 and an infrared transmitter IR2. Pin 4 of the infrared receiver IR1 is connected to resistor R2 and pin 7 of chip U1, respectively. The other end of resistor R2 is connected to VCC. Pin 3 of the infrared receiver IR1 is connected to GND. Pin 1 of the infrared transmitter IR2 is connected to resistor R1, the other end of resistor R1 is connected to VCC. Pin 2 of the infrared transmitter IR2 is connected to pin 3 of transistor Q1. Pin 1 of transistor Q1 is connected to GND. Pin 2 of transistor Q1 is connected to resistor R4. The other end of resistor R4 is connected to pin 6 of chip U1; pin 1 of chip U1 is connected to VCC, and pin 8 of chip U1 is connected to GND. A capacitor C3 is connected between pins 1 and 8 of chip U1. A capacitor C1 is connected between pins 3 and 4 of infrared receiver IR1. Pin 1 of infrared emitter IR2 is also connected to resistor R3, the other end of which is connected to capacitor C2, and the other end of capacitor C2 is connected to GND. Pin 2 of transistor Q1 is also connected to resistor R5, the other end of which is connected to GND. The difference between the default voltage and the trigger voltage is used to determine if there is an object obstructing the infrared pair. Therefore, when the ambient light changes... The default voltage and trigger voltage change equally, and the difference does not change significantly, resulting in strong anti-interference capability. Pin 6 of chip U1 outputs regular low and high levels, with the high level duration decreasing, effectively reducing the impact of other infrared devices on the infrared receiver tube. Within a cycle, the duration of the low level increases sequentially, avoiding interference from certain regular infrared signals, thereby reducing the impact of other infrared devices on the infrared receiver tube. By collecting multiple sets of data and calculating the average value, the default voltage and trigger voltage values are obtained more accurately, thus improving anti-interference capability. After each level flip, the voltage across the infrared receiver tube IR1 is collected again through pin 7 of chip U1 after a period of time, thereby reducing the impact of level signal fluctuations and obtaining the default voltage and trigger voltage values more accurately. The above-mentioned method for implementing the gesture control circuit based on infrared photodiodes includes the following steps: (a) Set pin 6 of chip U1 to cycle through low and high levels; (ii) When pin 6 of chip U1 outputs a low level, the voltage across the infrared receiver tube IR1 collected by pin 7 of chip U1 is defined as the default voltage value. When pin 6 of chip U1 outputs a high level, the voltage across the infrared receiver tube IR1 collected by pin 7 of chip U1 is defined as the trigger voltage value. (III) Set the trigger threshold and define that when the default voltage value minus the trigger voltage value is greater than the trigger threshold, there is an object blocking the infrared emitting tube IR2, and the chip U1 performs the corresponding action. (iv) Set the release threshold. Define that when chip U1 performs an action and the default voltage value minus the trigger voltage value is less than the release threshold, there is no object blocking the infrared emitting tube IR2, and the action ends. In step (1), the duration of the low level output by pin 6 of chip U1 is longer than the duration of the high level; In step (ii), when pin 6 of chip U1 outputs a low level, pin 7 of chip U1 collects the voltage across the infrared receiver tube IR1 several times and takes the average value as the default voltage value. When pin 6 of chip U1 outputs a high level, pin 7 of chip U1 collects the voltage across the infrared receiver tube IR1 several times and takes the average value as the trigger voltage value.
2. The gesture control circuit based on infrared photodiodes according to claim 1, characterized in that: In step (1), the way that pin 6 of chip U1 outputs low and high levels in a cycle is as follows: the cycle is performed by alternating between low and high levels several times. In one cycle, the duration of the low level increases sequentially, while the duration of the high level remains unchanged.
3. The gesture control circuit based on infrared photodiodes according to claim 1, characterized in that: In step (ii), after the level of the output of pin 6 of chip U1 switches, pin 7 of chip U1 starts to collect the voltage across the infrared receiver tube IR1 after a few milliseconds.