1. Overview Hybrid stepper motors are a new type of motor that integrates the advantages of both reactive and permanent magnet stepper motors. They have become mainstream products abroad, and are now being widely adopted in industrial control in China, gradually replacing reactive stepper motors. A significant advantage of stepper motors compared to servo motors is their low price and lack of cumulative error during operation. However, they also suffer from drawbacks such as a significant drop in output torque at high speeds and large vibrations at low speeds. These drawbacks can be overcome through innovation in drive technology. Currently, most two-phase hybrid stepper motor drivers in China use constant current chopper drive with sinusoidal wave microstepping current control. Constant current chopper drive effectively solves the problem of maintaining rated output torque during locking, low frequency, and high frequency, thus its application is widespread. The sinusoidal wave microstepping current control technology can significantly improve the operating quality of stepper motors, reduce torque fluctuations, suppress oscillations, reduce noise, and also improve step resolution. 2. Motor Drive Principle The control principle of a hybrid stepper motor driver is shown in Figure 1, including signal input, logic control, drive output, and feedback circuitry. Pulse and direction signals enter the control chip through an optical isolation circuit. Drivers with isolation circuits effectively prevent external interference signals from entering the circuit, allowing them to operate normally even in complex manufacturing environments. The PWM signal generated by the feedback circuit is processed by the control chip to produce the final power transistor switching control signal, achieving chopper drive. The protection circuit promptly inputs fault signals such as overvoltage and overcurrent to the control chip for processing, quickly shutting down the power transistor and ensuring the driver is not damaged. [align=center][IMG=Control Principle Diagram]/uploadpic/THESIS/2007/11/2007111618195078975L.jpg[/IMG][/align]Figure 1 Control Principle Diagram[IMG=Current Vector Diagram and Subdivision Current Waveform]/uploadpic/THESIS/2007/11/2007111618214651099W.jpg[/IMG]Figure 2 Current Vector Diagram and Subdivision Current Waveform 3 Current Vector Subdivision Drive Principle By using a 90° phase difference between the currents in the two coils of a two-phase hybrid stepper motor, and inputting sinusoidal waveforms with a 90° phase difference, subdivision drive can be achieved. As shown in Figure 2, when the space vector currents ia and ib through the coils change with the angle, the magnitude of the synthesized current vector remains constant and also changes with the corresponding angle. After subdivision, the current in each phase changes in steps and follows sine and cosine laws, making the synthesized current vector rotate with constant amplitude and uniformity. This allows the motor to achieve constant torque and uniform step angle subdivision drive. If the winding current subdivision is fine enough, more precise micro-step control can be achieved. 4 CPLD System 4.1 CPLD Hardware Circuit Design The driver hardware circuit control flow is shown in Figure 3. After power-on, the CPLD first reads the direction signal and subdivision settings, and initializes each pin. The driver compares the actual current detected by the sampling resistor with the given current, and the resulting chop signal is sent back to the CPLD chip for processing. Then, the power drive interface circuit controls the switching on and off of the power devices, so the actual current changes regularly with the given current. [IMG=Hardware Circuit]/uploadpic/THESIS/2007/11/20071116182345477949.jpg[/IMG] Figure 3 Hardware Circuit 4.1.1 Optocoupler Isolation Circuit When the driver is working, in order to reduce the interference of external signal interference to the internal circuit, optocoupler isolation is usually used. According to the different input signal frequencies, we use HCPL-2531 optocouplers. The 2531 has a conversion capability of 1 Mbit/s, which fully meets the pulse signal input frequency. The conduction characteristics of the phototransistor and the pull-up resistor at the output end are used to make the output and input levels the same. The hardware circuit is shown in Figure 4. [IMG=Optical Isolation Circuit]/uploadpic/THESIS/2007/11/20071116182613113690G.jpg[/IMG] Figure 4 Optical Isolation Circuit 4.1.2 Power Drive Circuit Integrated power chips have reasonable internal design and composite protection circuits, which can increase the reliability of operation. Moreover, the circuit layout is reasonable, the peripheral circuit is simple, and heat sinks can be added to solve the heat dissipation problem. Designers can choose different integrated chips according to their needs. The IR2110 driver chip from IR Company combines the advantages of optical isolation and electromagnetic isolation. Its high-end operating voltage can reach 500V, with low static power consumption; the output voltage range is 10-20V; the logic power supply voltage range is 5-15V, and the logic signal is compatible with 3.3V, which can be easily matched with TTL and CMOS levels; the operating frequency can reach 500KHz; the switching delay is small, and the totem pole output peak current is 2A; a typical application circuit is shown in Figure 5. The numerous advantages of the IR2110 greatly facilitate circuit design, especially its high-voltage side bootstrap floating drive principle, which allows for power supply using only one power source. 4.2 VHDL Language Programming Simulation Currently, commonly used EDA software includes MAXPLUSII or QuartusII simulation programming software. These offer various programming input formats, with direct application of VHDL language being the most common. Two-phase hybrid stepper motors must be powered by bipolar power supplies. Sometimes forward current is required in the motor phase windings, and sometimes reverse current is needed, hence the use of H-bridge drive. Distributing the stepping command pulses according to specific logic to each phase of the stepper motor is crucial for its proper operation. Figure 5 shows the two-phase excitation state output after QuartusII simulation. [IMG=IR2110 Typical Application]/uploadpic/THESIS/2007/11/20071116182703837478.jpg[/IMG] Figure 5. Typical Application of IR2110. The CPLD-based two-phase stepper motor controller features flexible and convenient design, strong versatility, and reliable performance. Testing has shown that it can effectively control two-phase stepper motors. 5. Product Series Lechuang Automation Technology Co., Ltd. produces the DMD series of two-phase hybrid stepper drivers, including models such as DMD402, DMD402A, DMD403, DMD403A, DMD808, and DMD808A. The output current range is 0.25A-7.7A, and the drive voltage range is 24V-90V. These drivers are suitable for driving two-phase or four-phase hybrid stepper motors with frame sizes of 42mm, 56mm, and 86mm. Its main features include: (1) bipolar constant current chopping mode with a chopping frequency of 20K; (2) opto-isolated signal input; (3) TTL compatible input signal; (4) automatic half-current function; (5) convenient current and microstepping settings, with a maximum microstepping number of 256; (6) some models have single and dual pulse selection input modes; (7) offline function; (8) overcurrent and overvoltage protection; (9) universal appearance, easy to install and use; (10) low noise, high efficiency, low vibration, and good operating performance. The A-series driver is controlled by CPLD technology and has the advantages of flexible architecture and logic unit, high integration, and powerful functions. In addition, CPLD has abundant pin resources and flexible use, which can integrate the functions of external discrete digital chips into the CPLD, which not only optimizes the circuit, but also reduces the interference problems caused by discrete components, significantly reduces motor vibration and noise, and facilitates debugging and maintenance. Nanosecond-level processing speed has a significant advantage in high-speed control, resulting in smooth motor operation and minimal noise. It also improves the reliability of the driver; when triggered by external fault signals, the processor can respond quickly to protect the driver. [IMG=Two-phase winding excitation voltage waveform]/uploadpic/THESIS/2007/11/20071116182800894193.jpg[/IMG] Figure 6 Two-phase winding excitation voltage waveform 6 Summary The two-phase hybrid stepper motor driver developed by Lechuang Automation Technology Co., Ltd. has the advantages of advanced technology, complete functions, and high reliability. It is widely used in CNC machine tools, special welding equipment, small engraving machines, laser marking machines, pneumatic marking machines, laser cutting machines, robotic arms, dispensing machines, and other fields. Proceedings of the 2nd Servo and Motion Control Forum Proceedings of the 3rd Servo and Motion Control Forum