CMOS image acquisition systems generally have image quality problems. If the image is not processed specifically, the image quality is difficult to guarantee. In recent years, with the rapid development of SoC technology, SoC image sensors have emerged in the field of image acquisition and processing. They integrate CMOS sensors and graphics processor functions to obtain very satisfactory image quality. The video acquisition system designed in this paper uses the SoC imaging chip MT9M111 and the USB2.0 interface chip CY7C68013.
system structure
The principle block diagram of this system is shown in Figure 1. When the image sensor starts working, the collected data is first stored in SRAM1 through the FPGA control logic. After the acquisition/storage process of a frame of image is completed, SRAM1 enters the write end state. At this time, the SRAM is switched, and SRAM2 continues to store the collected data. At the same time, SRAM1 is in a readable state. The control logic in the FPGA controls the data in SRAM1 to be transferred to the USB chip and then to the host. This system adopts a dual SRAM structure and a ping-pong mechanism. The two memories work alternately, so that the image acquisition and transmission are carried out in parallel. The dual frame storage structure not only improves the speed of the system, but also, since most of the algorithms for implementing various image processing in the FPGA require a relatively large storage space, the two large-capacity SRAMs can act as external caches when implementing the algorithms.
MT9M111
This system uses the MT9M111 SoC product launched by Micron that integrates CMOS sensor and graphics processor. MT9M111 is a low-power, low-cost progressive scan CMOS image sensor; 1.3 million pixel resolution (1280H×1024V); 1/3 inch optical format; power consumption is 170mW at full resolution 15fps, and power consumption is 90mW at VGA resolution 30fps. MT9M111 uses low-leakage DRAM process and is equipped with Micron's patented DigitalClarity technology to provide clear and bright color images even in the worst lighting conditions. MT9M111 has lower dark current and reduces chroma/luminance interference and transient noise. The functions provided by the embedded programmable image stream processor of MT9M111
Including color restoration and repair, automatic exposure, white balance, lens shading correction, increased clarity, programmable grayscale correction, dark level offset correction, flicker avoidance, continuous adjustment of filter size, smooth digital zoom, fast automatic exposure mode and non-operating defect correction, etc. Moreover, it is equipped with a two-wire serial interface, through which the USB chip can be configured.
IS61WV20488
The SRAM parameters related to image processing are mainly the read and write speed and capacity of SRAM. In terms of capacity, the maximum resolution of the image collected by this system is 1280×1024, the data width is 8 bits, and the 2M×8bit SRAM can meet the requirements of storing one frame of image data. The read and write speed of SRAM is generally 12ns, 15ns, 20ns or slower. Since the read and write speed of SRAM directly affects the clock of the entire image processing system, the faster the read and write speed of SRAM, the better. This system uses ISSI's IS61WV20488, with a chip capacity of 2M×8bit.
CY7C68013
The image data transmission part uses the interface chip CY7C68013 specially used for USB2.0 launched by Cypress. The chip includes an enhanced 8051 processor with 815kB on-chip RAM (compatible with the standard 8051 series, with a speed increase of 3 to 5 times), 4kB FIFO memory and a universal programmable interface I2C bus, a serial interface engine (SIE) and a USB2.0 transceiver.
Figure 1 Video acquisition system based on SoC image sensor
The system hardware/software design consists of three parts: image acquisition/storage module, image transmission module and USB driver/host application module.
Image acquisition/storage module
This module mainly uses the control logic of FPGA to transfer the image data collected by the imaging chip MT9M111 to SRAM in real time. The system adopts a dual frame storage structure, each of which is composed of an IS61WV20488 SRAM, which can store a frame of image data with a resolution of 1280×1024. Due to the ping-pong mechanism, the two memories work alternately, so that the image collection and transmission are carried out in parallel. In order to ensure that only one SRAM can read the collected image data at any time, a read mutex lock is set. Similarly, only one SRAM can receive the collected image data, so a write mutex lock is set. It should be noted that since the image data output speed of the image sensor is slower than the USB2.0 transmission speed, after reading the data of SRAM2, it is necessary to wait for the other SRAM1 to complete writing the image data before writing the next frame of image data to SRAM2, and SRAM1 can directly read the image data without waiting. This cycle is repeated to achieve parallel work and effectively improve the work efficiency of the system.
Figure 2 is a block diagram of the system control circuit. Each module inside the FPGA is written in Verilog HDL.
Figure 2 FPGA control circuit block diagram
Image transmission module
After acquiring a frame of image, the image data in the external RAM must be read into the host through the USB clock signal control module. In this image acquisition system, the Slave FIFO asynchronous working mode of CY7C68013 is used, and the FIFO is configured to be connected to the EP2 port, each data packet is 1024 bytes, 4 buffers, and block transmission mode. This setting can meet the system requirements, and at the same time, it also effectively utilizes the internal 4kB FIFO to transmit the acquired image data. The system control uses the FALGB signal pin to report the "FIFO full" state, which is low level valid by default. This article adopts the automatic input mode. When the data in the FIFO is full of a certain amount, EZ-USB-FX2 directly transmits the data to the USB transceiver through the FIFO without the intervention of the CPU, which improves the transmission speed. This system starts to send automatically when the FIFO is full of 1kB.
USB Driver and Host Application Module
The development of USB device drivers is a difficult point in USB system development, especially when the system has a large amount of data to transmit and a high speed requirement, it is necessary to write an efficient USB device driver to ensure the real-time transmission of high-resolution images. This system uses DDK to develop WDM drivers. In fact, the USB client driver contains a large number of routines, which is very helpful for driver development.
The main function of the host application is to read image data through the USB interface and display dynamic images in real time. To improve the efficiency of the host application, dual threads can be used.
Conclusion
This system uses the MT9M111 image sensor with 1.3 million pixels to ensure image quality, and the USB2.0 interface chip CY7C68013 to ensure real-time image transmission. It has a flexible design and provides software/hardware support for implementing various image processing algorithms.
Previous article:A wireless synchronous data acquisition method based on C8051F350
Next article:Design of high-gain data acquisition system based on USB interface
- Popular Resources
- Popular amplifiers
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- 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)
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
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- 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?
- Is the domestic RISC-V laptop on sale? Equipped with the Pingtou Ge Yiying 1520 SoC
- USB drive cannot be used
- Asking a non-professional question
- 【Project source code】Knowledge related to NIOS II software program solidification
- FPGA Classic Design Case
- SparkRoad basic function lamp
- 【Qinheng Trial】VI. PWM
- Here comes TI's new document "Tradeoffs and technologies required to increase power density"
- About the addition, subtraction, multiplication and division of double data on 51
- Renesas RL78 MCU Series Guide