ARM9 Remote Image Wireless Monitoring System

Publisher:GoldenSunriseLatest update time:2011-06-15 Keywords:ARM9 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

In the embedded field, the ARM9 series microprocessors provide the best performance in terms of high performance and low power consumption. Therefore, the ARM9 embedded processor S3C2440 is selected to design and implement a remote image light monitoring system. Through this system, a camera can be controlled thousands of miles away to collect images and transmit them back. If the camera has a 485 interface pan/tilt, the camera's viewing angle, lens stretching, focus and other functions can also be remotely controlled through the Internet.

In addition to acquiring image data, the system also provides multi-way switch control and data acquisition functions, which can connect various sensors such as temperature and humidity and control the switch status of other external devices such as infrared night vision lights. Finally, the data can be transmitted to any place through GPRS or CDMA wireless communication modules and the Internet.

1 System Design

This system uses Samsung's S3C2440 embedded processor and arm-linux2.4.26 operating system; S3C2440 uses the ARM920T core with a main frequency of 400MHz; in addition to integrating general serial port controllers, USB controllers, A/D converters and GPIO functions, it also integrates a camera interface (CAMIF) (this interface is the core part of remote image acquisition). Under the control of the S3C2440 processor, the system collects analog video signals from the CCD camera, and then transmits them to the memory buffer through encoding and DMA. The software then compresses and packages the digital video data in the memory. Finally, the image is sent to the server of the monitoring center in the form of IP packets through the communication unit. The hardware structure principle of the entire system is shown in Figure 1.

ARM9 Remote Image Wireless Monitoring System [page]

1.1 Image sampling interface

The camera interface (CAMIF) of S3C2440 supports ITU-R BT.601/656

The image data input is in the YCbCr8-bit standard, and the maximum image that can be sampled is 4096×4096 pixels. The camera interface can have two modes for data transmission with the DMA controller: one is the P-port mode, which converts the image data sampled from the camera interface into RGB data and transmits it to SDRAM under DMA control (generally this mode is used to provide image preview function); the other is the C-port mode, which transmits the image data to SDRAM in the format of YCbCr4:2:0 or 4:2:2 (this mode mainly provides image data input for encoders such as MPEG-4 and H.263). Both of the above working modes allow a clip window to be set, and only the image data entering this window can be transmitted to SDRAM. The above process can be illustrated by Figure 2.

ARM9 Remote Image Wireless Monitoring System

The camera interface of S3C2440 receives image data of ITU standard, but cannot directly receive analog video signals output by CCD cameras, so a SAA7113 video decoder chip is also required. SAA7113 can input 4 analog video signals, and can convert the 4 inputs through different configurations of internal registers. The input can be 4 CVBS or 2 S video (Y/C) signals, and the output is 8-bit "VPO" bus, which is in standard ITU656, YUV 4:2:2 format. The initialization of SAA7113 needs to be carried out through the I2C bus, and the I2C controller integrated in S3C2440 can realize this process. The connection principle between the camera interface of S3C2440 and SAA7113 is shown in Figure 3.

ARM9 Remote Image Wireless Monitoring System

[page]

The CE pin of SAA7113 is connected to a GPIO pin of S3C2440, so that the working state of SAA7113 can be controlled. When there is no need to collect images, the GPIO port outputs a low level, so that the SAA7113 chip is in a low power consumption state, saving energy consumption. Comparing Figures 2 and 3, it can be seen that the SAA7113 chip is the "external image sensor" in Figure 2. It provides the sampled standard ITU video data to the camera interface of the embedded system. These data are transferred to the memory through the P port or C port control of DMA, so that the image data can be further processed in the memory.

1.2

The driver of the image sampling interface is written according to the Linux video device driver model V4L (video for Linux). The driver uses the C port mode to communicate with DMA. Before sampling one frame of image, first set the resolution of the sampled image and the clip window size and other parameters, then set the memory address of the video sampling output buffer accessed by the DMA controller, and then start the acquisition of one frame of image by setting the CAMIF interface control register of S3C2440. When one frame of image is acquired, the CAMIF interface will automatically start one C port DMA communication to transfer the acquired image data to the memory. After the transmission is completed, a C port interrupt will be generated to notify the driver that the sampling and transmission of one frame of data has ended. Specifically, this driver needs to implement the following functions:

Initialize the clock register of the CAMIF interface of S3C2440. Mainly, the camera clock frequency division register (CAMDIVN) is set according to the external crystal frequency of SAA7113. Bits 0 to 3 of this register are the frequency division coefficient, which is calculated as:

CAMCLK_DIV=UPLL/(CAMCLK * 2)-1

(Initialization code omitted — Editor's note)

Configure the sampling parameters of the CAMIF interface. Mainly the format of the input source image data, the output image format, the sampling window size, the DMA access address and other parameters. Here is a structure defined to store the configuration information related to the CAMIF interface: [page]

struct s3c2440_camif_cfg_t {
int src_x; //输入的源图像宽度
int src_y; //输入的源图像高度
int
dst_x; //输出的目标图像宽度
int dst_y; //输出的目标图像高度
int dst_fmt;
//输出的目标图像数据格式
int pre_x; //预览通道(P端口模式)输出的图像宽
int pre_y;
//预览通道(P端口模式)输出的图像高
int pre_fmt; //使用通道(P端口模式)时设为1
__u16 bypass;
//为1时表示不启用按比例的图像放大/缩小
__u16 ycbcr; //输入图像的YcbCr顺序
struct s3c2440_camif
*dev; //设备的系统信息
};

The above configuration information is ultimately associated with a series of registers. This structure provides a clear, centralized storage buffer for reading/writing registers.

Interface functions for opening, closing and controlling the camera. These three interface functions are written according to the V4L specification, and their prototypes are as follows:

① Open the camera interface function:

static int

v4l_cam_open(struct video_device *v,int mode);

② Camera control interface function:

static int

v4l_cam_ioctl(struct video_device *v,unsigned int cmd,void *arg);

③ Close the camera interface function:

static void v4l_cam_close(struct video_device *v);

Interrupt processing interface function. This interrupt processing function is called after completing 1 frame of image acquisition using C port mode. The function prototype is defined as follows:

static void
s3c2440_camif_isr_c(int irq,void *dev_id,struct pt_regs *regs);

The implementation function for reading image data. This function uses the value of dev→rdy to determine whether the acquisition conversion of a frame of image has been completed. If the value is set to 1, it means that the sampling is completed, and the data can be copied from the image data buffer to the user's storage space; if it is 0, the function enters a blocking state or returns the EAGAIN flag. By the way, the value of dev→rdy is set in the interrupt processing function. (Implementation code omitted - Editor's note)

分页

[page]

1.3 Image Data Compression

The image data of one frame processed by the CAMIF interface of S3C2440 is relatively large and needs to be further compressed before it can be suitable for network data transmission. The S3C2440 processor does not provide a hardware image compression encoder, but because of its high main frequency, image compression can be performed using software. Considering the CPU processing power and the high requirements for the clarity of a single-frame sampled image, the JPEG/MJPEG method based on the discrete cosine transform algorithm (DCT) is used to compress and encode the image data.

1.4 Image Data Transmission

The communication unit is responsible for the data transmission of the image. In this system, there are two types of communication units available. One is the GPRS/CDMA wireless transmission module. They are connected to the S3C2440 processor through the serial port, and this communication method can be used in environments where Ethernet transmission cables are difficult to lay. Its disadvantages are small communication bandwidth and slow transmission speed, but if the real-time requirements are not high, it can also transmit high-definition static images. Another communication unit is the 10MHz CS8900a Ethernet transmission module. It can be connected to the local area network, and then send the monitoring image to the monitoring server of the local area network or to the Internet through the gateway. This communication method has high speed and good real-time performance, but a wired Ethernet network must be installed at the monitoring site.

1.5 Camera PTZ Control

The camera's pan/tilt control interface uses RS485 communication. Since there is only an RS232 controller inside the S3C2440, a RS232 to RS485 conversion interface is designed using the MAX485 chip. The circuit principle is shown in Figure 4.

ARM9 Remote Image Wireless Monitoring System

The data flow direction of RS485 in Figure 4 is controlled by the level of GPE13 port.

2 System Software Design

The system software includes lower computer software, server software and client software. The lower computer software is deployed on the remote image monitoring device. This software is started as a Linux daemon process, responsible for compressing the sampled image data, packaging the compressed image, and then uploading it to the monitoring server through Socket communication. If the GPRS/CDMA wireless transmission module is used, the upper computer software will automatically perform PPP dialing after the system is started and establish a TCP/IP communication pipeline. The client software is deployed on a PC connected to the Internet, which provides end users with functions such as browsing monitoring images and setting monitoring parameters. The server software is also deployed on a computer connected to the Internet. This computer has a fixed IP or domain name on the Internet. The server software is started as a background process and acts as a bridge for communication between the client and the remote image monitoring device. Because the IP address of the remote monitoring device is dynamic and cannot be directly addressed by the client, the server is needed as an intermediate bridge for communication between the two parties.

分页

[page]

The lower computer software completes the hardware initialization and control functions in the remote image monitoring device through the interface provided by the driver, and is also responsible for image compression and transmission. It is the control center of all devices, so here we focus on describing the workflow of the lower computer software, as shown in Figure 5.

ARM9 Remote Image Wireless Monitoring System

In order to save power, some high-power devices and equipment such as SAA7113, cameras and night vision infrared lights only work when needed, so these devices are disconnected from the power supply during initialization.

The lower computer program reads the device ID number (the ID number is unique) stored on the device, as well as the domain name/IP address and port of the monitoring server, and then the lower computer program actively connects to the monitoring server as a Socket connection client. After the connection is successful, the device ID number is sent. At this time, if a monitoring client wants to view the image of a remote monitoring device, it only needs to send a request to the monitoring server and tell the server the device ID number to connect. The server will establish a Socket connection channel for the client and the remote monitoring device based on the Socket handle corresponding to the ID number.

3 Conclusion

The remote image wireless monitoring system has been successfully applied in the ice coverage monitoring of high-voltage transmission lines. In the field all-weather environment, it can timely and accurately monitor the ice thickness of high-voltage transmission lines and issue early warning processing information, thus effectively avoiding the occurrence of cable break accidents.

Remote image monitoring technology has developed along with the development of computer technology, digital communication technology, network technology, automatic control technology, and LSI and VLSI integrated circuits, and this system based on the ARM9 embedded processor is the concentrated embodiment of the cross-cutting and integrated development of these technical disciplines. Practice has proved that the low power consumption, high performance and multi-function characteristics of the ARM9 processor meet many special needs of remote image monitoring and are a good choice for realizing remote image monitoring.

分页

Keywords:ARM9 Reference address:ARM9 Remote Image Wireless Monitoring System

Previous article:Design of open CNC system based on ARM and CPLD
Next article:Design of IDE hard disk interface based on ARM920T

Recommended ReadingLatest update time:2024-11-17 07:27

ARM9 embedded processor S3C2440 implements a remote image light monitoring system
  For image surveillance systems, users often put forward such functional requirements: they hope to be able to monitor distant objects. These objects may be distributed in suburbs, deep mountains, wastelands or other unattended places; in addition, they hope to obtain relatively clear surveillance images. , but it is
[Microcontroller]
ARM9 embedded processor S3C2440 implements a remote image light monitoring system
About the coprocessor CP15 and MCR/MRC instructions in ARM9
In ARM-based embedded application systems, the storage system is usually implemented through the system control coprocessor CP15. CP15 contains 16 32-bit registers, which are numbered 0 to 15. Instructions for accessing CP15 registers MCR ARM register to coprocessor register data transfer MRC Coprocessor register
[Microcontroller]
Design of real-time power load control management system based on ARM9 and GPRS
In today's industrial society where electricity is scarce, timely and accurate acquisition of users' electricity load information and timely control and dispatch based on it are of great practical significance for improving energy utilization. Traditional electricity settlement relies on manual on-site data reading
[Microcontroller]
Design of communication interface for measurement and control terminal based on ARM9 processor
  0 Preface   The control terminal is an indispensable main component of the measurement and control device and the basis for the existence of the measurement and control system. Many measurement and control systems currently used have large scale, scattered control points, low computing density of most control points
[Microcontroller]
Design of communication interface for measurement and control terminal based on ARM9 processor
ARM9 interrupt architecture
Purpose of the experiment: When a button on the TQ2440 development board is pressed, an interrupt is triggered and the LED light is turned on. Experimental source program: /********************************************************************************** *s3c24xx.h ***************************************************
[Microcontroller]
ARM9 interrupt architecture
Comparison between ARM9 processor and ARM7 processor
ARM9 series processors are mainstream embedded processors designed by the British company ARM, including ARM9TDMI and ARM9E-S series. This article mainly introduces their structure and performance comparison with ARM7TDMI. Taking mobile phone applications as an example, 2G mobile phones only need to provide voi
[Microcontroller]
Comparison between ARM9 processor and ARM7 processor
Design of media player based on ARM9
1 Introduction The rapid development of computer multimedia technology and network technology has made multimedia applications based on streaming media also used in many fields, especially in network videophone, remote monitoring, and video on demand. With the maturity of computer multimedia compression technol
[Microcontroller]
Design of media player based on ARM9
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号