Interactive machine top box remote infrared controller and control methodTechnical field
The present invention relates to a kind of infrared controller and control method, be specifically related to a kind of interactive machine top box remote infrared controller and control method.
Background technology
Existing set-top box remote controller mainly is to adopt infrared ray to control, and infra-red remote control utilizes near infrared light to transmit telecommand, and wavelength is 0.76um~1.5um.With near infrared as the remote control light source, be because at present infrared emission device (infraluminescence pipe) and the luminous of infrared receiver device (photodiode, triode and photoelectric cell) be subjected to photopeak value wavelength to be generally 0.8um~0.94um, in the near infrared light wave band, the spectrum of the two just in time overlaps, can mate well, can obtain higher transfer efficiency and higher reliability, but its range of control and coverage are very limited, generally all in 10 meters.
The radiating portion of telepilot comprises keyboard matrix, coded modulation, LED infrared transmitter, and receiving unit generally includes infrared receiving terminal, photoamplifier circuit, and demodulation part, as shown in Figure 1.When having button to press on the keyboard for remote control, the electric signal of key assignments changes electric signal into infrared ray signal (being called for short " infrared signal ") by infrared emission head and launches through decoding and modulation; And receiving unit changes the infrared ray signal that receives into electric signal through behind the infrared receiving terminal, then photo amplifier amplifies signal, carry out again corresponding demodulation, give Single Chip Microcomputer (SCM) system it is encoded, Single Chip Microcomputer (SCM) system can convert different key assignments to the code storage of non-equivalence to self EEPROM(EEPROM (Electrically Erasable Programmable Read Only Memo)).
The bottleneck of prior art is and can not controls at a distance, for the such company of radio and TV operator, not only to control with program request the set-top box of local monitor chamber and test, also need the strange land, effectively control and the program request test such as the set-top box of branch office or minute machine room, clearly existing short-range infrared controller can not be taken on this.
Summary of the invention
Goal of the invention: the problem and shortage for above-mentioned prior art exists, the purpose of this invention is to provide a kind of interactive machine top box remote infrared controller and control method, realize the control to the set-top box in strange land.
Technical scheme: for achieving the above object, the first technical scheme that the present invention adopts is a kind of interactive machine top box remote infrared controller, comprise service end computing machine, junction network, client computer and remote infrared control module, described service end computing machine sends to client computer by junction network with infrared remote coding, client computer is with the wired remote infrared control module that sends to of infrared remote coding, and the remote infrared control module is converted to the infrared remote coding that receives infrared signal and sends to the interactive machine top box.
Further, also comprise set-top box remote controller, described remote infrared control module comprises microcontroller, infrared transmitting circuit and infrared receiving circuit, described set-top box remote controller is launched infrared signal to infrared receiving circuit, infrared receiving circuit receives described infrared signal and is converted to infrared remote coding, is stored in the storer of microcontroller; Described infrared transmitting circuit will send to the interactive machine top box with the corresponding infrared signal of infrared remote coding that the service end computing machine sends.
Further, described infrared receiving circuit comprises infrared receiving terminal, and described infrared receiving terminal is used for the infrared signal that receives is converted to electric signal, through being stored in the storer of microcontroller behind the microcontroller coding.Further, the model of described infrared receiving terminal is NB1838.
Further, when infrared signal was sent to the interactive machine top box, microcontroller was modulated on the carrier wave after infrared remote coding is decoded, and sends to the interactive machine top box after the two-stage amplifying circuit of infrared transmitting circuit amplifies.
Further, described two-stage amplifying circuit comprisestriode 9013 andtriode 8050.
The second technical scheme that the present invention adopts is a kind of interactive machine top box remote infrared control method, comprises the steps:
(1) study: the infrared receiving terminal of set-top box remote controller being aimed at the remote infrared control module, each button on this set-top box remote controller is pressed one time, the infrared signal that infrared receiving terminal is launched each button of set-top box remote controller that receives is converted into electric signal, through being stored in the storer of microcontroller behind the microcontroller coding;
(2) the service end computing machine sends to client computer by junction network with infrared remote coding, and client computer is with the wired remote infrared control module that sends to of infrared remote coding;
(3) the remote infrared control module is with the infrared remote coding and the contrast of the coding in the storer that receive, and the electric signal that corresponding encoded is corresponding is converted into infrared signal and sends to the interactive machine top box.
Beneficial effect: 1, the application of the invention, effectively solved the problem that to control the strange land set-top box whenever and wherever possible, for monitoring districts and cities machine room, interoffice station machine room and a minute machine room set-top box signal provide a great convenience, changed in the past and notified program request to test the behindhand type of confirmation signal situation by manual telephone system, eliminated former blind spot to strange land machine room user class signal monitoring;
2, change the custom that must realize with telepilot traditionally the controller top box, directly used keyboard and mouse to get final product.
Description of drawings
Fig. 1 is existing infrared control module block diagram;
Fig. 2 is remote infrared control module block diagram;
Fig. 3 is the circuit diagram of infrared receiving circuit;
Fig. 4 is the circuit diagram of infrared transmitting circuit;
Fig. 5 is the overall signal process flow diagram of remote infrared control.
Embodiment
Below in conjunction with the drawings and specific embodiments, further illustrate the present invention, should understand these embodiment only is used for explanation the present invention and is not used in and limits the scope of the invention, after having read the present invention, those skilled in the art all fall within the application's claims limited range to the modification of the various equivalent form of values of the present invention.
The remote infrared control module comprises with single-chip microcomputer as master chip, comprise infrared transmitting circuit and infrared receiving circuit, as shown in Figure 2, infrared transmitting circuit is mainly used in launching infrared signal and comes the controller top box, and infrared receiving unit mainly is for from set-top box remote controller " study " key assignments.
Single-chip microcomputer can be learnt by infrared receiving terminal the infrared signal (or title " ultra-red order ") of other telepilots, and be stored in the single-chip microcomputer, in addition in order to store more infrared remote coding (being called for short " infrared coding "), this control circuit is expanded infrared coding by serial communication, can with study to infrared coding upload to PC by serial ports and preserve hereof, also can download to by the infrared coding file that serial ports is preserved PC this Single-chip Controlling terminal and store and launch by infrared emission head.Write simultaneously infrared coding and decoding program (these programs all are existing) in the inside of single-chip microcomputer, also had part to store instruction, wherein decoding program is used for infrared emission, and coded program is used for reception and study to the infrared signal of telepilot emission.
Infrared receiving circuit, as shown in Figure 3.The main part of infrared receiving circuit is exactly integrated infrared receiving terminal, and it is done the circuit such as infrared receiving diode, amplification, demodulation, shaping together, only has three pins.Be respectively+the 5V power supply,, signal output.Integrated infrared receiving terminal adopts NB1838 herein, and its Photoelectric Detection and prime amplifier are integrated in same encapsulation, and centre frequency is 37.9kHz.This integrated infrared receiving terminal can receive various dissimilar infrared remote coding signals, and the epoxy encapsulation structure of NB1838 provides a special Infrared filter for it, and natural light and electric field are disturbed very strong protective.The purpose of NB1838 is that various infrared remote coding signals (be called for short " infrared signal ") amplify to receiving, detection, shaping, obtain Transistor-Transistor Logic level, input to the single-chip microcomputer middle port, through generating infrared remote coding (being called for short " remote control mode " or " infrared coding ") after the processing of single-chip microcomputer coding, be stored in the external storage in the single-chip microcomputer.
Infrared transmitting circuit, as shown in Figure 4.Because the 38kHz infrared remote-controlled signal becomes Transistor-Transistor Logic level after receiving through infrared receiving terminal, be stored in the external storage after processing through processor again.When wanting the vat red external signal, get and produce first the 38kHz carrier signal.And then the remote control mode in the external storage is modulated on the 38kHz carrier signal, can restore strictly according to the facts the infrared signal of learning.At first produce the 38kHz carrier signal by single-chip microcomputer, and remote control mode is modulated on the carrier wave, the infrared pulse signal (i.e. " infrared signal ") that at last output has modulated.The infrared pulse signal that is exactly modulated to the carrier wave of this moment output carries out two-stage throughtriode 9013 and 8050 and amplifies to drive the infrared pulse signal that infrared transmitting tube gives off 940nm.Adopt the one-level amplifying circuit if get when building radiating circuit, a little less than the infrared ray signal that infrared sending tube is sent, remote-controlled distance is very limited.Show that one-level is amplified remote-controlled distance and probably only had about 1m, can not reach user's request for utilization through many experiments.Therefore added that herein second amplifying circuit makes its coverage at 5~10m, substantially satisfy user's remote control distance needs.
When receiving ultra-red order, the infrared ray signal becomes TTL signal (transistor-transistor logic level signal) through behind the infrared receiving terminal, and reverse form, inputs the external interrupt pin INT0 of single-chip microcomputer again, and by depositing in the single-chip microcomputer behind the coding.Before the long-distance infrared remote-controlled effect of performance, carry out " study " to the remote infrared control module first, namely first the infrared signal of set-top box is remembered in the single-chip microcomputer of remote infrared control module.
Learning process: the integrated infrared receiving terminal of set-top box remote controller being aimed at the remote infrared control module, each button is pressed one time, infrared receiving terminal is converted into electric signal with the key assignments of the set-top box remote controller that receives, through storing in the single-chip microcomputer process of client PC control single chip computer storage behind the single-chip microcomputer coding into.
When sending ultra-red order, first the instruction that is pre-stored in the computer is arranged on the corresponding bank bit of single-chip microcomputer, sends by transferring again infrared signal to after the infrared coding decoding of single-chip microcomputer with appointment again.In addition, in order to improve the antijamming capability of signal transmission, also need decoded electric signal is modulated on the carrier wave of upper frequency and launch.The carrier frequency of design is 38khz, and the pulsed modulation oscillatory circuit that can adopt the CMOS gate circuit to consist of is realized.
Fig. 5 is the overall signal flow process of remote infrared control, and the below will according to the direction of transfer of signal, be described in detail this scheme.
When 1, will control long-range set-top box, open first local service end PC, come to connect with set-top box by the ip address of client PC, the ip address of the client PC in different places is unique, and service end is connected by the tcp agreement with client; During the button of the telecontrol panel on clicking service end PC interface, the key assignments of the button on the telecontrol panel that the service end PC is clicked the user sends to the client PC of opposite end by junction network;
2, the remote infrared control module directly links to each other with client pc machine by the usb mouth, and what use in fact is that the RS-232 serial ports communicates.Receive the instruction of service end PC transmission when the client PC after, the remote infrared control module will be after the key assignments process coded modulation of client, by the infrared transmitting circuit on self module key assignments is sent to set-top box in the mode of infrared signal, set-top box is played control action.During the whole process, what the client PC was in good time keeps full-duplex communication with the service end PC.
Specific as follows:
1, first the remote infrared control module is carried out the action of " study ", the key assignments of set-top box remote controller is remembered in the single-chip microcomputer storer, concrete learning process is referring to above chatting;
2, open the service end PC of remote infrared control after, the ip address such as the 172.23.79.135 that connect strange land machine room client PC, service end is connected in the tcp mode with client, carries out between service end and the client regularly communicate by letter with affirmation the other side's state;
3, click corresponding key at telecontrol panel after the connection, service end passes to client after key assignments is transmitted by junction network, client is finished modulation and emission by the remote infrared control module with key assignments with the key assignments that receives, the key assignments of service end is sent to the set-top box of client with the form of infrared signal, thereby be implemented in long-range effective control to the set-top box that is positioned at client.