Design of Linear Array CCD Driving and Acquisition System Based on Single Chip Microcomputer

Publisher:ShiningSmileLatest update time:2012-07-02 Source: 现代电子技术 Keywords:C8051F020 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
0 Introduction
In today's scientific research and engineering, CCD is increasingly widely used, but its driving pulse and signal acquisition requirements are high, and generally requires a relatively complex microcontroller such as CPLD or DSP to undertake the main control tasks. Compared with single-chip microcomputers, these solutions are more difficult to operate, have a high starting point, and are relatively expensive. However, due to various limitations, single-chip microcomputers rarely have suitable driving and acquisition solutions. Although some published papers have proposed concepts, they are difficult to implement after testing. Therefore, this paper proposes a new solution for using single-chip microcomputers to drive CCDs. This solution is based on the C8051F020 single-chip microcomputer, which can drive CCDs well and at high speed, collect data at the same time, and communicate with computers through RS232 interfaces, reorganize data on computers, and complete functions such as analysis of optical signals. After experiments, this solution has good effects. At the same time, this solution uses Labview to design the human-computer interaction interface, which is highly flexible and can change CCDs into position sensors and other uses as needed.

1 Introduction to CCD
1.1 Basic Principles of CCD
CCD (charge coupled device) is a semiconductor device composed of many neatly arranged capacitors that can sense light and convert images into digital signals. Through the control of an external circuit, each small capacitor can transfer its charge to its adjacent capacitor. Finally, through the control of pulses, the charge of each capacitor is measured one by one to obtain the light intensity value.
1.2 Pins and main parameters of TCD1206 linear array CCD
This design uses the TCD1200D linear array CCD sensor. TCD1200D is a high-sensitivity, low dark current, 2160-pixel linear array CCD image sensor. The sensor can be used for fax, image scanning and OCR. The internal signal preprocessing circuit of the device includes sampling and holding and output pre-amplification circuits. It contains a column of 2160-pixel photodiodes, which can achieve an accuracy of 8 lines/mm (200DPI) when scanning a B4 drawing. Its pins and principles are shown in Figure 1.

c.JPG


Features of TCD1200D linear array CCD sensor:
· Number of image-sensitive units: 2160 pixels
· Image-sensitive unit size: 14×14×14 μm (center distance between adjacent pixels is 14 μm)
· Photosensitive area: High-sensitivity PN junction is used as the photosensitive unit
· Clock: Two-phase (5V)
· Internal circuit: Contains sample-and-hold circuit, output pre-amplifier circuit
· Package form: 22-pin DIP package. [page]

1.3 TCD1200 linear array CCD driver acquisition pulse requirements
This type of CCD driver needs to send SH, φ1, φ2, RS and other pulses, and the acquisition requires differential OS and DOS signals. The specific pulse requirements are shown in Figure 2.

d.JPG


Among them, SH is the integration pulse. When it is high level, the CCD pixel starts to accumulate charge, and when it is low level, it stops accumulating; φ1 and φ2 are two inverted driving pulses, whose main function is to control the transfer of charge; RS is the signal trigger pulse, each falling edge will trigger a pixel to release charge, thereby outputting the electrical signal; OS is the output signal, after 13 dummy outputs and light shielding output, the useful signal is output; DOS is the reference level signal, after differential with OS, the final signal output is obtained. These pulses require high frequencies (for example, the typical frequency reference value of RS is 1 MHz), and the matching requirements are high, so it is difficult to complete the operation of general single-chip microcomputers.

2 Hardware circuit design
As shown in Figure 2, the CCD driver needs to send 4 driving pulses including SH, φ1, φ2, RS, etc., among which the frequency range of RS is 0.02MHz to 2MHz, and the typical value is 1MHz. This high-frequency pulse is difficult for a single-chip microcomputer to complete independently, so this system uses a certain digital circuit for auxiliary design. At the same time, since the maximum value of the A/D conversion of the C8051F020 microcontroller is 500kHz, and the frequency of the analog signal sent by the CCD (i.e., the frequency of OS) is the same as RS, the frequency of RS is also selected as 500kHz.
The specific plan is to use the PCA module of the microcontroller to send a stable 1MHz square wave pulse, and then divide it twice through the D flip-flop (74HC74 chip) to obtain 5V, 0.5MHz and 0.25MHz square wave pulses (both frequencies have two pulses with opposite levels), of which the 0.5MHz pulse is used as the RS driving pulse, and the two 0.25MHz pulses are used as the pulses of φ1 and φ2 respectively. At the same time, timer 2 is used to detect RS, count, determine the integration time of SH, and send the SH pulse that meets the requirements. At the same time, the SH pulse requires an inverter to convert the level (3V~5V) and send the control pulse of the D flip-flop. For the acquisition of DOS, this system uses a subtractor and follower built with OP27 for acquisition.
The pulse control and signal A/D conversion of CCD are mainly completed by C8051F020 microcontroller. As mentioned above, TX0 and RX0 are configured at P0.0 and P0.1 for RS232 communication; 1 MHz stable square wave pulse is sent by P0.2 port (PCA); P0.3 (T2) counts RS (0.5 MHz); A/D conversion trigger control bit (CNVSTR) is connected to pin P0.4; P0.5 is controlled by timer 2 to send SH pulse; P1.1 is an analog input port to receive analog signals.

[page]

3 Human-computer interaction interface software design
The software design of this system includes the application program of the C8051 microcontroller and the Labview application program of the human-computer interaction interface.

e.JPG


The program flow chart of C8051 microcontroller is shown in Figure 3. After the initialization of PCA, ADC and other functions is set up with the hardware, the CCD data is read and stored in the XDATA space until the information sent by the computer is received. After the acquisition of one cycle of data is completed, the A/D conversion is turned off, and it is determined whether the information sent by the computer requires the entire waveform to be sent or the position judgment is performed (this design also includes a function of judging the extreme value, leaving an interface for position sensing). If it is the former, all data are sent to the serial port buffer; if it is the latter, the maximum value of the mountain conversion data is determined, and the position signal of the maximum value is started and sent to the serial port. After a series of processes, the acquisition is restarted, and the cycle continues.

f.JPG


Labview uses the graphical G language for programming to complete the functions of the human-computer interaction interface software. The software can realize the real-time acquisition of the entire waveform and position information, the preservation and reading of historical data, and the control of the start, stop and reset of the entire system. Figure 4 is the program flowchart of Labview.

4 Experimental results
4.1 Physical picture of the circuit board
This solution has been fully implemented and tested. The effect is good and can meet basic scientific research detection or demonstration teaching tasks. The following is a circuit board that has been successfully made.

a.JPG

[page]

4.2 Single-slit diffraction test
When light passes through a tiny single slit, and the slit width is equal to the wavelength of the light source, an obvious diffraction phenomenon will occur, that is, the light will change its linear propagation and propagate according to a certain law. Under ideal conditions, a single-slit diffraction will show a specific spectrum on the light screen, with the brightest stripe in the middle, gradually weakening to both sides, and dark stripes with no light at all. Figure 6 is the test pattern. The upper part is the light intensity waveform corresponding to the voltage value collected after calibration, which is completely consistent with the theory; the lower part is a simulation of the actual situation using Labview's two-dimensional light intensity control, which is consistent with the pattern observed by the naked eye.

b.JPG



5 Conclusion
This article provides a complete solution for collecting CCD signals with a single-chip microcomputer, and introduces the software and hardware in detail. Its novelty is that the drive pulse is generated by the PCA that does not occupy memory, in conjunction with the D flip-flop and the timing counter. In summary, the C8051f020 single-chip microcomputer can complete this task because it supports a 16-bit PCA module, 2 timing counters of more than 12 bits, more than 2k internal data RAM, an 8-bit high-speed ADC with multiple triggering modes, and a UART serial port. Any microcontroller with the same analog peripherals can complete this solution, and the PCA module can be replaced by an active crystal oscillator. If the built-in RAM is insufficient, it can be supplemented by external memory. There are also many 8-bit ADC chips on the market, and most single-chip microcomputers also have timing counters of more than 12 bits, so this method can be fully promoted and applied, and it is a universally applicable application solution.

Keywords:C8051F020 Reference address:Design of Linear Array CCD Driving and Acquisition System Based on Single Chip Microcomputer

Previous article:Single chip microcomputer and FPGA to achieve equal precision frequency measurement and IDDS technology design scheme
Next article:Design of audio mouse repellent based on 51-chip microcomputer

Recommended ReadingLatest update time:2024-11-17 00:53

LabVIEW-based CNC machine tool network measurement and control system - overall design (I)
2 Overall design of network measurement and control system for CNC machine tools   2.1 Design ideas and goals of the network measurement and control system for CNC machine tools With the integration of measurement and control networks and information networks, on the one hand, people hope to use the Internet more
[Test Measurement]
LabVIEW-based CNC machine tool network measurement and control system - overall design (I)
Design and system implementation of a photosensitive screen for LED dot matrix modules
According to the photoelectric effect, the PN junction can change its resistivity under the stimulation of light, and LED is also a PN junction, so can the PN junction characteristics of LED be used to complete a dot matrix photosensitive screen? After a simple experimental discussion, we found that LED itself has a g
[Microcontroller]
Design and system implementation of a photosensitive screen for LED dot matrix modules
LabVIEW cannot connect to the data acquisition card
Question: After installing Labview and the DAQ-MAX data acquisition card related content on the computer, when you open the corresponding Labview program, the related channels of the data acquisition card cannot be recognized, as shown in the figure If it is in a gray state, you can take the following steps to sol
[Test Measurement]
Labview array application
Example: Select an appropriate array operation function to calculate the number of elements in an array; extract the elements in the second row of an array and shift them 3 places in a loop; calculate the maximum and minimum values ​​of the array and transpose the array.   The selected function, program flowchart and
[Test Measurement]
Labview array application
Communication Problems with LabVIEW
Question: What is the basic architecture of serial communication? Solution: Serial Communication Architecture At the heart of every asynchronous serial system is a UART (Universal Asynchronous Receiver/Transmitter). The UART not only controls the data being transmitted and the corresponding voltage levels, but also
[Test Measurement]
Interface Design of Handheld Digital Waveform Table Based on LabVIEW8.6 and S3C2440
The virtual instrument program designed by LabVIEW is transplanted to the portable handheld device running WindowsCE. It can greatly improve the efficiency of embedded system software development. Specifically, an interface design that effectively solves the problem of alternating display of data waveforms is propos
[Test Measurement]
Interface Design of Handheld Digital Waveform Table Based on LabVIEW8.6 and S3C2440
In-depth exploration of labview-how to implement C-like function pointer calls
The concept of function pointers exists in C language. For the same number of parameters and parameter types, as well as the same function return value, different functions can be dynamically called to achieve different functions by passing function pointers. Let's first look at an example of a function pointer call
[Test Measurement]
In-depth exploration of labview-how to implement C-like function pointer calls
Distributed detection method of vibration signal based on single chip microcomputer and sensor
Introduction  Due to the distance limit of the connecting cable of the acceleration sensor and the charge amplifier, it is difficult to implement a centralized data acquisition and processing system in a space with a long distance, and its reliability and anti-interference problems are difficult to solve. Distributed
[Microcontroller]
Distributed detection method of vibration signal based on single chip microcomputer and sensor
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号