Abstract: This article mainly introduces the development of the home smart remote controller client based on Android mobile phone WiFi. By developing a remote control interface on an Android mobile phone and loading a remote control command data packet of a plurality of different types of devices, the WiFi-to-infrared module is decoded into an infrared signal matched with the home appliance, so that the physical remote control device is digitized. Achieve the goal of “a family needs only one remote control” to provide people with a smart, comfortable, environmentally friendly and energy-saving home environment.

I. Introduction

Due to the low price and mature technology of infrared remote control, many smart home appliances still use infrared remote control for control, including TV, air conditioner, DVD player, TV set-top box and so on. However, with the increase in smart home appliances in the home, the number of infrared remote controls is also increasing. The number of remote controls used in a home is as small as a few and more than a dozen, which brings three major problems:

(1) A large number of remote controls give users inconvenience in use and management;

(2) The disposable alkaline battery used in the infrared remote control will cause great harm to the environment after being discarded;

(3) After the remote control is accidentally damaged, it is difficult to find a matching remote controller.

Based on Android mobile phone WiFi, the home intelligent remote control can control multiple different brands of different types of household appliances at the same time, replacing the traditional physical remote control, realizing "a home can control all infrared remote control household appliances with only one remote control" The goal is to greatly reduce the number of remote controls and the use of disposable batteries, creating a convenient, comfortable, environmentally friendly and energy-saving home environment for people.

Second, the structure of the system

The whole system mainly includes client software and WiFi to infrared module, as shown in Figure 1. The client software transmits the encoded data to the WiFi to infrared module through WiFi through WiFi, and then the WiFi to infrared module transmits an instruction to the internal infrared transmitting module according to the encoding rule to realize the transmission of the infrared data.

(1) Composition of the home smart remote controller client

1. Collection and design of key code data packets

(1) Collection of key code data packets

The encoding format of the infrared remote control usually has NEC.

Features of the NEC format: Using a 38 kHz carrier frequency, the pilot code interval is 9 ms + 4.5 ms, using a 16-bit client code, using an 8-bit data code and an 8-bit negated data code.

As the types and models of home appliances continue to increase, the corresponding remote controllers also increase. In order to facilitate the management, access and update of the infrared code of the home appliance remote control, it is necessary to create a data packet for a variety of complicated codes.

(2) Design of remote control button data packet

Since the infrared protocols are different and incompatible with each other, directly transmitting infrared data can cause the WiFI to infrared module to be very cumbersome to process. Therefore, a plurality of infrared protocol data are collected, and various protocols are encoded according to a custom coding rule and stored in a back-end database.

In order to match the key interface with the remote control data packet, the format of the defined data packet is as follows:

The file start flag is 4 digits.

Key code attribute 128 bits: device information, access Chinese character library code, ASCII code.

Carrier frequency 4 bits: 35-42 kHz; resolution 0.5 kHz to accommodate different carrier remote controls.

Key code encoding: All keys of the remote control interface software are coded, and the number of key codes is determined according to the actual infrared protocol.

2. Design of remote control interface software

(1) Database design

The Android operating system uses the standard SQLite database to provide management database related APIs. Use the onCreate()Call Back method and the onUpdate()Call Back method in the SQLiteOpenHelper class to create and open various remote control infrared code tables and store them in the database. Facilitate the timely updating of data.

(2) The button matches the data packet

In the mobile phone interface, each button is matched with its corresponding infrared code, that is, the button function is connected with various remote controller data in the database. By calling the getReadableDatabase() method, when the user presses the button, the software will look for the data packet, and send the data packet data connected to the button, that is, the corresponding infrared code of the control home appliance, to the WiFi to infrared module in the form of WiFi.

(2) WiFi to infrared module

This module is responsible for data reception and infrared transmission. Includes WiFi data reception and transmission, serial data analysis, and infrared level transmission. The WiFi chip USR-WIFI232 is used to provide the WiFi signal and obtain the data sent by the client, and then the data is transmitted to the central control CPU through the serial port.

The module uses a single-chip microcomputer as the central control CPU to process the conversion of the encoded data and the infrared protocol. Because the price of the single-chip microcomputer is low, the resources are sufficient, and the function satisfies the requirements of the central control CPU. Therefore, the single-chip microcomputer is used as the central control CPU. In the single-chip computer program, multiple infrared protocol entry points are set, and when the encoded data is transmitted to the single-chip microcomputer, according to the customization The encoding rules look for the corresponding infrared protocol entry to emit the corresponding infrared level.

The central control CPU function hardware circuit is formed by the minimum system of the single chip microcomputer and the infrared transmitting circuit. In the central control CPU program, it includes timer function, serial data reading function and infrared level control function. The program flow chart of the central control CPU is shown in Figure 2. The timer function is mainly used to generate the carrier and superimpose with the infrared signal, thereby improving the anti-interference ability of the infrared signal to propagate in the air. The serial port data is read, and the data transmitted by the WiFi chip is analyzed, and the different infrared protocol function functions are entered according to the custom coding rules. The infrared level control function realizes the specific infrared protocol function, and the matching infrared signal is transmitted through the data provided by the serial port reading function.

Third, the experimental test

This test uses a dedicated infrared test instrument that monitors the infrared signal and displays its waveform. Android mobile phone with installation client and WiFi to infrared module are compared with physical remote control. Align the physical remote control and WiFi to infrared module to the infrared test instrument. After pressing a button of the physical remote control, observe the waveform displayed by the infrared test instrument, as shown in Figure 3; then press the corresponding remote control button on the Android phone to observe the waveform on the infrared test instrument, as shown in Figure 4. Show.

It can be seen from Fig. 3 and Fig. 4 that the Android mobile phone and the WiFi to infrared module installed on the client can realize the function of the physical remote controller.

Fourth, the conclusion

The new remote control designed on the Android mobile phone designed by this project proves that the function realized by the project is consistent with the performance of the original physical remote controller, which can completely replace the existing physical remote control and realize the physical control of the physical remote control device. cut costs. Because it is based on the Android mobile phone platform, it has the advantages of low cost, good expansion, "one machine and multiple control", environmental protection, intelligence, etc. After the work matures, it has a high market value. (Author Zhang Xuelei, Zeng Xiangyuan, Tang Jiefeng, Guo Huiting, Lu Jing)

2 times
Window._bd_share_config = { "common": { "bdSnsKey": {}, "bdText": "", "bdMini": "2", "bdMiniList": false, "bdPic": "", "bdStyle": " 0", "bdSize": "24" }, "share": {}, "image": { "viewList": ["qzone", "tsina", "tqq", "renren", "weixin"], "viewText": "Share to:", "viewSize": "16" }, "selectShare": { "bdContainerClass": null, "bdSelectMiniList": ["qzone", "tsina", "tqq", "renren" , "weixin"] } }; with (document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share. Baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)];

AVS, AVSS, TXL, GXL, UL2464,UL1015,UL1007 normally used for Car Alarm Wiring. JST, Dephi, Molex, and Chinese equipvalent part canbe assembly in the harness. Yacenter expands oversea markets, such as Europe, America,Janpan, etc. Owing to the rapid development, Yacenter has been awarded as [UL, CE, TS"certificate. 

Any technical question, inquiry price, feel free to communicate with us. 

Car Alarm Wiring

Car Alarm Wiring,Car Alarm Wire Harness,Automobile Car Alarm Wire Harness,Car Stereo Alarm Wiring Harness

Dongguan YAC Electric Co,. LTD. , https://www.yacenter-cn.com