WO2015000399A1 - 红外信号的学习方法 - Google Patents

红外信号的学习方法 Download PDF

Info

Publication number
WO2015000399A1
WO2015000399A1 PCT/CN2014/081378 CN2014081378W WO2015000399A1 WO 2015000399 A1 WO2015000399 A1 WO 2015000399A1 CN 2014081378 W CN2014081378 W CN 2014081378W WO 2015000399 A1 WO2015000399 A1 WO 2015000399A1
Authority
WO
WIPO (PCT)
Prior art keywords
infrared
processor
control code
signal
infrared signal
Prior art date
Application number
PCT/CN2014/081378
Other languages
English (en)
French (fr)
Inventor
张宇科
吴曙斌
王剑峰
Original Assignee
恬家(上海)信息科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN2013203890913U external-priority patent/CN203325207U/zh
Priority claimed from CN 201320441531 external-priority patent/CN203366528U/zh
Priority claimed from CN201310312245.3A external-priority patent/CN103400494B/zh
Application filed by 恬家(上海)信息科技有限公司 filed Critical 恬家(上海)信息科技有限公司
Publication of WO2015000399A1 publication Critical patent/WO2015000399A1/zh

Links

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C23/00Non-electrical signal transmission systems, e.g. optical systems
    • G08C23/04Non-electrical signal transmission systems, e.g. optical systems using light waves, e.g. infrared
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B1/00Details of transmission systems, not covered by a single one of groups H04B3/00 - H04B13/00; Details of transmission systems not characterised by the medium used for transmission
    • H04B1/38Transceivers, i.e. devices in which transmitter and receiver form a structural unit and in which at least one part is used for functions of transmitting and receiving
    • H04B1/3827Portable transceivers
    • H04B1/3833Hand-held transceivers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B10/00Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
    • H04B10/60Receivers
    • H04B10/66Non-coherent receivers, e.g. using direct detection
    • H04B10/69Electrical arrangements in the receiver

Definitions

  • the present application relates to a learning method for a infrared signal by a learning type infrared remote controller.
  • Infrared remote control is a remote control device that transmits control signals using an infrared signal with a wavelength between 0.76 and 1.5 ⁇ m. It is widely used in industrial control and home appliances. .
  • the infrared signal is converted by an electrical signal, for example, the presence or absence of infrared light respectively indicates the high and low levels of the electrical signal.
  • the electrical signal ie, the control signal
  • the infrared control code usually includes: a boot code, a system code, a data code, a system code complement code, a data code complement code, a synchronization code, and the like.
  • the system code and its complement, data code and its complement are usually used to represent remote control commands.
  • the remote command is a string of binary digits
  • the infrared control code represents a remote command in a combination of high and low levels.
  • the NEC protocol format definition a combination of a high level of 0.5625 ms duration and a low level of 0.5625 ms in the infrared control code represents a binary number 0, a high level with a duration of 0.5625 ms and a A combination of low levels with a duration of 1.6875 ms represents a binary number 1.
  • the carrier signal is a square wave signal.
  • the modulation signal formed by modulating the infrared remote control code onto the carrier in a pulse amplitude modulation (PAM) manner is the control signal. Pulse amplitude modulation means that the high and low levels in the infrared control code are respectively represented by the carrier square wave signal and the low level in the modulated signal.
  • PAM pulse amplitude modulation
  • the level format of the pilot code and the synchronization code in the infrared control code the system code in the infrared control code and its complement and the data code and its complement are represented by what level combination Binary digits 0 and 1, the system code in the infrared control code and its complement and the actual level state of the data code and its complement, using the signal of the known waveform as the carrier frequency of the carrier signal, can completely grasp the infrared signal.
  • Learning infrared remote control is a general-purpose infrared remote control. After learning the original remote control, the learning remote control has the infrared remote control function of the original remote control. In layman's terms, the learning remote is equivalent to a key blank that can be copied to any shape of key.
  • the former needs to collect a large number of infrared signals of the existing infrared remote controller in advance, and save the format of each infrared signal.
  • learning the infrared signal of an infrared remote controller it searches for the corresponding format from the saved infrared signal for decoding.
  • the disadvantage is that only the infrared signals that have been collected beforehand can be learned.
  • the latter does not need to pre-collect the format of the infrared signal, which is When learning the infrared signal of an infrared remote controller, the infrared signal is completely copied, and then the format is determined and saved.
  • the advantage is that you can learn any infrared remote control, but the processing power of the hardware is high.
  • the infrared learning type remote controller learns the infrared signal in the waveform copy mode
  • the carrier is directly filtered out, and only the infrared control code is learned, so that the carrier frequency cannot be known.
  • the technical problem to be solved by the present application is to provide a method for learning an infrared signal by an infrared remote controller, which belongs to a waveform copy mode, and can learn both an infrared control code and a carrier frequency.
  • the method for learning the infrared signal of the present application includes the following steps:
  • the infrared transceiver module receives the infrared signal in the environment, and outputs the received infrared signal to the processor;
  • the processor learns the level state of the infrared control code and the carrier frequency by learning from the received infrared signal.
  • Another method for learning an infrared signal of the present application includes the following steps:
  • the infrared transceiver module receives the infrared signal in the environment, and outputs the received infrared signal to the processor and the carrier filter module;
  • the processor obtains the carrier frequency by learning from the received infrared signal
  • the carrier filtering module converts the received infrared signal into an infrared control code and outputs the same to the processor
  • step 4 the processor learns the level state from the infrared control code converted by the carrier filter module
  • the present application provides two different methods for learning infrared signals, which are respectively suitable for learning an infrared control code from a received infrared signal by software, and converting an infrared control code from a received infrared signal by a hardware circuit. happening.
  • the application can simultaneously obtain two parameters of the infrared control code and the carrier frequency, and is particularly suitable for learning the infrared remote controller of the learning type.
  • 1 is a schematic diagram of conversion of a remote control command and an infrared control code, and modulation of an infrared control code to a carrier signal;
  • FIG. 2 is a schematic diagram showing the main structure of a learning type remote controller
  • FIG. 3 is a flow chart of a first embodiment of a method for learning an infrared signal of the present application
  • FIG. 4 is a schematic diagram of a first step signal of a first embodiment of a method for learning an infrared signal according to the present application
  • FIG. 5 is a schematic diagram of a first implementation manner of the second step of the first embodiment of the method for learning an infrared signal according to the present application;
  • FIG. 6 is a schematic diagram of a second implementation manner of the second step of the first embodiment of the method for learning an infrared signal according to the present application;
  • FIG. 7 is a schematic diagram of the main structure of another learning type remote controller
  • FIG. 8 is a flow chart of a second embodiment of a method for learning an infrared signal according to the present application.
  • FIG. 9 is a schematic diagram of a first implementation manner of the fourth step of the second embodiment of the method for learning an infrared signal according to the present application.
  • FIG. 10 is a schematic diagram of a second implementation manner of the fourth step of the second embodiment of the method for learning the infrared signal of the present application;
  • 11 is a schematic diagram showing slight differences between the infrared control code learned by the present application and the original infrared control code;
  • FIG. 12 is a flow chart of shaping the learned infrared control code according to the present application.
  • 10 is an infrared transceiver module
  • 20 is a processor
  • 30 is a carrier filter module.
  • Figure 2 is a learning infrared remote control, including:
  • the infrared transceiver module 10 receives the infrared signal in the environment and outputs the received infrared signal to the processor 20.
  • the processor 20 learns the level state and carrier frequency of the infrared control code by learning from the received infrared signal.
  • This learning type remote control can be implemented by an intelligent electronic device such as a mobile phone.
  • the infrared transceiver module 10 can be integrated into the intelligent electronic device, and the processor 20 can be concurrently occupied by the CPU of the intelligent electronic device.
  • the learning method of the infrared signal by the learning type infrared remote controller includes the following steps:
  • the infrared transceiver module 10 receives the infrared signal in the environment. Outside Carry Pulse In, and outputting the received infrared signal Carry Pulse In to the processor 20.
  • the infrared transceiver module 10 uses, for example, the TSMP77000 infrared receiving sensor of Vishay.
  • the infrared signal in the environment is not detected (ie, the infrared signal in the environment is always low), it always outputs a high level.
  • the received infrared signal of the output is inverted from the infrared signal in the environment. Therefore, the output (infrared signal after reception) of the infrared transceiver module 10 of this model is inverted with the input (infrared signal in the environment) as a whole. If other types of infrared transceiver modules 10 are used, the received infrared signals and the infrared signals in the environment may be in phase as a whole.
  • Step 2 the processor 20 receives the infrared signal from the Carry Pulse
  • the level state of the infrared control code and the carrier frequency are obtained by learning in In.
  • this is the first implementation of the second step of the above method, taking the infrared signal after receiving and the infrared signal in the environment as an example.
  • the processor 20 detects the first falling edge of the received infrared signal, the timer is started until the immediately rising rising edge stops, and the timing value t1 is recorded.
  • the processor 20 immediately clears the timer and stops timing again while the timer is stopped, until the immediately adjacent falling edge stops timing, and the timer value t2 is recorded.
  • the processor 20 records t3, t4, ....
  • the timer may be a timer internal to the processor 20 or a timer of a peripheral.
  • the carrier signal used for infrared remote control has a frequency within a certain range. Assuming that the duty cycle of the carrier square wave signal is R, the lowest value of the carrier frequency is X, and the highest value is Y, the value of the upper limit time S is S>(1-R)/X. Usually, the value of R is between 10% and 50%, so the value of the upper limit time S is, for example, 1/X.
  • the processor 20 adds t1 from t1 to t(n-1) and additionally adds t(n-2) as the total time T1 of the carrier square wave signal in the received infrared signal, which represents a high true infrared control code. The total time of the level (modulated by the carrier square wave signal in pulse amplitude modulation). The processor 20 also subtracts t(n-2) from the timing value t(n) as the total time T2 of the low level in the received infrared signal, which represents a low level of the true infrared control code (pulse amplitude modulation) The total time in the no-carrier square wave signal modulation).
  • t(n-2) represents a high-level portion of a carrier square wave signal falling within the t(n) interval, and may be replaced by t2, t4, ... or its average value.
  • the processor 20 learns the level state of the infrared control code by recording the high and low sequence and duration of the true infrared control code.
  • t1+t2 and t3+t4 may be roughly equal and have slight differences.
  • the carrier frequency f (n-2)/2/ ⁇ (t1+t2)+...+[t(n-3)+t(n-2)] ⁇ .
  • n must be an even number.
  • this is the second implementation manner of the second step of the above method, and the infrared signal after receiving is inverted with the infrared signal in the environment as an example.
  • the first timer is started when the processor 20 detects the first falling edge of the received infrared signal.
  • the second timer is started until the immediately falling edge stops the timing of the second timer, and the timing value t2 is recorded.
  • the processor 20 then clears the second timer and starts the second timer timing again upon detection of the next rising edge until the immediately following falling edge stops counting and records the timing value t4.
  • the processor 20 records t6, t8, ....
  • the processor 20 has timed the second timer t(n), the upper limit time S has been reached but the immediately adjacent falling edge has not been detected, that is, t(n) ⁇ S, indicating the square wave of the received infrared signal.
  • the signal has ended, which indicates that the high level of the corresponding infrared control code has ended.
  • the second timer continues t(n) timing until the immediately falling edge, the processor 20 simultaneously stops the first timer and the second timer, and the first timer records the timing value T, the second timing.
  • the timer value t(n) is recorded.
  • the two timers can be timers internal to processor 20 or timers of peripherals.
  • the carrier signal used for infrared remote control has a frequency within a certain range.
  • the value of the upper limit time S is S>(1-R)/X.
  • the value of R is between 10% and 50%, so the value of the upper limit time S is, for example, 1/X.
  • the processor 20 takes Tt(n)+t(n-2) as the total time of the carrier square wave signal in the received infrared signal, which represents a high level of the true infrared control code (the carrier side in the pulse amplitude modulation) The total time T1 of the wave signal modulation).
  • the processor 20 also uses t(n)-t(n-2) as the total time of the low level in the received infrared signal, which represents a low level of the true infrared control code (no carrier in the pulse amplitude modulation) The total time of the wave signal modulation).
  • t(n-2) represents a high-level portion of a carrier square wave signal falling within the t(n) interval, and may be replaced by t2, t4, ... or its average value.
  • the processor 20 learns the level state of the infrared control code by recording the high and low sequence and duration of the true infrared control code.
  • the total time T1 of the carrier square wave signal in the received infrared signal includes n/2 carrier square wave signals, so the period of each square wave signal is 2 ⁇ T1/n, and the reciprocal is the carrier side.
  • the two implementations of the second step of the above method shown in FIG. 5 and FIG. 6 are both taking the inverted infrared signal and the infrared signal in the environment as an example. Therefore, the infrared light is recognized according to the received infrared signal.
  • the control code is also inverted and is the real infrared control code. If the received infrared signal is in phase with the infrared signal in the environment, it is obvious that the principle is common, and only the rising edge and the falling edge of the received infrared signal at the start and end points of various timings need to be interchanged. At this time, the true infrared control code is recognized based on the received infrared signal.
  • the first embodiment of the method for learning the infrared signal shown in FIG. 3 completely learns the level state and carrier frequency of the infrared control code from the received infrared signal in a purely software manner by the processor 20, which performs the operation on the processor 20.
  • the ability puts higher demands.
  • the processor 20 needs to continuously monitor the rising and falling edges to start or stop the timer.
  • the processor 20 usually needs to process multiple tasks at the same time, and may interrupt the monitoring process within 500 ms, for example, responding to the system clock, etc., which easily interferes with the learning of the infrared signal and imposes a heavier burden on the processor 20.
  • FIG. It includes:
  • the infrared transceiver module 10 receives the infrared signal in the environment and outputs the received infrared signal to the processor 20 and the carrier filter module 30.
  • the processor 20 learns the carrier frequency from the received infrared signal and learns its level state from the infrared control code.
  • the carrier filtering module 30 converts the received infrared signal into an infrared control code and outputs it to the processor 20.
  • the learning type infrared remote controller wherein the infrared transceiver circuit is equivalent to the infrared transceiver module 10 in the present application, wherein the sum of the carrier smoothing circuit and the signal identification circuit is equivalent to the carrier filter module 30 in the present application.
  • This learning remote can also be implemented by intelligent electronic devices such as mobile phones.
  • the infrared transceiver module 10 and the carrier filter module 30 can be integrated into the smart electronic device, and the processor 20 can be served by the CPU of the smart electronic device.
  • the learning method of the infrared signal by the learning type infrared remote controller includes the following steps:
  • the infrared transceiver module 10 receives the infrared signal in the environment. Outside Carry Pulse In, and outputting the received infrared signal Carry Pulse In to the processor 20 and the carrier filter module 30.
  • the infrared transceiver module 10 uses, for example, the TSMP77000 infrared receiving sensor of Vishay.
  • the infrared signal in the environment is not detected (ie, the infrared signal in the environment is always low), it always outputs a high level.
  • the received infrared signal of the output is inverted from the infrared signal in the environment. Therefore, the output (infrared signal after reception) of the infrared transceiver module 10 of this model is inverted with the input (infrared signal in the environment) as a whole. If other types of infrared transceiver modules 10 are used, the received infrared signals and the infrared signals in the environment may be in phase as a whole.
  • the processor 20 learns the carrier frequency from the received infrared signal Carry Pulse In.
  • the infrared signal after receiving is inverted from the infrared signal in the environment as an example.
  • the processor 20 detects the first falling edge of the received infrared signal, the timer is started until the immediately rising rising edge stops, and the timing value t1 is recorded.
  • the processor 20 immediately clears the timer and stops timing again while the timer is stopped, until the immediately adjacent falling edge stops timing, and the timer value t2 is recorded.
  • multiple timings can be performed in the same way, and the carrier frequency is obtained by averaging.
  • step 3 the carrier filtering module 30 converts the received infrared signal into an infrared control code and outputs it to the processor 20.
  • FIG. 7 discloses a carrier filter module 30 implemented by a hardware circuit, which can read a carrier frequency signal (ie, an infrared signal after receiving). Pulse In converts to Pulse which characterizes the presence or absence of infrared remote control signals The In signal (ie, the converted infrared control code) is output. The converted infrared control code is inversely integrated with the true infrared control code as a whole.
  • a carrier frequency signal ie, an infrared signal after receiving
  • Pulse In converts to Pulse which characterizes the presence or absence of infrared remote control signals
  • the In signal ie, the converted infrared control code
  • the converted infrared control code is inversely integrated with the true infrared control code as a whole.
  • the processor 20 learns its level state from the infrared control code converted by the carrier filter module 30.
  • this is the first implementation of the fourth step of the above method, taking the inverted infrared control code and the real infrared control code as an example.
  • the processor 20 detects the first falling edge of the converted infrared control code, the timer is started until the immediately rising rising edge stops, and the timing value T1 is recorded.
  • the processor 20 immediately clears the timer and stops timing again while the timer is stopped, until the immediately adjacent falling edge stops timing, and the timer value T2 is recorded.
  • the processor 20 records T3, T4, ....
  • the timer may be a timer internal to the processor 20 or a timer of a peripheral.
  • T1, T3, ... are the time of each high level of the real infrared control code, T2, T4, ... is the time of each low level of the real infrared control code.
  • the processor 20 learns the level state of the infrared control code by recording the high and low sequence and duration of the true infrared control code.
  • FIG. 10 is the second implementation manner of the fourth step of the above method, and still takes the reversed infrared control code and the real infrared control code as an example.
  • the timer is started when the processor 20 detects the first falling edge of the converted infrared control code, and then does not stop timing whenever the processor 20 detects a rising or falling edge, but both record the current timing value T1. , T2, ....
  • the processor 20 subtracts the two adjacent timing values T(k-1), T(k) from the latter T(k) by the former T(k-1) to obtain the true infrared control code.
  • the duration of high and low levels The processor 20 learns the level state of the infrared control code by recording the high and low sequence and duration of the true infrared control code.
  • the two implementations of the fourth step of the above method shown in FIG. 9 and FIG. 10 are both taking the reverse of the converted infrared control code and the real infrared control code. If other types of carrier filtering modules 30 are used, the converted infrared control code and the true infrared control code may also be in phase. In this case, it is obvious that the principle of learning the level state is common, and only the starting and ending points of various timings need to be used. The rising edge and the falling edge of the converted infrared control code at the place can be interchanged.
  • the second embodiment of the method of learning the infrared signal shown in FIG. 8 increases the cost and complexity of the design due to the addition of the carrier filter module 30.
  • the newly added carrier filtering module 30 realizes the work of converting the received infrared signal into an infrared control code through a hardware circuit, so that the processor 20 only needs to learn the carrier frequency from the received infrared signal, thereby greatly reducing the processing.
  • the burden on the device 20 is such that its computing power requirements are reduced.
  • FIG. 3 and FIG. 8 show two embodiments of the method for learning the infrared signal of the present application, which are processed by software processing or hardware circuits to learn infrared control codes (except for inversion and in-phase problems) and original infrared control codes. There will inevitably be subtle differences between them, as shown in Figure 11. This is caused by the error of the infrared signal transmitting circuit, the interference encountered by the infrared signal in the environment, and the interference introduced by the infrared signal in the receiving sensor.
  • the processor 20 in the second step of the first embodiment of the method for learning the infrared signal of the present application, in the fourth step of the second embodiment, preferably, the processor 20 first performs the learned (or converted) infrared control code. Shape, and then learn its level state.
  • the applicant found that the difference between the high level and the low level of the infrared control codes of different formats is more than 50%, so this application is A tolerance coefficient is set for both the high level and the low level, and the preferred range is 5% to 20%.
  • the difference between the widths of different high levels and different low levels in the same infrared control code learned is within the tolerance coefficient range, it is normalized to a standard width of a high level and a low level, the standard The width is obtained by averaging a plurality of high levels and low levels having a width difference within the tolerance coefficient range.
  • the method for shaping the learned infrared control code is as follows:
  • the processor 20 reads the width of the first high level of the learned infrared control code and the width of the immediately adjacent low level, and records the first signal type;
  • Step 2 the processor 20 sequentially reads the width of the next high level of the learned infrared control code and the width of the immediately adjacent low level;
  • the difference between the width of the high level and the width of the high level of any signal type recorded is within a certain range, and the width of the low level immediately after the level and the width of the low level of the same signal type The difference is also within a certain range, then the high level and the immediately adjacent low level are classified as the signal type; at the same time, the high level value and the low level value of the signal type are respectively changed to all in the signal type.
  • the average of the high level and the low level of the signal; the average value includes an arithmetic mean, a weighted arithmetic mean, and the like.
  • step 3 repeat step 2 until the last level of the learned infrared control code is read.
  • All the signal types obtained by the above method correspond to The pilot code, system code and its complement and the data code and its complement 0, 1, synchronization code, etc. in the infrared control code.
  • Step 4 The processor will replace each of the learned infrared control codes (a combination of a high level and the immediately adjacent low level) with a combination of a high value and a low value of a recorded signal type. Finally, the infrared control code learned will be normalized.
  • infrared signals modulated signals
  • many infrared signals repeatedly transmit infrared control codes representing the same remote control command, which is generally dictated by the corresponding infrared remote control protocol.
  • de-weight the learned infrared control code it is preferable to de-weight the learned infrared control code, and then learn its level state and store it in the memory.
  • the deduplication may use an existing KMP matching algorithm or the like.
  • the present application provides a method for obtaining an infrared control code and a carrier frequency from an infrared signal in an environment, and is particularly suitable for learning an infrared signal transmitted by an existing infrared remote controller by a learning infrared remote controller.

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • General Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Selective Calling Equipment (AREA)
  • Optical Communication System (AREA)
  • Digital Transmission Methods That Use Modulated Carrier Waves (AREA)

Abstract

一种红外信号的学习方法:第1步,红外收发模块(10)接收环境中的红外信号,并向处理器(20)输出接收后的红外信号;第2步,处理器(20)从接收后的红外信号中通过学习得到红外控制码的电平状态、以及载波频率。或者为:第1步,红外收发模块(10)接收环境中的红外信号,并向处理器(20)和载波过滤模块(30)输出接收后的红外信号;第2步,处理器(20)从接收后的红外信号中通过学习得到载波频率;第3步,载波过滤模块(30)将接收后的红外信号转换为红外控制码,并输出给处理器(20);第4步,处理器(20)从载波过滤模块(30)转换的红外控制码中学习其电平状态;所述方法第2步和第3步的顺序可以互换。

Description

红外信号的学习方法 技术领域
本申请涉及一种学习型红外遥控器对红外信号的学习方法。
背景技术
红外遥控器(IR Remote Control)是利用波长为0.76~1.5μm之间的红外信号来传送控制信号的遥控设备, 在工业控制、家电领域的应用广泛 。所述红外信号由电信号转换而来,例如以红外光的有、无分别表示电信号的高、低电平。而所述电信号(即所述控制信号)是红外控制码调制到载波上所形成的调制信号。
红外控制码通常包括:引导码、系统码、数据码、系统码补码、数据码补码、同步码等。其中,系统码及其补码、数据码及其补码通常用于表示遥控指令。请参阅图1,遥控指令为一串二进制数字,红外控制码以高、低电平的组合来表示遥控指令。例如NEC协议格式定义:红外控制码中一个持续时间为0.5625ms的高电平与一个持续时间为0.5625ms的低电平的组合表示二进制数字0,一个持续时间为0.5625ms的高电平与一个持续时间为1.6875ms的低电平的组合表示二进制数字1。 载波信号为方波信号。以脉冲调幅(PAM)方式将红外遥控码调制到载波上形成的调制信号就是所述控制信号。脉冲调幅是指:红外控制码中的高、低电平分别以调制信号中的载波方波信号、低电平来表示。
一旦得知红外信号的以下四个特征:红外控制码中的引导码和同步码的电平格式、红外控制码中的系统码及其补码和数据码及其补码用什么电平组合表示二进制数字0和1、红外控制码中的系统码及其补码和数据码及其补码的实际电平状态、以已知波形的信号作为载波信号的载波频率,就可以完整地掌握该红外信号。
学习型红外遥控器(Self-Learning IR Remote Control)是一种通用的红外遥控器,在对原遥控器进行学习以后,学习型遥控器就具有原遥控器的红外遥控功能。通俗地说,学习型遥控器相当于钥匙坯子,可以对任意形状的钥匙进行复制。
学习型红外遥控器 分为两类:固定码格式学习的和波形拷贝方式学习的。前者需要预先收集大量已有的红外遥控器的红外信号,并保存每一种红外信号的格式。在对某一种红外遥控器的红外信号学习时,就从已保存的红外信号中寻找相应的格式进行解码。 其缺点是只能对事先已收集的红外信号进行学习。后者无须预先收集红外信号的格式,其在 对某一种红外遥控器的红外信号学习时,将红外信号完全拷贝,然后自行判定其格式并保存。其优点 是可以学习任意的红外遥控器,但对硬件的处理能力要求较高。
现有的红外学习型遥控器在以波形拷贝方式学习红外信号时,直接过滤掉其中的载波,仅学习红外控制码,因而无法得知载波频率。这就导致学习型红外遥控器在发射所学习的红外信号时,还需要通过辅助手段增加频率准确的载波,并将所学习的红外控制码调制到载波上形成调制信号。
技术问题
本申请所要解决的技术问题是提供一种红外遥控器对红外信号的学习方法,该方法属于波形拷贝方式,既能学习红外控制码,也能学习载波频率。
技术解决方案
为解决上述技术问题,本申请红外信号的学习方法包括如下步骤:
第1步,红外收发模块接收环境中的红外信号,并向处理器输出接收后的红外信号;
第2步,处理器从接收后的红外信号中通过学习得到红外控制码的电平状态、以及载波频率。
本申请另一种红外信号的学习方法包括如下步骤:
第1步,红外收发模块接收环境中的红外信号,并向处理器和载波过滤模块输出接收后的红外信号;
第2步,处理器从接收后的红外信号中通过学习得到载波频率;
第3步,载波过滤模块将接收后的红外信号转换为红外控制码,并输出给处理器;
第4步,处理器从载波过滤模块转换的红外控制码中学习其电平状态;
上述方法第2步和第3步的顺序可以互换。
有益效果
本申请给出了两种不同的红外信号的学习方法,分别适用于以软件方式从接收后的红外信号中学习到红外控制码、以硬件电路从接收后的红外信号中转换出红外控制码的情况。本申请可以同时得到红外控制码与载波频率两项参数,特别适用于学习型红外遥控器对已有的红外遥控器进行学习。
附图说明
图1是遥控指令与红外控制码的转换、以及红外控制码调制到载波信号的示意图;
图2是一种学习型遥控器的主要结构示意图;
图3是本申请红外信号的学习方法的第一实施例的流程图;
图4是本申请红外信号的学习方法的第一实施例的第1步信号示意图;
图5是本申请红外信号的学习方法的第一实施例的第2步第一种实现方式示意图;
图6是本申请红外信号的学习方法的第一实施例的第2步第二种实现方式示意图;
图7是另一种学习型遥控器的主要结构示意图;
图8是本申请红外信号的学习方法的第二实施例的流程图;
图9是本申请红外信号的学习方法的第二实施例的第4步第一种实现方式示意图;
图10是本申请红外信号的学习方法的第二实施例的第4步第二种实现方式示意图;
图11是本申请所学习到的红外控制码与原始的红外控制码存在细微差异的示意图;
图12是本申请对所学习到的红外控制码进行整形的流程图。
图中附图标记说明: 10为红外收发模块;20为处理器;30为载波过滤模块。
本发明的实施方式
请参阅图2,这是一种学习型红外遥控器,包括:
——红外收发模块10,接收环境中的红外信号,并向处理器20输出接收后的红外信号。
——处理器20,从接收后的红外信号中通过学习得到红外控制码的电平状态和载波频率。
这种学习型遥控器可由智能电子设备(如手机)来实现。红外收发模块10可集成到智能电子设备中,处理器20则可由智能电子设备的CPU兼任。
请参阅图3,上述学习型红外遥控器对红外信号的学习方法包括如下步骤:
第1步,红外收发模块10接收环境中的红外信号Outside Carry Pulse In,并向处理器20输出接收后的红外信号Carry Pulse In。
请参阅图4,所述红外收发模块10例如采用Vishay公司的TSMP77000红外接收传感器。当没有检测到环境中的红外信号(即环境中的红外信号始终为低电平)时,其始终输出高电平。当检测到了环境中的红外信号,其输出的接收后的红外信号与环境中的红外信号反相。因此,该型号的红外收发模块10的输出(接收后的红外信号)与输入(环境中的红外信号)整体而言是反相的。如果采用其他型号的红外收发模块10,则接收后的红外信号与环境中的红外信号就整体而言也可能同相。
第2步,处理器20从接收后的红外信号Carry Pulse In中通过学习得到红外控制码的电平状态、以及载波频率。
请参阅图5,这是上述方法第2步的第一种实现方式,以接收后的红外信号与环境中的红外信号反相为例。当处理器20检测到接收后的红外信号的第一个下降沿时启动定时器计时,直至紧邻的上升沿才停止计时,并记录计时值t1。处理器20在停止计时的同时立即清零定时器并再次开始计时,直至紧邻的下降沿才停止计时,并记录计时值t2。以此类推,处理器20记录t3、t4、……。直至处理器20在第n次开始计时后达到上限时间S后仍未检测到紧邻的下降沿,即出现t(n)≥S,则表明接收后的红外信号中的载波方波信号已经结束,这表示对应的红外控制码的高电平已经结束。所述定时器可以是处理器20内部的定时器,或者是外设的定时器。用于红外遥控的载波信号,其频率在一定范围内。假设载波方波信号的占空比为R,载波频率的最低值为X,最高值为Y,则上限时间S的取值为S>(1-R)/X。通常R的取值在10%~50%之间,因此上限时间S的取值例如为1/X。
处理器20从t1累加到t(n-1)再额外加一遍t(n-2)作为接收后的红外信号中的载波方波信号的总时间T1,这表示真正的红外控制码的一个高电平(脉冲调幅中由载波方波信号调制)的总时间。处理器20还将计时值t(n)减去t(n-2)作为接收后的红外信号中的低电平的总时间T2,这表示真正的红外控制码的一个低电平(脉冲调幅中无载波方波信号调制)的总时间。t(n-2)表示落在t(n)区间的一个载波方波信号的高电平部分,也可由t2、t4、……或其平均值代替。处理器20通过记录真正的红外控制码的高、低电平顺序及持续时间,即学习了红外控制码的电平状态。
理论上t1+t2=t3+t4=……,这就是载波方波信号的周期,因此其倒数就是载波方波信号的频率f=1/(t1+t2)=1/(t3+t4)=……。但在实际环境下,t1+t2与t3+t4可能只是大致相等而具有细微差异。此时计算多个载波频率取平均值即可,即载波频率f=(n-2)/2/{(t1+t2)+…+[t(n-3)+t(n-2)]}。此处的n必定为偶数。
请参阅图6,这是上述方法第2步的第二种实现方式,仍以接收后的红外信号与环境中的红外信号反相为例。当处理器20检测到接收后的红外信号的第一个下降沿时启动第一定时器计时。当处理器20检测到接收后的红外信号的第一个上升沿时启动第二定时器计时,直至紧邻的下降沿才停止第二定时器的计时,并记录计时值t2。随后处理器20清零第二定时器,并在检测到下一个上升沿时再次启动第二定时器计时,直至紧邻的下降沿才停止计时,并记录计时值t4。以此类推,处理器20记录t6、t8、……。直至处理器20在使第二定时器t(n)计时时,已达到上限时间S但仍未检测到紧邻的下降沿,即t(n)≥S,则表明接收后的红外信号的方波信号已经结束,这表示对应的红外控制码的高电平已经结束。此时第二定时器对t(n)计时仍继续,直至紧邻的下降沿,处理器20同时使第一定时器和第二定时器停止计时,第一定时器记录计时值T,第二定时器记录计时值t(n)。两个定时器可以是处理器20内部的定时器,或者是外设的定时器。用于红外遥控的载波信号,其频率在一定范围内。假设载波方波信号的占空比为R,载波频率的最低值为X,最高值为Y,则上限时间S的取值为S>(1-R)/X。通常R的取值在10%~50%之间,因此上限时间S的取值例如为1/X。
处理器20以T-t(n)+t(n-2)作为接收后的红外信号中的载波方波信号的总时间,这表示真正的红外控制码的一个高电平(脉冲调幅中由载波方波信号调制)的总时间T1。处理器20还将t(n)-t(n-2)作为接收后的红外信号中的低电平的总时间,这表示真正的红外控制码的一个低电平(脉冲调幅中无载波方波信号调制)的总时间。t(n-2)表示落在t(n)区间的一个载波方波信号的高电平部分,也可由t2、t4、……或其平均值代替。处理器20通过记录真正的红外控制码的高、低电平顺序及持续时间,即学习了红外控制码的电平状态。
在接收后的红外信号中的载波方波信号的总时间T1中包含了n/2个载波方波信号,因此每个方波信号的周期为2×T1/n,对其取倒数就是载波方波信号的频率f=n/(2×T1)。
图5、图6所示的上述方法第2步的二种实现方式,都是以接收后的红外信号与环境中的红外信号反相为例,因此根据接收后的红外信号所识别出的红外控制码还要经过反相后才是真正的红外控制码。如果接收后的红外信号与环境中的红外信号同相,显然原理是共通的,只需要将各种计时的起点和终点处的接收后的红外信号的上升沿与下降沿互换即可。此时,根据接收后的红外信号所识别出的就是真正的红外控制码。
图3所示的红外信号的学习方法的第一实施例完全由处理器20以纯软件的方式从接收后的红外信号中学习红外控制码的电平状态和载波频率,这对处理器20的运算能力提出了较高要求。当接收后的红外信号较长,例如500ms时,处理器20需要持续监控其中的上升沿和下降沿以启动或停止计时器。处理器20通常要同时处理多项任务,可能在500ms内被打断监控过程,例如要响应系统时钟等,这样容易对红外信号的学习造成干扰,同时给处理器20带来较重的负担。
为了减轻处理器20的负担,也可采用另一种学习型红外遥控器,如图7所示。其包括:
——红外收发模块10,接收环境中的红外信号,并向处理器20和载波过滤模块30输出接收后的红外信号。
——处理器20,从接收后的红外信号中通过学习得到载波频率,还从红外控制码中学习其电平状态。
——载波过滤模块30,将接收后的红外信号转换为红外控制码,并输出给处理器20。
申请号为201320389091.3、申请日为2013年7月2日的中国实用新型专利申请;以及申请号为201320441531.5、申请日为2013年7月23日的中国实用新型专利申请就公开了图7所示的学习型红外遥控器,其中的红外收发电路相当于本申请中的红外收发模块10,其中的载波平滑电路与信号识别电路的总和相当于本申请中的载波过滤模块30。
这种学习型遥控器也可由智能电子设备(如手机)来实现。红外收发模块10、载波过滤模块30可集成到智能电子设备中,处理器20可由智能电子设备的CPU担任。
请参阅图8,上述学习型红外遥控器对红外信号的学习方法包括如下步骤:
第1步,红外收发模块10接收环境中的红外信号Outside Carry Pulse In,并向处理器20和载波过滤模块30输出接收后的红外信号Carry Pulse In。
请参阅图4,所述红外收发模块10例如采用Vishay公司的TSMP77000红外接收传感器。当没有检测到环境中的红外信号(即环境中的红外信号始终为低电平)时,其始终输出高电平。当检测到了环境中的红外信号,其输出的接收后的红外信号与环境中的红外信号反相。因此,该型号的红外收发模块10的输出(接收后的红外信号)与输入(环境中的红外信号)整体而言是反相的。如果采用其他型号的红外收发模块10,则接收后的红外信号与环境中的红外信号就整体而言也可能同相。
第2步,处理器20从接收后的红外信号Carry Pulse In中通过学习得到载波频率。
请参阅图5,仍以接收后的红外信号与环境中的红外信号反相为例。当处理器20检测到接收后的红外信号的第一个下降沿时启动定时器计时,直至紧邻的上升沿才停止计时,并记录计时值t1。处理器20在停止计时的同时立即清零定时器并再次开始计时,直至紧邻的下降沿才停止计时,并记录计时值t2。当t1、t2均小于上限时间S时,t1+t2就是载波方波信号的周期,因此其倒数就是载波方波信号的频率f=1/(t1+t2)。为确保准确,还可以同样方式进行多次计时,并以求平均值的方式得到载波频率。
第3步,载波过滤模块30将接收后的红外信号转换为红外控制码,并输出给处理器20。
申请号为201320389091.3、申请日为2013年7月2日的中国实用新型专利申请的图1;以及申请号为201320441531.5、申请日为2013年7月23日的中国实用新型专利申请的图1、图6、图7就公开了一种以硬件电路实现的载波过滤模块30,其可将载波频率读取信号(即接收后的红外信号)Carry Pulse In转换为表征红外遥控信号有无的Pulse In信号(即转换后的红外控制码)输出。该转换后的红外控制码与真正的红外控制码就整体而言是反相的。
上述方法第2步和第3步的顺序可以互换。
第4步,处理器20从载波过滤模块30转换的红外控制码中学习其电平状态。
请参阅图9,这是上述方法第4步的第一种实现方式,以转换后的红外控制码与真正的红外控制码反相为例。当处理器20检测到转换后的红外控制码的第一个下降沿时启动定时器计时,直至紧邻的上升沿才停止计时,并记录计时值T1。处理器20在停止计时的同时立即清零定时器并再次开始计时,直至紧邻的下降沿才停止计时,并记录计时值T2。以此类推,处理器20记录T3、T4、……。所述定时器可以是处理器20内部的定时器,或者是外设的定时器。T1、T3、……就是真正的红外控制码的每个高电平的时间,T2、T4、……就是真正的红外控制码的每个低电平的时间。处理器20通过记录真正的红外控制码的高、低电平顺序及持续时间,即学习了红外控制码的电平状态。
请参阅图10,这是上述方法第4步的第二种实现方式,仍以转换后的红外控制码与真正的红外控制码反相为例。当处理器20检测到转换后的红外控制码的第一个下降沿时启动定时器计时,随后每当处理器20检测到上升沿或下降沿时不停止计时,但均记录当时的计时值T1、T2、……。处理器20将相邻的两个计时值T(k-1)、T(k)的靠后者T(k)减去靠前者T(k-1)即得到真正的红外控制码的各个高、低电平的持续时间。处理器20通过记录真正的红外控制码的高、低电平顺序及持续时间,即学习了红外控制码的电平状态。
图9、图10所示的上述方法第4步的二种实现方式,都是以转换后的红外控制码与真正的红外控制码反相为例。如果采用其他类型的载波过滤模块30,则转换后的红外控制码与真正的红外控制码也可能同相,此时学习其电平状态显然原理是共通的,只需要将各种计时的起点和终点处的转换后的红外控制码的上升沿与下降沿互换即可。
图8所示的红外信号的学习方法的第二实施例由于增加了载波过滤模块30,因而使得成本增加、设计复杂。但新增的载波过滤模块30通过硬件电路实现了将接收后的红外信号转换为红外控制码的工作,这使得处理器20只需要从接收后的红外信号中学习载波频率,因而大大减轻了处理器20的负担,从而对其计算能力的要求降低。
图3和图8给出了本申请红外信号的学习方法的两个实施例,其经过软件处理或硬件电路所学习到的红外控制码(除了反相、同相问题以外)与原始的红外控制码之间不可避免地会存在细微差异,如图11所示。这是由于红外信号发射电路的误差、红外信号在环境中传播遇到的干扰、红外信号在接收传感器中引入的干扰等造成的。为此,本申请红外信号的学习方法的第一实施例的第2步中、第二实施例的第4步中,优选地处理器20先对所学习(或转换)到的红外控制码进行整形,再学习其电平状态。
通过分析大量现有的红外遥控器的红外控制码的格式,申请人发现不同格式的红外控制码的高电平之间、低电平之间的宽度差异均在50%以上,因此本申请为高电平、低电平均设置一个容忍系数,优选的取值范围为5%~20%。当学习到的同一个红外控制码中的不同高电平、不同低电平的宽度差异在所述容忍系数范围内,则将其规整为高电平、低电平的标准宽度,所述标准宽度由宽度差异在所述容忍系数范围内的多个高电平、低电平取平均值而得。
请参阅图12,上述对学习到的红外控制码进行整形的方法为:
第1步,处理器20读取学习到的红外控制码的第一个高电平的宽度和紧邻的低电平的宽度,并记录为第一信号种类;
第2步,随后,处理器20依次读取学习到的红外控制码的下一个高电平的宽度和紧邻的低电平的宽度;
当该高电平的宽度与已记录的任何信号种类的高电平的宽度的差异在一定范围内,且该电平之后紧邻的低电平的宽度与该同一信号种类的低电平的宽度的差异也在一定范围内,则将该高电平与紧邻的低电平归类为该信号种类;同时将该信号种类的高电平值、低电平值分别改为该信号种类中所有信号的高电平、低电平的平均值;所述平均值包括算术平均数、加权算术平均数等。
否则,将该高电平与紧邻的低电平记录为新的信号种类;
第3步,重复第2步直至读取到学习到的红外控制码的最后一个电平。
通过上述方法得到的所有信号种类就对应于 红外控制码中的引导码、系统码及其补码和数据码及其补码的0、1、同步码等。
第4步, 处理器将学习到的红外控制码中的每一个信号(一个高电平与紧邻的低电平的组合)都以已记录的一个信号种类的高电平值与低电平值的组合来替代,最终将学习到的红外控制码进行规整化。
通过分析大量现有的红外遥控器的红外信号(调制信号),申请人还发现许多红外信号会重复发送代表同一个遥控指令的红外控制码,这通常是相应地红外遥控协议所规定的。为了减少学习型遥控器的存储量,优选地可以对所学习到的红外控制码进行去重,然后再学习其电平状态并保存在存储器中。所述去重可以采用现有的KMP匹配算法等。
以上仅为本申请的优选实施例,并不用于限定本申请。对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。
工业实用性
本申请给出了从环境中的红外信号中通过学习得到红外控制码、载波频率的方法,特别适用于学习型红外遥控器对已有的红外遥控器所发射的红外信号进行学习。

Claims (10)

  1. 一种红外信号的学习方法,其特征是,包括如下步骤:
    第1步,红外收发模块接收环境中的红外信号,并向处理器输出接收后的红外信号;
    第2步,处理器从接收后的红外信号中通过学习得到红外控制码的电平状态、以及载波频率。
  2. 根据权利要求1所述的红外信号的学习方法,其特征是,所述方法第2步中学习红外控制码的电平状态和载波频率采用如下手段:
    在接收后的红外信号与环境中的红外信号反相时,当处理器检测到接收后的红外信号的第一个下降沿时启动定时器计时,直至紧邻的上升沿才停止计时,并记录计时值t1;处理器在停止计时的同时立即清零定时器并再次开始计时,直至紧邻的下降沿才停止计时,并记录计时值t2;以此类推,处理器记录t3、t4、……;直至出现t(n)大于或等于上限时间S,则表明所学习的红外控制码的高电平已经结束;
    在接收后的红外信号与环境中的红外信号同相时,将作为定时器启动、停止的上升沿、下降沿互相调换;
    处理器从t1累加到t(n-1)再额外加一遍t(n-2)作为所学习的红外控制码的一个高电平的总时间;处理器还将计时值t(n)减去t(n-2)作为所学习的红外控制码的一个低电平的总时间;或者,t(n-2)由t2、t4、……或其平均值代替;
    载波频率f=1/(t1+t2)=1/(t3+t4)=……;
    或者,载波频率f=(n-2)/2/{(t1+t2)+…+[t(n-3)+t(n-2)]}。
  3. 根据权利要求1所述的红外信号的学习方法,其特征是,所述方法第2步中学习红外控制码的电平状态和载波频率采用如下手段:
    在接收后的红外信号与环境中的红外信号反相时,当处理器检测到接收后的红外信号的第一个下降沿时启动第一定时器计时;当处理器检测到接收后的红外信号的第一个上升沿时启动第二定时器计时,直至紧邻的下降沿才停止第二定时器的计时,并记录计时值t2;随后处理器清零第二定时器,并在检测到下一个上升沿时再次启动第二定时器计时,直至紧邻的下降沿才停止计时,并记录计时值t4;以此类推,处理器记录t6、t8、……;直至出现t(n)大于或等于上限时间S,则表明所学习的红外控制码的高电平已经结束;在第二定时器t(n)计时停止点的下降沿,处理器使第一定时器同时停止计时,第一定时器记录计时值T;
    在接收后的红外信号与环境中的红外信号同相时,将作为定时器启动、停止的上升沿、下降沿互相调换;
    处理器以T-t(n)+t(n-2)作为所学习的红外控制码的一个高电平的总时间T1;处理器还将t(n)-t(n-2)作为所学习的红外控制码的一个低电平的总时间;或者,t(n-2)由t2、t4、……或其平均值代替;
    载波频率f=n/(2×T1)。
  4. 根据权利要求2或3所述的红外信号的学习方法,其特征是,当载波方波信号的占空比为R,载波频率取值范围的最低值为X、最高值为Y时,上限时间S的取值为S>(1-R)/X。
  5. 根据权利要求1所述的红外信号的学习方法,其特征是,所述方法第2步中,处理器将学习到的红外控制码调整为与原始的红外控制码同相位后,处理器对其先进行整形,再学习其电平状态;
    所述对学习到的红外控制码进行整形的方法为:
    第1步,处理器读取学习到的红外控制码的第一个高电平的宽度和紧邻的低电平的宽度,并记录为第一信号种类;
    第2步,随后,处理器依次读取学习到的红外控制码的下一个高电平的宽度和紧邻的低电平的宽度;
    当该高电平的宽度与已记录的任何信号种类的高电平的宽度的差异在一定范围内,且该电平之后紧邻的低电平的宽度与该同一信号种类的低电平的宽度的差异也在一定范围内,则将该高电平与紧邻的低电平归类为该信号种类;同时将该信号种类的高电平值、低电平值分别改为该信号种类中所有信号的高电平、低电平的平均值;
    否则,将该高电平与紧邻的低电平记录为新的信号种类;
    第3步,重复第2步直至读取到学习到的红外控制码的最后一个电平;
    第4步,处理器将学习到的红外控制码中的每一个信号都以已记录的一个信号种类的高电平值与低电平值的组合来替代。
  6. 一种红外信号的学习方法,其特征是,包括如下步骤:
    第1步,红外收发模块接收环境中的红外信号,并向处理器和载波过滤模块输出接收后的红外信号;
    第2步,处理器从接收后的红外信号中通过学习得到载波频率;
    第3步,载波过滤模块将接收后的红外信号转换为红外控制码,并输出给处理器;
    第4步,处理器从载波过滤模块转换的红外控制码中学习其电平状态;
    或者,所述方法第2步和第3步的顺序互换。
  7. 根据权利要求6所述的红外信号的学习方法,其特征是,所述方法第2步中学习载波频率采用如下手段:
    在接收后的红外信号与环境中的红外信号反相时,当处理器检测到接收后的红外信号的第一个下降沿时启动定时器计时,直至紧邻的上升沿才停止计时,并记录计时值t1;处理器在停止计时的同时立即清零定时器并再次开始计时,直至紧邻的下降沿才停止计时,并记录计时值t2;当t1、t2均小于上限时间S时,载波方频率f=1/(t1+t2);或者,以同样方式进行多次计时,并以求平均值的方式得到载波频率;
    在接收后的红外信号与环境中的红外信号同相时,将作为定时器启动、停止的上升沿、下降沿互相调换。
  8. 根据权利要求6所述的红外信号的学习方法,其特征是,所述方法第4步中学习红外控制码的电平状态采用如下手段:
    在转换后的红外控制码与真正的红外控制码反相时,当处理器检测到转换后的红外控制码的第一个下降沿时启动定时器计时,直至紧邻的上升沿才停止计时,并记录计时值T1;处理器在停止计时的同时立即清零定时器并再次开始计时,直至紧邻的下降沿才停止计时,并记录计时值T2;以此类推,处理器记录T3、T4、……;
    T1 、T3、……就是所学习的红外控制码的每个高电平的时间;
    T2 、T4、……就是所学习的红外控制码的每个低电平的时间;
    在接收后的红外信号与环境中的红外信号同相时,将作为定时器启动、停止的上升沿、下降沿互相调换。
  9. 根据权利要求6所述的红外信号的学习方法,其特征是,所述方法第4步中学习红外控制码的电平状态采用如下手段:
    在转换后的红外控制码与真正的红外控制码反相时,当处理器检测到转换后的红外控制码的第一个下降沿时启动定时器计时,随后每当处理器检测到上升沿或下降沿时不停止计时,但均记录当时的计时值T1、T2、……;处理器将相邻的两个计时值T(k-1)、T(k)的靠后者T(k)减去靠前者T(k-1)即得到所学习的红外控制码的各个高、低电平的持续时间;
    在接收后的红外信号与环境中的红外信号同相时,将作为定时器启动、停止的上升沿、下降沿互相调换。
  10. 根据权利要求6所述的红外信号的学习方法,其特征是,所述方法第4步中,处理器对转换后的红外控制码调整为与原始的红外控制码同相位后,称为学习到的红外控制码;处理器对其先进行整形,再学习其电平状态;
    所述对学习到的红外控制码进行整形的方法为:
    第1步,处理器读取学习到的红外控制码的第一个高电平的宽度和紧邻的低电平的宽度,并记录为第一信号种类;
    第2步,随后,处理器依次读取学习到的红外控制码的下一个高电平的宽度和紧邻的低电平的宽度;
    当该高电平的宽度与已记录的任何信号种类的高电平的宽度的差异在一定范围内,且该电平之后紧邻的低电平的宽度与该同一信号种类的低电平的宽度的差异也在一定范围内,则将该高电平与紧邻的低电平归类为该信号种类;同时将该信号种类的高电平值、低电平值分别改为该信号种类中所有信号的高电平、低电平的平均值;
    否则,将该高电平与紧邻的低电平记录为新的信号种类;
    第3步,重复第2步直至读取到学习到的红外控制码的最后一个电平;
    第4步,处理器将学习到的红外控制码中的每一个信号都以已记录的一个信号种类的高电平值与低电平值的组合来替代。
PCT/CN2014/081378 2013-07-02 2014-07-01 红外信号的学习方法 WO2015000399A1 (zh)

Applications Claiming Priority (6)

Application Number Priority Date Filing Date Title
CN2013203890913U CN203325207U (zh) 2013-07-02 2013-07-02 红外发射和接收电路
CN201320389091.3 2013-07-02
CN201310312245.3 2013-07-23
CN 201320441531 CN203366528U (zh) 2013-07-23 2013-07-23 红外发射和接收电路
CN201320441531.5 2013-07-23
CN201310312245.3A CN103400494B (zh) 2013-07-23 2013-07-23 红外信号的学习方法

Publications (1)

Publication Number Publication Date
WO2015000399A1 true WO2015000399A1 (zh) 2015-01-08

Family

ID=52143101

Family Applications (2)

Application Number Title Priority Date Filing Date
PCT/CN2014/081143 WO2015000391A1 (zh) 2013-07-02 2014-06-30 红外发射和接收电路及其实现方法
PCT/CN2014/081378 WO2015000399A1 (zh) 2013-07-02 2014-07-01 红外信号的学习方法

Family Applications Before (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/081143 WO2015000391A1 (zh) 2013-07-02 2014-06-30 红外发射和接收电路及其实现方法

Country Status (2)

Country Link
US (1) US10043383B2 (zh)
WO (2) WO2015000391A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110930684A (zh) * 2019-12-10 2020-03-27 杭州涂鸦信息技术有限公司 一种支持多编码格式的红外控制方法及系统

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108986444B (zh) * 2017-06-05 2021-06-22 深圳市海洋王照明工程有限公司 一种红外编码的学习方法及其发射设备
CN117498945A (zh) * 2023-12-25 2024-02-02 广东恩威视科技有限公司 Uart信号红外收发电路

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010009180A (ko) * 1999-07-08 2001-02-05 김영환 음성인식·등록장치를 구비한 적외선 리모콘 및 그 음성인식·등록방법
CN101609604A (zh) * 2008-06-17 2009-12-23 上海创见电子有限公司 红外学习的控制方法
US20100141473A1 (en) * 2008-12-04 2010-06-10 Jiun-Chau Tzeng Intelligent appliance control system
CN101990335A (zh) * 2009-07-31 2011-03-23 宁波家天下智能系统有限公司 一种智能家居控制系统中的万能遥控器
CN102881150A (zh) * 2012-09-13 2013-01-16 厦门华联电子有限公司 红外遥控信号学习模组及遥控装置
CN103400494A (zh) * 2013-07-23 2013-11-20 恬家(上海)信息科技有限公司 红外信号的学习方法
CN203325207U (zh) * 2013-07-02 2013-12-04 恬家(上海)信息科技有限公司 红外发射和接收电路
CN203366528U (zh) * 2013-07-23 2013-12-25 恬家(上海)信息科技有限公司 红外发射和接收电路

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040208182A1 (en) * 2003-04-16 2004-10-21 Microsoft Corporation Format independent consumer IR transceiver
JP4246222B2 (ja) * 2006-07-18 2009-04-02 シャープ株式会社 キャリア検出回路、それを備えた赤外線信号処理回路、ならびにキャリア検出回路の制御方法
US20080069567A1 (en) * 2006-09-20 2008-03-20 Control4 Corporation System and method for regenerating infrared code signals
US8213809B2 (en) * 2009-01-23 2012-07-03 Conexant Systems, Inc. Universal systems and methods for determining an incoming carrier frequency and decoding an incoming signal
CN102025854B (zh) * 2010-11-29 2013-12-11 惠州Tcl移动通信有限公司 一种学习型手机遥控器的实现方法和学习型手机遥控器

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010009180A (ko) * 1999-07-08 2001-02-05 김영환 음성인식·등록장치를 구비한 적외선 리모콘 및 그 음성인식·등록방법
CN101609604A (zh) * 2008-06-17 2009-12-23 上海创见电子有限公司 红外学习的控制方法
US20100141473A1 (en) * 2008-12-04 2010-06-10 Jiun-Chau Tzeng Intelligent appliance control system
CN101990335A (zh) * 2009-07-31 2011-03-23 宁波家天下智能系统有限公司 一种智能家居控制系统中的万能遥控器
CN102881150A (zh) * 2012-09-13 2013-01-16 厦门华联电子有限公司 红外遥控信号学习模组及遥控装置
CN203325207U (zh) * 2013-07-02 2013-12-04 恬家(上海)信息科技有限公司 红外发射和接收电路
CN103400494A (zh) * 2013-07-23 2013-11-20 恬家(上海)信息科技有限公司 红外信号的学习方法
CN203366528U (zh) * 2013-07-23 2013-12-25 恬家(上海)信息科技有限公司 红外发射和接收电路

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110930684A (zh) * 2019-12-10 2020-03-27 杭州涂鸦信息技术有限公司 一种支持多编码格式的红外控制方法及系统

Also Published As

Publication number Publication date
US20170004704A1 (en) 2017-01-05
US10043383B2 (en) 2018-08-07
WO2015000391A1 (zh) 2015-01-08

Similar Documents

Publication Publication Date Title
CN101939958B (zh) 带有频移键控调制解调器的微控制器
CN103400494B (zh) 红外信号的学习方法
US9892077B2 (en) Camera control interface slave device to slave device communication
US20110286542A1 (en) Hart transmitter/receiver systems
WO2015000399A1 (zh) 红外信号的学习方法
WO2017156837A1 (zh) 一种全频带电力线载波通信方法
WO2016023449A1 (zh) 采用ad方式进行红外学习的方法
CN103152052B (zh) 对多个电压模拟信号进行采样的方法
CN102571518B (zh) 一种基于现场总线的电子式互感器数据传输方法
JP2002252606A (ja) 同期補正回路
CN107548183A (zh) 基于无线通信的led驱动调光芯片
CN102354193A (zh) 一种开关信号采集方法
CN110365710A (zh) 多协议聚合传输装置、系统及方法
WO2023206876A1 (zh) 电力线载波通讯装置、方法及系统
CN107229543A (zh) 半导体装置
CN210405365U (zh) 多协议聚合传输装置及系统
CN205105090U (zh) 一种直流输电串并联转换器用控制系统中的驱动电路
CN113866492A (zh) 一种直流电压信号线性隔离采样方法
CN203368439U (zh) 脉宽自适应单总线接收器
EA008784B1 (ru) Система сбора данных по распределительной электросети переменного тока
RU2762386C1 (ru) Способ передачи сигналов между ведущим и ведомыми устройствами
CN102880443B (zh) 数据处理方法及其相关装置
CN211183981U (zh) 全自主多功能网络化健康管理系统
CN218450373U (zh) 一种基于canbus数字对讲装置
US10904978B1 (en) Two-wire code controlled synchronous led stripe and a control method thereof

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14820671

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14820671

Country of ref document: EP

Kind code of ref document: A1