Infrared

First, the definition

Remote control technology, also known as remote control technology means to achieve remote control of the controlled object, industrial control, aerospace, widely used in household appliances.

Is a wireless infrared remote control, control of non-contact, having a strong anti-interference capability, reliability of information transmission, low power, low cost, easy to implement and other significant advantages, particularly household appliances widely used in many electronic devices,

And more and more applications to the computer and mobile phone systems. With the popularity of home appliances, audio-visual products, the infrared remote controller has been widely used in various types of household electrical appliances (such as a remote control switch, intelligent switch, etc.).

Its small size, strong anti-interference ability, low power consumption, functionality, low cost, industrial equipment has been widely used. Generally, a universal remote control system of the infrared transmitting and receiving the two major components, as shown below:

 

Second, the basic principle

Infrared remote control transmitting circuit is the use of infrared light emitting diodes to emit modulated infrared light; IR receiver circuit by the infrared receiving diode, triode or silicon photocell composition,

They infrared emitter emits infrared light into corresponding electrical signals, sending post amplifier.

transmitter

Usually by the instruction key (or lever ), the instruction encoding system, a modulation circuit, a driving circuit, the transmitting circuit composed of several parts. When the command key is pressed or pushed the operating lever,

Instruction encoding circuit generates a desired signal encoded with instructions, instruction code that modulates a carrier signal, then the instruction code modulated signal of the power amplifier to develop emitted outward from the transmitting circuit by the drive circuit.

 

Reception circuit

Usually by the receiving circuit, an amplifier circuit, a modulation circuit, a command decoder circuit, a drive circuit, execution circuit (means ) composed of several parts.

The reception circuit modulated coded command signals emitted by the transmitter receives down evacuation and amplifies the demodulation circuit, demodulation circuit the modulated coded command signal is demodulated, i.e., the reduction encoded signal.

Instruction decoder decodes the coded command signal, and finally is driven by the driving circuit performs an operation control circuit implementation of the various instructions.

 

 

Third, the application

Since the infrared remote control that does not have the ability to pass through the barrier to control the controlled object as radio remote control, therefore, the design when the home appliance infrared remote controller,

As necessary as radio remote control, each set (transmitter and receiver ) have different frequencies, or codes of the remote control (otherwise it will partition controlling household appliances or interfering neighbors ), the infrared remote controller similar products,

You can have the same frequency or a remote control code, and where a remote control signal "stopping" does not appear. This provides a great convenience for the mass production of household appliances and popularity infrared remote control.

Since infrared ray is not visible, so little impact on the environment, then the long-wave infrared light fluctuation is less than the wavelength of the radio waves, the infrared remote control will not affect the other home appliances, it will not affect adjacent radio device.

 

Four, NEC protocol

 

Different companies remote chip, using the remote control code formats are not the same. The current widespread use generally describes two more, one is the NEC Protocol of PWM (pulse width modulation ) standard,

One is the Philips RC-5 Protocol's PPM (pulse position modulation ) standards.

 

1. Characteristics

8-bit address and 8-bit command length

Twice each transfer address (user code) and a command (key value)

To achieve modulation signal interval (the time between bursts by PPM)

38Khz carrier

Each period is 1.12ms (bit 0), or 2.25ms (bit 1)

 

2. Timing diagram analysis

 

Sixth, infrared receiver Notes

 

1.     LSB and MSB

LSB: least significant bit first, such as infrared communication is the least significant bit is sent and received.

MSB: most significant bit first, e.g., when obtaining the temperature and humidity of the bit stream data is received by the most significant bit.

Example, to send 0xF4 (1111 0100), using the LSB and MSB differences are as follows:

 

The LSB bits transmitted: 00101111

MSB transmitted bit order: 11110100

 

2. Write the code ideas

 

1. Write the interrupt service function, using the pin falling edge trigger mode , in which the interrupt service function, and then implement the receiving process.

 

void interrupt service routine ( void ) 
{ 
    the while ( . 1 ) 
    { 
        // add the decoded IR codes, can be used simultaneously PAin (8) to read pin level 
 
        // If decoding is successful then the decoding fails or out of the loop 
    } 
 
}

 

 

Infrared communication process, what is the role of anti-code

Inverted role is to check if the anti-code is not correct, the representative said current received infrared data is problematic!

 

Intercepted infrared remote control data

and date BB44FF00

ir data:BC43FF00

ir data:BC43FF00

ir data:BC43FF00

ir data:BA45FF00

.......

 

 

 

Why detect infrared receiver must use interrupts? what is the reason?

Because the timing of receiving infrared pulses occur randomly, you must use an interrupt to achieve real-time response

 

Guess you like

Origin www.cnblogs.com/xiangtingshen/p/10958569.html