Microcontroller and TA8435 Stepper Motor Microstepping Control Method
2026-04-06 04:15:05··#1
1. Stepper Motor: A stepper motor is a purely digitally controlled motor that converts electrical pulse signals into angular displacement. For every pulse, the stepper motor rotates by one angle, making it ideal for microcontroller control. Under non-overload conditions, the motor's speed and stopping position depend only on the frequency and number of pulse signals, unaffected by load changes. The motor rotates one step angle. Furthermore, stepper motors exhibit only periodic errors with no cumulative errors, resulting in high precision. Stepper motors have the following characteristics: ① The angular displacement of a stepper motor is strictly proportional to the number of input pulses. Therefore, after one revolution, there is no cumulative error, providing excellent tracking performance. ② An open-loop CNC system composed of a stepper motor and drive circuit is simple, inexpensive, and highly reliable. It can also be combined with an angle feedback circuit to form a high-performance closed-loop CNC system. ③ Stepper motors have fast dynamic response and are easy to start, stop, reverse, and speed-change. ④ The speed can be smoothly adjusted over a wide range, and significant torque can still be obtained at low speeds, thus generally eliminating the need for a speed reducer to directly drive the load. ⑤ Stepper motors can only operate when powered by a pulse power supply; they cannot be directly powered by AC or DC power. ⑥ Stepper motors are prone to oscillation and step loss, requiring corresponding measures to be taken for the control system and mechanical load. Stepper motors have the advantages of simple control and mechanical structure. Figure 1 is a schematic diagram of a four-phase six-wire stepper motor. This type of stepper motor can be used as a four-phase motor or a two-phase motor, offering flexibility and therefore wide application. Stepper motors have two operating modes: full-step mode and half-step mode. Taking a four-phase hybrid stepper motor with a step angle of 1.8° as an example, in full-step mode, the stepper motor rotates 1.8° for one revolution with each pulse received, requiring 200 pulses. In half-step mode, the stepper motor rotates 0.9° for one revolution with each pulse received, requiring 400 pulses. Controlling the rotation of a stepper motor requires inputting pulses to the stepper motor leads according to a specific timing sequence. Taking the above four-phase six-wire stepper motor as an example, the control timing sequences for its half-step and full-step operating modes are listed in Tables 1 and 2. Stepper motors suffer from high vibration and noise when operating at low frequencies. Microstepping effectively solves this problem. Essentially, stepper motor microstepping control involves controlling the current in the motor's field windings to create a uniform, rotating circular magnetic field within the motor, thus subdividing the step angle. Generally, the amplitude of the resultant magnetic field vector determines the stepper motor's torque, while the angle between two adjacent resultant magnetic field vectors determines the step angle. The half-step operation mode of a stepper motor embodies this microstepping principle. There are various methods to implement microstepping, the most common being pulse width modulation (PWM) chopper drive. Most dedicated stepper motor driver chips use this method; the TA8435 is one such chip. 2. Stepper Motor Microstepping Based on TA8435H Chip 2.1 Features of the TA8435 Chip The TA8435 is a single-chip sinusoidal microstepping two-phase stepper motor driver manufactured by Toshiba. This chip has the following features: ① Wide operating voltage range (10-40V); ② Output current up to 1.5A (average) and 2.5A (peak); ③ Selectable full-step, half-step, 1/4 microstepping, and 1/8 microstepping modes; ④ Pulse width modulation chopper drive mode; ⑤ Forward/reverse control function; ⑥ Reset and enable pins; ⑦ Selectable single-clock or dual-clock input. As shown in Figure 2, the TA8435 mainly consists of a decoder, two bridge drive circuits, two output current control circuits, two maximum current limiting circuits, and a chopper. 2.2 TA8435 Subdivision Working Principle In Figure 3, during the first CK clock cycle, the decoder turns on the bridge drive circuit. Current flows from VMA through the motor coil, then through RNFA, and finally forms a loop with ground. Due to the coil inductance, the current gradually increases, so the voltage on RNFB also rises accordingly. When the voltage on RNFB is greater than the voltage at the positive terminal of the comparator, the comparator turns off the bridge drive circuit, the current in the motor coil begins to decay, and the voltage on RNFB decreases accordingly. When the voltage value is less than the comparator's positive voltage, the bridge drive circuit turns on again. This cycle repeats, and the continuous rise and fall of the current forms a sawtooth wave, the waveform of which is the first segment of the IA waveform in Figure 3. Furthermore, since the chopper frequency is very high, typically in the tens of kHz range, its frequency depends on the selected capacitor. Under the action of the OSC, the current sawtooth ripple is very small, and the output current can be approximated as DC. At the start of the second clock cycle, the output voltage Ua of the output current control circuit reaches stage 2, and the comparator's positive voltage also reaches stage 2. Therefore, the current flowing through the stepper motor coil rises from stage 1 to stage 2. The current waveform is shown in part 2 of Figure IA. In the third and fourth clock cycles, the working principle of TA8435 is the same as in stages 1 and 2, except that the comparator's positive voltage is increased again. The output current waveform is shown in parts 3 and 4 of Figure IA. This ultimately forms a stepped current, and the current applied to coil B is shown as IB in Figure 3. Within one clock cycle of CK, the current flowing through coils A and B works together to make the stepper motor run one microstep. 2.3 Application of Stepper Motors Figure 4 is a schematic diagram of the microcontroller connected to TA8435 to control the stepper motor. Pins M1 and M2 determine the motor's rotation mode: M1=0, M2=0, the motor operates in full-step mode; M1=1, M2=0, the motor operates in half-step mode; M1=0, M2=1, the motor operates in 1/4 microstep mode; M1=1, M2=1, the motor operates in 1/8 microstep mode. CW/CWW controls the motor's rotation direction. The maximum frequency of the CK1 and CK2 clock inputs cannot exceed 5 kHz. Controlling the clock frequency controls the motor's rotation speed. When REFIN is high, the output voltage of NFA and NFB is 0.8 V; when REFIN is low, the output voltage of NFA and NFB is 0.5 V. These two pins control the stepper motor's input current. The current magnitude is related to the external resistor connected to the NF terminal by the formula: Io=Vref/Rnf. In Figure 4, assuming REFIN=1, a stepper motor with a rated current of 0.4 A is selected, and 1.6 Ω, 2W high-power resistors are selected for R1 and R2. The O and C lines are not connected. Stepper motors are used in two-phase bipolar configurations; using four-phase motors in two-phase configurations can increase the output torque. Fast recovery diodes D1-D4 are used to discharge winding current. The following is a program using a TA8435 to control a stepper motor, implementing clockwise rotation using 1/8 microstepping. Timer 1 outputs pulses to the TA8435 to control the stepper motor speed. #include<8051. h> #define REFIN P1_5; #define M2 Pl_4} #define -M1 Pl_3; #define CW Pl_2; #define CLK2 Pl_1; #define CLK1 P1_O; void C10cklrqHandler(void)interrtlDt 3 //Timer 1 interrupt program{CLK2=!CLK2; TH0=0xef; TL0=0xff; void main() { PO=0x00; TMOD=0x00; EA=l: ETl=h TRl=1: REF1N=0; M2=O: M1=1: CLK1=l: CW=l. for(;;;; } 3 Conclusion This article introduces the characteristics of stepper motors and the working principle of TA8435 chips. Using microstepping can improve the control accuracy of stepper motors and reduce the vibration and noise of stepper motors. Therefore, for low-frequency operation, 1/4 microstepping or 1/8 microstepping modes can be selected to reduce system vibration and noise. When the system needs to operate at high speeds, microstepping mode may not be sufficient to achieve the required speed; in this case, full-step or half-step modes can be used. At higher speeds, stepper motors operate stably with low vibration and low noise in full-step or half-step modes. Switching between microstepping, half-step, and full-step modes is quite easy with the TA8435. Using the TA8435 to control stepper motors is characterized by low cost, simple control, and reliable operation, thus possessing high promotional value and broad application prospects.