This paper uses ARM core 32-bit embedded microprocessor as hardware platform, combines wireless communication technology, transplants embedded operating system mClinux, and develops corresponding drivers, applications and embedded Web server on it to realize a convenient and practical home gateway.
System hardware design
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 as the core, 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 keys 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 type of telephone remote control based on the public switched telephone network (PSTN), used for telephone command control, such as remote control of home appliances, telephone alarms, 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 network, which can save the trouble of rewiring in 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. [page]
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 of the basic hardware platform with S3C44B0X as the core is shown in Figure 2, and the functions and interface circuits of each part are analyzed as follows.
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 complete series of general peripheral devices based on the ARM7TDMI content, it is very suitable for handheld devices and general embedded applications.
Flash memory interface circuit: Flash chip is used to store embedded operating system, home network server, CGI gateway application and file system required to support various services in home gateway. A HY29LV160 is used in the system to build a 16-bit Flash memory system with a storage capacity of 2MB. After the system is powered on or reset, it gets instructions from here and starts to execute, so the Flash memory is configured to ROM/SRAM/FLASH Bank0.
SDRAM interface circuit: The existence of 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, 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 was selected in the design. Its data width is 16 bits, consisting 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 has Ethernet MAC control inside, 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 S3C44B0X already has a MAC controller with an MII interface inside the chip, and 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 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 transmitting and receiving module and telephone voice control module of the home internal network, the home gateway needs an asynchronous serial communication interface. Since S3C44B0X has only two asynchronous serial ports, the serial port needs to be expanded. In this design, a 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 must be performed 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 interface. In this system, an AT24C01 is used as IIC memory. AT24C01 provides 128 bytes of EEPROM storage space, which can be used to store a small amount of data that needs to be saved when the system loses power, such as parameter settings of the home gateway and user authentication codes.
LCD display module: This module can use 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 a circuit that can realize the voltage deflection function needs to be installed between the controller and the LCD interface to achieve the 27V deflection voltage required for the output LCD display.
Keyboard interface circuit: Use 8 general I/O ports to 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 Ericsson's ROK 101008 module. 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 telephone voice control module is composed of dual-audio dialing chip DTMF8870, speech synthesis chip ISD1420, ring current detection chip circuit and 89C51.
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 the module. After amplification, shaping and demodulation, it is converted into a digital signal of TTL level. The infrared transmitting module modulates the infrared original code just learned and sends it out. Here, the modulated signal is generated by software coding, so the circuit is very simple. [page]
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 mClinux transplantation. After success, you can see two kernel files in the mClinux-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.
Hardware driver and application development
The development of hardware drivers and application programs should also be carried out in a cross-compilation environment. First, they are developed on a PC, then ported to a target machine for debugging and finally solidified 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 the embedded operating system, a micro GUI must be developed, and dynamic web pages and CGI programs must be written to implement embedded WEB technology, security authentication, and wireless communication protocols. For example: Internet-based remote control is achieved by browsing the dynamic web pages of the Web Server in the home gateway. The remote control program needs to extract useful control command information from the user access information, and then compose the command frame according to the internal protocol of the home control network. The key to achieving control is the compilation of the 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 mClinux. The home gateway has various control modes and can remotely control home appliances by browsing the web anytime and anywhere. The home gateway has low cost, is easy to upgrade, and is easy to promote and apply.
Previous article:Design of stepper motor driver based on embedded ARM Linux
Next article:Digital multi-channel voice recorder based on ARM9 processor S3C2410
Recommended ReadingLatest update time:2024-11-17 00:49
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
- Extending HomeKit with Matter
- What are the charge pump chip solutions for boosting voltage to 12V?
- Exceeding the 2022 goal
- [EETalk] Let’s chat. What aspect of power supply do you want to know most?
- I recently got an esp32-Ethernet-Kit_A_V1.2 and tried it out.
- Line and Matter
- Are switching power supplies also divided into inductive and capacitive types?
- [Hua Diao Hands-on] Interesting and fun music visualization series project (33) --- Nucleic acid tray lamp
- How does a charge pump boost voltage? The principle is very simple and you will understand it at a glance.
- DC-DC output voltage and output impedance issues