Share this

Stepper Motor-Based Speed ​​Testing System

2026-04-06 03:39:25 · · #1
Abstract: This paper introduces the structure, working principle, and speed regulation method of a speed testing system based on a stepper motor. Keywords: speed; stepper motor; microcontroller 0 Introduction In the aviation field, tachometers are mostly used to measure and indicate the speed of engine turbine shafts. It consists of two parts: a sensor and an indicator. The sensor is essentially a generator, which generates three-phase alternating current driven by the turbine shaft, with the frequency proportional to the shaft's speed. The indicator generally consists of a motor, a transmission mechanism, and a meter head. The motor's speed is proportional to the frequency of the alternating current; therefore, the engine turbine shaft speed can be indicated by the indicator. In previous tachometer tests, a DC motor and a phase-locked loop (PLL) were commonly used to form a motor speed regulation system. The DC motor simulates the rotation of the engine turbine shaft, and the tachometer's operation is tested by measuring the DC motor's speed. However, due to factors such as speed drift and accumulated errors during speed regulation, the PLL's testing accuracy is not high across the entire tachometer testing range, and the reliability of the test results is poor. 1. Principle of Stepper Motor A stepper motor, also known as a pulse motor, is an actuator that converts input pulse signals into angular displacement (or linear displacement) of the output shaft. For each input pulse signal, the output shaft rotates by a fixed angle. The total angle rotated by the output shaft is proportional to the number of input pulses, and the rotational speed of the output shaft is proportional to the pulse frequency. 2. Characteristics of Stepper Motor (1) High-precision positioning: The biggest characteristic of a stepper motor is its ability to achieve high-precision positioning control with ease. Taking a stepper motor as an example: its basic positioning unit (resolution) is (full step level) (half step level 0.72° / 0.36°), which is very small; the stopping positioning accuracy error is within (±3 ±) minutes, and there is no cumulative error, thus achieving high-precision positioning control of 0.05° (the positioning accuracy of a stepper motor depends on the mechanical processing accuracy of the motor itself). (2) Position and speed control: When the stepper motor receives the input pulse signal 2, it can rotate at a fixed angle according to the number of input pulses, thereby obtaining flexible angle control (position control), and can obtain a rotation speed proportional to the frequency of the pulse signal. (3) Position holding force: When the stepper motor is stopped (without the input of the 3 pulse signal), it still has the excitation holding force, so it can maintain the stopped position even without relying on mechanical brakes. (4) Sensitive action: Because of its superior acceleration performance, the stepper motor can achieve instantaneous start, stop, forward and reverse rapid and frequent positioning actions. Therefore, when it is used as a servo motor in a servo system, it can often simplify the system, make the operation reliable, and obtain higher control accuracy. The motion system using the stepper motor consists of a stepper motor driver and a stepper motor. When the system receives an electrical pulse signal, the shaft of the stepper motor will rotate through a certain angle or move a certain linear distance. The more electrical pulses input, the greater the angle or linear displacement of the motor shaft; simultaneously, the higher the frequency of the input electrical pulses, the faster the motor shaft's speed or displacement. The biggest characteristic of stepper motor control is the absence of accumulated error (accuracy is 0.5%). Therefore, applying stepper motors to speed testing is 100% necessary and reasonable. 3. Working Principle of Tachometer Testing The principle diagram of tachometer testing is shown in Figure 1. The microcontroller's minimum system frequency should ideally be above 30MHz, with a 16-bit timer and counter. Timer T0 controls DO to drive the stepper motor through an opto-isolator. The stepper motor's speed can be adjusted by adjusting the timing of timer T0. The photoelectric encoder is mounted on the stepper motor's shaft; the signal output from the photoelectric encoder is sent to the microcontroller's counter T1 after opto-isolation, and T1 is used to measure the stepper motor's speed. This speed is the standard speed of the stepper motor. The stepper motor drives the photoelectric encoder to rotate and simultaneously drives the tachometer's sensor, indicating the stepper motor's speed through the tachometer's indicator; this speed is the indicated speed. When the indicated speed is within the allowable error range of the standard speed, the tachometer can be diagnosed as working normally; otherwise, the tachometer is faulty. Stepper motor speed control is accomplished through a timer. During the first timing period, the microcontroller's DO port outputs a high level, and during the second timing period, the DO port outputs a low level, completing one step pulse output. Under the action of this pulse, the stepper motor completes one step angle rotation. Let the step angle of the stepper motor be 'a', the speed be 'n', and the frequency of the step pulse be 'f', then the number of step pulses in one minute is: Therefore, the stepper motor speed is: Since f = 1/2t, the relationship between the timer timing period 't' and the speed 'n' is: t = a/120n. The frequency of the timer counting pulses in the AT89C51 microcontroller is 1/12 of the main frequency M. Let the initial value of the 16-bit timer be N: then the timing period is t = 12/M(2^(16-N)) = a/120n. Therefore, the initial value of the timer is: This formula shows that when the speed exceeds 10,000 RPM, to facilitate the selection of the timer's initial value, the stepper motor should have a relatively large step angle, and the microcontroller's main frequency should also be relatively high. In the microcontroller system, the speed can be set via the keyboard. After the microcontroller calculates the initial timer value, it controls the DO interface to output stepping pulses. After calculating the initial timer value, the DO stepper motor starts rotating. At this time, the microcontroller's display can show the standard speed obtained through the counter. If the standard speed differs from the set speed, the speed can be adjusted by modifying the initial timer value through software. Since the speed of the same stepper motor is adjusted by the number of stepping pulses, the speed can be adjusted by continuously changing the initial timer value to make the standard speed the same as the set speed. Once the standard speed matches the set speed, the tachometer reading can be read to diagnose the test results. 4. Software Design The author used C language to program the microcontroller, and the development system was Keil C51. Compared to assembly language, C language has significant advantages in functionality, structure, readability, and maintainability, making it easier to learn and use. Having used assembly language before, the experience of using C for development is even more profound. Keil C51 software provides rich library functions and powerful integrated development and debugging tools, with a full Windows interface. Below is part of the C51 program's source code, with some comments, which I hope to share with everyone, and I welcome your feedback and valuable suggestions. 5. Conclusion Compared to phase-locked loop (PLL) motor speed control, this test method is easier to implement. Speed ​​control relies on software, overcoming the shortcomings of speed drift and accumulated errors. The author has completed two studies on tachometer testing instruments for testing tachometers and believes this speed control method is worth promoting. References [1] Wu Jianqiang Modern Transmission and Control Technology [M], Beijing: Machinery Industry Press, 2003. [2] Hu Wei, Ji Xiaoheng Single-chip Microcomputer C Programming and Application Examples [M], Beijing: Posts & Telecom Press, 2003.
Read next

CATDOLL 60CM Sasha Silicone (Elf Ear)

Height: 60cm Silicone Weight: 2.7kg Shoulder Width: 14cm Bust/Waist/Hip: 27/24/31cm Oral Depth: N/A Vaginal Depth: 3-8c...

Articles 2026-02-22