Embedded Web and ZigBee Smart Home System Solution

Publisher:来来去去来来Latest update time:2015-03-27 Source: ck365Keywords:Web Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
The smart home system is to integrate relatively independent household appliances into a unified system, thereby realizing intelligent management, remote monitoring and resource sharing of these devices and the home environment. Its purpose is to provide people with a safe, comfortable, efficient and convenient living environment. This article introduces the design and implementation of a networked smart home system based on embedded Web and ZigBee technology.

1. System structure and function introduction

The system consists of four parts: remote PC, embedded gateway, USB camera and ZigBee internal wireless network. The design idea is to install ZigBee modules and corresponding sensors on each home device to form a terminal node, which is used to monitor the status of the device in real time and send the collected data to the ZigBee coordinator wirelessly. In this way, the ZigBee coordinator and each terminal device form a wirelessly connected star-shaped internal network. The embedded gateway is the center of the system, which can transmit the video information collected by the USB camera and the terminal node signal received from the coordinator to the Internet, thus connecting the internal network to the Internet. In particular, the use of USB cameras allows users to intuitively see all changes in the home, making up for the deficiency that most smart home systems can only view the digital information of home devices. Users can access the internal network of the home through a remote PC, view the digital information and video information of home devices, and achieve the purpose of remote monitoring.

2. System hardware design

2.1 Core Processor Module

This system uses S3C2440A as the core controller, which is a processor based on ARM920T core launched by Samsung. It uses a 16/32-bit RISC processor, has an external memory controller, LCD controller, 4-channel DMA controller, three-channel UART, two-channel SPI, two full-speed USB host device chips, and an MMU virtual memory unit. This feature can be used to transplant Linux systems and establish Web servers. The main frequency is 400MHz, with 130 I/O ports and 24 external interrupt sources, and has multiple communication interfaces. It is small in size, low in power consumption and cost, and high in reliability, making it particularly suitable as an embedded microprocessor.

2.2 Storage Module

The NANDFLASH storage module uses the high-performance storage chip K9F1208U0M-YCB064 M*8bits produced by Samsung. Information will not be lost after power failure, and it is used to store boot code, kernel and file system.

SDRAM is the system memory. It does not have the characteristic of retaining data when power is off. Its access speed is much higher than Flash memory. It is mainly used as the program running space, data and stack area in the system. The SDRAM in the system uses K4S561632C-TC75 chip. The storage capacity of K4S561632C-TC75 is 16M*16 bits (32M bytes), and the data width is 16 bits. Since S3C2440A is 32 bits and the external bus is also 32 bits, in order to maximize the performance of the processor, this system uses two K4S561632C-TC75 chips in parallel to form a 32-bit memory system.

2.3 Ethernet interface

The system uses the CS8900A chip to establish the network interface. CS8900A is a single-chip, full-duplex, highly integrated Ethernet controller produced by Cirrus that fully supports the IEEE802.3 standard. The network controller plays an important role in this system. It is responsible for sending monitoring data to the Internet and transmitting control instructions from the Internet to the bottom layer.

2.4 Camera Selection

For the image acquisition sensor, a USB camera with Vimicro's ZC301 photosensitive chip as the core is used as the image acquisition module. Vimicro's 301 series high-definition chips have advanced camera control technologies such as automatic gain enhancement technology for image light sources, automatic white balance, edge enhancement, and gamma correction.

2.5 ZigBee Module

The wireless transceiver chip uses CC2430 produced by Chipcon (acquired by TI in 2006). In addition to integrating ZigBee radio frequency (RF) front end, memory and microcontroller, CC2430 chip also has 128KB programmable memory and 8KB RAM, analog-to-digital converter (ADC), timer, AES-128 coprocessor, watchdog timer and 21 programmable I/O pins. Therefore, CC2430 is selected as the wireless transceiver part, which is very easy to use. Due to the high integration of CC2430, few peripheral devices are needed to form the minimum system. It combines Chipcon's world-leading ZigBee protocol stack, toolkit and reference design to demonstrate the leading ZigBee solution. Its products are widely used in automobiles, industrial control systems, home systems and wireless sensor networks.

3. System software design

The system software mainly includes the porting of Linux operating system, the writing of USB camera driver, the ZigBee coordinator working program and the receiving and sending program of terminal equipment, the porting of embedded Web server, etc.

3.1 Porting Linux Operating System

This system uses the 2.6 version of the Linux kernel. First, from the kernel source code. Before compiling the kernel, you must first modify the Makefile file in the root directory: ARCH=armCROSSCOMPILE=arm-linux-gcc, then run makemenuconfig to enter the configuration menu, select the required options, save and exit after the configuration is completed, and execute the kernel compilation commands in sequence: makedep; makeclean; makezImage. After the compilation is successful, the compiled kernel image file zImage will be found in /linux/arch/arm/boot/. Then you can use the Bootloader menu command to burn the kernel image to NANDFLASH.

3.2USB Camera Program

In the Linux kernel source directory, driver/usb/usb-skeleton.c provides a basic USB driver. It only requires a few modifications to complete the driver of a USB device. Recompile the kernel to generate the camera driver file, and then execute insmod to load the USB camera driver. The Linux system will register the USB video device /dev/video0 in the /dev directory.

After the camera driver is installed, the Video4Linux module must be added for video capture. Video4Linux is the kernel driver for video devices in Linux. It provides a series of interface functions for applications targeting video devices. For USB cameras, the driver needs to provide the implementation of basic I/O operation interface functions such as open, close, read, and write. The interrupt processing implementation, memory mapping function, and I/O channel control interface function ioctl implementation, etc., are defined in structfile_operation. In this way, when the application makes system call functions such as open, close, read, and write to the device file, the Linux kernel will access the functions provided by the driver through the file_operation structure.

Keywords:Web Reference address:Embedded Web and ZigBee Smart Home System Solution

Previous article:An efficient exception handling solution based on ARM processor
Next article:Micro rapid urine analyzer system based on LPC2148

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号