Abstract: In view of the shortcomings of the existing CA6 140 lathe, this paper puts forward the numerical control transformation scheme and the design of single chip microcomputer system, so as to improve the machining accuracy, expand the application scope of the machine tool and improve the productivity. In this paper, the design process of numerical control transformation of ordinary lathe is expounded, and the design of mechanical transformation part and numerical control system part of CA6 140 is introduced in detail. The control system with 803 1 as CPU is used to process the signal, and the stepping pulse is output through I/O interface, which drives the rolling screw to rotate after being decelerated by the first gear transmission, thus realizing the longitudinal and transverse feeding movement.
Keywords: CNC machine tool, single-chip CNC system, refit design
I. Introduction
As an important basic equipment of machinery manufacturing industry, the development of machine tools has been paid close attention to by people. Due to the rise of computer technology, the control information of machine tools has made a qualitative breakthrough, which has led to the birth and development of a new generation of machine tools-CNC machine tools with flexible automatic control by digital technology. The appearance and application of computers provide an ideal means for human beings to realize the automation of machining process. With the development of computer, CNC machine tools have been rapidly developed and widely used, and at the same time, people have fundamentally changed the traditional concept of machine tool transmission and structure.
Two. general survey
CNC machine tools have attracted worldwide attention for their excellent performance, precision, flexibility and diverse functions, and started the development of mechanical products to mechatronics. Numerical control machine tool is a mechatronics product which uses digital information to control the machine tool. It records the information of the relative position between the tool and the workpiece, the start and stop of the machine tool motor, the change of spindle speed, the loosening and clamping of the workpiece, the selection of the tool, the start and stop of the cooling pump and other operations and sequential actions on the control medium with coded numbers, and then sends the digital information to the numerical control device or computer. After decoding and operation, various instructions are issued to control the servo system or other executive parts of the machine tool to add the required workpieces.
Compared with ordinary machine tools, CNC machine tools mainly have the following advantages:
1. has strong adaptability, and is suitable for processing single piece or small batch of complex workpieces; When replacing a workpiece on a CNC machine tool, it is only necessary to re-program the processing program of the new workpiece to realize the processing of the new workpiece.
2. High machining accuracy;
3. High production efficiency;
4. Reduce labor intensity and improve working conditions;
5. Good economic benefits;
6. Conducive to the modernization of production management.
CNC machine tools have become the mainstream products in China market, and the demand is increasing year by year. In recent years, China's CNC machine tools have made remarkable progress in industrialization and product development, especially in the aspects of high speed, multi-axis, compound and precision of machine tools. However, there is still a gap between domestic CNC machine tools and similar products in advanced countries, which can not meet the needs of national construction. China is a country with a large number of machine tools, with more than 3 million ordinary machine tools. But the quality of the machine tool is poor and its performance is backward. The average output value of a single machine tool is only about110 in advanced industrial countries, which is too large and needs to be reformed urgently. The numerical control transformation of the old machine tool, as the name implies, is to add a microcomputer control device to the ordinary machine tool, so that it has certain automation ability to achieve the predetermined processing technology goal. With the increasing popularity and application of CNC machine tools, everyone knows the technical and economic benefits of CNC machine tools. In the technical transformation of domestic factories, the microcomputer numerical control transformation of machine tools has become an important aspect. Many factories use CNC, digital display and PC technology to transform ordinary machine tools while purchasing CNC machine tools, and have achieved good economic benefits.
China has limited economic resources, a large country and a large demand for machine tools, so it is impossible to spend considerable money on buying new CNC machine tools. There are many old machine tools in our country, so it is more in line with our national conditions to transform ordinary machine tools with economical numerical control system, which can not only meet the needs of processing, but also improve the automation degree of machine tools with less investment. 1984, China began to produce economical numerical control system and used it to transform old machine tools. So far, many manufacturers have produced economical numerical control systems. It can be predicted that in the future, the economical NC transformation of machine tools will develop and popularize rapidly. Therefore, this graduation design example is typical and practical.
Third, the design of the overall scheme
3. 1 design task
This design task is to carry out numerical control transformation on CA6 140 lathe. The longitudinal and transverse feed systems are controlled by open-loop microcomputer. The pulse equivalent in the longitudinal direction (Z direction) is 0.0 1mm/ pulse, and that in the transverse direction (X direction) is 0.005mm/ pulse. The driving element adopts stepping motor, the transmission system adopts ball screw pair, and the tool rest adopts automatic indexing tool rest.
3.2 Overall Scheme Demonstration
For the economical numerical control transformation of ordinary machine tools, when determining the overall design scheme, we should consider making as few changes to the machine tools as possible under the premise of meeting the design requirements to reduce the cost.
1) Determination of motion mode of CNC system
Numerical control system can be divided into point-to-point control system, point-to-point linear control system and continuous control system according to motion mode. Because CA6 140 lathe is needed to process complex contour parts, this microcomputer numerical control system adopts two-axis linkage continuous control system.
2) Reform design of servo feed system.
The servo feed system of CNC machine tools can be divided into open loop, semi-closed loop and closed loop. Because open-loop control has the advantages of simple structure, easy design and manufacture, good control accuracy, easy debugging, low price, convenient use and maintenance. Therefore, this design decided to adopt the open-loop control system.
3) Hardware circuit design of CNC system.
Any numerical control system consists of hardware and software. Hardware is the foundation of CNC system, and its performance directly affects the working performance of the whole CNC system. With hardware, software can run effectively. In the design of numerical control device, the selection of CPU is the key, and the following factors should be considered when selecting CPU:
(1) clock frequency and word length are closely related to the motion speed and accuracy of the controlled object;
(2) The capacity of expandable memory is related to the strength of numerical control function;
(3) The ability to expand I/O ports is related to the ability to control peripherals.
In addition, the CPU should be determined according to the application situation, control object and various performance and parameter requirements of the numerical control system. In China, Z80CPU and MCS-5 1 series single-chip microcomputer are widely used in the numerical control transformation of ordinary machine tools, mainly because their supporting chips are cheap, versatile and convenient to manufacture and maintain, which can fully meet the needs of the transformation of economical numerical control machine tools. This design adopts MCS-5 1 series single chip microcomputer. 5 1 series is richer than 48 series and cheaper than 96 series. In the 5 1 series, it is 805 1 without ROM, and 875 1 is 805 1 with EPROM instead of ROM. At present, 803 1 single chip microcomputer is the most widely used in industrial computers. This design takes 803 1 chip as the core, and adds a control system composed of memory expansion circuit, interface and panel operation switch.
3.3 Determination of master plan
After the demonstration of the overall design scheme, the economic NC transformation diagram of CA6 140 lathe is determined. The spindle speed of CA6 140 lathe retains the function of the original machine tool, that is, manual speed change. The longitudinal (Z-axis) and transverse (X-axis) feed movements of the lathe are driven by stepping motors. The microcomputer composed of 803 1 single chip microcomputer is the core of numerical control device. I/O interface, ring distributor and power amplifier control the stepping motor to rotate, and the gear slows down to drive the ball screw to rotate, thus realizing the longitudinal and transverse feeding movement of the lathe. The tool rest is changed into an automatic indexing tool rest controlled by microcomputer and driven by motor. In order to keep the thread cutting function, it is necessary to install a spindle pulse generator. Therefore, the spindle rotates synchronously with the synchronous toothed belt and sends out two signals: the number of pulses per revolution and a synchronous signal, which are sent to the microcomputer through the isolation circuit and I/O interface.
Fourth, the hardware circuit design of microcomputer numerical control system
4. 1 overall design of hardware circuit of microcomputer numerical control system
This system chooses 803 1CPU as the central processor of the numerical control system. The external 2764EPROM is used as a program memory for monitoring programs and processing programs, and is used to store public parts. Then choose a 6264RAM to store the parts program and working parameters that need to be modified randomly. The expansion chip is addressed by decoding, and the 74LS 138 decoder is used to complete this function. As an extension of the input and output ports of the system, 8279 is connected to the input and output display of the keyboard respectively, and 8255 is connected to the ring distributor of the stepping motor to control the stepping motor of X axis and Z axis in parallel respectively. In addition, we should also consider the photoelectric isolation between the machine tool and the single chip microcomputer, power amplification circuit and so on.
The function of each pin is briefly described as follows:
1) Source pin VSS: power supply ground. Vcc:+5v power supply terminal.
2) Input/output port line 803 1 has P0, P 1, P2 and P3.
4 ports, each with 8 I/O lines. When the system expands external memory, P0 port is used to output low 8-bit parallel data, P2 port is used to output high 8-bit address, and P3 port has a second function besides being an 8-bit quasi-bidirectional parallel port. The second function of each pin is defined as follows: P3.0
RXD: serial data input. P3. 1 TXD: serial data output P3.2 INT0: external interrupt 0 requests signal input. P3.3
INT 1: external interrupt 1 request signal input. P3.4 T0: external input of timer/counter 0 P3.5 T 1: external input of timer/counter 1 P3.6
WR: write strobe of external data memory. P3.7 RD: read strobe of external data memory. Before the second function runs, the output latch of the second function must be set to 1 by the program.
3) Signal control line
RST/VPD: RST is the input pin of the reset signal line. After the clock circuit works, the high level appears on this pin for more than two machine cycles to complete the reset operation. 803 1 MCU adopts two reset modes: one is automatic reset when power is on, and the other is switch reset. Ale/Prog: Ale is the data latch permission signal. Its function is to lock the low 8-bit address sent by CPU from P0 port in an additional latch.
External program memory read strobe signal. Effective at low time.
VPP: When EA is at high level and the PC value is less than 0FFFH, the CPU executes the program in the internal program memory. When EA is low, the CPU only executes the programs in the external program memory. XTAL 1: When using an external oscillator, the inverting amplifier input of the oscillator must be grounded; XTAL2: the output of the inverting amplifier of the oscillator, which receives the peripheral oscillation signal when an external oscillator is used;
4.2 Off-chip three-bus structure
In practical application, single chip microcomputer often needs to expand external memory, I/O port and so on. Except for power supply, reset, clock input and user I/O port, the pins of the single chip microcomputer are all set for system expansion, and these pins form a three-bus form:
1) address bus AB
The address bus width is 16 bits. Therefore, the direct addressing range of external memory is 64KB. The P0 port provides the low 8-bit address (A7 ~ A0) of the 16-bit address bus through the address latch, and the P2 port directly provides the high 8-bit address (A 15 ~ A8).
2) Data bus database
The width of data bus is 8 bits, which is provided by P0 port.
3) control bus CB
The control bus consists of P3 port in the second functional state and four independent control lines RST, EA, ALE and PSEN. 8255A programmable parallel I/O port expansion chip
8255A programmable parallel I/O port expansion chip can be directly connected to the bus of MCS series single chip microcomputer system. It has three 8-bit parallel I/O ports and three working modes. Through programming, it can easily complete the information exchange between CPU and peripheral devices through unconditional transmission, query transmission or interrupt transmission.
Structure and pin function of 8255A: structure of 8255A.
The internal structure of 8255A includes three 8-bit parallel data I/O ports, two working mode control circuits, a read/write control logic circuit and an 8-bit data bus buffer. The functions of each part are introduced as follows:
(1) Three 8-bit parallel I/O terminals A, B and C.
A: It has an 8-bit data output latch/buffer and an 8-bit data input latch. It can be programmed as an 8-bit input, 8-bit output or 8-bit bidirectional register.
B: It has an 8-bit data output latch/buffer and an 8-bit input or output register, but it can't input/output bidirectionally.
C: It has an 8-bit data output latch/buffer and an 8-bit data input buffer. Port C can be divided into two 4-bit ports for input or output, and can also be used as a state control signal when port A and port B are gated.
(2) Working mode control circuit
A and B control circuits divide the three ports into two groups: A and B. Group A controls the position of port A and the position of port C high, while group B controls the position of port B and the position of port C low. Two groups of control circuits each have a control command register, which is used to receive control words written by CPU and determine the working modes of two groups of ports. You can also reset the C port to zero or set "1" according to the requirements of the control word.
(3) read/write control logic circuit
It receives the address signal from CPU and some control signals to control the working state of each port.
(4) Data bus buffer
It is a three-state bidirectional buffer, which is used to directly connect the data bus of the system and realize the information transmission between CPU and 8255A.
Verb (abbreviation of verb) abstract
The numerical control transformation scheme of ordinary lathe and the design of single chip microcomputer system have improved the machining accuracy, expanded the use range of machine tools and improved the productivity. The control system with 803 1 as CPU is used to process the signal, and the stepping pulse is output through I/O interface, which drives the rolling screw to rotate after being decelerated by the first gear transmission, thus realizing the longitudinal and transverse feeding movement.
Sixth, thank you.
The graduation thesis has come to an end temporarily, which also means that my three-year study and life in Jiujiang Vocational College is coming to an end. In retrospect, it is a great honor to spend the most precious time in life under the influence of many knowledgeable and talented teachers on such a campus. In these three years, I have benefited a lot from my study and thinking. In addition to our own efforts, this is inseparable from the care, support and encouragement of teachers, classmates and friends.