“With the continuous advancement of science and technology in the 21st century, wireless and mobile communications have developed rapidly. New concepts and new products such as convenient and fast wireless access and wireless interconnection have gradually been integrated into people’s work field and daily life. Due to the extensive use of wireless frequencies today, the wireless frequency resources are becoming increasingly scarce, and the short-range broadband wireless communication technology has received extensive attention from the industrial circles and research institutions in many countries around the world. With the increase of various portable terminal communication devices, people’s demand for short-distance wireless and mobile communication is becoming more and more urgent.
“
1 Introduction
With the continuous advancement of science and technology in the 21st century, wireless and mobile communications have developed rapidly. New concepts and new products such as convenient and fast wireless access and wireless interconnection have gradually been integrated into people’s work field and daily life. Due to the extensive use of wireless frequencies today, the wireless frequency resources are becoming increasingly scarce, and the short-range broadband wireless communication technology has received extensive attention from the industrial circles and research institutions in many countries around the world. With the increase of various portable terminal communication devices, people’s demand for short-distance wireless and mobile communication is becoming more and more urgent. In the ubiquitous network world, it has become an inevitable trend to implement network management of various electrical equipment. At present, the management of terminal equipment in a small area, such as Ethernet, mainly uses the wired mode. Recently, with the emergence of new technologies related to wireless communication and the popularization of a large number of cheap and highly integrated wireless Modules, wireless networking technology is characterized by low installation cost and convenient use. Where wired connectivity has its place, it is becoming the technology of choice for home networking and industrial automation.
Research and design of ZigBee-based wireless serial port hub, connect ZigBee to ARM microprocessor, and connect with remote computer through Ethernet. This hub can be optimized and expanded according to the needs of remote monitoring and control applications. It has the advantages of simplicity, reliability, low power consumption and low cost, and realizes the supervision, management and equipment operation of various electrical appliances and various detection/monitoring equipment. and remote control.
2. Overall design of wireless serial hub
ZigBee-based wireless serial port hub is mainly composed of hardware and software, hardware includes circuit board, ARM microprocessor, memory, serial interface, parallel interface, network port and ZigBee wireless communication module, etc. The software part includes operating system software (OS) and applications. The hardware part is the physical basis of the whole system, it provides the software running platform and communication interface, and the software part is used to control the operation of the system and respond to various events. The completed function is that the operating system in the device is running normally, and the external devices are running normally. Through the programming of the ZigBee wireless communication module protocol, the ARM microprocessor can realize wireless communication and communication with various electrical appliances, detection/monitoring equipment through the ZigBee module. operate. Connect with the remote computer through Ethernet to form a wireless network, as shown in Figure 1. The device plays the function of a hub in the network, has a serial communication interface, and has the advantages and characteristics of long communication distance, strong anti-interference ability, and flexible networking. Using point-to-point or star topology, it can realize the transparent transmission of serial device data between point-to-point and point-to-multipoint, so that the remote computer can realize remote control of electrical equipment through this hub.
3. Hub hardware design
3.1 ARM microprocessor design
This topic selects S3C2410 microprocessor of ARM9 series, focuses on the design of the core module of the embedded ARM board, and realizes the basic environment for program operation, which is mainly composed of the following parts:
(1) Storage module: Flash memory, SDRAM memory; (2) External communication interface module: including serial interface, parallel interface, network port, JTAG interface, ZigBee wireless communication module; (3) Power supply and power management. Figure 2 shows the composition of the hardware system.
Power module function: adopt a low-power forward voltage regulator, with stable output current, over-current and temperature protection features. To have the characteristics of high efficiency, small package and low power consumption, it should be suitable for embedded system applications.
Flash memory function: used to store user-written startup programs, operating system kernels and applications.
SDRAM (Synchronous Dynamic RAM) synchronous dynamic memory function: The use of SDRAM can not only improve system performance, but also simplify design and provide high-speed data transmission. Functionally, the clock needs to be refreshed. When the system is running, most of all programs and data interact with microprocessors and peripheral devices in SDRAM, so the speed of SDRAM has a crucial impact on the running speed of the entire system.
Serial interface function: ARM microprocessor is connected with ZigBee wireless communication module through serial interface for serial communication and data transmission.
ZigBee module function: wireless communication with electrical equipment, responsible for wireless data transmission and reception.
JTAG interface function: test the system hardware, software and application programs.
3.2 ZigBee wireless communication module design
3.2.1 ZigBee Protocol Overview
ZigBee is an emerging two-way wireless communication technology for short-range communication. It has the advantages of close range, low complexity, low power consumption, low data rate, low cost, and uses the 2.4GHz band. Due to the lower data transmission rate and lower working frequency band, the ZigBee module is defined as a low-power sleep state when it is not in use, and the overall power consumption of the module is very low. Therefore, ZigBee technology is suitable for small data traffic. condition. Compared with various existing wireless communication technologies, such as GSM, 3G, Bluetooth and other wireless communication technologies, ZigBee is simpler, has lower power and lower cost, can be better applied to the fields of automatic control and remote control, and can better meet the Wireless networking and control of small, inexpensive devices supporting gaming, consumer electronics, instrumentation, and home automation applications.
3.2.2 ZigBee Module Design
ZigBee wireless communication modules also play a pivotal role in the overall hub design. The RF (radio frequency) transceiver in the ZigBee module adopts the UZ2400 chip for the RF transceiver module, and the 8051 chip for the microprocessor. RF transceiver is the core of ZigBee device, any ZigBee device must have RF transceiver. It differs from ordinary wireless transceivers used for broadcasting in its small size, low power consumption, and support for battery-powered devices. It mainly performs signal modulation and demodulation, transmission and reception, etc. The microprocessor is connected with the RF transceiver through the SPI bus, and is mainly used for processing radio frequency signals, controlling and coordinating the work of each part of the device, and communicating with external devices through the serial port. ZigBee module also includes memory, crystal oscillator, antenna, serial port and other devices. As shown in Figure 3:
4. Software design
4.1 Operating system software design
The software mainly includes two parts: operating system software and application program. The ARM BIOS software in the ARM9 microprocessor of the hub completes the initialization of the ARM, the setting of the SDRAM and the loading of the embedded Linux, and finally the control right is given to the operating system Linux, after which the system runs the application program under the management of the Linux.
In the ARM9 microprocessor, embedded Linux is selected as the operating system. Compared with other embedded operating systems, Linux is widely used in the embedded field for its superior performance such as easy porting and cutting, small kernel, high efficiency, completeness and excellent performance of network modules, open source code and numerous developers. recognition. Therefore, the use of Linux can greatly shorten the product development cycle. Using ARM9 microprocessor and embedded Linux operating system can develop wireless handheld devices with excellent performance in multimedia and wireless communication.
System development with embedded Linux software system usually includes hardware-related underlying driver software, system kernel, device driver interface, communication protocol, graphical interface, etc. First create a cross-compilation environment. After the cross-compilation environment is established, roughly the following five aspects need to be done:
① Boot Loader (BootLoader), which can realize the fast boot of the system and provide instant boot function. Responsible for loading the Linux kernel into the memory, and handing control over to the kernel initialization program; ②The transplantation and reduction of the Linux kernel (Kernel), the Linux kernel adopts a modular organizational structure, and the function of the system is increased or decreased by adding or removing kernel modules. , Set the function modules of the kernel correctly and reasonably, and only compile the code of the functions required by the system to obtain a higher running speed; ③ Loading the file system (File system) Embedded systems generally do not have large-capacity storage bodies such as hard disks, and use Flash is the main memory, and its file system also has particularity; ④Develop Graphical User Interface (GUI);
⑤Select the upper application (Application).
One of the more important is to write the ZigBee wireless communication module protocol. The ZigBee protocol is rewritten according to the needs of the hardware conditions, so that the system can exert the maximum function of the hardware under the most concise program. ZigBee is a technical standard on networking, security and application software developed based on the 802.15.4 standard. ZigBee protocol includes high-level application specification (profile), convergence layer, network layer, data link layer and physical layer. The data link layer and physical layer standards are formulated by IEEE 802.15.4, and the network layer and above are formulated by the ZigBee Alliance. The IEEE 802.15.4 standard was formulated in May 2003. It complies with the International Organization for Standardization (ISO) Open Systems Interconnection (OSI) reference model, mainly including the physical layer and the data link layer. Compared with other wireless networks, the IEEE 802.15.4 protocol has outstanding advantages: strong networking capability, wide adaptability, high reliability, and good energy saving.
Compared with other common wireless communication standards, the ZigBee protocol stack is compact and simple, and does not require high environmental configuration. As shown in Figure 4:
The design of the ZigBee node joining and leaving the network handshake protocol is: when a ZigBee node requests to join the network, it only needs to set its own channel to be the same as the channel used by the ARM microprocessor in the hub, and provide correct authentication information, that is, Can request to join the network. Similarly, if a ZigBee node wants to leave the network, it only needs to make a request to the ARM microprocessor. A node successfully joins or leaves the network, must be controlled by ARM microprocessor. Therefore, the ARM microprocessor in the hub can grasp all the node information of the network in real time.
4.2 Application software design
The application software is developed on the platform of the system software Linux. The application software is installed according to actual needs, and can be widely used in industrial control, home automation, medical care, smart agriculture, consumer electronics and remote control and other fields. Install different applications to realize the communication and control of various smart appliances and detection/monitoring equipment.
5. Conclusion
This article is to use ARM microprocessor and ZigBee module to form a wireless serial port hub, and then form a wireless network. Applications of ZigBee-based serial hubs will be numerous. It can be used in home network, building automation, vehicle-mounted systems, small offices, etc. It has the advantages of beautiful and convenient layout and no need for professional maintenance. It will have far-reaching significance for the future social informatization process. Internet home broadband access and home equipment sharing will become mainstream, and serial port hubs will play an irreplaceable role in the home. In addition, ZigBee-based serial port hubs have broad application prospects in industrial and agricultural production. It can be applied to automation, networking and intelligent remote device control in industrial and agricultural production.
The Links: 2SC0435T2A0-17 FF400R12KE3