Share this

Microcomputer microstepping control

2026-04-06 05:09:49 · · #1
Abstract: Through the development process of a numerical control system, this paper describes the improvement of the stepper motor microstepping drive circuit and the grating ruler microstepping detection method. Keywords: numerical control system; stepper motor; grating ruler; microstepping. Introduction Numerical control technology is an advanced technology in modern mechanical manufacturing and processing, and it is also a direction for the modernization of China's machinery industry. We once collaborated with the Guangdong Sugar Machinery Factory to successfully transform an ordinary lathe into a CNC lathe. We were responsible for the development of the CNC system, while they were responsible for the mechanical modification. This improved the product qualification rate and production efficiency. System Composition The hardware block diagram of the system is shown in Figure 1. This is a closed-loop automatic control system. The 8031 ​​microcontroller serves as the main control CPU. 32K+8K EPROMs store the system monitoring program and the user processing program, respectively. 8K RAM stores temporary data. A dedicated 8279 chip expands an 8x8 keyboard and a 16-digit LED display. An 8255 and a 74LS573 latch are used to expand various parallel I/O ports of the microcontroller. An optical scale is used to detect the position of the tool holder, and a photoelectric encoder detects the position of the workpiece. The movement of the tool holder is accomplished by two stepper motors working together on the x-axis (lateral) and z-axis (vertical). The z-axis motor uses a conventional three-phase six-step high/low voltage method, while the x-axis motor uses a three-phase six-step method or a step angle microstepping drive method. The system software structure: Under the control of the main monitoring program, it enters sub-modules such as user program editing, cutting (interpolation), tool setting, command interpretation, and error detection. 2. Improvement of Stepper Motor Drive Method In CNC lathes, stepper motors drive the tool holder through a transmission screw. In CNC systems, because the x-axis requires high precision (0.005mm), a corresponding step angle microstepping is required. 3. Grating Ruler Detection and Subdivision The grating ruler is a highly precise position sensor used in this system to measure the position of the tool holder. The signal is fed back to the microcontroller, forming a closed loop in the system. The parameters of the grating ruler we used are as follows: Model—SGC—l; Grating pitch—0.02mm; Range—600mm; Output signal—4 channels of sine waves with a 90° difference and 1 channel of absolute zero signal. Because the resolution of the grating ruler (0.02mm) does not meet the design requirements of this system, subdivision detection is required. The principle of subdivision detection: Since the grating ruler outputs one sine wave within each grating pitch, dividing this sine wave into N equal parts and measuring the sine wave value at each of the N division points is equivalent to dividing the spatial position within one grating pitch into N equal parts. The general subdivision detection method is: after the grating ruler signal is converted from digital to analog, the CPU performs software subdivision and direction determination. However, when the grating ruler is installed in the white line, the detection head often has a certain error, especially when it stops in place, there are often many high-frequency vibrations. Although the amplitude is very small, it may cause a large error when the subdivision detection is performed. For this reason, we added anti-shaking measures, designed a hardware direction discrimination circuit, and added a 16-bit high-speed counter. The circuit block diagram is shown in Figure 3. Working principle: The sinusoidal signal of the grating ruler is shaped into a pulse and sent to the counter and direction discrimination circuit to record the small vibration of the grating head and send it to the CPU. The grating ruler signal is then converted by A/D to obtain the corresponding binary code of the position and sent to the CPU. The CPU processes these signals. The software flow is shown in Figure 4. This method can effectively eliminate the error caused by high-speed and high-frequency vibration. In order to ensure positioning accuracy, some redundant measures are also taken: the software and hardware count and position at the same time, and finally compare the two. When the error exceeds a certain value, the system displays a prompt message. This can ensure that the scrap rate of the processed products is reduced to almost zero. References [1] Qin Yongquan et al. Power interface technology of single-chip microcomputer application system. Beijing: Beijing University of Aeronautics and Astronautics Press, 1992. [2] Wang Wenxi. Machine Tool Digital Adjustment Technology. Beijing: China Science and Technology Press, 1992. Click here to download the original text.
Read next

CATDOLL CATDOLL 115CM Purple Silicone Doll

Height: 115 Silicone Weight: 22kg Shoulder Width: 29cm Bust/Waist/Hip: 57/53/64cm Oral Depth: N/A Vaginal Depth: 3-15cm...

Articles 2026-02-22