WO2016107609A1 - 红外遥控电路、方法和终端 - Google Patents

红外遥控电路、方法和终端 Download PDF

Info

Publication number
WO2016107609A1
WO2016107609A1 PCT/CN2016/070050 CN2016070050W WO2016107609A1 WO 2016107609 A1 WO2016107609 A1 WO 2016107609A1 CN 2016070050 W CN2016070050 W CN 2016070050W WO 2016107609 A1 WO2016107609 A1 WO 2016107609A1
Authority
WO
WIPO (PCT)
Prior art keywords
infrared
remote control
module
carrier frequency
preset
Prior art date
Application number
PCT/CN2016/070050
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
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016107609A1 publication Critical patent/WO2016107609A1/zh

Links

Images

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

Definitions

  • This paper relates to the field of infrared remote control technology, and more particularly to infrared remote control circuits, methods and terminals.
  • Infrared remote control generally uses infrared light of 940 nm.
  • Commonly used infrared signal transmission protocols are ITT protocol, NEC protocol, Nokia NRC protocol, Sharp protocol, Philips RC-5 protocol, Philips RC-6 protocol, Philips RECS-80 protocol and Sony SIRC protocol. The difference between these protocols can be attributed to the different carrier frequencies used and the different encodings. For a certain remote control device, the different buttons use the same carrier frequency, but the codes of the buttons are different.
  • an infrared signal can be generated to control the device.
  • the carrier frequencies commonly used in infrared remote control are 38 kHz, 40 kHz and 58 kHz.
  • Figure 1 shows the relationship between carrier, code and infrared modulation waveforms.
  • an infrared remote control code library of a common home appliance is provided through a software preset or a network database, and the carrier frequency and the key code information used by the infrared remote control of the common home appliance are stored in the library.
  • the corresponding infrared remote control code package is searched by the specification model of the home appliance, and after the corresponding remote control code is found, the infrared signal generated by the carrier frequency and each key code information infrared transmission circuit can be remotely controlled by the remote control device.
  • Some mobile phones that support the infrared remote control function also provide a button learning function.
  • the learning function can copy the infrared remote control signal of the button by extracting the carrier frequency and key code of the remote control button.
  • the infrared remote control function in the mobile phone the most common method is: the infrared remote control and learning scheme of Figure 2 to Figure 4, the mobile phone CPU of Figure 2 directly controls the infrared emission tube emission. Figure 4 is increased relative to Figure 2.
  • the learning function also directly recognizes the infrared waveform through GPIO (General Purpose Input Output), and analyzes the carrier and signal through software.
  • GPIO General Purpose Input Output
  • the disadvantage is that most of the infrared remote control functions need carrier modulation, the carrier frequency is 38 kHz, 40 kHz and 58 kHz, etc., directly using the GPIO port of the CPU to control the generation of tens of kHz waveforms will occupy Large CPU resources, and the operating system is difficult to produce accurate microsecond timing, which inevitably leads to error and carrier drift. There are also some schemes as shown in Figures 3 and 5.
  • the mobile phone CPU does not directly control the infrared transmitting tube or the receiving tube.
  • an ASIC, a single-chip microcomputer or an FPGA is added between the CPU and the infrared transmitting circuit and the receiving circuit, and the ASIC, the single-chip microcomputer and the FPGA control the learning of the transmitting or receiving tube of the infrared transmitting tube.
  • This scheme does not directly generate the learned infrared code because the CPU does not directly generate carrier and infrared codes, and does not need to occupy CPU resources for a long time, and does not cause carrier offset or bit error.
  • the actual implementation of this scheme requires an ASIC, a single-chip microcomputer or an FPGA.
  • the circuit is extremely complicated, the PCB area is large, and the cost is high, which brings obstacles to the introduction of infrared remote control functions for more mobile phones.
  • the main object of the present invention is to provide an infrared remote control circuit, method and terminal, which aim to solve the problems of complicated infrared remote control circuit, large PCB area and high cost.
  • An infrared remote control method is applied to a terminal, and the infrared remote control method includes:
  • the acquired remote control model and the preset infrared database it is determined whether the acquired remote control model is a known remote control model
  • the carrier frequency and the infrared code corresponding to the remote controller are obtained from a preset infrared database;
  • the acquired remote control model is not a known remote control model, try to remotely control the remotely controlled device with the preset carrier frequency and the recognized infrared code when learning the button. If the remote control device responds, confirm The preset carrier frequency is a carrier frequency of the remote controller.
  • the method further includes:
  • remotely controlled device does not respond, replace the preset carrier frequency, and remotely control the remotely controlled device with the replaced carrier frequency and the identified infrared code until determining the carrier frequency of the remote controller rate.
  • the method further comprises: learning the acquired remote control model as follows:
  • the infrared receiving module receives the infrared signal emitted by the remote controller
  • the amplifying module amplifies the received infrared signal to obtain an amplified infrared signal
  • the filtering shaping module receives the amplified infrared signal, filters the amplified infrared signal, obtains the filtered infrared signal, and determines the high and low levels of the infrared signal.
  • the method further includes:
  • the processor CPU receives the infrared code of the filtered infrared signal, and identifies the infrared code
  • the CPU transmits the preset carrier frequency and the identified infrared code.
  • the step of attempting to remotely control the remotely controlled device by using the preset carrier frequency and the recognized infrared code when learning the button comprises:
  • the modulator modulates the received carrier frequency and infrared code sent by the CPU, and generates a modulation waveform to be sent to the infrared transmitting module;
  • the infrared transmitting module transmits the received modulation waveform.
  • a terminal includes an acquisition module, a determination module, and a determination module, wherein:
  • the obtaining module is configured to: acquire a remote control model of the remote controller;
  • the determining module is configured to: determine, according to the acquired remote control model and a preset infrared database, whether the acquired remote control model is a known remote control model;
  • the determining module is configured to: when the determining module determines that the model of the remote controller acquired by the acquiring module is a known remote controller model, obtain a carrier frequency corresponding to the remote controller from a preset infrared database And infrared coding; when the determination module determines that the remote control model acquired by the acquisition module is not a known remote control model, then attempts to remotely control the preset carrier frequency and the recognized infrared code when learning the button
  • the remotely controlled device determines that the preset carrier frequency is the carrier frequency of the remote controller if the remotely controlled device is responsive.
  • the determining module is further configured to: if the remotely controlled device does not respond, replace the carrier frequency, and remotely control the remotely controlled device by using the replaced carrier frequency and the identified infrared code, To determine the carrier frequency of the remote controller.
  • the terminal further includes a learning circuit, wherein
  • the learning circuit is configured to: after the determining module determines that the acquired remote controller signal is not a known remote control model, and attempts to remotely control with the preset carrier frequency and the identified infrared code while learning the first button Before the remote control device, learn the acquired remote control model;
  • the learning circuit includes an infrared receiving module, an amplifying module connected to the infrared receiving module, and a filtering shaping module connected to the amplifying module, wherein
  • the infrared receiving module is configured to: receive an infrared signal emitted by the remote controller;
  • the amplifying module is configured to: amplify the received infrared signal to obtain an amplified infrared signal;
  • the filtering and shaping module is configured to: receive the amplified infrared signal, filter the amplified infrared signal, obtain the filtered infrared signal, and determine the high and low levels of the infrared signal.
  • the terminal further includes a processor CPU, where
  • the CPU is configured to: receive infrared coding of the filtered infrared signal, identify the infrared code, and send the preset carrier frequency and the identified infrared code;
  • the CPU includes a PWM generator, a PWM output pin, and a GPIO output pin, wherein
  • the PWM generator is configured to: generate the preset carrier frequency, and output the generated carrier frequency generated by the PWM output pin;
  • the GPIO output pin is configured to: output the identified infrared code.
  • the terminal further includes an infrared transmitting circuit for transmitting an infrared signal, wherein
  • the infrared transmitting circuit is connected to the CPU;
  • the infrared transmitting circuit includes a modulator and an infrared emitting module coupled to the modulator, wherein
  • the modulator is configured to: receive the preset infrared carrier and the identified infrared code sent by the CPU, modulate the preset infrared carrier and the identified infrared code, and generate a modulation waveform to be sent to the Infrared transmitting module;
  • the infrared transmitting module is configured to: send the received modulated waveform.
  • the mediator includes a logic circuit and a gate
  • the two input ends of the logic circuit and the gate are respectively connected to the PWM output pin of the CPU and the GPIO output pin, and are configured to: receive a preset carrier frequency output by the CPU and The identified infrared code;
  • the output end of the logic circuit and the gate is connected to the infrared transmitting module, and is further configured to: control the infrared transmitting module.
  • the infrared emitting module comprises an infrared transmitting tube, and the infrared transmitting tube is connected to the modulator and configured to: emit an infrared signal.
  • the infrared emitting module further includes a resistor and a field effect transistor, one end of the resistor is connected to the power supply voltage, and the other end of the resistor is connected to the anode of the infrared transmitting tube; the cathode of the infrared transmitting tube Connected to the drain of the FET, the gate of the FET is connected to the output pin of the modulator, and the source of the FET is connected to ground.
  • the infrared receiving module includes an infrared receiving tube, and the infrared receiving tube is connected to the amplifying module, and is configured to: receive an infrared signal emitted by the remote controller.
  • the filter shaping module includes an RC filtering unit and a comparator, and the RC filtering unit is connected to the amplifying module, configured to: filter an infrared signal; the comparator, and the RC filtering unit Connected, set to: after comparing the filtered infrared signal, determine the high and low levels.
  • the CPU is configured to generate and output an infrared carrier and an infrared code; and is further configured to identify an infrared code of the infrared signal;
  • the modulator is connected to the CPU and the infrared transmitting module, and configured to: The output infrared carrier and the infrared code are modulated to generate a modulation waveform, and the infrared transmission module is controlled by a modulation waveform; the infrared transmission module is configured to transmit an infrared signal; and the infrared receiving module is configured to receive the learned An infrared signal;
  • the amplifying module is connected to the infrared receiving module, and is configured to amplify an infrared signal;
  • the filtering shaping module is connected to the amplifying module, and is configured to filter and shape the amplified infrared signal to obtain an infrared signal.
  • Infrared coding The technical scheme of the invention has the advantages of simple circuit, small PCB area and low cost.
  • 1 is a relationship diagram of an infrared carrier, an infrared code, and a modulation waveform of an infrared remote control signal
  • FIG. 2 is a first circuit diagram of a related art infrared remote control transmission control circuit
  • FIG. 3 is a second circuit diagram of a related art infrared remote control transmission control circuit
  • FIG. 4 is a first circuit diagram of a related art infrared remote control transmitting and learning circuit
  • FIG. 5 is a second circuit diagram of a related art infrared remote control transmitting and learning circuit
  • FIG. 6 is a circuit diagram of an embodiment of an infrared remote control circuit of the present invention.
  • FIG. 7 is a schematic flow chart of an embodiment of an infrared remote control method according to the present invention.
  • FIG. 8 is a schematic diagram of functional modules of an embodiment of a terminal according to the present invention.
  • FIG. 6 is a schematic circuit diagram of an embodiment of an infrared remote control circuit according to the present invention.
  • the infrared remote control circuit includes a CPU 100, an infrared transmitting circuit 200, and learning.
  • the learning circuit 300 includes an infrared receiving module 310, an amplifying module 320, and a filtering shaping module 330.
  • the processor CPU 100 is configured to: generate and output an infrared carrier and a first infrared code; and further configured to: identify a second infrared code of the second infrared signal;
  • the modulator 210 is connected to the CPU 100 and the infrared transmitting module 220, and is configured to: modulate an infrared carrier outputted by the CPU 100 and a first infrared code to generate a modulated waveform, and transmit the infrared waveform by using a modulated waveform.
  • Module 220 performs control;
  • the infrared emitting module 220 is configured to: emit a first infrared signal
  • the infrared receiving module 310 is configured to: receive a second infrared signal sent by the remote controller;
  • the filtering shaping module 330 is connected to the amplifying module 320 and configured to: perform filtering and shaping on the amplified second infrared signal to obtain a second infrared encoding of the second infrared signal.
  • the infrared remote control circuit of the embodiment generates and outputs an infrared carrier and a first infrared code from the CPU 100, and after modulation by the modulator 210, generates a modulation waveform, thereby transmitting a first infrared signal to the infrared transmitting module 220. Take control.
  • the infrared remote control circuit of the embodiment receives the second infrared signal sent by the remote controller from the infrared receiving module 310 , and the amplification of the second infrared signal by the amplification module 320 is performed by filtering and shaping the filter shaping module 330 . A second infrared encoding of the second infrared signal is obtained, and finally the second infrared encoding is recognized by the CPU 100.
  • the GPIO is usually used to directly synchronize the analog modulated signal.
  • the disadvantage is that the timing of the CPU is high, and under the multi-tasking operating system, the timing requirement of the infrared remote control cannot generally be met. Inevitably, problems such as bit error and carrier drift are brought about.
  • an external oscillation source is used to generate a carrier, and then an infrared code is generated by a GPIO port of the CPU, and a modulation circuit is used to debug the carrier and the infrared code to control the transmission of the infrared transmission tube, but the scheme has a complicated circuit and a carrier. The frequency cannot be adjusted and cannot be adapted to the requirements of the mobile phone to control a variety of remotely controlled devices.
  • a CPU commonly used in a mobile phone generally has one or more PWM-Pulse-Width Modulation generators. After setting a specific register, a dedicated pin can output a PWM waveform of a specific frequency. Once the setup is successful, the CPU does not need to intervene to work. At the same time, a GPIO port of the CPU is used to output the infrared code. The infrared code and the PWM waveform generated by the CPU are modulated by the modulator, and the modulation waveform is generated to control the infrared emission tube/module.
  • This solution avoids the problems of high CPU usage, bit error and carrier drift caused by directly generating modulating waveforms with GPIO, and reduces the timing requirement of microseconds to a timing requirement of several hundred microseconds.
  • This design is simple and flexible, as long as the frequency of the PWM wave is modified to generate carriers of various frequencies, which can be applied to various infrared remote control protocols.
  • the infrared receiving signal/module or similar equivalent circuit receives the infrared signal and no longer demodulates, and after adding a simple filtering and shaping module after the conventional amplifying module, Directly obtain infrared encoding without extracting carrier frequency information from the received infrared signal. Since the width of the infrared encoding is generally several hundred microseconds (such as NEC protocol high and low minimum width 512us), it is easy to pass the CPU GPIO. The mouth to identify the read.
  • the learning circuit 300 further includes an amplifying module 320.
  • the amplifying module 320 is connected to the infrared receiving module 310 and configured to: amplify the second infrared signal.
  • the CPU 100 includes a PWM generator, a PWM output pin, a first GPIO output pin and a second GPIO input pin, wherein the PWM generator is configured to generate an infrared carrier and generate the output through a PWM output pin.
  • the mediator 210 includes a logic circuit and a gate, and the two input ends of the logic circuit and the gate are respectively connected to the PWM output pin of the CPU 100 and the first GPIO output pin, and are set.
  • the infrared carrier and the first infrared code output by the CPU 100 are received; the output end of the logic circuit and the gate is connected to the infrared transmitting module 220, and is configured to: control the infrared transmitting module 220.
  • the infrared emitting module 220 includes an infrared transmitting tube D1, and the infrared transmitting tube D1 is connected to the modulator 210 and configured to emit an infrared signal.
  • the infrared emitting module 220 further includes a resistor R1 and a field effect transistor Q1, one end of the resistor R1 is connected to the power supply voltage VCC, and the other end of the resistor R1 is connected to the anode of the infrared transmitting tube D1;
  • the cathode of the tube D1 is connected to the drain of the field effect transistor Q1, the gate of the field effect transistor Q1 is connected to the output pin of the modulator 210, and the source of the field effect transistor Q1 is connected to the ground.
  • the field effect transistor Q1 is an N-type field effect transistor.
  • the infrared receiving module 310 includes an infrared receiving tube D2, the infrared receiving tube D2, and the The amplifying module 320 is connected to be configured to receive a second infrared signal sent by the remote controller.
  • the filter shaping module 330 includes an RC filtering unit and a comparator, and the RC filtering unit is connected to the amplification module 320, and configured to: filter the second infrared signal; the comparator, and the RC filtering unit Connected, set to: after comparing the filtered second infrared signal, determine the high and low levels.
  • the embodiment of the present invention further provides a terminal, including the above-mentioned infrared remote control circuit, which is not described herein again.
  • FIG. 7 is a schematic flowchart of an embodiment of an infrared remote control method according to an embodiment of the present invention.
  • the infrared remote control method includes the following steps:
  • Step S100 Obtain a remote controller model.
  • the terminal acquires a remote control specification model
  • the remote controller is an infrared remote controller
  • the remote controller may be a remote controller of a television or an air conditioner.
  • Step S200 Determine, according to the acquired remote control model and the preset infrared database, whether the acquired remote control model is a known remote control model.
  • the terminal searches for a matching remote controller specification model from the preset infrared database. If the remote controller specification model can be found in the preset infrared database, it is determined that the remote controller model is known. Remote control model.
  • Step S300 if yes, obtaining a carrier frequency and an infrared code corresponding to the remote controller from a preset infrared database; if not, attempting to use a preset carrier frequency and the recognized infrared when learning the first button Encoding to remotely control the remotely controlled device, and if the remotely controlled device is responsive, determining that the preset carrier frequency is a carrier frequency of the remote controller. If the remotely controlled device does not respond, try again after replacing the carrier frequency.
  • the carrier frequency and infrared code corresponding to the remote controller are obtained from a preset infrared database; if the remote control model is an unknown remote control model, Then, when learning the first button, try to remotely control the remotely controlled device by using a preset carrier frequency and the recognized infrared code, and if the remote device is responsive, confirm that the preset carrier frequency is The carrier frequency of the remote controller. If the remotely controlled device does not respond, try again after replacing the carrier frequency.
  • the preset carrier frequencies are 38 kHz, 40 kHz, and 56 kHz, because commonly used infrared remote control carrier frequencies are only 38 kHz, 40 kHz, and 56 kHz.
  • this trial process is very fast.
  • the preset infrared encoding database or the network infrared encoding database of the remote control software on the terminal does not have the carrier frequency and infrared encoding information of the remote controller, then the first one in learning the remote controller
  • the button is pressed, when the infrared code of the first button is extracted by the infrared control circuit, the user needs to send the code just learned to the remote device when confirming the button, and the software first uses the preset first carrier frequency (such as 38 kHz).
  • the carrier frequency if the remote control device responds, after the user confirms, the first carrier frequency is used as the correct carrier frequency of the remote controller.
  • the remote control device does not respond, try to use the preset second carrier frequency (such as 40 kHz) as the carrier frequency.
  • the carrier frequency is tried.
  • step S300 when learning the first button, attempting to remotely control the remotely controlled device to use the preset carrier frequency when learning the first button by using the preset first carrier frequency and the recognized infrared code.
  • the remotely controlled device Before remotely controlling the remotely controlled device with the identified infrared code, including learning to obtain the remote control model:
  • the infrared receiving module 310 receives the infrared signal emitted by the remote controller
  • the amplification module 320 amplifies the received infrared signal to obtain an amplified infrared signal
  • the filtering shaping module 330 receives the amplified infrared signal, filters the amplified infrared signal, obtains the filtered infrared signal, and determines the high and low levels of the infrared signal.
  • the acquired remote control model after learning the acquired remote control model, it also includes:
  • the processor CPU 100 receives the infrared code of the filtered infrared signal to identify the infrared code
  • the processor CPU 100 transmits the preset first carrier frequency and the identified infrared code.
  • step S300 attempting to remotely control the remotely controlled device by using the preset first carrier frequency and the identified infrared code when learning the first button comprises:
  • the modulator 210 modulates the outer carrier and the infrared code transmitted by the receiving processor CPU 100 and generates a modulated waveform to be sent to the infrared transmitting module;
  • the infrared transmit mode 220 block transmits the received modulated waveform.
  • the infrared remote control method provided by this embodiment greatly simplifies the hardware or software design by using the carrier frequency of a known button or by a limited number of attempts to learn and determine the carrier frequency.
  • the obtaining module 10 is configured to: obtain a remote control model
  • the determining module 20 is configured to: determine, according to the acquired remote control model and the preset infrared database, whether the acquired remote control model is a known remote control model;
  • the determining module 30 is configured to: if yes, obtain a carrier frequency and an infrared code corresponding to the remote controller from a preset infrared database; if not, try to use a preset carrier frequency and the ground when learning the first button
  • the recognized infrared code is used to remotely control the remotely controlled device, and if the remotely controlled device is responsive, it is determined that the preset carrier frequency is the carrier frequency of the remote controller. If the remotely controlled device does not respond, try again after replacing the carrier frequency.
  • the acquisition module 10 of the terminal acquires a remote control specification model
  • the remote controller is an infrared remote controller
  • the remote controller may be a remote controller of a television or an air conditioner.
  • the determining module 20 of the terminal searches for a matching remote controller specification model from the preset infrared database according to the model of the remote controller, and determines the remote controller if the remote controller specification model can be found in the preset infrared database.
  • the model number is a known remote control model.
  • the determining module 30 of the terminal obtains the carrier frequency and the infrared code corresponding to the remote controller from the preset infrared database according to the result of the determination, if the remote controller model is a known remote control model; if the remote control model is unknown
  • the remote control model attempts to remotely control the remotely controlled device with a preset carrier frequency and the identified infrared code when learning the first button, and confirms the preset if the remote device is responsive
  • the carrier frequency is the carrier frequency of the remote controller. If the remotely controlled device does not respond, try again after replacing the carrier frequency.
  • the preset carrier frequencies are 38 kHz, 40 kHz, and 56 kHz.
  • the preset infrared encoding database or the network infrared encoding database of the remote control software on the terminal does not have the carrier frequency and infrared encoding information of the remote controller, then the first one in learning the remote controller
  • the button is pressed, when the infrared code of the first button is extracted by the infrared control circuit, the user needs to send the code just learned to the remote device when confirming the button, and the software first uses the preset first carrier frequency (such as 38 kHz).
  • the carrier frequency if it is reacted by the remote control device, after the user confirms, the first carrier frequency is used as the correct carrier frequency of the remote controller. If the remote control device does not respond, try to use the preset number. A two carrier frequency (eg, 40 kHz) is attempted as the carrier frequency. When learning the other buttons of this remote control, you only need to use the already determined carrier frequency, no need to try again.
  • the terminal provided by this embodiment greatly simplifies the hardware or software design by using the carrier frequency of a known button or by a limited number of attempts to learn and determine the carrier frequency.
  • the terminal further includes a learning circuit configured to: after the remote controller signal acquired by the determination module 20 is not a known remote control model, and to attempt to use the preset carrier frequency and the identified infrared code when learning the first button The remote control model obtained before the remote control device is remotely controlled;
  • the learning circuit includes an infrared receiving module 310, an amplifying module 320 connected to the infrared receiving module 310, and a filtering shaping module 330 connected to the amplifying module 320.
  • the infrared receiving module 310 is configured to: receive an infrared signal emitted by the remote controller; and the amplifying module 320 , configured to: amplify the received infrared signal to obtain an amplified infrared signal; and the filter shaping module 330 is configured to: receive the amplified infrared signal, and filter the amplified infrared signal to obtain the filtered infrared signal. And determining the high and low levels of the infrared signal.
  • the terminal further includes a processor CPU 100 configured to: receive an infrared code of the filtered infrared signal, identify the infrared code, and transmit the preset carrier frequency and the identified infrared code.
  • a processor CPU 100 configured to: receive an infrared code of the filtered infrared signal, identify the infrared code, and transmit the preset carrier frequency and the identified infrared code.
  • the terminal further includes a transmitting circuit for transmitting an infrared signal, the transmitting circuit is connected to the processor CPU; the transmitting circuit includes a modulator 210 and a transmitting module 220 connected to the modulator 210; the modulator 210 is configured to: the receiving processor CPU sends The preset infrared carrier and infrared coding, modulating the infrared carrier and the preset infrared code and generating a modulation waveform are sent to the infrared transmitting module 220; and the modulated waveform received by the infrared transmitting module 220 is sent out.
  • the embodiment of the invention further discloses a computer program, comprising program instructions, when the program instruction is executed by the terminal, so that the terminal can execute any of the above infrared remote control methods.
  • the embodiment of the invention also discloses a carrier carrying the computer program.
  • all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve. Thus, the invention is not limited to any specific combination of hardware and software.
  • the devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
  • each device/function module/functional unit in the above embodiment When each device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium.
  • the above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • the technical solution of the invention has simple circuit, small PCB area and low cost, so the invention has strong industrial applicability.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Selective Calling Equipment (AREA)

Abstract

一种红外遥控方法包括:获取遥控器型号(S100);根据获取的遥控器型号和预设的红外数据库,判定获取的遥控器型号是否为已知的遥控器型号(S200);若是,则从预设的红外数据库中获取遥控器对应的载波频率和红外编码;若否,则在学习第一个按键时尝试用预置的第一载波频率和所识别到的红外编码来遥控被遥控设备,如果被遥控设备有反应,则确认预置的载波频率为遥控器的载波频率(S300)。并且红外遥控电路简单、PCB面积小、成本低。

Description

红外遥控电路、方法和终端 技术领域
本文涉及红外遥控技术领域,尤其涉及红外遥控电路、方法和终端。
背景技术
家电的遥控功能绝大部分采用红外线方式进行遥控,遥控器发出一串红外波形,被遥控设备接收到这串波形后作出反应。红外遥控一般采用940nm的红外线。常用的红外线信号传输协议有ITT协议、NEC协议、Nokia NRC协议、Sharp协议、Philips RC-5协议、Philips RC-6协议,Philips RECS-80协议和Sony SIRC协议等。这些协议的差别可以归结为所使用的载波频率不同和编码不同。对于一个确定的遥控设备,其不同按键都采用同一个载波频率,只是各按键的编码不相同。只要知道了某个遥控设备所使用的载波频率和各按键的编码信息,就可以产生红外信号来控制设备。红外遥控中常用的载波频率有38kHz,40kHz和58kHz等几种。图1表示了载波、编码和红外调制波形之间的关系。
随着智能手机的功能不断增多,为便于用户直接通过手机来控制具有红外遥控功能的家电,部分手机已经具备红外遥控功能。手机红外软件中通过软件预置或者网络数据库的形式提供常用家电的红外遥控编码库,库中存储有常用家电的红外遥控所使用的载波频率和各按键编码信息。使用时通过家电的规格型号来查找对应的红外遥控编码包,找到对应的遥控编码后,即可通过载波频率和各按键编码信息红外发射电路产生红外信号对被遥控设备进行遥控。
对于已知的某个型号的家电的遥控编码包,可能存在的错键或者少键的问题,以及整个遥控器的编码都未知的情况。部分支持红外遥控功能的手机还提供了按键学习功能,学习功能可以通过提取遥控器按键的载波频率和按键编码来复制出按键的红外遥控信号。
对于手机中的红外遥控功能,最常见的做法是:如图2-图4的红外遥控和学习方案,图2中手机CPU直接控制红外发射管发射。图4相对图2增加 了学习功能,也是通过GPIO(General Purpose Input Output,通用输入/输出)直接识别红外波形,通过软件分析载波和信号。此类方案优点是电路简单,成本低,缺点是由于大部分红外遥控功能需要进行载波调制,载波频率有38kHz,40kHz和58kHz等,直接用CPU的GPIO口控制产生几十kHz的波形会占用较大的CPU资源,而且操作系统很难产生精确的微秒级的定时,不可避免的带来了误码和载波漂移。还有一些方案如图3和图5所示,手机CPU不直接控制红外发射管或者接收管。而是在CPU和红外发射电路与接收电路之间增加一个ASIC、单片机或FPGA,由ASIC、单片机和FPGA来控制红外发射管的发射或者接收管的学习。这种方案由于CPU不直接产生载波和红外编码,也不直接接收学习到的红外编码,不需要长时间占用CPU资源,不会导致载波偏移或者误码的问题。但是这种方案实际实施上由于需要ASIC、单片机或者FPGA,电路极为复杂,PCB面积大,成本较高,给更多手机引入红外遥控功能带来了障碍。
发明内容
本发明的主要目的在于提供一种红外遥控电路、方法和终端,旨在解决红外遥控电路复杂、PCB面积大和成本较高的问题。
为实现上述目的,采用如下技术方案:
一种红外遥控方法,应用于终端,所述红外遥控方法包括:
获取遥控器的遥控器型号;
根据获取的遥控器型号和预设的红外数据库,判断获取的遥控器型号是否为已知的遥控器型号;
若获取的遥控器型号是已知的遥控器型号,则从预设的红外数据库中获取所述遥控器对应的载波频率和红外编码;
若获取的遥控器型号不是已知的遥控器型号,则在学习按键时尝试用预置的载波频率和所识别到的红外编码来遥控被遥控设备,如果所述被遥控设备有反应,则确认所述预置的载波频率为所述遥控器的载波频率。
可选地,所述方法还包括:
若所述被遥控设备无反应,则更换预置的载波频率,用所更换的载波频率和所识别到的红外编码来遥控被遥控设备,直到确定所述遥控器的载波频 率。
可选地,所述在学习按键时尝试用预置的载波频率和所识别到的红外编码来遥控所述被遥控设备的步骤之前,该方法还包括:按照如下方式学习获取的遥控器型号:
红外接收模块接收所述遥控器发出的红外信号;
放大模块对接收到的所述红外信号进行放大,得到放大后的红外信号;
滤波整形模块接收放大后的红外信号,对放大后的红外信号进行滤波,得到滤波后的红外信号并且判断所述红外信号的高低电平。
可选地,所述学习获取的遥控器型号的步骤之后,该方法还包括:
处理器CPU接收滤波后的红外信号的红外编码,对该红外编码进行识别;
所述CPU将所述预置的载波频率和所识别的红外编码发送出去。
可选地,所述在学习按键时尝试用预置的载波频率和所识别到的红外编码来遥控被遥控设备的步骤包括:
调制器对接收到的所述CPU发送的载波频率和红外编码进行调制,并且产生调制波形发送至红外发射模块;
所述红外发射模块将接收到的调制波形发送出去。
一种终端,包括获取模块、判定模块和确定模块,其中:
所述获取模块设置成:获取遥控器的遥控器型号;
所述判定模块设置成:根据获取的遥控器型号和预设的红外数据库,判定获取的遥控器型号是否为已知的遥控器型号;
所述确定模块设置成:当所述判定模块确定所述获取模块所获取的遥控器的型号是已知的遥控器型号时,则从预设的红外数据库中获取所述遥控器对应的载波频率和红外编码;当所述判定模块确定所述获取模块所获取的遥控器型号不是已知的遥控器型号时,则在学习按键时尝试用预置的载波频率和所识别到的红外编码来遥控被遥控设备,如果所述被遥控设备有反应,则确定所述预置的载波频率为所述遥控器的载波频率。
可选地,所述确定模块还设置成:若所述被遥控设备无反应,则更换载波频率,用所更换的载波频率和所识别到的红外编码来遥控被遥控设备,直 到确定所述遥控器的载波频率。
可选地,所述终端还包括学习电路,其中
所述学习电路设置成:在当确定模块确定获取的遥控器信号不是已知的遥控器型号之后,并且在学习第一个按键时尝试用预置的载波频率和所识别到的红外编码来遥控所述被遥控设备之前,学习获取的遥控器型号;
所述学习电路包括红外接收模块,与所述红外接收模块连接的放大模块,及与所述放大模块连接的滤波整形模块,其中
所述红外接收模块设置成:接收所述遥控器发出的红外信号;
所述放大模块设置成:对接收到的红外信号进行放大,得到放大后的红外信号;
所述滤波整形模块设置成:接收放大后的红外信号,对放大后的红外信号进行滤波,得到滤波后的红外信号并且判断所述红外信号的高低电平。
可选地,所述终端还包括处理器CPU,其中
该CPU设置成:接收滤波后的红外信号的红外编码,对该红外编码进行识别,并且发送所述预置的载波频率和所识别到的红外编码;
所述CPU包括PWM发生器、PWM输出引脚和GPIO输出引脚,其中,
所述PWM发生器设置成:产生所述预置的载波频率,并通过所述PWM输出引脚输出产生的所述预置的载波频率;
所述GPIO输出引脚设置成:输出所识别到的红外编码。
可选地,所述终端还包括用于发送红外信号的红外发射电路,其中
所述红外发射电路与所述CPU连接;
所述红外发射电路包括调制器和与所述调制器连接的红外发射模块,其中
所述调制器设置成:接收所述CPU发送的所述预置的红外载波和所识别的红外编码,对所述预置的红外载波和所识别的红外编码进行调制并且产生调制波形发送至所述红外发射模块;
所述红外发射模块设置成:将接收到的调制波形发送出去。
可选地,所述调解器包括逻辑电路与门,
所述逻辑电路与门的两输入端分别与所述CPU的所述PWM输出引脚和所述GPIO输出引脚相连,设置成:接收所述CPU输出的预置的载波频率和 所识别到的红外编码;
所述逻辑电路与门的输出端与所述红外发射模块相连,还设置成:控制所述红外发射模块。
可选地,所述红外发射模块包括红外发射管,所述红外发射管与所述调制器相连,设置成:发射红外信号。
可选地,所述红外发射模块还包括电阻和场效应管,所述电阻的一端与供电电压相连,所述电阻的另一端与所述红外发射管的阳极相连;所述红外发射管的阴极与所述场效应管的漏极相连,所述场效应管的栅极与所述调制器的输出脚相连,所述场效应管的源极与地相连。
可选地,所述红外接收模块包括红外接收管,所述红外接收管与所述放大模块相连,设置成:接收所述遥控器发出的红外信号。
可选地,所述滤波整形模块包括RC滤波单元和比较器,所述RC滤波单元,与所述放大模块相连,设置成:对红外信号进行滤波;所述比较器,与所述RC滤波单元相连,设置成:对滤波后的红外信号进行比较后,判决高低电平。
本发明技术方案提供的红外遥控电路,包括CPU、红外发射电路和学习电路,所述红外遥控发射电路包括调制器和红外发射模块;所述学习电路包括红外接收模块、放大模块和滤波整形模块,其中,所述CPU,用于产生和输出红外载波和红外编码;还用于识别红外信号的红外编码;所述调制器,与所述CPU和所述红外发射模块相连,用于将所述CPU输出的红外载波和红外编码进行调制,产生调制波形,通过调制波形对所述红外发射模块进行控制;所述红外发射模块,用于发射红外信号;所述红外接收模块,用于接收学习到的红外信号;所述放大模块,与所述红外接收模块相连,用于放大红外信号;所述滤波整形模块,与所述放大模块相连,用于对放大的红外信号进行滤波整形,获取红外信号的红外编码。本发明技术方案的电路简单、PCB面积小、成本低。
附图概述
图1为红外遥控信号的红外载波、红外编码和调制波形的关系图;
图2为相关技术红外遥控发射控制电路的第一电路示意图;
图3为相关技术红外遥控发射控制电路的第二电路示意图;
图4为相关技术红外遥控发射和学习电路的第一电路示意图;
图5为相关技术红外遥控发射和学习电路的第二电路示意图;
图6为本发明红外遥控电路一实施例的电路示意图;
图7为本发明红外遥控方法一实施例的流程示意图;
图8为本发明终端一实施例的功能模块示意图。
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
本发明的较佳实施方式
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
本发明实施例提供一种红外遥控电路,参照图6,图6为本发明红外遥控电路一实施例的电路示意图,在一实施例中,所述红外遥控电路包括CPU100、红外发射电路200和学习电路300,其中,所述红外遥控发射电路200包括调制器210和红外发射模块220;所述学习电路300包括红外接收模块310、放大模块320和滤波整形模块330,其中,
所述处理器CPU100,设置成:产生和输出红外载波和第一红外编码;还设置成:识别第二红外信号的第二红外编码;
所述调制器210,与所述CPU100和所述红外发射模块220相连,设置成:将所述CPU100输出的红外载波和第一红外编码进行调制,产生调制波形,通过调制波形对所述红外发射模块220进行控制;
所述红外发射模块220,设置成:发射第一红外信号;
所述红外接收模块310,设置成:接收遥控器发出的第二红外信号;
所述滤波整形模块330,与所述放大模块320相连,设置成:对放大后的第二红外信号进行滤波整形,获取第二红外信号的第二红外编码。
本发明实施例提供的上述红外遥控电路的工作原理为:
一、红外遥控
如图6所示,本实施例红外遥控电路,从CPU100中产生和输出红外载波和第一红外编码,通过调制器210进行调制后,产生调制波形,从而对红外发射模块220发射第一红外信号进行控制。
二、获取遥控器发出的红外信号中的红外编码
进一步参见图6,本实施例红外遥控电路,从红外接收模块310接收遥控器发出的第二红外信号,经过放大模块320对第二红外信号的放大,并经由滤波整形模块330的滤波整形后,获取第二红外信号的第二红外编码,最后由CPU100对第二红外编码进行识别。
在相关技术的红外发射电路中,CPU进行红外发射控制时通常采用GPIO直接同步模拟调制信号,这样的缺点在于:对CPU定时要求高,在多任务操作系统下,一般无法达到红外遥控的定时要求,不可避免的带来误码和载波漂移等问题。相关方案中,也有采用外部振荡源产生载波,然后用CPU的GPIO口发生红外编码,用调制电路对载波和红外编码进行调试后控制红外发射管发射的方案,但是这种方案存在电路复杂,载波频率不能调整,无法适合手机控制多种被遥控设备的要求。
本实施例考虑到手机常用的CPU一般都有一个或者多个脉宽调变(PWM,Pulse-Width Modulation)发生器,在对特定的寄存器设置后,专用的引脚可以输出特定频率的PWM波形,一旦设置成功后,CPU不需要再介入即可工作。同时用CPU的一个GPIO口输出红外编码,这个红外编码和CPU产生的PWM波形经过调制器的调制后,产生调制波形对红外发射管/模块进行控制。这种方案即避免了直接用GPIO产生调制波形的CPU占用率高、误码和载波漂移等问题,把微秒级的定时要求降低到了几百微秒级的定时要求。这种设计方案简单而且灵活,只要修改PWM波的频率就可产生各种频率的载波,可适用于各种红外遥控协议。
对于红外学习功能,传统方案都需要用CPU或者外部的ASIC、单片机 或者FPGA解调出载波频率和红外编码。而经过CPU解调,存在CPU占用率高,误码或者载波漂移的问题,实用性不高。用ASIC、单片机或者FPGA解调存在电路复杂、成本高的缺点。在本实例中,对红外接收管/模块或者类似等效电路(如红外发射管加放大器)接收到红外信号不再进行解调,在传统的放大模块后增加一个简单的滤波整形模块后即可直接获取红外编码,而不从接收到的红外信号提取载波频率信息,由于红外编码的宽度一般是几百微秒级的(如NEC协议高低电平最低宽度512us),这样很容易通过CPU的GPIO口来识别读取。
基于上述分析,进一步参见图6,所述学习电路300还包括放大模块320,所述放大模块320,与所述红外接收模块310相连,设置成:放大第二红外信号。
所述CPU100包括PWM发生器、PWM输出引脚、第一GPIO输出引脚和第二GPIO输入引脚,其中,所述PWM发生器,设置成:产生红外载波,并通过PWM输出引脚输出产生的红外载波;所述第一GPIO输出引脚,设置成:输出红外编码;所述第二GPIO输入引脚,设置成:接收红外信号的红外编码。
进一步参见图6,所述调解器210包括逻辑电路与门,所述逻辑电路与门的两输入端分别与所述CPU100的所述PWM输出引脚和所述第一GPIO输出引脚相连,设置成:接收所述CPU100输出的红外载波和第一红外编码;所述逻辑电路与门的输出端与所述红外发射模块220相连,设置成:控制所述红外发射模块220。
进一步参见图6,所述红外发射模块220包括红外发射管D1,所述红外发射管D1,与所述调制器210相连,设置成:发射红外信号。所述红外发射模块220还包括电阻R1和场效应管Q1,所述电阻R1的一端与供电电压VCC相连,所述电阻R1的另一端与所述红外发射管D1的阳极相连;所述红外发射管D1的阴极与所述场效应管Q1的漏极相连,所述场效应管Q1的栅极与所述调制器210的输出脚相连,所述场效应管Q1的源极与地相连。所述场效应管Q1为N型场效应管。
所述红外接收模块310包括红外接收管D2,所述红外接收管D2,与所 述放大模块320相连,设置成:接收遥控器发出的第二红外信号。
所述滤波整形模块330包括RC滤波单元和比较器,所述RC滤波单元,与所述放大模块320相连,设置成:对第二红外信号进行滤波;所述比较器,与所述RC滤波单元相连,设置成:对滤波后的第二红外信号进行比较后,判决高低电平。
本发明实施例还进一步提供一种终端,包括上述的红外遥控电路,在此不再赘述。
如图7所述,图7为本发明红外遥控方法一实施例的流程示意图,在一实施例中,所述红外遥控方法包括步骤:
步骤S100、获取遥控器型号。
终端获取遥控器规格型号,所述遥控器为红外遥控器,所述遥控器可以为电视、空调的遥控器。
步骤S200、根据获取的遥控器型号和预设的红外数据库,判定获取的遥控器型号是否为已知的遥控器型号。
终端根据获取遥控器规格型号,从预设的红外数据库中查找是否有相符的遥控器规格型号,如果所述遥控器规格型号在预设的红外数据库中能够找到,则判定遥控器型号为已知的遥控器型号。
步骤S300、若是,则从预设的红外数据库中获取所述遥控器对应的载波频率和红外编码;若否,则在学习第一个按键时尝试用预置的载波频率和所识别到的红外编码来遥控所述被遥控设备,如果所述被遥控设备有反应,则确定所述预置的载波频率为所述遥控器的载波频率。若所述被遥控设备无反应,则更换载波频率后再次进行尝试。
终端根据判定的结果,如果遥控器型号为已知的遥控器型号,则从预设的红外数据库中获取所述遥控器对应的载波频率和红外编码;如果遥控器型号为未知的遥控器型号,则在学习第一个按键时尝试用预置的载波频率和所识别到的红外编码来遥控所述被遥控设备,如果所述被遥控设备有反应,则确认所述预置的载波频率为所述遥控器的载波频率。若所述被遥控设备无反应,则更换载波频率后再次进行尝试。所述预置的载波频率为38kHz、40kHz和56kHz,因为常用的红外遥控载波频率只有38kHz、40kHz和56kHz等几 种,这个尝试过程非常快。对于一款完全未知的遥控器,即终端上的遥控软件的预置红外编码数据库或者网络红外编码数据库都没有这款遥控器的载波频率和红外编码信息,那么在学习此遥控器的第一个按键时,当通过红外控制电路提取到第一个按键的红外编码后,让用户确认此按键时需要向被遥控设备发送刚才学习的编码,软件先用预置的第一载波频率(如38kHz)作为载波频率,如果被遥控设备有反应,用户确认后,第一载波频率作为此遥控器正确的载波频率,如果被遥控设备无反应,则尝试用预置的第二载波频率(如40kHz)作为载波频率进行尝试。当学习此遥控器的其他按键时,只要使用已经确定的载波频率即可,无需再次尝试。
具体的,步骤S300、在学习第一个按键时尝试用预置的第一载波频率和所识别到的红外编码来遥控所述被遥控设备在学习第一个按键时尝试用预置的载波频率和所识别到的红外编码来遥控所述被遥控设备之前,包括学习获取的遥控器型号:
红外接收模块310接收遥控器发出的红外信号;
放大模块320对接收到的红外信号进行放大,得到放大后的红外信号;
滤波整形模块330接收放大后的红外信号,对放大后的红外信号进行滤波,得到滤波后的红外信号并且判断所述红外信号的高低电平。
具体的,学习获取的遥控器型号之后还包括:
处理器CPU100接收滤波后的红外信号的红外编码,对红外编码进行识别;
处理器CPU100将预置的第一载波频率和所识别的红外编码发送出去。
具体的,步骤S300、在学习第一个按键时尝试用预置的第一载波频率和所识别到的红外编码来遥控所述被遥控设备包括:
调制器210对接收处理器CPU100发送的外载波和红外编码进行调制并且产生调制波形发送至红外发射模块;
红外发射模220块将接收到的调制波形发送出去。
本实施例提供的红外遥控方法,通过使用已知按键的载波频率或通过有限几次尝试学习和确定载波频率,大大简化了硬件或软件设计。
如图8所述,图8为本发明终端一实施例的功能模块示意图,在一实施例中,所述终端包括:
获取模块10,设置成:获取遥控器型号;
判定模块20,设置成:根据获取的遥控器型号和预设的红外数据库,判定获取的遥控器型号是否为已知的遥控器型号;
确定模块30,设置成:若是,则从预设的红外数据库中获取所述遥控器对应的载波频率和红外编码;若否,则在学习第一个按键时尝试用预置的载波频率和所识别到的红外编码来遥控所述被遥控设备,如果所述被遥控设备有反应,则确定所述预置的载波频率为所述遥控器的载波频率。若所述被遥控设备无反应,则更换载波频率后再次进行尝试。
终端的获取模块10获取遥控器规格型号,所述遥控器为红外遥控器,所述遥控器可以为电视、空调的遥控器。
终端的判定模块20根据获取遥控器规格型号,从预设的红外数据库中查找是否有相符的遥控器规格型号,如果所述遥控器规格型号在预设的红外数据库中能够找到,则判定遥控器型号为已知的遥控器型号。
终端的确定模块30根据判定的结果,如果遥控器型号为已知的遥控器型号,则从预设的红外数据库中获取所述遥控器对应的载波频率和红外编码;如果遥控器型号为未知的遥控器型号,则在学习第一个按键时尝试用预置的载波频率和所识别到的红外编码来遥控所述被遥控设备,如果所述被遥控设备有反应,则确认所述预置的载波频率为所述遥控器的载波频率。若所述被遥控设备无反应,则更换载波频率后再次进行尝试。所述预置的载波频率为38kHz、40kHz和56kHz,因为常用的红外遥控载波频率只有38kHz、40kHz和56kHz等几种,这个尝试过程非常快。对于一款完全未知的遥控器,即终端上的遥控软件的预置红外编码数据库或者网络红外编码数据库都没有这款遥控器的载波频率和红外编码信息,那么在学习此遥控器的第一个按键时,当通过红外控制电路提取到第一个按键的红外编码后,让用户确认此按键时需要向被遥控设备发送刚才学习的编码,软件先用预置的第一载波频率(如38kHz)作为载波频率,如果被遥控设备有反应,用户确认后,第一载波频率作为此遥控器正确的载波频率,如果被遥控设备无反应,则尝试用预置的第 二载波频率(如40kHz)作为载波频率进行尝试。当学习此遥控器的其他按键时,只要使用已经确定的载波频率即可,无需再次尝试。
本实施例提供的终端,通过使用已知按键的载波频率或通过有限几次尝试学习和确定载波频率,大大简化了硬件或软件设计。
终端还包括学习电路,设置成:在当判断模块20获取的遥控器信号不是已知的遥控器型号之后,并且在学习第一个按键时尝试用预置的载波频率和所识别到的红外编码来遥控所述被遥控设备之前学习获取的遥控器型号;
学习电路包括红外接收模块310,与红外接收模块310连接的放大模块320,及与放大模块320连接的滤波整形模块330;红外接收模块310,设置成:接收遥控器发出的红外信号;放大模块320,设置成:对接收到的红外信号进行放大,得到放大后的红外信号;滤波整形模块330,设置成:接收放大后的红外信号,对放大后的红外信号进行滤波,得到滤波后的红外信号并且判断所述红外信号的高低电平。
终端还包括处理器CPU100,设置成:接收滤波后的红外信号的红外编码,对红外编码进行识别,并且发送预置的载波频率和所识别到的红外编码。
终端还包括用于发送红外信号的发射电路,发射电路与处理器CPU连接;所述发射电路包括调制器210和与调制器210连接的发送模块220;调制器210设置成:接收处理器CPU发送的预置的红外载波和红外编码,对所述红外载波和预置的红外编码进行调制并且产生调制波形发送至红外发射模块220;红外发射模块220接收到的调制波形发送出去。
本发明实施例还公开了一种计算机程序,包括程序指令,当该程序指令被终端执行时,使得该终端可执行上述任意的红外遥控方法。
本发明实施例还公开了一种载有所述的计算机程序的载体。
在阅读并理解了附图和详细描述后,可以明白其他方面。
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(如系统、设备、装置、器件等)执行, 在执行时,包括方法实施例的步骤之一或其组合。
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。
上述实施例中的各装置/功能模块/功能单元可以采用通用的计算装置来实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成的网络上。
上述实施例中的各装置/功能模块/功能单元以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。
任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求所述的保护范围为准。
工业实用性
本发明技术方案的电路简单、PCB面积小、成本低,因此本发明具有很强的工业实用性。

Claims (15)

  1. 一种红外遥控方法,应用于终端,所述红外遥控方法包括:
    获取遥控器的遥控器型号;
    根据获取的遥控器型号和预设的红外数据库,判断获取的遥控器型号是否为已知的遥控器型号;
    若获取的遥控器型号是已知的遥控器型号,则从预设的红外数据库中获取所述遥控器对应的载波频率和红外编码;
    若获取的遥控器型号不是已知的遥控器型号,则在学习按键时尝试用预置的载波频率和所识别到的红外编码来遥控被遥控设备,如果所述被遥控设备有反应,则确认所述预置的载波频率为所述遥控器的载波频率。
  2. 如权利要求1所述的红外遥控方法,所述方法还包括:
    若所述被遥控设备无反应,则更换预置的载波频率,用所更换的载波频率和所识别到的红外编码来遥控被遥控设备,直到确定所述遥控器的载波频率。
  3. 如权利要求1所述的红外遥控方法,其中,所述在学习按键时尝试用预置的载波频率和所识别到的红外编码来遥控所述被遥控设备的步骤之前,该方法还包括:按照如下方式学习获取的遥控器型号:
    红外接收模块接收所述遥控器发出的红外信号;
    放大模块对接收到的所述红外信号进行放大,得到放大后的红外信号;
    滤波整形模块接收放大后的红外信号,对放大后的红外信号进行滤波,得到滤波后的红外信号并且判断所述红外信号的高低电平。
  4. 如权利要求3述的红外遥控方法,其中,所述学习获取的遥控器型号的步骤之后,该方法还包括:
    处理器CPU接收滤波后的红外信号的红外编码,对该红外编码进行识别;
    所述CPU将所述预置的载波频率和所识别的红外编码发送出去。
  5. 权利要求4所述的红外遥控方法,其中,所述在学习按键时尝试用预置的载波频率和所识别到的红外编码来遥控被遥控设备的步骤包括:
    调制器对接收到的所述CPU发送的载波频率和红外编码进行调制,并且产生调制波形发送至红外发射模块;
    所述红外发射模块将接收到的调制波形发送出去。
  6. 一种终端,包括获取模块、判定模块和确定模块,其中:
    所述获取模块设置成:获取遥控器的遥控器型号;
    所述判定模块设置成:根据获取的遥控器型号和预设的红外数据库,判定获取的遥控器型号是否为已知的遥控器型号;
    所述确定模块设置成:当所述判定模块确定所述获取模块所获取的遥控器的型号是已知的遥控器型号时,则从预设的红外数据库中获取所述遥控器对应的载波频率和红外编码;当所述判定模块确定所述获取模块所获取的遥控器型号不是已知的遥控器型号时,则在学习按键时尝试用预置的载波频率和所识别到的红外编码来遥控被遥控设备,如果所述被遥控设备有反应,则确定所述预置的载波频率为所述遥控器的载波频率。
  7. 如权利要求6所述的终端,其中,所述确定模块还设置成:若所述被遥控设备无反应,则更换载波频率,用所更换的载波频率和所识别到的红外编码来遥控被遥控设备,直到确定所述遥控器的载波频率。
  8. 如权利要求6所述的终端,所述终端还包括学习电路,其中
    所述学习电路设置成:在当确定模块确定获取的遥控器信号不是已知的遥控器型号之后,并且在学习第一个按键时尝试用预置的载波频率和所识别 到的红外编码来遥控所述被遥控设备之前,学习获取的遥控器型号;
    所述学习电路包括红外接收模块,与所述红外接收模块连接的放大模块,及与所述放大模块连接的滤波整形模块,其中
    所述红外接收模块设置成:接收所述遥控器发出的红外信号;
    所述放大模块设置成:对接收到的红外信号进行放大,得到放大后的红外信号;
    所述滤波整形模块设置成:接收放大后的红外信号,对放大后的红外信号进行滤波,得到滤波后的红外信号并且判断所述红外信号的高低电平。
  9. 如权利要求8所述的终端,所述终端还包括处理器CPU,其中
    该CPU设置成:接收滤波后的红外信号的红外编码,对该红外编码进行识别,并且发送所述预置的载波频率和所识别到的红外编码;
    所述CPU包括PWM发生器、PWM输出引脚和GPIO输出引脚,其中,
    所述PWM发生器设置成:产生所述预置的载波频率,并通过所述PWM输出引脚输出产生的所述预置的载波频率;
    所述GPIO输出引脚设置成:输出所识别到的红外编码。
  10. 如权利要求9所述的终端,所述终端还包括用于发送红外信号的红外发射电路,其中
    所述红外发射电路与所述CPU连接;
    所述红外发射电路包括调制器和与所述调制器连接的红外发射模块,其中
    所述调制器设置成:接收所述CPU发送的所述预置的红外载波和所识别的红外编码,对所述预置的红外载波和所识别的红外编码进行调制并且产生调制波形发送至所述红外发射模块;
    所述红外发射模块设置成:将接收到的调制波形发送出去。
  11. 如权利要求10所述的终端,其中,所述调解器包括逻辑电路与门,
    所述逻辑电路与门的两输入端分别与所述CPU的所述PWM输出引脚和所述GPIO输出引脚相连,设置成:接收所述CPU输出的预置的载波频率和所识别到的红外编码;
    所述逻辑电路与门的输出端与所述红外发射模块相连,还设置成:控制所述红外发射模块。
  12. 如权利要求10或11所述的终端,其中,所述红外发射模块包括红外发射管,所述红外发射管与所述调制器相连,设置成:发射红外信号。
  13. 如权利要求12所述的终端,其中,所述红外发射模块还包括电阻和场效应管,所述电阻的一端与供电电压相连,所述电阻的另一端与所述红外发射管的阳极相连;所述红外发射管的阴极与所述场效应管的漏极相连,所述场效应管的栅极与所述调制器的输出脚相连,所述场效应管的源极与地相连。
  14. 如权利要求8所述的终端,其中,所述红外接收模块包括红外接收管,所述红外接收管与所述放大模块相连,设置成:接收所述遥控器发出的红外信号。
  15. 如权利要求8或14所述的终端,其中,所述滤波整形模块包括RC滤波单元和比较器,所述RC滤波单元,与所述放大模块相连,设置成:对红外信号进行滤波;所述比较器,与所述RC滤波单元相连,设置成:对滤波后的红外信号进行比较后,判决高低电平。
PCT/CN2016/070050 2015-01-04 2016-01-04 红外遥控电路、方法和终端 WO2016107609A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510005704.2 2015-01-04
CN201510005704.2A CN104574931A (zh) 2015-01-04 2015-01-04 红外遥控电路、方法和终端

Publications (1)

Publication Number Publication Date
WO2016107609A1 true WO2016107609A1 (zh) 2016-07-07

Family

ID=53090876

Family Applications (2)

Application Number Title Priority Date Filing Date
PCT/CN2015/076359 WO2016107007A1 (zh) 2015-01-04 2015-04-10 红外遥控电路、方法和终端
PCT/CN2016/070050 WO2016107609A1 (zh) 2015-01-04 2016-01-04 红外遥控电路、方法和终端

Family Applications Before (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/076359 WO2016107007A1 (zh) 2015-01-04 2015-04-10 红外遥控电路、方法和终端

Country Status (2)

Country Link
CN (1) CN104574931A (zh)
WO (2) WO2016107007A1 (zh)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104574931A (zh) * 2015-01-04 2015-04-29 中兴通讯股份有限公司 红外遥控电路、方法和终端
CN105785379B (zh) * 2016-03-07 2019-01-11 上海摩软通讯技术有限公司 红外传感器及手持设备
CN105959752A (zh) * 2016-04-29 2016-09-21 镇江惠通电子有限公司 终端与遥控终端的适配方法、装置及遥控终端
CN107170223B (zh) * 2017-07-10 2024-02-20 万雅菡 一种可实现语音控制的无线电遥控器电路
CN108417011A (zh) * 2018-04-27 2018-08-17 上海中基国威电子股份有限公司 一种重复擦写多系统可编程红外遥控发射电路
CN108629952A (zh) * 2018-05-23 2018-10-09 安徽国电京润电力科技有限公司 一种电站用红外遥控温度报警器及报警方法
CN109830098A (zh) * 2019-03-11 2019-05-31 攀枝花学院 基于fpga的红外编码器及红外通信设备
CN112396819B (zh) * 2019-08-16 2022-06-03 北京小米移动软件有限公司 红外通信装置、系统、方法、终端设备及存储介质
CN111009111B (zh) * 2019-12-12 2021-08-27 上海龙旗科技股份有限公司 一种基于spi总线的数据编码调制方法与系统
CN111415508A (zh) * 2020-04-20 2020-07-14 深圳市金锐显数码科技有限公司 模拟遥控器的测试设备
CN114613117A (zh) * 2022-03-16 2022-06-10 深圳数马电子技术有限公司 对拷遥控器的遥控方法、对拷遥控器和存储介质
CN115035701B (zh) * 2022-06-07 2024-05-10 深圳恩浦诺科技有限公司 一种全向遥控装置及控制方法
CN115173850B (zh) * 2022-09-07 2022-12-06 广州市保伦电子有限公司 一种基于红外原理的触摸按键控制方法、装置及系统

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1215283A (zh) * 1997-10-17 1999-04-28 赖荣华 遥控器自动寻码与锁定方法及电路
US20020075161A1 (en) * 2000-09-27 2002-06-20 Raffel Mark J. Universal remote control system
EP1209642B1 (en) * 1995-09-15 2004-07-14 THOMSON multimedia Process for controlling a video recorder
CN101384034A (zh) * 2007-09-07 2009-03-11 宁波萨基姆波导研发有限公司 一种具有遥控功能的手机及其遥控功能处理方法
CN102538140A (zh) * 2012-01-17 2012-07-04 苏州智蝶科技有限公司 多载波空调红外信号自学习控制器及其方法
CN103761860A (zh) * 2014-02-20 2014-04-30 广州物联家信息科技股份有限公司 一种基于Home-IOT的红外自适应学习的方法及系统
CN103996281A (zh) * 2014-04-28 2014-08-20 东南大学 一种学习型无线转红外万向转发装置及其工作方法
CN104574931A (zh) * 2015-01-04 2015-04-29 中兴通讯股份有限公司 红外遥控电路、方法和终端

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101158867A (zh) * 2007-10-26 2008-04-09 海信集团有限公司 家电设备的远程控制方法及能够控制家电设备的报警器
CN101470945A (zh) * 2007-12-25 2009-07-01 上海晨兴电子科技有限公司 具有红外遥控功能的手机及其遥控方法
CN101998078B (zh) * 2009-08-18 2012-08-08 金宝电子工业股份有限公司 万用遥控器与其频率设定方法
CN201765694U (zh) * 2010-07-19 2011-03-16 厦门哈隆电子有限公司 多功能红外测试仪
CN102385887A (zh) * 2010-08-31 2012-03-21 晨星软件研发(深圳)有限公司 播放装置与相关方法
US20140376919A1 (en) * 2011-03-24 2014-12-25 Robert P. Stratton Remote Control System and Method
CN102610076B (zh) * 2011-12-15 2014-01-15 鸿富锦精密工业(深圳)有限公司 遥控系统及遥控装置
CN102881150B (zh) * 2012-09-13 2014-10-29 厦门华联电子有限公司 红外遥控信号学习模组及遥控装置
CN103400494B (zh) * 2013-07-23 2016-12-28 恬家(上海)信息科技有限公司 红外信号的学习方法
CN103442151A (zh) * 2013-08-23 2013-12-11 惠州学院 一种基于智能移动终端的遥控器及遥控方法

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1209642B1 (en) * 1995-09-15 2004-07-14 THOMSON multimedia Process for controlling a video recorder
CN1215283A (zh) * 1997-10-17 1999-04-28 赖荣华 遥控器自动寻码与锁定方法及电路
US20020075161A1 (en) * 2000-09-27 2002-06-20 Raffel Mark J. Universal remote control system
CN101384034A (zh) * 2007-09-07 2009-03-11 宁波萨基姆波导研发有限公司 一种具有遥控功能的手机及其遥控功能处理方法
CN102538140A (zh) * 2012-01-17 2012-07-04 苏州智蝶科技有限公司 多载波空调红外信号自学习控制器及其方法
CN103761860A (zh) * 2014-02-20 2014-04-30 广州物联家信息科技股份有限公司 一种基于Home-IOT的红外自适应学习的方法及系统
CN103996281A (zh) * 2014-04-28 2014-08-20 东南大学 一种学习型无线转红外万向转发装置及其工作方法
CN104574931A (zh) * 2015-01-04 2015-04-29 中兴通讯股份有限公司 红外遥控电路、方法和终端

Also Published As

Publication number Publication date
CN104574931A (zh) 2015-04-29
WO2016107007A1 (zh) 2016-07-07

Similar Documents

Publication Publication Date Title
WO2016107609A1 (zh) 红外遥控电路、方法和终端
CN102881150B (zh) 红外遥控信号学习模组及遥控装置
JP6096983B2 (ja) 赤外線信号の送信方法、赤外線信号の送信装置、リモコン、プログラム、及び記録媒体
US20100329688A1 (en) Universal remote-control signal transmitting device for controlling ir equipment and a setting method thereof
CN106788719B (zh) 控制设备联网的方法及装置
CN101589413B (zh) 用于编程通用遥控器的装置及方法
CN105825659A (zh) 一种终端及其红外遥控方法
CN104766462A (zh) 一种声波遥控系统以及声波遥控方法
CN104036316A (zh) 超低功耗光激活电子标签与读卡器系统及其信号处理方法
CN203386343U (zh) 一种基于wifi的学习型红外遥控器
CN203552708U (zh) 用于可见光接收终端的脱机烧录系统
US20170004704A1 (en) Infrared emission and reception circuit and method of implementing the same
CN105070014A (zh) 基于rf4ce的万能学习遥控器及万能学习遥控方法
CN205751226U (zh) 基于智能移动终端的学习型红外遥控装置
CN210199979U (zh) 一种新型自拷贝遥控器电路
CN110868254B (zh) 一种监控设备控制方法及系统
WO2017113491A1 (zh) 智能红外控制装置及智能红外控制系统
CN112383953A (zh) 便携式组网协助装置和无线传感器组网系统
CN217606412U (zh) 一种无线门铃控制系统
CN217087859U (zh) 红外放大电路、电子设备和红外遥控系统
CN210271223U (zh) 红外遥控学习电路及便携式红外遥控学习装置
CN206594816U (zh) 一种红外遥控电路
CN114429708A (zh) 一种遥控方法、存储介质及终端设备
WO2017113492A1 (zh) 智能射频控制装置及智能射频控制系统
CN219349138U (zh) 一种柔性红外测距传感器

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: 16732875

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: 16732875

Country of ref document: EP

Kind code of ref document: A1