Research on roundness error measurement device based on μC/OS-Ⅱ

Publisher:快乐飞跃Latest update time:2021-07-02 Source: eefocusKeywords:μC Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Introduction: Based on the ARM microprocessor and embedded μC/OS-Ⅱ operating system, a design scheme for roundness and cylindricity error measurement system with high automation and reliable operation is proposed. The main features of the system's hardware platform core device LPC2294 and the embedded real-time operating system μC/OS-Ⅱ are introduced, the system hardware structure design framework diagram is given, and the key issues of system development are elaborated in detail. Finally, the software implementation of the system in μC/OS-Ⅱ is given.


0 Preface

In the field of precision testing, roundness measuring instruments are key equipment for measuring the roundness, cylindricity, coaxiality or straightness errors of parts. A large part of the roundness measuring instruments currently used in China use electromechanical or photoelectric measurement methods. Although the accuracy of the main part of the measurement is high, the measurement results often have a large deviation from the actual measurement value; the obtained data cannot be stored; the measurement system has poor stability and low error resolution. At present, roundness measurement systems are all offline open-loop measurement systems, which means poor portability and insufficient real-time detection. Its contact measurement method is also prone to wear of the workpiece and the probe, causing equipment damage. Roundness measuring instruments, cylindricity measuring instruments, three-coordinate measuring machines, etc. manufactured abroad are often large in size, difficult to adapt to various complex measurement environments, and have high costs.


The roundness and cylindricity measurement system proposed in this paper is formally proposed to solve the above-mentioned problems. The system is based on μC/OS-Ⅱ embedded operating system, with simple and reliable structure, strong targeted functions, and LPC2294 microprocessor as the core. The scalability has been significantly improved and its cost has been greatly reduced.


1. Overall design of roundness and cylindricity measurement system

1.1 System Function Analysis

The data acquisition module of the roundness and cylindricity measurement system consists of an eddy current displacement sensor, a preamplifier and peripheral circuits. The sensor is fixed to make the workpiece rotate and the voltage signal is collected in a non-contact manner. The signal after signal conditioning is separated from the spindle rotation error and roundness error by executing the error separation (EST) algorithm of LPC2294. After data conversion, the required roundness and cylindricity errors can be obtained.


1.2 Overall system design

In order to realize the above functions, according to the specific requirements of system structure and other aspects, the overall design of the system is shown in Figure 1.



Parameter input: receive the voltage signal of the sensor, the diameter and height of the workpiece being measured.

Output information: roundness and cylindricity error values ​​of the measured workpiece.


1.3 Measurement principle

Different sensor selections can be divided into contact and non-contact measurement. This system uses a non-contact measurement system. The measurement principle is shown in Figure 2, which shows the enlarged contour line of the section where the cylindrical workpiece is located. The system uses a non-contact eddy current displacement sensor, which can statically and dynamically measure the distance between the measured metal conductor and the measured surface. It is a non-contact linear measurement tool, and the measurement result is not affected by dust, paint, rust, etc. on the surface of the measured workpiece. During measurement, the sensor probe is aligned with the axis o and there is a certain gap with the contour line. When the workpiece rotates with o as the axis, the level signal output by the sensor can change with the change of the gap. Therefore, once the relationship between the gap and the level signal is determined , the radius change of the workpiece in the circumferential direction under the section can be measured, and then the roundness and cylindricity of the workpiece can be obtained by calculation.



2 Hardware System Design

2.1LPC2294 module

The LPC2294 core module includes the LPC2294 microprocessor, storage module, power module, system reset circuit and system clock circuit. The LPC2294 contains 16K bytes of static RAM and 256K bytes of on-chip Flash program memory, 4-channel 10-bit A/D converter, and the conversion time is as low as 2.44us.


2.2 System clock circuit

This system uses a 10MHz crystal oscillator as the external clock input source. The processor clock frequency cclk = M × , M is the multiplier value of the MSEL bit in the PLLCFG register. The frequency of the PLL current controlled oscillator = cclk × 2 × P, P is the divider value of PSEL in the PLLCFG register. In this design, M is 6, P is 2, the system clock cclk is 60MHz, and the frequency allocated to the peripherals is 30MHz.


2.3 System reset circuit

The microcontroller will generate a reset signal when it is powered on. Although the simple RC reset circuit is low-cost, it cannot guarantee a stable and reliable reset signal under any circumstances, so a special reset chip is generally required. This design uses the SP708 reset chip that can be manually reset. It is a comparator reset device that can effectively enhance the reliability and work efficiency of the system.


2.4 Power Module

Reasonable power supply design is the basic guarantee for the safe, reliable and normal operation of electronic systems. The power supply not only requires the device to provide a variety of high-performance power output, but also includes the selection of appropriate bypass and decoupling capacitors to filter out various interference signals and ensure the stable operation of the system. Since the I/O voltage of LPC2294 is 3.3V and the CPU operating voltage is 1.8V, this design uses a 5V DC power supply as the input, which is used as the input of the low dropout (LDO) regulator after passing through a rectifier diode and a simple filter circuit.


2.5 Storage Module

In the module with LPC2294 as the core, 2M bytes of NORFLASH (chip model SST39VF160) and 8M bytes of PSRAM (MT45W4MW16) are expanded. Since both SST39VF160 and MT45W4MW16 are 15-bit bus interfaces, the address bus A1~A23 of LPC2294 is used to connect directly to them. In addition, the system also expands 16M bytes of NANDFLASH (K9F2808U0C) and uses 74LV245 chip for bus driver.


2.6 Data Acquisition Module

The eddy current displacement sensor is composed of a probe (sensor), an extension cable and a converter (preamplifier). It has a wide frequency response, a wide linear measurement range, a small size, and strong anti-interference ability, which brings convenience to the dynamic measurement of rotating bodies such as rotating shafts.


The eddy current displacement sensor model CWY-DO-502 used in this article has a linear range of 2.0mm and a sensitivity of 4.02Mv/μm. The specific parameters are as follows:



2.6JTAG Debug Module

The design of the JTAG interface makes ARM debugging and simulation relatively simple.


LPC2294 supports simulation and debugging through the JTAG port. Its trace and debug ports are not multiplexed with any other ports. According to the LPC2294 manual, the JTAG interface can be used for both boundary scan and debugging.


2.7RS-232 serial communication module

RS-232 is a single-ended communication that increases the communication distance in low-speed serial communication. It is designed for point-to-point communication, and the maximum transmission distance is about 15 meters, so it is suitable for communication between local devices. The UART controller of LPC2294 has a TTL level for sending and receiving, so it must be converted before it can communicate normally with the control board. In order to achieve RS232 level conversion, this design uses the MAX3232 chip. The MAX3232, which contains two transmitters and receivers, has the characteristics of low power consumption, high data rate, and enhanced ESD protection.


3. Control part software design

The core module LPC2294 adopts μCOS-Ⅱ real-time operating system, which has compact structure, high execution efficiency, excellent real-time performance and strong scalability, and can better meet the requirements of stability and reliability of this system. Its portable, curable and tailorable priority-based preemptive real-time multi-task embedded operating system includes real-time kernel, task management, time management, task synchronization communication and memory management functions.


3.1 Overall software design and software task division



The system will eventually realize data acquisition, motor control, error separation tasks, and data display. According to the needs of system functions, a total of six tasks are created, including keyboard tasks, motor transmission tasks, data acquisition tasks, error separation tasks, and display tasks. In the mechanical transmission module, an accurate pulse is required as a measurement benchmark, and in order to meet the needs of further system expansion and flexibility considerations, the CPLD chip A3P030 is used as the pulse source of the spindle, X-axis, and Y-axis stepper motors, and the communication with the main control chip is realized through the RS-232 interface connection.


3.2 Error Separation Task

The error algorithm task is to extract the data packet after AD conversion from the register and pre-process it, and then perform FFT fast Fourier transform, filter out useless harmonic components, and convert the data V through IFFT Fourier inversion to the shape and position error value 0 after error separation after conversion by the formula . Since this algorithm module is the core of this system and must also ensure synchronization with the output, the error separation task has the highest priority in this system. Its function is shown as follows:

void ErrorSeparation()

[1] [2]
Keywords:μC Reference address:Research on roundness error measurement device based on μC/OS-Ⅱ

Previous article:Design and implementation of a multi-channel real-time data acquisition monitoring system
Next article:Design of embedded intelligent vehicle system based on ARM9

Latest Microcontroller Articles
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号