Implementation of Internet-based smart home network controller
2026-04-06 08:17:49··#1
Abstract: With the rapid development of intelligent buildings, home automation systems are gradually improving in terms of convenience, efficiency, energy saving, and security. This paper designs an Internet-based intelligent home network controller. The upper layer achieves Internet interconnection, while the lower layer uses fieldbus technology to manage underlying devices. Its advantages lie in fully utilizing the interconnectivity of the Internet and the bidirectional, serial, and digital characteristics of the fieldbus to monitor and manage home appliances and optimize energy use. Keywords: Internet, Intelligent, CAN bus, Home automation system. With the continuous development and improvement of computer, control, network, communication, microelectronics, and building technologies, as well as their system integration and organic combination, intelligent buildings have become the development direction of modern architecture. Building automation systems (BAS), office automation systems (OAS), and communication automation systems (CAS) have already been successfully applied. At the same time, the improvement of people's living standards has placed higher demands on the residential environment in terms of comfort, safety, efficiency, energy saving, and convenience. Therefore, home automation systems (HAS) have emerged, which on the one hand manage the network of home devices, and on the other hand interconnect with the entire building's main control management system. The management of home networks mainly includes: (1) Automated monitoring of electrical appliances, optimization management and control of energy, such as appliance switches, air conditioning adjustment, lighting control, sound adjustment, temperature control, humidity control, security and safety management, and automatic billing and transfer management of water, electricity and gas meters. (2) Interconnection of digital devices, connection of local area networks between internal home network access devices, such as entertainment devices such as computers, multimedia computers, televisions, cameras/video recorders, VCDs/DVDs and digital cameras. Externally, it connects to the Internet to realize remote monitoring, education, medical care, deposit and loan, shopping, etc. At present, there are multiple HAS products coexisting, mainly concentrated in Europe, the United States and Japan, basically adopting DCS control scheme, but the network standards between the systems are different and the mutual compatibility is poor. For details, please refer to the literature. Domestically, it is currently in the initial stage of development and research, and many problems need to be solved. 1 Overall Scheme Design Generally speaking, users purchase home appliances one by one. From the perspective of informatization, most electrical appliances are field devices and do not have the conditions for informatization, which are "information islands", while digital devices have the foundation for information exchange. The complexity and diversity of device functions, the correlation between devices, the randomness of user usage, and the unpredictability of usage levels require the system to have good openness, scalability, and a high degree of intelligence. The system should be able to automatically adjust to adapt to the needs of different users and various environments. Users only need to perform simple configuration operations to achieve "plug and play" of devices, automatically identifying the type of device and establishing related connections. Based on the network data of intelligent buildings and the trend of embedded networking of peripheral devices, building LANs and the Internet have been interconnected, and some have directly connected to the home via Ethernet. This fully utilizes existing standards and existing resources within the building. Internet access provides the conditions for users to conveniently, quickly, and easily perform remote operations, and remotely query, monitor, and manage home devices. The interconnection technology between digital devices and the Internet, as well as the interconnection technology between them in LANs, is already mature and will not be discussed further in this paper. Considering the characteristics of dispersed and randomly numbered home field devices, the Fieldbus Control System (FCS), an open, digital, decentralized, and intelligent underlying control network based on bidirectional, serial, and multi-node digital communication technologies, fully meets the requirements of distributed and incremental control. The openness of the bus communication protocol allows interconnection between devices from different manufacturers to exchange information. Control tasks are downloaded separately to field intelligent instruments and devices, and control and monitoring algorithms are completed by a microprocessor, achieving integrated measurement and control and improving the reliability of the entire system. Based on the above analysis, the author designed an Internet-based intelligent home network controller, the overall scheme of which is shown in Figure 1. Taking direct Internet/Ethernet access as an example, the user's home controller HCU (Home Control Unit) is connected via a twisted-pair unshielded cable. Field circuit devices are connected to the controller via a CAN bus through their own control units. Thus, the HAS, as an information processing system, provides an embedded unified control platform for various devices within the residence. On the one hand, it enables information processing and communication capabilities for field devices; on the other hand, it provides a unified information exchange interface and control rules. Through information integration management of subsystems with different functions and information exchange between subsystems, the residence becomes an organic whole. 2. HCU Hardware Implementation The hardware structure principle of the HCU is shown in Figure 2. The controller uses the Intel high-performance 16-bit microcontroller 80C196KC, which, based on the minimum system, is expanded with 32KB of data memory and program memory. The X25045 integrates a watchdog timer, voltage monitoring, and an E2PROM (512×8bit) to store basic system parameters, such as the number of nodes, characteristic parameters of each node, node identifiers, and node-related relationships. The DS1302 serial real-time clock provides real-time information for seconds, minutes, hours, days, months, and years, and can automatically adjust the month and end date based on leap years. The 8255 parallel chip expands the 4×5 keyboard interface, providing an input interface for user settings and queries. The dot-matrix graphic LCD uses the MGL(S)12864, with the character library generated by character extraction software and stored in the EPROM. A small-scale, highly reliable, and easily expandable CAN bus is used between the HCU and the lower-level nodes, employing twisted-pair cable as the communication medium. The CAN bus interface uses the Philips 82C200 independent controller, which supports all functions of the CANBUS physical layer and data link layer, has multiple masters, group and broadcast message functions, bus access priority depends on message identifier, has strong error handling capabilities, and flexible configuration allows for local area network expansion. The bus driver interface 82C250 is selected in combination with opto-isolation to provide differential transmission and reception functions for the bus, realize electrical isolation between nodes, increase communication distance, and improve the bus's instantaneous anti-interference capability [3]. The connection with the Ethernet network uses the Rabbit2000 TCP/IP development toolbox developed based on the Rabbit2000 microprocessor and Ethernet chip. It is an embedded development system containing the TCP/IP protocol stack [4], which provides a working platform with an 8-bit high-performance microprocessor and a dynamic C language software development package. The development board provides one RS-232 interface, one manufacturer-configured port (compatible with both RS-485 and RS-232), four high-speed current output devices, four data input devices, seven timers, one real-time battery-supported clock, and one 10Base-T Ethernet interface. It also provides the complete source code for the TCP/IP protocol, enabling mutual conversion between TCP/IP and RS-232, providing a software/hardware platform for network connectivity for field devices. The development of corresponding CAN bus-based control units for field devices is not discussed here. In the underlying control network, the HCU and field control units each have their own ID identifiers. Since the CAN standard is used as the communication protocol, and the nodes have the same status in the network, the HCU is virtualized as the master, and the field devices are virtualized as slaves, responding to the master's requests and executing corresponding processes. Information can also be exchanged between nodes. 3. Software Modules and Protocols The system software mainly consists of four parts: monitoring, configuration, network management, and network protocols. The monitoring part controls and detects the operating status of home devices, displays the information in a timely manner, and performs relevant processing, such as fault alarms and event prompts. The configuration section provides users with a human-machine interface for changing system and device configurations, promptly prompting users with configuration steps and errors during the configuration process. Users can query the current status information of a specific subsystem. Network management helps users analyze, manage, and expand the network, as well as perform fault diagnosis and recovery. The network protocol implements the conversion between TCP/IP and HASP (HAS Protocol), mainly involving the conversion between TCP/IP, RS-232, and CAN data flow relationships. The system program first completes the initialization definition, including the minimum system, X25045, DS1302, keyboard definition and processing, LCD, CAN bus, and Rabbit2000, and then enters the loop monitoring state. A brief explanation of water meter billing: The water meter billing node automatically completes the billing function. When the user presses the water billing key → the keyboard processing program detects the key press → sends a billing instruction to the water billing node → the water billing node responds to the command and returns the current cost → the controller displays the water cost. Alternatively, the user can access the home HCU via Ethernet using a password → send a command to access the water billing information → the controller responds and sends a billing instruction to the water billing node → the water billing node returns the cost → the HCU returns the current water cost to the user via Ethernet. Internet access and intelligent implementation are inevitably the development direction of HAS. The hardware platform and underlying field control system experiments for this solution have been completed, and debugging with the upper-level network is underway. The advantage of this solution lies in fully utilizing the interconnectivity of the Internet and the bidirectional, serial, and digital characteristics of the fieldbus, achieving optimized management of all home network devices.