Wireless network technology has been widely used in the past one or two years. Whether it is home users or corporate users, we can see the shadow of wireless technology. To understand wireless monitoring, I believe everyone is more familiar with wired monitoring systems, which are mainly composed of network cameras, PTZ, video servers, monitoring terminals and other equipment. The equipment required for wireless monitoring systems is relatively simple. It only requires wireless network cameras, wireless APs, monitoring terminals and other equipment. If long-distance wireless monitoring is required, outdoor wireless bridges and other equipment must be added.
This paper proposes a wireless video surveillance system based on embedded Windows CE5.0. It solves the problems of high cost, large size, limited transmission distance, high power consumption, and inconvenient installation of traditional video surveillance systems. The design of this system will provide a new idea, method and technical route for wireless video surveillance; it has broad application prospects in wireless video fields such as security, distance education, remote video conferencing, and medical systems.
The Windows CE operating system is the newest member of the Windows family, designed specifically for the computing environment used by handheld computers (HPCs). Such an operating system allows full portable technology to work in conjunction with existing Windows desktop technologies. Windows CE is designed as a general-purpose operating system for small devices (typically diskless systems with limited memory). Windows CE can be used to configure the hardware platform by designing a layer of code between the kernel and the hardware, which is the well-known Hardware Abstraction Layer (HAL) (in previous explanations, this was called the OEMC (Original Equipment Manufacturing) Adaptation Layer, or OAL; the Kernel Compression Layer, or KAL. To avoid confusion with Microsoft's Windows NT operating system HAL).
1 Introduction to the overall hardware block diagram of the system
The hardware system of the wireless monitoring system based on embedded WinCE5.0 is mainly composed of an embedded terminal and a PC on the server side. The microprocessor of the embedded terminal platform is S3C2440 based on the ARM9T20 core. S3C2440 has a rich interface, among which the camera interface is connected to the CMOS camera and the serial port is connected to the GPRS transmitter module; the server side is mainly a PC and a GPRS receiver module. The whole block diagram is shown in Figure 1.
The system first uses the S3C2440 microprocessor to control the CMOS camera to collect image data. After compression encoding, the compressed data is transmitted through the GPRS wireless transmission module. The PC on the server side receives the data through the GPRS receiving module, and decodes the video data through the corresponding application program and displays it on the screen. The core control board of the embedded terminal platform containing the S3C2440 microprocessor is shown in Figure 2.
[page]
2 System expansion interface design
2.1 Camera interface design
Camera (CAMERA), also known as computer camera, computer eye, etc., is a video input device that is widely used in video conferencing, telemedicine and real-time monitoring. Ordinary people can also communicate with each other through cameras on the Internet with images and sounds. In addition, people can also use it for various popular digital images and audio and video processing.
The image acquisition chip used in the camera is the OV9650 image sensor, which has a 10-bit data interface and a standard SCCB interface, and is packaged in CSP-28 with a small size.
The chip supports three data output formats: RGB (4:2:2), YUV (4:2:2), and YCrCb (4:2:2). It has 138 built-in device control registers with addresses ranging from Ox00 to Ox8A. The sensor window size, gain, white balance correction, exposure control, saturation, hue and other parameters can be easily set through the SCCB interface. The camera module including the image sensor OV9650 is shown in Figure 3.
S3C2440 has a dedicated camera interface. The CPU can be directly connected to the CMOS image sensor. When the 0V9650 outputs data in 8-bit YUV format, data lines D2 to D9 (D9 is the MSB bit, D2 is the LSB bit) are used; when the output data format is 10-bit RGB, data lines D0 to D9 (D9 is the MSB bit, D0 is the LSB bit) are used. The system uses the YUV format. The camera module is connected to the Camera interface of S3C2440. Its circuit diagrams are shown in Figures 4 to 6.
The TI level conversion chip 74LVC4245 is used, which is a dual-power level shifter. The level shift is performed inside it. The 5 V end uses 5 V power as VDD_CAM, and the 3.3 V end uses 3.3 V as VCC33. The dual power supply can ensure that the output swing of both ports can reach the full power supply amplitude.
[page]
2.2 GPRS module interface design
General Packet Radio Service is an abbreviation for mobile data service available to GSM mobile phone users. GPRS can be said to be a continuation of GSM. GPRS is different from the previous continuous channel transmission method. It is transmitted in packets. Therefore, the user's fee is calculated based on the transmission data unit, not the entire channel. In theory, it is cheaper. The transmission rate of GPRS can be increased to 56 or even 114Kbps.
S3C2440 has three UART channels. One of the channels is used to design a serial port to connect it to the GPRS module. Since S3C2440 has its own UART controller, hardware development and software design are relatively simple. However, the high and low level signals defined by the RS 232 standard are completely different from the high and low level signals defined by the circuits of general microcontroller systems. For example, the standard logic "1" of the S3C2440 system corresponds to a level of 2 to 3 V, and the standard logic "0" corresponds to a level of 0 to 4 V. Obviously, it is completely different from the level signal described in the RS 232 standard. In order for the two to communicate, the signal level must be converted. The commonly used level conversion chips are MAX232, MAX3221 and MAX324.3. The specific design circuits are shown in Figures 7 and 8.
3 Customization of operating system platform
Windows CE is a highly modular embedded operating system. Because of this, users customize the operating system to meet specific requirements. If you customize the Windows CE operating system for your own embedded device, you must perform a series of operations such as creating, building, running, and publishing the OS. In the wireless video surveillance system, according to the functional requirements, the process of using Platform Builder5.0 to customize the system is as follows:
(1) Import the BSP development package. Since the S3C2440 based on the ARM920T core of Samsung is used, find the SMDK2440.CEC file under the SMDK2440 file in the BSP package and import it. Open "Platform Builder5.0" and select "Manage Catalog Features" under the "File" menu, as shown in Figure 9. Click "Import" in the pop-up dialog box, browse to the smdk2440.cec file under the SMDK2440 file, and import it.
(2) Create a project. According to the requirements of the WinCE wireless monitoring system, select appropriate components to implement it during the customization of the system. The components include: MFC components that support application development and related components that support the network.
(3) Compile the project: Click the menu “Build OS” → “Sysgen” to start compiling the project.
(4) Download the runtime image and start it after debugging is successful. After successful compilation, files such as nk.bin and nk.nb0 will be generated in the directory WinCES00PBWorkspacestestlRelDirsmdk2 440_ARMV4I_Release. Download nk.nb0 to the hardware platform for running.
4 Driver Development
4.1 Camera driver development
Camera driver development is a difficult point in the design, and it is also a key part. Since the video data collected by the camera can be processed as a data stream, the camera driver will be developed using a streaming interface method.
(1) Open the customized operating system project in Platform Builder, then create a new WIN32 DLL project and add two C++ source files, namely: camera.cpp and IIc.cpp. Among them, camera.cpp contains the driver's entry function DLLMain(); the driver prefix is "CIS", and IIc.cpp contains the function to configure the camera-related registers through the ICC interface.
(2) According to the previous hardware circuit and the working timing of the OV9650 chip, the OV9650 initialization is implemented by writing the CIS_Init function of the stream interface. It mainly includes the following three steps: call the InterruptInitialize(SYSINTR_CAM, CameraEvent, NULL, 0) function to notify the system to register the interrupt; call the CreateEvent() function to create a CameraEvent event; call the CreateThread() function to create a CameraThread thread. In the Camera Capture Thread service function, call the WaitForSingleObject(CameraEvent, Display Time) function to wait for the occurrence of the Camera Event event. This event is triggered by the SYSINTR_CAM interrupt associated with it. In addition, other stream interface functions (CIS_IOControl, etc.) can also be implemented in a similar way.
Previous article:Position-Independent Programming for ARM Processors
Next article:Design of intelligent navigation cane system based on ARM
Recommended ReadingLatest update time:2024-11-17 00:04
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
- [ESP32-Korvo Review] (5) Implementation of Microphone Audio Stream Capture
- TI Battery Fuel Gauging Basics Training
- 【ST NUCLEO-H743ZI Review】(5) USB to Serial
- Questions about the calculation formula for the life of aluminum electrolytic capacitors
- Espressif ESP32-C5
- EEWORLD University ---- Haiwell IoT Terminal MQTT Protocol Application Video Tutorial
- [TI recommended course] #TI LED driver# RGB LED circuit design reference
- PNIRP-06V-S Properties Introduction
- [Synopsys IP Resources] Why HDCP 2.3 is required for high-definition large-screen displays
- AM335x Evaluation Board Quick Test (1)