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()
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
- Popular Resources
- Popular amplifiers
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- TFT LCD display realizes dial pointer clock
- About DSP28335 SPI transmission
- Thirteen typical application circuits of light-emitting diode indicator lights
- Talk about the order of learning VC and C++
- [Low-cost smart cat-eye based on RGB-D face detection and environmental monitoring] Training results of face detection model
- Today's Live Broadcast | ST Data Center and Communication Network Power Management Solutions
- What changes will the upgraded WiFi7 bring?
- I would like to ask you, does ESP32-S2 currently support Micropython development?
- Program Size: data=8.0 edata+hdata=1204 xdata=0 const=647 code=17864 What does it mean?
- Some Problems When Using Operational Amplifiers as Comparators