A monitoring device based on infrared signal codes

By combining a hardware timer with an external crystal oscillator module, the problems of false triggering and decoding errors in traditional infrared remote control signal detection devices are solved, enabling accurate monitoring and real-time feedback of infrared signals, and improving the system's adaptability and reliability.

CN224287643UActive Publication Date: 2026-05-26BOSEN ELECTRONICS (DONGGUAN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
BOSEN ELECTRONICS (DONGGUAN) CO LTD
Filing Date
2025-05-09
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Traditional infrared remote control signal detection devices suffer from high false triggering rates, insufficient accuracy, and difficult maintenance, making it difficult to meet the ever-increasing demands for precise control and monitoring. They are also susceptible to the effects of MCU main frequency, task scheduling, and software load, resulting in large decoding errors and a lack of real-time status monitoring and intuitive feedback.

Method used

By combining a hardware timer with an external crystal oscillator module, the timer captures the demodulation pulses of the infrared receiving module, and the storage module and judgment unit perform accurate decoding. The display module outputs the recognition results in real time, improving the decoding accuracy and stability.

Benefits of technology

It significantly improves the accuracy and timing stability of decoding, enabling rapid and accurate identification and real-time feedback of infrared signals, and enhancing system adaptation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN224287643U_ABST
    Figure CN224287643U_ABST
Patent Text Reader

Abstract

This utility model belongs to the field of infrared signal decoding technology, and mainly relates to a monitoring device based on infrared signal codes. It includes a main control module and a receiving module and a display module electrically connected to the main control module. The receiving module receives infrared signal codes transmitted by infrared remote control and outputs demodulated pulses corresponding to the infrared signal codes to the main control module. The main control module includes a timer, a crystal oscillator module, a storage module, and a judgment unit. The timer decodes the demodulated pulses into decoded signals and stores the decoded signals in the storage unit. The crystal oscillator module provides the system clock to the timer. The storage module also stores built-in remote control code values. The judgment unit compares the built-in remote control code values ​​with the decoded signals and outputs the test results to the display module. The technical solution of this application does not rely on MCU load and task scheduling, significantly improving the decoding accuracy and timing stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This utility model belongs to the field of infrared signal decoding technology, specifically relating to a monitoring device based on infrared signal codes. Background Technology

[0002] With the widespread application of smart homes, smart appliances, robot remote control, drone control, and industrial automation equipment, infrared remote control signal technology has gained a large market share in the field of equipment remote control due to its advantages of low cost, ease of implementation, and high compatibility.

[0003] However, in practical applications, the shortcomings of traditional infrared detection devices have gradually become apparent, such as high false trigger rate, insufficient accuracy, and difficult maintenance, making it difficult to meet the ever-increasing demands for precise control and monitoring. In particular, most traditional remote control signal decoding relies on software delay or simple GPIO level detection methods, which are easily affected by MCU clock frequency, task scheduling, and software load, leading to inaccurate signal pulse width measurement and large decoding errors.

[0004] Therefore, it is urgent to improve the technical defects of existing infrared signal code monitoring devices. Utility Model Content

[0005] The purpose of this invention is to provide a device for accurate monitoring of infrared signals, addressing the shortcomings of existing technologies and solving the problems of low accuracy, poor reliability, susceptibility to interference, and difficulty in real-time monitoring and feedback in traditional infrared remote control signal detection.

[0006] To achieve the above objectives, this application implements the following technical solution:

[0007] A monitoring device based on infrared signal codes includes a main control module and a receiving module and a display module electrically connected to the main control module;

[0008] The receiving module is used to receive the modulated signal transmitted by the infrared remote control and output the demodulated pulse corresponding to the modulated signal to the main control module;

[0009] The main control module includes a timer, a crystal oscillator module, a storage module, and a judgment unit; the timer decodes the demodulated pulses into decoded signals and stores the decoded signals in the storage module; the crystal oscillator module provides the system clock to the timer; the storage module also stores the built-in remote control code values;

[0010] The judgment unit compares the built-in remote control code value with the decoded signal and outputs the test result to the display module.

[0011] The above technical solution produces the following technical effects:

[0012] This application's technical solution utilizes an integrated hardware timer in the main control module and an external crystal oscillator module to accurately capture the demodulated pulses output by the infrared receiving module. Compared to traditional software delay or GPIO polling methods, this application's solution does not rely on MCU load and task scheduling, significantly improving decoding accuracy and timing stability. Furthermore, the application's display module outputs the recognition results and operating status in real time, enabling users to quickly verify the recognition of remote control signals and improving system adaptation efficiency.

[0013] As a further improvement to the infrared signal code-based monitoring device of this application, the receiving module includes an infrared receiver head and a receiving circuit electrically connected to the infrared receiver head. The input terminal of the receiving circuit is the output terminal of the infrared receiver head, and the output terminal of the receiving circuit is connected to the input terminal of the main control module.

[0014] As a further improvement to the infrared signal code-based monitoring device of this application, the receiving circuit includes resistors R83 and R82. The power input terminal of the infrared receiver head is connected to the power supply through resistor R3, and the output terminal of the infrared receiver head is connected to the power supply through resistor R82.

[0015] As a further improvement to the infrared signal code-based monitoring device of this application, the resistance of resistor R83 is 22Ω and the resistance of resistor R82 is 10kΩ.

[0016] As a further improvement to the infrared signal code-based monitoring device of this application, the infrared receiver head is model TSOP34838.

[0017] As a further improvement to the infrared signal code-based monitoring device of this application, the crystal oscillator module includes a crystal oscillator unit and capacitors C6 and C8 disposed around the crystal oscillator X2.

[0018] As a further improvement to the infrared signal code-based monitoring device of this application, the values ​​of capacitors C6 and C8 are both 22pF.

[0019] As a further improvement to the infrared signal code-based monitoring device of this application, the timer acquires multiple capture values ​​based on the falling edge interruption of the demodulation pulse, and the timer decodes the NEC protocol and generates a decoded signal based on the pulse width between the capture values.

[0020] As a further improvement to the infrared signal code-based monitoring device of this application, the decoding signal includes a preamble code, a user code, and a data code, wherein the preamble code is used to synchronize the decoding signal and the demodulation pulse;

[0021] The user code is used to identify the type of device transmitting infrared remote control signals, while the data code is used for button recognition on the infrared remote control.

[0022] As a further improvement to the infrared signal code-based monitoring device of this application, the main control module is provided with a flag bit. After the decoded signal is matched with the remote control code value, the button state corresponding to the decoded signal is input to the flag bit.

[0023] The main control module polls the flag bit and outputs the key status input by the flag bit to the display module. Attached Figure Description

[0024] The accompanying drawings, which are included to provide a further understanding of the present invention and constitute a part of this invention, illustrate exemplary embodiments of the present invention and, together with the description thereof, serve to explain the present invention and do not constitute an undue limitation thereof. In the drawings:

[0025] Figure 1 This is a schematic diagram of the structure in Embodiment 1 of this utility model;

[0026] Figure 2 This is a schematic diagram of the main control module in Embodiment 1 of this utility model;

[0027] Figure 3 This is a schematic diagram of the receiving module in Embodiment 2 of this utility model;

[0028] Figure 4 This is a circuit diagram of the receiving module in Embodiment 2 of this utility model;

[0029] Figure 5 This is a circuit diagram of the main control module in Embodiment 3 of this utility model;

[0030] in:

[0031] 1-Main control module;

[0032] 11-Timer;

[0033] 12-Crystal oscillator module;

[0034] 13-Storage module;

[0035] 14-Judgment Unit;

[0036] 2-Receiver module;

[0037] 21-Infrared receiver head;

[0038] 3-Display module. Detailed Implementation

[0039] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this application.

[0040] In the description of this utility model, unless otherwise explicitly specified and limited, the terms "installation," "connection," "joining," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this utility model based on the specific circumstances.

[0041] Although this application discloses preferred embodiments as described above, it is not intended to limit the claims. Any person skilled in the art can make several possible changes and modifications without departing from the concept of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.

[0042] The present invention will be further described in detail below with reference to specific embodiments, but the embodiments of the present invention are not limited thereto.

[0043] Implementation Method 1

[0044] It is worth noting that traditional infrared remote control signal detection technologies rely on software delays or simple GPIO level detection methods, which are easily affected by MCU clock speed, task scheduling, and software load, leading to inaccurate signal pulse width measurement and large decoding errors. For example, simple edge-triggered detection methods are easily affected by ambient light and external interference signals, causing false triggering or decoding failure. Moreover, most existing solutions can only perform actions after simple decoding, lacking real-time status monitoring and intuitive feedback, making it difficult to quickly diagnose faults or troubleshoot problems.

[0045] Based on this, such as Figure 1-3As shown, this application addresses the technical shortcomings of existing traditional infrared remote control signal detection technologies by making improvements. Specifically, the infrared signal code-based monitoring device in this application includes a main control module 1, a receiving module 2 electrically connected to the main control module 1, and a display module 3. The receiving module 2 receives the modulated signal emitted by the infrared remote control and outputs a demodulated pulse corresponding to the modulated signal to the main control module 1. In practical implementation, the receiving module 2 can sensitively capture the modulated signal emitted by the infrared remote control transmitter. These signals are processed by the receiving module 2, converted into demodulated pulses, and accurately transmitted to the main control module 1, effectively reducing the impact of ambient light, electromagnetic interference, and other factors on signal reception.

[0046] Furthermore, the main control module 1 includes a timer 11, a crystal oscillator module 12, a storage module 13, and a judgment unit 14; the timer 11 decodes the demodulated pulse into a decoded signal and stores the decoded signal in the storage module; the crystal oscillator module 12 is used to provide the system clock to the timer 11; the storage module 13 also stores the built-in remote control code value;

[0047] The judgment unit 14 compares the built-in remote control code value with the decoded signal and outputs the test result to the display module 3.

[0048] Furthermore, the working principle of the above technical solution is as follows: after receiving the built-in remote control code value provided by the storage module 13 and the decoded signal obtained by the timer 11, the judgment unit 14 immediately performs a comparison analysis. If the built-in remote control code value and the decoded signal are completely consistent, the judgment unit 14 will trigger a successful matching signal, which is then sent to the display module 3. After receiving the successful matching signal, the display module 3 will immediately display the test result on the interface, as well as the corresponding button status or function indicator. This process ensures that the entire monitoring device can quickly and accurately identify and respond to infrared remote control signals, greatly improving the efficiency and accuracy of infrared signal monitoring. At the same time, due to the use of a hardware timer and an external crystal oscillator module 12 for precise pulse width capture, this device also significantly improves the stability and reliability of infrared signal decoding.

[0049] Specifically, in this application, timer 11 is the TIME2 timer of the main control module 1-GD32F470 (MCU). In the specific implementation, the main control module 1 configures channel 0 of timer 11TIMER2 as input capture mode, sets the trigger edge to a falling edge (i.e., the modulation signal triggered when the infrared signal code goes from high to low), and other parameters (filtering, frequency division, etc.). Furthermore, timer 11 obtains multiple capture values ​​based on the falling edge interrupt of the demodulated pulse. In the specific real-time process, the method by which timer 11 obtains multiple capture values ​​is as follows: First, it reads the current capture count value readvalue1, and uses the previous capture value readvalue2 to calculate the count difference (count) between the two captures. This difference reflects the pulse width.

[0050] Furthermore, timer 11 updates readvalue2 to the current captured value and increments the interrupt count ccnumber. When ccnumber = 2 (meaning the first pulse interval has been captured), it checks whether count falls between 6000ms and 8000ms.

[0051] When the interrupt count exceeds 2, data bit decoding begins: For each new pulse received, the decoded data is right-shifted to make room for the most significant bit. Specifically, if the pulse width is between 450 and 700 ohms, the code is considered 0 (no additional operation is performed, the most significant bit is 0). If the pulse width is between 800 and 13000 ohms, the code is considered 1, and the most significant bit is set to 1 (via a bitwise OR operation). If the pulse width is outside these two reasonable ranges, the data is considered incorrect, and all counters are reset. If it is within the range, it is considered a valid preamble. Otherwise, decoding restarts. This describes the process by which the timer decodes the NEC protocol and generates the decoded signal based on the pulse width between captured values.

[0052] Furthermore, the decoded signal includes a preamble code, a user code, and a data code. The preamble code is used to synchronize the decoded signal with the demodulation pulse; the user code is used to identify the type of device transmitting the infrared remote control; and the data code is used for button recognition on the infrared remote control. The main control module 1 has a flag bit. After the decoded signal is matched with the remote control code value, the button state corresponding to the decoded signal is input to the flag bit. The flag bit is a global variable; after the remote control signal is decoded, the flag bit is assigned a specific value to identify which function key is currently pressed on the remote control. The main control module 1 then polls the flag bit and outputs the button state input by the flag bit to the display module 3.

[0053] Implementation Method 2

[0054] like Figure 1-4As shown, to further improve the accuracy of the demodulated pulses corresponding to the modulation signal output by the receiving module 2 to the main control module 1 in this application, the receiving module 2 further includes an infrared receiver head 21 and a receiving circuit electrically connected to the infrared receiver head 21. The input terminal of the receiving circuit is the output terminal of the infrared receiver head 21, and the output terminal of the receiving circuit is connected to the input terminal of the main control module 1.

[0055] The infrared receiver 21, model TSOP34838, used in this application is an infrared remote control receiver. Its VS terminal (power supply terminal) provides the operating voltage to the infrared receiver 21, typically +5V, to ensure the normal operation of the receiver module 2. Its OUT terminal (signal output terminal) outputs the data from the internally demodulated (38kHz) modulated signal as a TTL level signal (active low). In the idle state, the OUT terminal outputs a high level; after receiving the modulated signal from the infrared remote control, the OUT terminal goes low; after the modulation signal ends, the OUT terminal returns to a high level.

[0056] It is worth noting that the receiving circuit includes resistors R83 and R82. The power input terminal of the infrared receiver 21 is connected to the power supply through resistor R3, and the output terminal of the infrared receiver 21 is connected to the power supply through resistor R82. When the receiving circuit is first powered on or when there is a momentary current spike, resistor R83 can limit the current, preventing excessive momentary current from damaging the module or reducing the lifespan of the receiving circuit. The specific principle is as follows:

[0057] When the power supply is working normally, the voltage drop across the 22Ω resistor is minimal and has little impact on the power supply to the infrared receiver 21. However, in the event of a short circuit or a momentary surge current: the instantaneous current flowing through R83 is:

[0058]

[0059] This current limiting effect prevents damage to the TSOP34838 infrared receiver head 21 due to excessive instantaneous current, and increases the stability and lifespan of the receiving circuit.

[0060] A further R82 connection is placed between the power supply and the OUT terminal of the infrared connector, acting as a pull-up resistor. The OUT terminal of the TSOP34838 infrared connector is typically an open-drain or open-collector output type, meaning the module has only one transistor controlling the output to ground, without an internal active pull-up function. When the TSOP34838 infrared connector does not detect an infrared signal (idle state), the internal transistor is off, and the OUT terminal is floating. This application uses R82 (10kΩ) to pull it up to 5V, further stabilizing the OUT terminal at a high level. However, when an infrared remote control signal is received, the internal transistor of the TSOP34838 infrared connector turns on, pulling the OUT terminal close to 0V (low level), and the signal enters the main control module 1.

[0061] The reason for choosing 10kΩ for the pull-up resistor R82 is that a larger resistance value (such as 10kΩ) can reduce power consumption, while being small enough to ensure a steep rising edge of the output signal and a clear and stable signal level; at the same time, it ensures that the input port of the main control module 1 can quickly and accurately capture changes in the logic level.

[0062] Other aspects that are the same as in Implementation Method 1 will not be described again in this implementation method.

[0063] Implementation Method 3

[0064] like Figure 1-5 As shown, to further improve the operational stability of the timer 11 in this application, the crystal oscillator module 12 further includes a crystal oscillator unit and capacitors C6 and C8 disposed around the crystal oscillator X2. Two pins of the main control module 1 are respectively connected to a 25MHz crystal oscillator to generate the MCU core clock frequency. This provides a precise system clock for the main control module 1 and is also the source of the clock for the timer 11.

[0065] Furthermore, two 22pF capacitors (C6 and C8) peripherally mounted on the 25MHz crystal oscillator X2 are connected to ground for crystal oscillation startup and frequency stabilization. Thus, the selection of capacitors C6 and C8 ensures the stable operation of the crystal oscillator module 12. The 22pF capacitance helps the crystal oscillator quickly reach a stable oscillation state upon startup and maintain frequency stability, which is crucial for the accurate timing of the timer 11. In addition, a stable system clock not only guarantees the accuracy of the internal logic operations of the main control module 1 but also provides a reliable timing reference for the decoding process, thereby further improving the accuracy and stability of infrared signal decoding.

[0066] Other aspects that are the same as in Implementation Method 1 will not be described again in this implementation method.

[0067] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A monitoring device based on infrared signal codes, characterized in that, It includes a main control module (1), a receiving module (2) electrically connected to the main control module (1), and a display module (3); The receiving module (2) is used to receive the infrared signal code transmitted by the infrared remote control and output the demodulation pulse corresponding to the infrared signal code to the main control module (1); The main control module (1) includes a timer (11), a crystal oscillator module (12), a storage module (13), and a judgment unit (14); the timer (11) decodes the demodulation pulse into a decoded signal and stores the decoded signal in the storage module (13); the crystal oscillator module (12) provides a system clock to the timer (11); the storage module (13) also stores the built-in remote control code value; The judgment unit (14) compares the built-in remote control code value with the decoded signal and outputs the test result to the display module (3).

2. The monitoring device based on infrared signal codes according to claim 1, characterized in that, The receiving module (2) includes an infrared receiver head (21) and a receiving circuit electrically connected to the infrared receiver head (21). The input terminal of the receiving circuit is the output terminal of the infrared receiver head (21), and the output terminal of the receiving circuit is connected to the input terminal of the main control module (1).

3. The monitoring device based on infrared signal codes according to claim 2, characterized in that, The receiving circuit includes resistors R83 and R82. The power input terminal of the infrared receiver is connected to the power supply through resistor R3, and the output terminal of the infrared receiver is connected to the power supply through resistor R82.

4. The monitoring device based on infrared signal codes according to claim 3, characterized in that, The resistance of resistor R83 is 22Ω, and the resistance of resistor R82 is 10kΩ.

5. A monitoring device based on infrared signal codes according to claim 2, characterized in that, The infrared receiver head (21) is model TSOP34838.

6. A monitoring device based on infrared signal codes according to claim 1, characterized in that, The crystal oscillator module (12) includes the crystal oscillator unit, the crystal oscillator X2, and capacitors C6 and C8 disposed around the crystal oscillator X2.

7. A monitoring device based on infrared signal codes according to claim 6, characterized in that, The values ​​of capacitors C6 and C8 are both 22pF.

8. A monitoring device based on infrared signal codes according to claim 1, characterized in that, The timer (11) acquires multiple capture values ​​based on the falling edge interrupt of the demodulation pulse, and the timer (11) performs NEC protocol decoding and generates a decoding signal based on the pulse width between the capture values.

9. A monitoring device based on infrared signal codes according to claim 8, characterized in that, The decoding signal includes a preamble, a user code, and a data code. The preamble is used to synchronize the decoding signal with the demodulation pulse. The user code is used to identify the type of device transmitting the infrared remote control, and the data code is used for button recognition on the infrared remote control.

10. A monitoring device based on infrared signal codes according to claim 9, characterized in that, The main control module (1) is provided with a flag bit. After the decoding signal is matched with the remote control code value, the button state corresponding to the decoding signal is input to the flag bit. The main control module (1) polls the flag bit and outputs the key status input by the flag bit to the display module (3).