In the modern industrial automation production process, the material level should often be measured, accurate level measurement is the guarantee of continuous production and safe production. With the development of industrial modernization, the information exchanged between the field equipment and the control room automation equipment has also increased rapidly. The traditional 4-20mA analog circuit can only transmit one parameter one-way,which is difficult to meet the needs of modern production. As a backward compatible intelligent instrument solution, on the one hand, the HART protocol has the superiority of field-bus, and on the other hand, it retains the compatibility of the original 4 -20mA analog circuit. Aimed at the high temperature, viscosity and other harsh industrial environments,based on the research of HART communication and the method of measuring material level,through the improvement of algorithm and the knowledge of curve fitting, the measurement error is reduced, the software and hardware design has been completed, and a set of high precision level meter has been developed.The content of this thesis is reflected in the following aspects:(1) This dissertation makes a deep research on the characteristics of HART communication protocol and the method of measuring material level, the architecture of HART protocol and its advantages are analyzed. The principle of the ray method used in the design has been expounded, a comprehensive analysis on the research and development of the material level measurement technology at home and abroad has been summarized.(2) Comparison and analysis of several common curve fitting methods, select the best fitting method so as to make the calibration curve as close as possible to the real curve. In the process of data collection, a weighted average algorithm is used. Ten sets of data were collected every time, which has a large difference with the average value would have a smaller weights. By this method we can ensure the accuracy of the collected data so as to improve the accuracy of the measurement.(3) A set of level measurement system is designed. The system consists of two parts: the material level signal acquisition part and the manual operator. The signal acquisition part uses ARM7 as the processor, and the software programming is programmed by the C language in the MDK-ARM programming tool. The HART communication part is made up of A5191 modulation and demodulation chip and AD5421 D/A converter, and the signal acquisition part designs the 485 communication interface at the same time. The manual operator uses Samsung S3C2416 as the core of the MCU, the operating system uses WinCE, in the VS2008 environment developed based on the intelligent device MFC as the software interface , HART and 485 communication interfaces are also designed. STM32 converts the pulse frequency into the corresponding material level value, and the value was sent to the AD5421 through the SPI port, it was converted into the corresponding 4-20mA current then sent to the HART bus.The manual operator can be used as a portable device in the industrial field to achieve the function of parameter query, parameter setting and calibration.The test results show that the accuracy of the designed level meter can reach 2%F.S. The accurate measurement of the material level in harsh industrial environment such as high temperature and viscosity is realized. The measurement system has a high degree of intelligence with the functions of parameter query, parameter setting, and calibration. The research results have been applied to the measurement of material level in the actual industrial automation process. |