Application scheme of linear CCD measurement system based on TMS320F206PZA
Veröffentlichte Zeit: 2020-08-03 11:04:23
There are many methods for processing CCD optical integration signals. DSP is used as a dedicated digital signal processing chip for ccD signal processing, which can realize online real-time high-speed measurement. Combining the DSP processing system with the input and output system can make the ordinary measurement system free from dependence on the computer, and get rid of the interference problem of long-distance signal transmission and the bottleneck of the computer interface speed. DSP is a kind of processor with high-speed, real-time and abundant internal resources of the chip. Its appearance provides a new way for people to solve this problem. This article will take the DSP model TMS320F206PZA as an example, combined with the ADC device ADS803E, to introduce the application of DSP in the online array CCD measurement system.
1. System structure
The overall system structure is shown in Figure 1.
It can be seen from the system structure diagram that this system uses CPLD to generate CCD drive pulses and system global synchronization pulse signals to control the gating of other devices. The A/D device performs analog-to-digital conversion of the CCD measurement signal and stores it in the buffer via the data bus. Under the control of the CPLD, it enters the DSP for data processing, and the DSP outputs the processing result to the latch for output latching. The segment digital tube displays the final measurement result in real time. The system has placed a buzzer at the final output position to alarm when the output result exceeds the warning value.
2. Hardware composition
The hardware structure of this system consists of two parts, one is a linear CCD camera, the other is a CCD drive circuit and a DSP-based signal processing circuit.
The photosensitive unit of the CCD sensor is excited by light to convert the light signal into an electrical signal and output it under the action of an external driving pulse. The signal output by the CCD is a discrete analog pulse sequence. The analog signal is first differentially amplified by the operational amplifier to the output signal OS and the auxiliary output signal DOS, and then converted into a digital signal by the ADC. The A/D chip used in this system is ADS803E produced by Burr-Brown Company. It is a 12-bit A/D chip with a speed of 5 MHz. It is fully capable of processing CCD signals with a driving frequency of 1 MHz. It has speed Fast, small size, simple driving signal and other advantages, it is an A/D chip designed for CCD signal processing. In each light integration cycle, there are 2 160 analog pulse sequences that need to be converted. The data after A/D conversion is input to SRAM through the data bus for buffering. The SRAM of this system uses 6 264 chips produced by Hyundai. , It is a 8 k×8 bit memory, so for 12 bit A/D output data, 2 pieces of SRAM are needed in parallel to store all data. When all the image-sensitive unit signals are converted, the A/D device stops working, and at the same time the DSP is strobed, and all data in the SRAM is read into the data memory on the DSP chip through the data bus. DSP processes all data according to the on-chip data processing program, and outputs the processing results from the digital tube through the latch.
3. Software design
The data processing program in DSP is a key part of the whole system. The program flow chart is shown as in Fig. 2.
In the program, because the DSP external interrupt time period is too long and cannot adapt to the output speed of the CCD, the data signal is processed in batches in a query mode. When the A/D conversion is over, the DSP reads 2 160 sets of data from the SRAM and stores it in the on-chip data storage space. Firstly, the data is preprocessed, that is, to filter out the burrs in the waveform, and eliminate the values that cannot appear in practical applications. Then calculate the processed data. Because the 12-bit A/D conversion is adopted, in the DSP, the analog signal of each image sensitive unit is expressed as a decimal value between 0 and 4 095, and each value is compared with a preset threshold value. If it is higher than the threshold, increase the high register by 1, otherwise increase the low register by 1. After comparing a set of 2 160 values, the value of the low register is the number of image sensitive units that the linear CCD is blocked and cannot be exposed to light. This value is multiplied by the CCD image sensitive unit size of 14 m, and then multiplied by The optical magnification β of the CCD lens is the actual size of the measured workpiece.
DSP decodes the final result and sends it to the data bus, which is output and displayed by the digital tube through the latch.
4. Experimental inspection
In order to test the practicability of this system, a relatively simple experiment was designed: using LED as the light source, parallel light is formed through the lens group to illuminate the detection CCD, and a black paper strip is used to shield the light, and directly compare the width of the paper strip with the measurement display result. In this way, the step of calculating the optical magnification can be omitted. After testing, it is found that after calibration, the linear relationship between the width of the measured object and the measurement result can be achieved, and the accuracy can reach 0.1 mm.
The hardware system introduced in this article can be used in many aspects of industrial production. As long as the software is modified, different measurement functions can be realized, such as: workpiece surface defect detection, workpiece gap measurement, workpiece outer dimension measurement, transparent workpiece inner diameter non-contact measurement Wait.Etikett: TMS320F206PZA