Design and implementation of a remote control storable image acquisition system

Publisher:游走人间Latest update time:2010-08-12 Source: 现代电子技术 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

0 Introduction

With the continuous advancement of science and technology, image acquisition technology has been increasingly widely used in the world, such as military industry, medical, electronics and other fields. In China, there is also a widespread demand for industrial automation and intelligentization using image acquisition technology in various industries, and industrial field applications have gradually begun, such as drug testing and packaging in the pharmaceutical industry, printing color testing in the printing industry, surface quality testing of PCB boards, quality testing of LCD screens, etc. Therefore, with image acquisition function as the core, developing an image acquisition system that is suitable for industrial applications, fully functional, and easy to operate will bring great benefits to users.

At present, there are many and very complete solutions for image acquisition. This paper chooses to use FPGA for image acquisition and designs an image acquisition system. Different from the common image acquisition system used in industry, this system adds storage function and improves the traditional control operation method.

1 System overall design

The overall design of the system is as follows: the image is displayed on the monitor through the VGA interface, and the display rate can reach 25 f/s; the system can store the current image seen on the monitor in a bitmap format to a USB flash drive or other USB device, and can echo the stored image; the remote control is used instead of the button control method, and all functions such as exposure, gain, crosshairs, image storage and reading can be adjusted by the remote control within a few meters, which is flexible and convenient to operate. The system uses Micron's 1.3 million pixel MT9T001 as the image sensor; Altera's FPGA chip EP2C8Q208 is used to complete the control of image acquisition and display functions. When browsing images in real time, it collects black and white image data of the Bayer array from MT9T001, and then converts the collected data into 24-bit RGB data using an interpolation algorithm. Since the image acquisition speed is 40 MHz and the VGA display speed is only 25 MHz, the FPGA puts the converted data into SDRAM for buffering before sending it to the ADV7125 chip that drives the VGA display; ADV7125 is ADI's high-speed digital-to-analog conversion chip, which converts digital true color image data into analog video signals that can be transmitted using the VGA interface; Atmel's ATmega 8L chip is used to complete the decoding of the remote control, the control of reading and writing USB devices, and the creation of bitmap formats; FTDI's VNC1L-1A chip with an integrated file system is used as the interface chip for communicating with USB devices. The single-chip microcomputer plus an interface chip completes the USB Host function, eliminating the need to process the file system and saving software development time. This image acquisition system with storage function and remote control mode is applied to the industrial field and made into a product as one of the many industrial cameras. Figure 1 is its overall design block diagram.

2 Storage Module Design

There are many ways to store data at present, such as hard disk, FLASH, CD, etc. Among them, the most portable and convenient ones should be mobile hard disk, USB flash drive, SD card. These methods can transfer data through USB port (SD card or CF can transfer data through USB port with the help of corresponding card reader). It can be seen that the application of USB bus is very common. The advantages of USB bus such as plug-and-play, fast speed and self-power supply are indeed unmatched by other devices. Therefore, the storage part of the system is designed as USB device. USB devices are divided into USB host devices and USB slave devices. USB slave devices can only passively write or read data from the host device, which does not meet the requirements of this system. Therefore, the USBHost device is selected. As long as the USB slave device such as USB flash drive is plugged into the USB port of the system, the current picture to be stored can be stored in the storage device such as USB flash drive.

A typical example of a USB Host device is a PC. This host function is completed under the operating system. Therefore, most of the microcontroller chips on the market that can be transplanted with operating systems have integrated USB Host functions, such as Samsung and Philips' ARM chips, and JZ4740, a MIPS core chip developed by Ingenic. This solution with an operating system is easier to develop for experienced developers, but it requires a certain familiarization process for novices. It is unnecessary to use the operating system to complete the control of the entire system just to realize the USB Host function. This not only wastes resources, but also increases the development time of the underlying driver. Therefore, this design chooses a simpler way, using only a single-chip microcomputer and a USB interface chip to complete the USB Host function. In this way, any developer who can use a single-chip microcomputer can make a USB Host device. The interface chips for USB slave devices on the market include Philips' PDIUSBDl2 and ISPl581, but there are relatively few USB Host interface chips. After testing, the VNClL-1A chip was finally determined as the USB Host controller.

2.1 USB Host Controller

The VNClL-1A chip is the first one in the Vinculum series of FTDI to embed a USB host controller. It can not only process USB Host interface and data, but also has built-in MCU and FLASH, and also encapsulates the USB Device class. It integrates a 12-48 MHz clock multiplier, supports power-on reset function, embeds 64 KB FLASH ROM, 4 KB SRAM, has a standard USB firmware library provided by FTDI, and supports USB 2.0 full speed (12 Mb/s) and low speed (1.5 Mb/s). The 28 GPIOs can be used as general I/O and command monitoring interfaces, and have 2 pairs of USB bus interfaces, which can be programmed using serial ports or disks. When the chip is used as a master device to communicate with slave devices such as USB flash drives, it can handle FAT file systems, support FATl2, FATl6, and FAT32 formats, and the file naming method is the traditional 8.3 format, that is, the file name does not exceed 8 characters and the extension is 3 characters, such as the file name can be text.txt. When performing specific operations, you only need to send a simple command to VNClL to complete functions such as creating a new folder, creating a new file, reading a file, writing a file, opening and closing a file, etc. For example, if you want to create a hello.-txt file in a USB flash drive, you can write the characters "OPW+space+hello.txt+enter" to VNClL one by one in character mode, and you can see a hello.txt file in the USB flash drive, or send "09 20 file OD" in hexadecimal code mode, where file is the corresponding ASCII code value of each character of hello.txt. The manufacturer provides free target code on the website, and users can download different target codes according to different needs. In this design, the VDAPFUL_V3_65.ROM target code with a USB port as USBHost function is selected, and the target code is burned into the chip in serial port mode. Therefore, users do not need to care about how the internal program of VNClL is executed. They only need to care about whether it needs to complete the USB host device, slave device or other functions, and find the corresponding target code. The VNCIL chip after burning the program is equivalent to an interface chip. As long as the interface is connected correctly and the timing operation is correct, the required functions will run normally. VNC-lL has dedicated UART, SPI and parallel port pins, so any of the three interfaces can be used to control it. If you want to see the return value of the operation command, you can connect it to the PC via the serial port. After sending the corresponding command to VNClL using the serial port debugging assistant on the PC, you will see the corresponding return value.

2.2 Implementation of stored procedures

Bitmap images are widely used in computers. For example, in Windows, the text in Notepad and WordPad is represented by bitmap images. Many images stored in other formats are obtained by optimizing bitmap images, such as JPEG images. In digital image processing, many algorithms are designed for 24-bit true color bitmaps or grayscale bitmaps. Therefore, storing the acquired images in bitmap format facilitates the subsequent image processing. The storage format of the bitmap is divided into 24-bit true color format and grayscale bitmap format. The 24-bit true color format is 2/3 larger than the grayscale bitmap format, because the grayscale image uses one byte to represent one pixel, while the 24-bit true color bitmap uses three bytes to represent one pixel, so this design uses the grayscale bitmap format to store images.

When a frame of image is to be stored, ATmega8L sends a new file command to VNC1L, and a new .BMP file is created in the storage device. Then ATmega8L writes the 14 B file header, 40 B information header, and 1 024 B color index table of the bitmap into the beginning of the .BMP file. After writing, ATmega8L gives FPGA a ready signal. After receiving this signal, FPGA directly sends the image data to the .BMP file of the storage device through VNC1L. After sending a frame of image data, FPGA gives ATmega8L an end signal, and then ATmega8L executes the close current file command, and the storage of a BMP image is completed. This design hopes that all images collected by this system are stored in a separate folder in the storage device. In this way, every time a new storage device is inserted, ATmega8L must first send a query command to VNC1L to query whether there is a dedicated folder for this system in the current root directory. If not, create this folder. If yes, query whether there is already a . BMP file. If it does not exist, create a new one, and the file name starts with the number O. If it does exist, query which file name has the largest number, and then use the largest number plus one as the file name to be created. When reading an image from a storage device, ATmega8L also executes a command to query whether the folder and file exist. If both exist, read from the image with the largest file name number. The reading process is similar to the writing process, except that the commands used are different, and when reading, the image data can only be passed to the FPGA after VNC1L has read the 1078B file information of the bitmap. VNC1L communicates with FPGA and ATmega8L in a parallel port, and only 8 data lines and 4 signal lines are needed to complete the data transmission. The interface connection is shown in Figure 2.



3 Remote control function design

At present, most electronic products use switch buttons or touch control methods, such as digital cameras, mobile phones, etc., and the same is true for industrial equipment. The control method described in this article uses a wireless remote control method. This remote control method has been used in the field of televisions for many years. The technology is very mature, the principle is simple, and it is easy to implement. Since the selected remote control is suitable for infrared receivers with a carrier frequency of 36 to 40 kHz, a 36 kHz infrared receiver is selected in the design. ATmega 8L receives the signal from the infrared receiver, parses the code value of each button on the remote control, and will execute the function of the corresponding button on the remote control. There are 21 buttons designed on the remote control, representing all the functions of this system, namely:

Image storage function Press the storage key to store the currently viewed image into the storage device;

The image preview function will read out the pictures stored in the storage device and display them on the monitor. When previewing pictures, you can scroll up or down based on the current picture to cycle through all the stored pictures.

The red, green, blue gain and exposure value adjustment functions can increase and decrease these four parameters;

Double crosshair control and adjustment function: When you want the crosshair function, just press the crosshair button and you will see two crosshairs on the current real-time display. The position of the crosshairs can be moved as needed by the user. When double crosshairs are needed, both control crosshair buttons need to be pressed. Using double crosshairs can circle the key observation range on the entire screen.

Image freeze function: When the freeze key is pressed, the entire screen on the display freezes, and you cannot save, read or perform any other operations.

Current parameter value saving function: After pressing this key, the current values ​​of the current gain, exposure, crosshair position and other parameters will be stored in the E2PROM of ATmega8L. In this way, the system will read out the parameter values ​​saved in E2PROM one by one when the system is started next time;

Reset initial parameter value function If the user accidentally adjusts a parameter value, you can press this key to restore the system's original parameter value.

4 Conclusion

The selection and design of the storage solution in the image acquisition system described in this article can serve as a reference for the design of systems with slightly larger data volumes but not very complex. In addition, the use of remote control technology as a way to control the system operation is refreshing. This image acquisition system is applied in the industrial field, is easy to operate, affordable and novel.

Reference address:Design and implementation of a remote control storable image acquisition system

Previous article:Design of role-based security access control in OA system
Next article:Mechanical CAD basics autonomous learning system based on industrial design principles

Recommended ReadingLatest update time:2024-11-17 04:50

Embedded high-speed image acquisition and storage system based on ARM and FPGA
Modern production and scientific research have increasing requirements for image acquisition systems. Traditional image acquisition systems are mostly based on PCs, but in some special occasions, especially when real-time requirements are high, ordinary PCs obviously cannot meet application requirements. This paper des
[Microcontroller]
Embedded high-speed image acquisition and storage system based on ARM and FPGA
Overview of some common misunderstandings in learning FPGA
1. Not familiar with the internal structure of FPGA and the basic principles of programmable logic devices.   Why is FPGA programmable? I'm afraid many novices don't know, and they don't want to know. Because they think it's irrelevant. They subconsciously think that programming must be like writing software. The id
[Analog Electronics]
Overview of some common misunderstandings in learning FPGA
FPGA-based automotive ECU design fully complies with AUTOSAR and ISO 26262 standards (Part 2)
FPGA-based static hardware ECU design   The AUTOSAR architecture is very suitable for embedded systems consisting of CPU, memory and programmable logic. The ECU platform requires a CPU or host processor to manage applications and handle different functions distributed in the software components of the application la
[Analog Electronics]
FPGA-based automotive ECU design fully complies with AUTOSAR and ISO 26262 standards (Part 2)
Research and development of power battery management system based on FPGA
The safety, cost and driving range of automotive power batteries have always been the main factors affecting the promotion and application of electric vehicles. Based on the existing battery technology, an effective battery management system can protect automotive power batteries, extend their service life, increase
[Embedded]
Research and development of power battery management system based on FPGA
The hardware platform based on ARM and FPGA realizes an embedded CNC system with high openness characteristics.
introduction In the existing CNC system, the computer CNC system solution of industrial computer plus motion control card is mostly used to design the motion controller. As the overall functions of industrial computers become increasingly complex, the requirements for motion control systems in terms of volume, cost, a
[Microcontroller]
The hardware platform based on ARM and FPGA realizes an embedded CNC system with high openness characteristics.
Rapid development of medical imaging equipment based on FPGA
Medical imaging technology plays an increasingly important role in the healthcare industry. The industry is moving toward early disease prediction and treatment through non-invasive means, reducing patient costs. The convergence of multiple diagnostic imaging methods and advances in algorithm development are the mai
[Embedded]
Rapid development of medical imaging equipment based on FPGA
Implementation of Remote Detection System for FPGA Development Board
1 System Overview Currently, the onboard resource detection of FPGA development boards adopts the method of downloading examples to the development board for detection. Different examples are generally used to detect different resources. This detection method lacks the collection of detection result information. It is
[Test Measurement]
Implementation of Remote Detection System for FPGA Development Board
Intermediate Frequency Design of High-Speed ​​Broadband Frequency Hopping Transmitter Based on FPGA
introduction Frequency hopping communication is the main means to ensure normal communication in a harsh electromagnetic environment. Improving the frequency hopping rate and frequency hopping bandwidth of the frequency hopping communication system can help to combat single-frequency narrowband interference
[Embedded]
Intermediate Frequency Design of High-Speed ​​Broadband Frequency Hopping Transmitter Based on FPGA
Latest Industrial Control Articles
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号