With the rapid development of 3G network technology and the enhancement of various functions of 3G mobile phones, it has become possible to use 3G mobile phones to realize video surveillance anytime and anywhere. As a popular technology in today's IT industry, various embedded chips such as DSP, A RM, SOC, etc. are widely used in digital, security, traffic signal collection, telemedicine and other fields [1]. It can be foreseen that in the future, portable and multifunctional personal medical digital service terminals will be as popular as mobile phones [2]. Users can transmit their important physiological information to telemedicine centers or home care experts in real time, accurately and quickly at any time and anywhere, so as to obtain professional advice and guidance from doctors and realize the application of telemedicine monitoring. The wireless monitoring system in reference [3] also uses ARM9 chip and WinCE operating system, but the discussion of software design is not clear. The ARM-based wireless video monitoring system discussed in reference [4] only introduces a simple hardware structure and program flow chart, and does not give experimental results. Reference [5] only gives a simulation diagram. The 3G-based mobile phone remote monitoring system discussed in reference [6] also only introduces a simple system block diagram and application examples, and does not have experimental results. References [7] and [8] both use ARM9 core embedded chips and Linux operating system, but there is no experimental verification, and they mainly discuss Linux kernel compilation. This paper designs a 3G mobile phone embedded video acquisition system based on ARM9 chip. Compared with the video acquisition system discussed in references [3-8], this system has the characteristics of small size, low energy consumption, easy update and maintenance, and low development difficulty.
1 System hardware structure
The hardware platform of this system is shown in Figure 1. In view of the reliability, scalability and maintainability of the system, this system adopts the modular design principle. The video acquisition system hardware of the whole system consists of three parts.
Figure 1 Hardware platform
1.1 Microsystem core module
This module is composed of embedded microprocessor S3C2440A, NANDFALSH interface circuit, SDRAM interface circuit and bus interface circuit. S3C2440 is a 32-bit RISC microprocessor chip based on ARM920T core of Samsung Company, which provides low-cost, low-power and high-performance small microcontroller solutions for handheld devices and general types of applications. It adopts the new bus architecture AMBA, and its core also implements MMU and Har vard high-speed cache architecture. In addition, its enhanced ARM architecture MMU supports WinCE, Linux and EPOC32 operating systems [9], supports ARM modulation architecture, and supports booting from NAND FLASH memory. Moreover, it also integrates a wealth of on-chip functions, such as LCD controller, UART interface, USB master-slave interface, I2C interface , CAM IF unit, etc.
Although SDRAM cannot save data when power is off, it has a very high read and write speed, so it is suitable for the operation of the main program. This system uses two 32 MB chips of model HY57V561620 to cascade into a 64 MB SDRAM memory. The internal storage structure of the chip is 4 Banks×4M×16 b, a total of 4 Banks. The NAND FLASH storage system uses Samsung's K9F1208U0M chip with a storage capacity of 64M×8 b. The interface connection between the core module and the peripheral control module is realized by the bus interface.
1.2 Video acquisition module
This module uses the CMOS camera interface of the Micro2440 development board and directly uses the CAM130 camera module provided by Friendly Arm. The module consists of a 1.3 million pixel CMOS image sensor OV9650 and its interface circuit and power supply circuit. The CMOS sensor is selected because it has the advantages of high integration, small size, low power consumption, convenient programming, easy control, low cost, etc., and this type of sensor is developing in the direction of low noise and high sensitivity, so the CMOS sensor is the best choice for low-pixel image acquisition system. The interface circuit performs A/D conversion and processing on the image signal and transmits it to the CAM IF of the processor. The
microsystem core module controls the sensor through the I2C serial bus. The power supply circuit provides 1.8 V and 2.8 V voltages for the camera by the power conversion chip AS1117, of which the 2.8 V voltage is obtained by voltage division of the adjustable voltage chip (i.e., VDD_CAM in Figure 2). The power supply voltage of this module is 3.3 V, which is consistent with the power supply voltage of the microsystem core module and does not need to be provided separately.
1.3 Peripheral control module
This module consists of LCD and touch screen interface circuit, JTAG debugging interface circuit, USB master-slave port circuit, reset circuit, power supply circuit, RS 232 serial port circuit, etc. The LCD and touch screen interface circuit is used to display the video data collected after the application is written, accept the user's external control commands, etc., and plays the role of human-machine interface. JAT G debugging interface provides hardware debugging function. It follows the IEEE 11491 standard and uses boundary scan technology to realize the observation and control of chip input and output signals through boundary scan chain. An important function of JATG in this system is to burn the boot loader Boot loader into the development board for further kernel loading. The USB master port is used to connect external USB flash disk, mobile hard disk and mouse and other devices that support USB bus interface to expand storage space.
The USB slave port is used to burn WinCE kernel files to the system and communicate between the system and the PC. The reset circuit uses a special reset chip MAX811 that has both power monitoring and data protection and watchdog functions to ensure that the system can be reliably reset when an abnormality occurs. RS 232 is used to view the boot status of the Boot loader program through the hyperterminal or DNW tool and to expand the serial communication function. The power supply circuit here provides 5 V (external power supply for the entire system), 3.3 V (core module, peripheral control, image acquisition module power supply) and 1.3 V (core module power supply).
2 Image sensor interface circuit and working principle
The camera uses the CAM130 module, in which the image sensor is OV9650. The schematic diagram and interface circuit of this part are shown in Figure 2.
Figure 2 CAM130 module schematic diagram and OV9650 interface circuit
The interface between OV9650 and the processor includes SCCB (serial camera control bus) interface, data output interface and control interface.
The SCCB interface plays the role of transmitting the parameters of the internal registers of the OV9650 provided by the processor for initialization. Its data line SIOD and clock line SI-OC are equivalent to SDA and SCL in the I2C bus. In other words, SC-CB plays the role of the I2C bus. OV9650 is the slave device of the I2C bus, and S3C2440 is the corresponding master device. The I2C bus uses a serial method to transmit byte data from high to low. After each byte is transmitted, the master controller sets SDA to a high level and releases it, waiting for the slave device to send a confirmation signal. OV9650 has a built-in 10-bit A/D converter, corresponding to 10 data output ports D[0:9]. The format of the output image data can be 10-bit original RAW, RGB or 8-bit RGB/YCbCr converted by the internal DSP. The CAM IF unit of the microprocessor chip S3C2440 selected in this system supports 8-bit YUV/YCbCr format, so it is necessary to connect the data interface D[9:2] of OV9650 with the data port CAMDAT A[7:0] of CAM IF. The XVCLK of OV9650 is used to receive the 24 MHz working clock output by the CPU. The three clock signals generated by the OV9650, such as the frame synchronization signal VSYNC, the line synchronization signal HREF, and the pixel clock signal PCLK, are transmitted to the ARM chip to control image acquisition. Each VSYNC pulse indicates the start of a frame of image data acquisition, and the high level of HREF indicates the acquisition of a line of image data. The image sensor collects one byte of data in each PCLK pulse process from left to right until a frame of image data is fully acquired.
3 3G picture transmission process
The picture transmission process diagram is shown in Figure 3. The 3G mobile phone sends a text message to the MINI2440 development board to request to send a photo. The ARM9 control center receives the message and sends the file name and file size. The TCP server receives the message and receives the picture and closes the window. At the same time, it feedbacks the picture reception to the 3G mobile phone. Then the 3G mobile phone sends a request to the server to receive the photo. The TCP server sends the picture data to the 3G mobile phone until the picture is received. When the reception is completed, the 3G mobile phone feedbacks the picture reception to the server.
Figure 3 3G picture transmission solution
Some programs about Micro2440 development board sending pictures and 3G mobile phone receiving pictures are as follows:
// TCP listening
UINT ListenT hread (void * p)
{
// Prepare to receive request
CGSMW_CameraDlg * pDlg = (CGSMW_CameraDlg*) p;
SOCKET s=pDlg??> m_hSocket;
CString strFileName = temp; // Get file name
strcpy (temp, buffer + i+ 1);
long FileSize = ato l (temp); // Get file size;
strFilePath= "123ARM" + strFileName; // Progress bar operation, receive and save file
CFile file (strFilePath, CFile:: modeCreate | CFile:: mode??Write);
long iTemp = 0;
while (1)
{
rcv = recv (s, buffer, 1024, 0) ;
if (rcv == 0)
{
break;
}
file.Wr ite( buffer, rcv) ;
iTemp += rcv ;
}
file.Close( ) ;
send( s, " [ ! %] " , 4, 0) ; // Send receive file end request
int ret1= send( pDlg> m_hSo cket, buffer, iSize, 0) ;
// Send file name and size
// Send fileif
( iEnd= = SOCKET_Error)
{
strError.Format( _T( " Send File: %d") , error= WSAGetLast Error( ) ) ;
AfxMessageBox( strErr or) ;
break;
}
iTmp += iEnd;
pDlg> m_pro gr ess.Set Pos( iTmp) ;
Sleep( 10) ;
//Judge whether the sending is successful and end the processing
if (iTmp == lFileSize)
{
}
CSt ring st rTemp= "File sending completed" ;
//Reply to the other party that the reception is completed
pDlg> SendMessage (NULL, NULL);
pDlg> m_cState. SetWindowTex t (st rTemp);
//shutdown ();
ExitThread (0);
return 0;
4 Application software design and experimental results
The operating system and the hardware platform use a virtual serial port for communication. EVC has two limitations in implementing serial port data communication: one is that EVC does not support the serial port communication control MScomm, and the other is that WinCE does not support overlapping I/O operations. Therefore, WinCE's API functions and multi-threading technology are used for the underlying development of data serial port communication [10].
Windows API functions treat serial ports as files, and operations on serial ports are similar to operations on ordinary files. In the EVC environment, open the serial port by calling the CreateFile function and set the serial port read and write mode:
HANDLE m_hComm = CreateFile (szPor t, GENERIC _READ| GENERIC _WRITE, 0, NULL, OPEN _ EXISTING, 0, NULL); Because WinCE does not support overlapped I/O, the sixth parameter of CreateFile cannot be set to: FILE_FLAG_OVER_LAPPED, it is set to the general constant "0" here, otherwise the serial communication process will be blocked by the system information.
After opening the serial port, you can use the serial port initialization function SetCommState() to get the current configuration of the serial port, such as serial port number, baud rate, parity, data bits, stop bits, etc.:
BOOL CGSM W_CameraDlg::OpenPort(UINT port No, /* serial port number*/
UINT baud, /
* baud rate*/UINT parity, /* parity*/
UINT databits, /* data bits*/
UINT stopbits/* stop bits*/)
Initialize the buffer information:
PurgeComm(m_hComm, PURGE_TXCLEAR | PURGE_RXCLEAR);
m_hReadCloseEvent = CreateEvent(NULL, TRUE,FALSE, NULL);
m_hReadThread = CreateThread(NULL, 0, ReadThread Func, this, 0, & m_dw ReadThreadID);
Application development is carried out in the EVC integrated development environment.
Use the EVC AppWizard wizard to establish the MFC-based dialog program architecture. After the page layout of "image display area", "initialization", "answer", "dial", "hang up" and other buttons, add various message response times to various buttons and complete the settings of each button to respond to the commands expected by the user. The "initialization" button is to initialize the 3G network. The "answer" button is to respond to the command sent by the 3G mobile phone to the development board. The settings required for the "dial" button include the other party's number, the message sent when dialing, and the server IP and port number. After setting these, you can dial and wait for a response; the "hang up" button realizes the functions of exiting the application and closing the camera driver. It is relatively easy to add the single-click event response function of these buttons. In the EVC environment, double-click the button directly to enter the code editing area for programming and debugging. Here are some codes for the "initialization" and "dial" buttons, ... The following is the omitted part. [page]
OpenPor t( 7, 115200) ; // AT Com
if ( m_hComm ! = INVALID_HANDLE_VALU E) // If the initialization button is pressed
{
// 3G initialization
UpdateData( TRUE) ;
SendCommand( "ATE0 r n" ) ; / * Cancel echo command * /
… }
else
{
str = "WCDMA is not connected";
Messag eBox ( str) ;
return;
}
…
CString str ( "AT D") ;
UpdateData( TRUE) ;
m_hut.EnableWindow( TRUE) ;
str+ = m_RecvTele;
str+ = " ; r n";
UpdateData( ) ;
SendCommand( str ) ; / * Read the first SMS in the SIM * /
…
After the system application software is developed, open the mobile phone main control software in the 3G mobile phone application, Click the Initialize button to complete the pre-dial settings, send the information to the Micro2440 development board, wait for the response, successfully collect pictures and finally display them on the 3G mobile phone. Figure 4 shows the 3G mobile phone main control terminal software interface and picture display results.
5 Conclusion
The system is based on the ARM9 platform and WinCE operating system. It collects on-site photo information through the CMOS camera, and then connects to the World Wide Web server through the WCDMA wireless network. The mobile phone end designs software that meets the conditions, and finally realizes the picture monitoring function on the 3G mobile phone. The system has the advantages of good real-time performance, low cost, and easy to carry. It is very suitable for applications in security, transportation, handheld devices, home appliances, school patrols, etc. It is an important part of realizing the video monitoring part.
At present, only the transmission and display of images on 3G mobile phones have been realized. The transmission and display of the video part have not been completed for the time being due to time reasons. The next step will be to use appropriate video compression encoding algorithms such as H. 264, MPEG4 encoding and decoding technology to realize the video monitoring function.
Figure 4 3G mobile phone main control terminal software interface and picture display results
References
[1] Yu Liang. Structural characteristics and research overview of embedded systems [J]. Enterprise Technology and Development, 2010 (8): 55-57.
[2] Xie Yuanyuan, Sun Faqin. Design and simulation implementation of remote medical monitoring terminal based on embedded system [J]. Journal of Jinling Institute of Technology, 2006, 22 (3): 34-36.
[3] Xu Xuemei, Guo Yuanwei, Wu Aijun, et al. Research on wireless monitoring system based on embedded Windows CE50 [J]. Modern Electronic Technology, 2009, 32 (2): 25-29.
[4] Zhao Xiaojun, Ren Mingwei, Su Haixia, et al. Embedded wireless video surveillance system based on ARM [J]. Microcomputer and Application, 2010, 29 (16): 54-56.
[5] Zha Jing, Liu Bo, Cao Jianzhong. Embedded video acquisition and network transmission system [J]. Electronic Devices, 2009, 32 (3): 646-648.
[6] Li Ling, Li Taijun. Mobile phone remote monitoring system based on 3G [J]. Communication Technology, 2010, 43 (9): 130-132.
[7] Jiao Ge, Yi Xiaobo, Li Renfa. Design of remote video surveillance system based on embedded Internet [J]. Computer Technology and Development, 2009, 19 (5): 176-179.
[8] Qian Huaming, Liu Yingming, Zhang Zhenlv. Design of embedded wireless video surveillance system based on S3C2410 [J]. Computer Measurement and Control, 2009, 17 (6): 1132-1134.
[9] Wang Jing. Infrared image acquisition and processing system based on S3C2440 and TCP/IP network [D]. Nanjing: Nanjing University of Science and Technology, 2008.
[10] Liu Qingliang, Liu Jiancheng. Application of multi-threaded serial port communication in navigation system under WinCE [J]. Software Guide, 2010, 9 (3): 77-79.
[11] Li Wenxin, Wang Guanglong, Chen Jianhui, et al. Development of I2C driver for digital compass integrated circuit based on WinCE [J]. Electronic Measurement Technology, 2009, 32 (10): 73-76.
Previous article:NXP State Grid Single-Phase Meter Solution
Next article:Research and design of monitoring system based on embedded technology
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- What does this warning mean and how to deal with it?
- I have seen many articles saying that the IO port of STM32 can be set to 8 modes. How to set it? Use the control register to set...
- Xunwei IMX6ULL development board installs VMware Tool
- Problem of filter network with two probes
- Design scheme for realizing communication between upper and lower computers via USB
- Which parameters in the datasheet of the five devices, diode, triode, MOS tube, op amp, and optocoupler, can reflect...
- I want a Zircon A4 FPGA board (without downloader). If you have one, please contact me.
- Is inductance or magnetic beads used to isolate the digital power supply from the analog power supply?
- Introduction to RISC-V Toolchain
- Crazy Shell AI open source drone GPIO (LED flight status light, signal light control)