A self-learning universal infrared remote control system design

0 Preface

The types of household appliances in people's lives are increasing, and the types of remote controls are also increasing. Different types of remote controllers cannot generally replace each other, which brings inconvenience to people's lives.

The functions of various remote controls are roughly the same. Most of them have numeric keys, start stop buttons, forward buttons, fast forward buttons, and back buttons. The complicated ones are to add several function keys. In real life, due to individual differences of users, special functions. The use of keys is very low, and even some users have never used such keys from start to finish. Therefore, these keys can be simplified and categorized. For a small number of special function keys that are not easy to simplify and categorize, you can customize them. The method of the button area is solved. In view of this, this paper designs a self-learning universal infrared remote control system based on the idea of ​​recording waveforms based on single-chip microcomputer and large-scale programmable gate array FPGA, and adds additional facilities such as electric lights, fans and curtains without remote control function. The remote control model of the coach + learning + control can also realize remote control of the computer after installing the Girder software on the computer.

1 Introduction to infrared remote control

1.1 About infrared

Infrared is an electromagnetic wave having a wavelength between 0.75 μm and 100 μm. Its frequency is higher than that of microwave and lower than visible light, and it is a kind of light that is invisible to human eyes. Infrared communication generally uses near infrared rays in the infrared band, and the wavelength is between 0.75 μm and 25 μm. After the establishment of the Infrared Data Association (IRDA), in order to ensure the best communication results of infrared products from different manufacturers, the infrared communication protocol limits the wavelength of light waves used in infrared data communication to 850 nm to 900 nm.

Since the infrared wavelength is short and the diffraction ability to obstacles is poor, it is suitable for point-to-point linear data transmission where short-range wireless communication is required.

1.2 Infrared remote control encoding format

The control codes used for remote control are mostly modulated with a different coding standard above the carrier frequency of about 38 kHz, and then transmitted in the serial format through the on and off of the infrared carrier. Here's a quick introduction to common coding standards:

1) Pulse Coded (Pulse Coded)

The length of the pulse differs depending on the indicated data '0', '1', and Sony's remote control uses this code.

2) Space Coded (Space Coded)

In contrast to pulse coding, it is based on the length of the space between pulses, which is used in Panasonic's remote control.

3) Shift Coded (Shift Coded)

This type of coding represents the data in the direction of level shifting, so all bits have consecutive time periods, and Philips uses this encoding.

2 system hardware and software components

The system adopts the structure of "computer host + single chip + FPGA". The system software is divided into two parts: one part is the Girder program running on the host, used to decode the received signal and control the computer to perform the specified action, and the other part runs on On the single-chip microcomputer, it is used to drive the liquid crystal (LCD) display of the remote control. The hardware of the system is divided into four parts: the learner, the trainer, the receiver and the interface circuit with the host. The learner has the functions of learning and remote control. By learning the code of the original remote control, it can remotely control any electric appliance with remote control function. It includes two parts of the MCU and the FPGA. The main learning and remote control functions are performed by the FPGA to improve the running speed and integration. The MCU is used to drive the LCD display; the trainer and the receiver are responsible for adding the remote control function to the device without the remote control function. Specifically, the trainer generates a sufficient number of encoded addresses for the learner to learn, and the receiver is responsible for decoding the corresponding address and generating corresponding actions at the electrical end; responsible for implementing the host interface circuit designed for remote control of the computer Convert the infrared signal to a digital signal and send it to the host. The overall block diagram of the hardware circuit implementation is shown in Figure 1.

Overall block diagram of the hardware system

Figure 1 Overall block diagram of the hardware system

3 system hardware design and implementation

3.1 learner

The learner is the main part of the hardware circuit, and has the functions of learning and remote control. It takes FPGA as the core and the peripheral circuit is simple. It mainly consists of keyboard, memory, receiving circuit and transmitting circuit, considering the use of pure hardware to control the LCD display. The difficulty is large, decided to use the microcontroller to assist the FPGA to achieve. The receiving circuit here is different from the receiver to be mentioned later. It is specially designed for the learning function. It is responsible for receiving the infrared signal of the existing remote controller and sending it to the FPGA for identification, decoding and storage. The transmitting circuit is driven by the driving circuit and infrared light. The diode consists of two parts of the circuit, which is responsible for transmitting the encoded signal in the form of infrared light. The overall principle block diagram of the system is shown in Figure 2.

Learner hardware structure

Figure 2 learner hardware structure

3.1.1 FPGA design

It includes three modules: keyboard module, transmit code modulation module, receive decode memory module, and a total control module. Its internal structure is shown in Figure 3.

FPGA internal structure

Figure 3 FPGA internal structure

The total control module is a finite state machine, which is responsible for coordinating the work of other modules and providing an interface with the display circuit and the memory; the keyboard module receives the user's button information and encodes the output to the total module, including the address of the button, the button The type and the user select the device code to be remotely controlled; the receiving decoding memory module records the width of the high and low levels of the received signal by the counter, and stores the data in the corresponding address of the memory, the storage timing is controlled by the state machine; the transmitting code modulation module is responsible for The data information of the current button is read from the memory, and a level of high and low variation similar to the learned signal is generated, and the output is modulated with a carrier of 38 kHz.

3.1.2 LCD display circuit realized by single chip microcomputer

The display circuit adopts RT12864M-2 liquid crystal display. The LCD which is familiar to us is used to control the liquid crystal to display the state of the remote control and prompt the user to perform correct operation.

3.2 Trainer

The role of the trainer is to generate a sufficient number of coded signals for the learner to learn to control the different receivers.

SC2262 is a low-power low-cost general-purpose coding circuit manufactured by CMOS technology. It can have up to 12-bit (A0-A11) tri-state address terminal pins (floating, high level, low level), any combination. The 531441 address code is available, and the SC2262 can have up to 6 bits (D0-D5) data port pins. The coding mode is shown in Figure 4.

Coded pulse of SC2262

Figure 4 SC2262 coded pulse

A good laminate structure can control the characteristic impedance of the printed circuit board, and the traces can form an easily controllable and predictable transmission line structure called an impedance plate. The characteristic impedance of the conductor on the printed circuit board is an important indicator of the circuit design. Especially in the PCB design of the high frequency circuit, it must be considered whether the characteristic impedance of the wire and the characteristic impedance required by the device or signal are consistent and match.

Impedance Control PCB

Impedance Control In Pcb,Impedance In Pcb,Control Impedance Board,Industry Control Circuit Board

Chuangying Electronics Co.,Ltd , https://www.cwpcb.com