Design and implementation of remote wireless monitoring system based on ARM

Publisher:乐基儿vosLatest update time:2012-04-10 Source: 21ic Keywords:ARM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

With the development of computer, network and communication technology, as well as the continuous improvement of multimedia video technology, the third generation of remote network video monitoring system based on the network has made great progress. The new generation of monitoring system is based on the network, with the compression, transmission, storage and playback of digital video as the core. The system adopts an embedded multi-task operating system, an efficient video compression chip and a powerful embedded processor, and all the video compression and transmission processing work is built into the chip. The video signal sent by the front-end camera is digitized and compressed and packaged to become a video stream of the basic network protocol. The video stream is sent to the receiving end through the network transmission. The video receiving end can use software to decode and display and process it on the PC.

System hardware platform

This system is composed of an ARM development platform with PXA270 as the microprocessor. PXA270 is a 32-bit processor that can run at four different clock frequencies: 312MHz, 416MHz, 520MHz and 624MHz. It is used in high-performance, low-power, portable and handheld devices. It incorporates Intel Xscale technology, has the ability to adjust dynamic voltage and frequency and perfect power management functions, and provides industry-leading MIPS/mw performance. The external network card interface is directly connected to the processor to achieve Ethernet communication, and the TFTP protocol can be used to quickly download the kernel and root file system images. There are 3 UARTs, namely standard, Bluetooth and full-function UARTs, which can be connected to GPRS DTU for signal transmission through the full-function UART. There are 3 USB interfaces that can be connected to USB cameras for image acquisition. The USB camera uses the Mesh V2000 camera with OV511 as the chip.

GPRS DTU is a wireless data transmission terminal device based on GPRS network, providing a fully transparent data channel. The network coverage is wide and can be used wherever a mobile phone can be used. It supports transparent data transmission and protocol conversion, backup data center, point-to-point interconnection function, and three working modes: always online, idle offline and idle power off. It has SMS and phone wake-up functions and supports automatic reconnection after disconnection.

Overall system design

The whole monitoring system is mainly composed of ARM, GPRS DTU, USB camera and PC. The ARM development board is driven by Linux operating system. The USB camera is used for image acquisition through instruction scheduling. The acquired images are wirelessly transmitted through GPRS DTU. The PC is connected to the Internet and receives the images transmitted by GPRS DTU. The host computer is written through VC++, and the images transmitted by the monitoring point can be seen. The operator can control the monitoring terminal through SMS or phone calls, and the monitoring terminal can be in working or closed at any time. In this way, the monitoring terminal can be controlled at will and traffic can be saved. It is economical and affordable, especially suitable for some environments with low requirements for dynamic images. The system structure diagram is shown in Figure 1.

Design and implementation of remote wireless monitoring system based on ARM
Figure 1 System structure diagram

System software design

This system uses Linux as the operating system, which is a multi-user, multi-tasking operating system; it has good openness and follows world standards, especially the international standards of Open System Interconnection (OSI). It has a complete built-in network. Linux is superior to other operating systems in terms of communication and network functions. It provides users with powerful and complete network functions. According to the needs of program development, the Linux operating system is cut and compiled, and the prepared Linux operating system is downloaded to the ARM development board through JTAG, and then arm-linux can be used to control the ARM development board. [page]

Image acquisition is performed by scheduling Video4Linux and image device drivers through ARM-Linux. Video4Linux is the basis of Linux image system and embedded image, and is a set of APIs in the Linux kernel that support image devices. The application of Linux in multimedia is currently a very popular research field, and the most critical technology is Linux's Video4Linux. Configure Video4Linux in the Linux kernel, as shown in Figure 2. After configuration, download it to ARM-Linux through the bootloader. The USB camera uses the Mesh V2000 camera with the OV511 chip. Configure the driver of the OV511 chip in the Linux operating system, as shown in Figure 3.

Design and implementation of remote wireless monitoring system based on ARM
Figure 2 Configuring Video for Linux

Design and implementation of remote wireless monitoring system based on ARM
Figure 3 Configuring the USB OV511 camera

Download it to ARM-Linux through the bootloader, so that image acquisition can be performed through the USB camera. The image acquisition process is shown in Figure 4.

The collected images are in BMP format. The images are too large to be transmitted over the network, so JPEG compression is required. JPEG compression technology is very advanced. It uses lossy compression to remove redundant image data. While achieving a high compression rate, it can also display very rich and vivid images, which is very suitable for video network transmission. The basic JPEG algorithm is completed by the following steps: (1) eliminating data redundancy through discrete cosine transform (DCT); (2) using the quantization coefficient matrix to quantize the discrete cosine transform coefficients; (3) encoding the quantized coefficients to minimize their entropy. Entropy coding usually uses Huffman variable word length coding. The reason for lossy image compression mainly occurs in the second step. The JPEG standard is based on transform coding and combines DCT and Huffman coding to achieve a good image compression effect. The coding method based on discrete cosine transform DCT is the core content of the JPEG algorithm [5]. The JPEG library is needed when collecting images, so it is necessary to install the JPEG library first.

Design and implementation of remote wireless monitoring system based on ARM
Figure 4 Image acquisition flow chart

Six files, cjpeg.l, djpeg.l, jpegtran.l, rdjpgcom.l, wrjpgcom.l, snapscreenshop.l, will be generated in the /usr/local/man/manl directory. Five function libraries, libjpeg.a, libjpeg.la, libjpeg.so, libjpeg.so.62, libjpeg.so.0.0, will be generated in the /usr/local/arm/3.4.3/arm-linux/lib directory. libjpeg.so.62 and libjpeg.so.0.0 are the libraries we need. Copy them to arm-linux, so that ARM supports images in JPEG compression format. Some important functions of image compression are as follows:

Design and implementation of remote wireless monitoring system based on ARM

The captured image is shown in Figure 5. If continuous frame capture is required, the number of frames to be captured is determined by grab_fd.frams, and a maximum of 32 frames can be captured at a time. [page]

Design and implementation of remote wireless monitoring system based on ARM
Figure 5: The collected images

GPRS DTU is connected to the ARM development board through a full-function serial port. Under the instruction scheduling of arm-linux, the image collected by ARM is transmitted to GPRS DTU through serial communication. arm-linux accesses the serial port through device files. When accessing a specific serial port, you only need to open the corresponding device file. The device files corresponding to serial ports Port1 and Port2 are /dev/ttyS0 and /dev/ttyS1 respectively. If you want to use the serial port for communication, you must set the properties of the serial port at both ends of the communication, including the baud rate of data transmission, the format of the transmitted data, whether there is a parity bit, flow control method, etc. Serial port settings under Linux involve an important data structure struct termios, setting the serial port baud rate struct termios Opt, setting the serial port data bit

Design and implementation of remote wireless monitoring system based on ARM

The serial port uses the open function to perform the opening operation. The open() function has two parameters, parameter 1 is the device file name to be opened, and parameter 2 is the opening method. Their meanings are as follows.

O_RDWR: Both readable and writable.

O_NOCTTY: Tells embedded Linux that the program does not want to be the "controlling terminal" of this port. If the application does not emphasize this, then any input will affect the execution of the program.

O_NDELAY: Indicates that the program does not care about the state of the DCD signal line, that is, it does not matter whether the other device is running or suspended. If this flag is not set, the program will be set to sleep until the DCD signal is low.

Use the close(fd) system call to close the serial port. Closing a serial port usually sets the DTR signal to a low level. If an external GPRS DTU is connected, the GPRS DTU will be suspended. Use the write() function to write data to the serial port. If the write call is correct, it returns the number of bytes sent, otherwise it returns -1. Read data from the serial port If the port is operated in raw data mode, the read() function call will return all the data in the serial port input buffer. If there is no data, the process will be blocked and wait until data arrives, or until the specified time is reached or an error occurs. The following method can make the read() function call return immediately.

System Implementation

The monitoring center server of this system is implemented by PC, using Windows operating system, using VC++ to write the host computer program, using TCP/IP communication, after entering the IP address of the monitoring terminal, the host computer can communicate with the monitoring terminal and receive the transmitted image, as shown in Figure 6. The system transmits an image in about 3 to 5 seconds.

Design and implementation of remote wireless monitoring system based on ARM
Figure 6 Received image

This monitoring system supports SMS and phone wake-up functions, that is, the monitoring system can be remotely controlled through SMS and phone dialing, so that it can enter the working state and transmit information. It has a controllable connection timing function and supports three working modes: always online, idle offline and idle power off. When no data transmission is performed, the monitoring system can enter the offline state, which greatly saves communication costs. When data transmission needs to be restarted, you can use your mobile phone to send SMS to the monitoring system or call to wake it up and restore the connection with the data center. You can also send SMS to configure the monitoring system anytime and anywhere for easy management.

Keywords:ARM Reference address:Design and implementation of remote wireless monitoring system based on ARM

Previous article:Design of Touch Screen Interface for Embedded Microprocessor ARM7202
Next article:Design of smart home controller based on ARM and ZigBee technology

Recommended ReadingLatest update time:2024-11-16 20:23

IAR launches cross-platform build tool for efficient building and testing in CI/CD environment
IAR Systems launches cross-platform build tool for efficient building and testing in CI/CD environments IAR's new Build tool for Arm enables users to automate build and test processes on Ubuntu, RedHat or Windows Uppsala, Sweden – November 3, 2021 – IAR Systems®, a leading globa
[Embedded]
IAR launches cross-platform build tool for efficient building and testing in CI/CD environment
[ARM Notes] Storage controller and its principle of accessing peripherals
1. Address space of S3C2410/S3C2440        The access range of 27 address lines ADDR0~ADDR26 led out by S3C2410/S3C2440 is only 128MB, so how to reach 1GB of space? The CPU also leads out 8 chip select signals nGCS0~nGCS7, corresponding to BANK0~BANK7. When accessing the address space of BANKx, the nGCSx pin outputs a
[Microcontroller]
[ARM Notes] Storage controller and its principle of accessing peripherals
Pi Zi Heng Embedded: ARM Cortex-M Core (2) - The First Microcontroller
1. Born to Glory: The Origin of ARM Cortex-M Processor   When ARM introduced the ARMv7 core architecture in 2004, it abandoned the previous "ARM+number" processor naming method (processors before ARM11 were collectively called classic processor series), re-enabled the Cortex naming method, and subdivided the Cortex se
[Microcontroller]
iTOP-4412 development board-practical tutorial-ssh server ported to arm development board
In the previous practical tutorial, the "Serial Port File Transfer Tool" was transplanted. The whole transplantation process was relatively simple, and I We did not learn anything about the protocol, and just "configured" and "compiled" to complete the whole work. Now everyone should have a basic understanding of port
[Microcontroller]
iTOP-4412 development board-practical tutorial-ssh server ported to arm development board
ARM development board embedded Linux system and host PC transfer files through serial port
Embedded Linux system and host transfer files through serial port If you want to download something from a PC to the embedded Linux system of a development board, many people will first think of using network tools such as tftp or sftp to download from the network port. But what if the network is unavailable and you
[Microcontroller]
ARM assembly instruction DCD
Introduction DCD: Data Definition directive It is generally used to allocate storage units for specific data and to initialize the allocated storage units. Syntax format: Label DCD (or DCDU) Expression The DCD (or DCDU) directive is used to allocate a continuous word storage unit and initialize it with a specified e
[Microcontroller]
[ARM bare metal program][6]ARM GNU assembler example
ARM GNU Assembler Framework .section .data     Initialized data .section .bss     Uninitialized data .section .text .global _start _start:     Assembly code Entry address Assembler Example //start.s .bass .text .global _start _start:     mov r1,#1     mov r2,#2     add r3,r1,r2 _loop:     b _loop //Makefile all:
[Microcontroller]
uC/GUI transplantation example on ARM core S3C44B0X
uC/GUI is a graphical user interface (GUI) software package for embedded systems launched by Micrigm. Since uC/GUI is written entirely in ANSI-C, it is independent of the processor and can be easily ported to different operating systems and embedded microprocessors, and can support graphic LCDs of different sizes.
[Microcontroller]
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号