Design of a remote control system based on a communication controller
2026-04-06 06:20:12··#1
Abstract: This paper designs and implements a remote control system based on a communication controller. This system uses a central air conditioning unit controller, a GSM/GPRS communication controller, and a central server located on the Internet to monitor, collect, and store air conditioning operating status data. JSP technology is used to publish the operating data in the form of web pages, and interactive web page management functions are provided to achieve remote management and control. Additionally, SMS messaging can be used to further enable remote control. Keywords: Remote control; Communication controller; Internet 1 Introduction In recent years, with the rapid development of the international and domestic central air conditioning refrigeration industry, various new refrigeration technologies have emerged. These technologies improve the refrigeration performance of air conditioning equipment while reducing the production cost of air conditioning, and central air conditioning is one of the most representative products. Combining wireless communication technology with the monitoring and control of central air conditioning can not only achieve remote real-time monitoring of the central air conditioning operating status and data, but also realize remote control of the unit. 2. Overall Design of the Remote Control System This paper designs a remote control system based on a communication controller to realize the remote control of central air conditioning. Overall, it connects central air conditioning equipment, a central server, and administrators distributed in different regions via a GSM/GPRS wireless network, applying SMS (Short Message Service) and GPRS (General Packet Radio Service) technologies. With the central server located on the Internet as the core, it achieves the goal of rapidly transmitting central air conditioning operating status monitoring information and control settings information within the system, forming a complete platform for remote control of central air conditioning. Considering the characteristics of central air conditioning equipment and actual usage, this system consists of three parts: a central air conditioning unit controller, a GSM/GPRS communication controller, and an Internet central server. 3. Hardware Design and Implementation of the Remote Control System The hardware of the entire remote control system based on the communication controller mainly consists of a central air conditioning unit controller, an MSP430F147, a GSM/GPRS module, a communication interface, and a DC-DC power converter. Figure 1 shows the system hardware structure block diagram. The microcontroller (MSP430F147) is the central hub for data transmission, communicating with the central air conditioning unit controller via an RS-85 bus interface. After receiving and processing data in interrupt mode, it controls the GSM/GPRS wireless communication module to send and receive information with the central server/manager's mobile phone, thus completing the system's remote control function. [align=center] Figure 1 System Hardware Structure Diagram[/align] 3.1 Unit Controller and Unit Controller Selection The unit controller in this system adopts the HAC series central air conditioning controller. This series of central air conditioning controllers features versatility, adjustable parameters, expandable functions, and remote control capabilities. Not only can one controller perform multiple functions, but it can also be arbitrarily expanded with different control modules, making it convenient to apply, purchase, and maintain. Some wireless communication equipment manufacturers integrate the core components of their communication products, including microcontrollers, power systems, data storage, control and display, voice processing, and especially the most technically challenging high-frequency circuits and radio frequency components, into the wireless communication module. The Q2400 series (Q2403, Q2406) GPRS/GSM wireless communication modules from the French company WAVEECOM are wireless data transmission modules based on GPRS/GSM networks. The modules support voice, data, and fax functions. In areas where GPRS is unavailable, data can also be transmitted via GSM SMS. 3.2 Microcontroller Interface Circuit Design and Implementation The system uses the ultra-low power Flash mixed-signal processor MSP430F147 from Texas Instruments, USA. Figure 2 shows the schematic diagram of the communication controller interface circuit. [align=center] Figure 2 Schematic diagram of the communication controller interface circuit[/align] There are three main connections between the microcontroller and the MAX485. Two are responsible for receiving and transmitting serial data, namely, the P3.4 (UTXDO serial port 0 transmit data terminal) of the MSP430F147 is connected to the DL (driver input terminal) of the MAX485, used for the microcontroller's data output. Pin P3.5 (URXDO serial port 0 receive data terminal) is connected to the RO (receiver output terminal) of the MAX485 for microcontroller data input. Additionally, since the MAX485 module uses half-duplex communication, pin P3.3 of the microcontroller is needed as a control signal, connected to the RE and DE terminals of the MAX485 to control its receive or transmit state. Although the microcontroller and Q2406B are connected via a 60-pin general-purpose interface, only a small portion of the functions provided by the Q2406B are used in this system, so only a portion of the pins are actually used. Furthermore, the Q2406B module also has some pins connected to the SIM card, mainly including SIMVCC, SIMRST, SIMCLK, SIMDATA, and SIMPRES signal lines, used to complete data transmission with the SIM card. 3.3 Design and Implementation of the Communication Controller Power Supply Section For microcontroller application systems, the power supply is a crucial component; the accuracy and stability of the power supply output voltage play a vital role in the operation of the entire system. In the GSM/GPRS communication controller of this system, the selected microcontroller MSP430F147 operates from 1.8V to 3.6V, while the wireless communication module Q2406B operates from 3.3V to 4.5V. Considering that the Q2406B module will generate a certain voltage drop during power transmission, a 3.6V operating voltage is more suitable. This way, the GSM/GPRS controller only needs a single voltage power supply, reducing system complexity, facilitating low power consumption, and improving system stability. The GSM/GPRS communication controller receives an external 9-12V DC voltage (which can be drawn from the front-end central air conditioning unit controller circuit), which is stepped down by the LM2576T ADJ to output a 3.6V voltage (VCC) for system use. Figure 3 shows the circuit diagram of the power supply section of the communication controller. [align=center]Figure 3 Schematic diagram of the power supply circuit for the communication controller[/align] As can be seen from the circuit schematic, the power supply used in this system has the characteristics of simple circuit and few external components. This simplifies the circuit design, saves space, and the reduced number of components also helps to improve the reliability of the entire system. 4 Software Design and Implementation of the Remote Control System The software design of this system mainly includes two parts: the program design of the GSM/GPRS communication controller and the server program design of the central server. These two parts perform different functions respectively, and cooperate with each other to complete the remote control function of the central air conditioner. 4.1 Program Design and Implementation of the GSM/GPRS Communication Controller The program design of the GSM/GPRS communication controller is actually the writing and debugging of the embedded program of the microcontroller. During programming and debugging, we used the IAR Embedded Workbench EW430 (EW430 for short), a development platform for MSP430 from IAR Systems, Sweden. This platform is very powerful, with built-in MSP430 feature extensions and optimizations, internal functions supporting low-power mode, and support for mixed C and assembly language programming, making it particularly suitable for embedded development applications of the MSP430 series microcontrollers. [align=center] Figure 4 System Main Program Flowchart[/align] The main program is mainly responsible for system initialization, including microcontroller clock settings, port working mode settings, serial port settings (baud rate, interrupt enable, etc.), restoration of default system data (such as time settings, flag clearing, etc.), GPRS module initialization, interrupt initialization, etc. Then, it repeatedly queries the SIM card network registration status until registration is successful, then establishes a GPRSTCP connection, enters TCP data transmission mode, and finally the microcontroller system enters low-power mode, waiting for interrupts. The flowchart is shown in Figure 4. 4.2 Program Design and Implementation of the Central Server The program design of the central server part is actually the program design of the two major functional parts: remote data reception and processing, and reverse control implementation. The content involved includes server background listening and processing, JSP front-end web page publishing interface design, and database processing. 1. Data Channel Program Design The functions of the data channel part include: establishing a TCP connection with the GSM/GPRS communication controller; processing the received working data frames; and transmitting control command data in reverse. These functions are all implemented using Java programming. 1) Establishing a TCP connection. The GSM/GPRS communication controller sends a TCP connection establishment request to the port set by the central server through the Q2406B module. After the server receives this request through the Java listening program, the two parties establish a TCP channel for data transmission. The socket mechanism is used here. Socket is designed for the client/server model, and two programs on the network exchange data through a bidirectional communication connection. Java has several classes that allow users to create socket-based network applications. Here, the Java.net.Socket class and the Java.net.ServerSocket class are mainly used. The central server creates a TCP server, that is, establishes a server-side Socket program with ServerSocket, specifies the port to listen on, and uses the accept() method to wait for client connections. The accept() method is in a blocking state until a client connects. After the client connects, it returns a Socket instance for communication with the client. After the connection is established, data transmission with the client is generally handled using InputStream and OutputStream streams. Data access between the server and the database is handled by JDBC. 2) Processing central air conditioning working data frames: After the TCP channel is established, the server receives the working data frames sent by the GSM/GPRS communication controller. It decomposes the data according to the format specified by the communication protocol and performs corresponding processing. The main process is to extract the data items from the data frame and store them in the background database. The workflow diagram is shown in Figure 5. [align=center] Figure 5 Flowchart of server processing working data frames[/align] 3) Reverse transmission of control command frames: When the administrator logs into the JSP management page to perform control operations, the server encapsulates the parameters to be set according to the specified control command frame format, puts them into the sending buffer, and finally transmits them to the front-end GSM/GPRS communication controller through the established TCP channel, thereby completing the control of the central air conditioning. Since this series of operations are all performed on the basis of the previously established TCP connection, and the transmission in the TCP channel is a "transparent" method, the program flow and design are relatively simple, and will not be described in detail here. 3. Design and Implementation of the Control Channel Program The main functions of the control channel program include: publishing central air conditioning operating status information on a webpage; and enabling administrators to remotely control the central air conditioning system by setting parameters through the control page. The program design primarily utilizes JSP, JavaBean, and a database system. Due to space limitations, these will not be detailed here. Author's Innovation This paper designs and implements a remote control system based on a communication controller. This system has the following characteristics: simple hardware circuit design, few peripheral components, low power consumption, and high reliability; the software design uses a modular programming method, facilitating expansion, debugging, and modification; the remote control function is implemented flexibly and efficiently, with seamless integration of SMS and TCP data transmission functions, minimizing time and space constraints; the system adopts a B/S model to achieve online control, reducing client requirements; short message control commands can be freely defined, allowing for personalized control methods; the entire system combines hardware and software, boasts powerful functions, and is easy to install and debug. References: [1] Liu Weihua. New technologies and progress in refrigeration and air conditioning [M]. Beijing: Machinery Industry Press, 2005. [2] Zhang Shuwei, Guo Fadong. Hydrological and meteorological observation and control alarm system for oil platforms [J]. Shandong Science, 2005 (12): 61-63. [3] Cui Xiuyu, Wang Zhiyong. Application of GPRS technology in electronic system communication [J]. Electric Power System Communication, 2004 (8): 3-7. [4] Liu Xin, Yang Zhijia. Research and implementation of transceiver function of FlexRay communication controller [J]. Microcomputer Information, 2007, 6-1: 266-268.