This paper introduces an intelligent on-line real-time control system for irregular surface detection based on single-chip microcomputer. A complex three-dimensional model is constructed by using on-line photography of optical elements. The model has good value preservation, real-time data processing and storage It can effectively correct the edge threshold data and process the gray level of the edge pixels on line by using the asymmetric smoothing average method. Its purpose is to achieve the accuracy of edge processing of special-shaped surface parts, effectively improve the efficiency of online real-time detection, and obtain an effective method for the processing of special-shaped surface.

0 Introduction

With the use of 3D design software for system simulation and optimization analysis, road condition feedback and theoretical calculation, it is able to design high-level curved surface special-shaped lines and sections, as well as process problems. In addition, the performance of the machine tool is getting higher and higher, which makes the online machining of the special-shaped surface widely used and realized. Therefore, the online detection of the special-shaped surface is becoming more and more important. Due to the different measuring equipment and detection means, different measuring schemes can be designed, but which design scheme can most economically ensure the measurement accuracy requirements, so as to achieve the purpose of design, is a problem that must be studied in measurement design.

1 system design idea and basic algorithm

1.1 the idea of three dimensional design

Based on the high machining accuracy of irregular surface, and to solve the problem of constructing a complex three-dimensional image model through photography on microcomputer, the model should meet the following conditions: good preservation, so as to ensure that the visual effect of photography is in line with the objective reality; The model should get a huge amount of data, which can be processed on the main control chip; It can deal with the edge pixel problem of irregular surface; Deal with the hidden problem caused by the location of the camera.

In order to meet the above problems, charge coupled device (CCD) and optical devices are used to measure the different surface, and the photoelectric measurement is processed by single-chip microcomputer. The working process is to put the measured anisotropic surface in front of the controllable background of uniform illumination, collect the image into the single-chip microcomputer system, calculate the geometric parameters of the anisotropic surface according to a certain algorithm, and process the measured anisotropic surface The measurement system is shown in Figure 1.

Design of intelligent online real time control system for detection based on MCS-51 Single Chip Microcomputer

1.2 processing of detecting image edge pixels

In the process of on-line machining of curved surface by machine tool, the construction of curved surface model should not only deal with the regular area, but also deal with the irregular edge problem. Because the brightness near the edge of the image changes greatly, the pixels whose gray change exceeds a certain appropriate threshold th in the neighborhood can be regarded as edge points. Taking this point as the parallel section, because the section has good preservation, smooth connection, and has nothing to do with the selection of coordinate system, the piecewise parametric cubic curve is used to fit the curve, and the whole curve is transformed into the second-order continuous derivative curve. At the same time, because the threshold value of the curve edge can not be smoothed, the asymmetric moving average method can only be used to supplement the data.

Suppose that for the Dynamic Smoothing threshold data YK, for the time series XK (XK is the dynamic detection data time series, k = 1, 2, 3,…, n), take M adjacent data for weighted average, and obtain the positive integer of the total smoothing number m after data smoothing, which requires p + Q + 1 = M, Suppose M = 5, then take the product of the front five values or the back five values and the front coefficient to find y1y2 or ynyn-1 and yn and Y1; The weight coefficients of yn-1 and Y2 are the same, as shown in Table 1

Design of intelligent online real time control system for detection based on MCS-51 Single Chip Microcomputer

2 module design

2.1 active real-time automatic detection system its process CCD real-time video data acquisition, transmission to the video image processor, and its analog-to-digital processing, through the data bus transmission to the main control chip processing results, as shown in Figure 2.

Design of intelligent online real time control system for detection based on MCS-51 Single Chip Microcomputer

2.2 software design and algorithm optimization

Considering the practicability of the software, that is, the performance of the software meets the actual needs of production, and the running environment (hardware and software) of the software should meet the actual conditions, the system adopts the numerical stability algorithm to improve the accuracy of the calculation results; Modular design method is adopted to facilitate the maintenance, debugging, readability and rationality of the program and improve the efficiency of software development; The correct and proper use of programming skills can improve the speed, reduce the error and improve the reliability of the program; According to the characteristics of the system, the combination of high-level language and low-level language is adopted, that is, the control of the whole system and digital image processing are realized by C program, which undoubtedly improves the readability and portability of the program, while the assembly program is mainly used to realize the initialization of the interface of each part of the system. In order to improve the above shortcomings, after in-depth study of the processing system and algorithm, according to the characteristics of the hardware structure, the improved algorithm suitable for efficient operation in the hardware is studied to meet the requirements of real-time processing. The program flow is shown in Figure 3.

Design of intelligent online real time control system for detection based on MCS-51 Single Chip Microcomputer


It can be seen that the system has the advantages of less investment, high degree of automation, strong practicability and simple operation. It not only improves the detection accuracy of irregular surface, but also meets the requirements of real-time and economic performance. At the same time, it reduces the cost of production and research, and improves the efficiency of production and work.

Source; 21ic

Leave a Reply

Your email address will not be published. Required fields are marked *