With the rapid development of network technology and information appliances, more and more families are demanding to establish home networks. The home gateway is the core of the entire home network. It mainly realizes Internet access, remote control, and the functions of connecting heterogeneous subnets within the home. The home gateway based on the PC solution is not only expensive, but also requires the computer to be turned on and able to communicate all the time, and software and hardware that interfere with communication tasks cannot be run on the computer. Therefore, in order to adapt to ordinary users, the home gateway should be designed as a cheap non-PC device. However, if 8-bit or 16-bit microcontrollers are used, it is difficult to implement the TCP/IP protocol due to its slow speed and limited resources, so it is not ideal.
Therefore, this paper uses the 32-bit embedded microprocessor with ARM core as the hardware platform, combines wireless communication technology, and realizes a convenient and practical home gateway by transplanting the embedded operating system Clinux and developing corresponding drivers, applications and embedded Web servers on it.
Hardware design of the system
System structure and working principle
The system structure of the home gateway is shown in Figure 1. It is based on Samsung's 32-bit RISC processor S3C44B0X, and builds a hardware platform through external expansion memory (Flash/SDRAM), Bluetooth module, LCD display, keypad, Ethernet interface module, telephone voice control module and infrared transceiver module, and can realize multiple control methods.
Figure 1 Home gateway system structure diagram
1) Local control with keyboard and display: The system is equipped with 16 buttons and a 128×32 dot matrix LCD display, which is convenient for users to set and query the status locally, such as data query, electrical appliance control, etc.
2) Local infrared remote control: Through the infrared remote control module with self-learning function, infrared remote control of indoor home appliances can be realized.
3) Remote telephone voice control: This is a telephone remote control based on the public telephone switching network (PSTN), which is used for telephone command control, such as remote control of home appliances, telephone alarm, etc.
4) Internet-based remote control: Using the browser-side/server-side structure (B/S structure), users can directly use the IE browser that comes with Windows as the client program to achieve the purpose of remote control anytime and anywhere.
Wireless communication technology is the most ideal technology for realizing home networks, which can save the trouble of rewiring inside the home. In the design of this home gateway, the Bluetooth module is used as the wireless communication module to communicate with the underlying functional modules.
Hardware circuit composition
The hardware design of this system mainly includes the basic hardware platform built with S3C44B0X embedded microprocessor as the core, as well as the hardware design of modules such as Bluetooth communication, telephone voice control and infrared remote control. The
hardware block diagram of the basic system with S3C44B0X as the core is shown in Figure 2.
Figure 2 Block diagram of the basic hardware platform of the home gateway
ARM microprocessor S3C44B0X: S3C44B0X is an ARM7 core SoC produced by Samsung. By expanding a series of complete general peripheral devices based on the ARM7TDMI content, it is very suitable for handheld devices and general embedded applications.
Flash memory interface circuit: Flash chips are used to store embedded operating systems, home network servers, CGI gateway applications, and file systems required to support various services in home gateways. In the system, a HY29LV160 is used to build a 16-bit Flash memory system with a storage capacity of 2MB. After the system is powered on or reset, it obtains instructions and starts executing, so the Flash memory is configured to ROM/SRAM/FLASH Bank0. [page]
SDRAM interface circuit: The existence of an embedded operating system requires a certain amount of dynamic RAM. The decompressed operating system will be moved from Flash to SDRAM and reside in memory; at the same time, the user stack and running data will also be placed in SDRAM. The 8K cache provided by the S3C44B0X chip is far from meeting the requirements. Considering the needs of practical applications, Samsung's K4S281632D is selected in the design. Its data width is 16 bits, composed of 4 banks, and the storage capacity is 16 MB. Bank6 and Bank7 of S3C44B0X support SDRAM, so they can be easily connected. Set the data width of Bank6 to 16 bits in the bus width control register BWSCON, set MT = 0x3, Trcd = 0x0, SCAN = 0x01 in the Bank6 control register BANKCON6, and set BK76MAP = 0x110 in the storage capacity register BANKSIZE.
10/100M Ethernet interface circuit: S3C44B0X already includes Ethernet MAC control, but does not provide a physical layer interface. Therefore, an external physical layer chip is required to provide an Ethernet access channel. RTL8201 is selected in this design. Since the S3C44B0X chip already has a MAC controller with an MII interface, and the RTL8201 also provides an MII interface, and the definitions of various signals are also very clear, the connection between RTL8201 and S3C44B0X is relatively simple. When connecting, you only need to interconnect the corresponding pins of the two chips. It is worth noting that the RTL8201 using CMOS technology cannot be directly connected to the RJ45 interface. Due to the difference in level signals and the existence of network impact signals, the two need to be isolated and level signal conversion components. In this design, the network transformer HR61H58L is selected.
Serial interface circuit: In order to complete the communication with the Bluetooth communication module, infrared transmission and reception module, and telephone voice control module of the home internal network, the home gateway needs an asynchronous serial communication interface. Since the S3C44B0X has only two asynchronous serial ports, the serial port needs to be expanded. In this design, an ST16C554 chip is selected for serial port expansion. Since the high and low level signals defined by the LVTTL circuit of the S3C44B0X system are different from the high and low level signals defined by the RS-232-C standard, the signal level conversion is required for communication between the two. Here, MAX202 is used to convert the serial port data signal into TTL level, and then the interrupt request is output through ST16C554. The interrupt requests of the four serial ports are ORed to generate the IRQ signal INTREQ, which is then connected to the terminal controller of the CPU through the CPLD.
IIC interface circuit: S3C44B0X contains an IIC bus master controller, which can be easily connected to various devices with IIC interfaces. In this system, an AT24C01 is used as an IIC memory. AT24C01 provides 128 bytes of EEPROM storage space.
LCD display module: This module can use the LM057QC1T01 produced by Sharp, which is a graphic dot matrix 256-color STN liquid crystal module with a resolution of 320×240. Since both S3C44B0X and LM057QC1T01 have strong versatility, they are easy to connect, but it is necessary to add a circuit that can realize the voltage deflection function between the controller and the LCD interface to achieve the 27V deflection voltage required for the output LCD display.
Keyboard interface circuit: 8 general I/O ports form a 4×4 keyboard.
Other peripheral circuits required by S3C44B0X: JTAG interface circuit (for JTAG debugging), reset circuit and power supply circuit.
Other functional modules Bluetooth module: In this solution, the Bluetooth hardware chip uses the ROK 101008 module of Ericsson. The home gateway is developed by installing BlueZ under the Clinux operating system to cooperate with the Bluetooth module and establishing related protocols based on the L2CAP layer.
Telephone voice control module: The dual audio dial chip DTMF8870, speech synthesis chip ISD1420, ring current detection chip circuit and 89C51 are used to form the telephone voice control module.
Infrared remote control module: Infrared receiving module and infrared transmitting module are added to the system. The infrared receiving module uses BA5302. The infrared signal is input from the top of it. After amplification, shaping and demodulation, it is converted into a digital signal of TTL level; the infrared transmitting module modulates and sends out the infrared original code just learned. Here, the modulated signal is generated by software coding, so the circuit is very simple.
System software platform
Establish Clinux development environment The application development environment based on Clinux operating system is generally composed of the target system hardware development board (S3C44B0X development board) and the host PC. The kernel compilation of the operating system used by the target board, the development and debugging of the application program need to be completed through the host PC. The connection between the two is generally established through the serial port, parallel port or Ethernet interface. First, install the standard Linux operating system on the host machine, and then you can establish a cross-development environment. Download the tool chain from the Internet and install the cross compiler on the host machine. It is also necessary to reconfigure and compile the kernel according to the needs of the home gateway and perform Clinux transplantation. After success, you can see two kernel files in the Clinux-Samsung/images directory: image.ram and image.rom. Burn image.rom into the Flash memory corresponding to ROM/SRAM/FLASH Bank0. When the system is reset or powered on, the kernel will self-decompress to SDRAM and start running. In this way, an embedded application development platform is successfully built.
Development of hardware drivers and applications
The development of hardware drivers and applications must also be carried out in a cross-compilation environment. First develop on the PC, then transplant to the target machine for debugging and finally solidify on the target machine. The hardware drivers that need to be developed in this design include: Ethernet card controller, serial port, LCD driver, Bluetooth module, keypad driver, etc. Writing drivers for the Linux kernel is not as complicated as other operating systems. You only need to write a few basic functions for the corresponding devices and register them with VFS. Generally, corresponding changes are made to special hardware devices based on a ready-made driver. On the basis of embedded operating system, micro GUI should be developed, dynamic web pages and CGI programs should be written to realize embedded WEB technology, security authentication, and wireless communication protocols, etc. For example, remote control based on Internet is realized by browsing the dynamic web pages of Web Server in home gateway. The remote control program needs to extract useful control command information from user access information, and then compose command frames according to the internal protocol of home control network. The key to realize control is the compilation of CGI program, and its process is shown in Figure 3.
Figure 3 Internet remote control program flow chart
Conclusion
This paper discusses the software and hardware design of a wireless home gateway based on ARM microprocessor S3C44B0X and Clinux. The home gateway has various control methods and can realize remote control of home appliances by browsing the web anytime and anywhere. The home gateway has low cost, easy to upgrade, and easy to promote and apply.
Previous article:Design of Intelligent Motor Protector Based on ARM Microprocessor LPC2132
Next article:Design of wireless home gateway based on S3C44B0X
Recommended ReadingLatest update time:2024-11-16 14:37
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Various bus transmission rates
- 555 classic circuit diagram: 555 simple delay circuit diagram
- TUSB9261 -- USB3.0 to SATA interface bridge chip programming guide
- Please help me find the schematic diagram, thank you very much
- msp430f5529 capture plus serial port source code
- Playing with circuits (3) - Alternative circuits for LM5050/LM5060
- Talk about the current mainstream microcontrollers, what are their advantages and disadvantages
- USB drive cannot be used
- Asking a non-professional question
- FPGA Classic Design Case