Share this

Hardware Design of a DSP-Based DC Servo Controller for Engraving Machines

2026-04-06 04:35:54 · · #1

Abstract : To meet the high-speed and high-precision processing requirements of engraving machines and improve their cost-effectiveness, a hardware design for a 2D DC servo real-time motion controller for engraving machines was presented. The controller uses the TMS320C2812 as the control core, the L6203 as the power drive module, and a small-power DC motor as the actuator. Experimental results demonstrate that the controller operates stably, has high tracking accuracy, and achieves fast processing speed, making it promising for widespread practical application.

Keywords : Engraving machine; DSP; Power drive module; DC servo motor ; 2D motion controller ; Experiment

Hardware Design of Direct Current Servo Controller for Engraving Machine Based on DSP

LI Hong-mei, ZHANG Hou-lai (College of Electrical Engineering, Hefei University of Technology, Hefei 230009, China)

Abstract: In order to meet the requirements of high speed and high accuracy for an engraving machine, automatic machining and improved its performance and value ratio, achieved hardware design for a two-dimensional direct current servo and real-time motion controller. The designed controller had DSP as its control kernel1. L6203 as its power drive module and small power DC motor as its executive machine. The repeating experimental results validated that the controller had the following merits such as motion stabilization, high tracking precision and fast machining speed, therefore, it was hopeful to widely and practically apply the controller.

Key Words: Engraving machine; DSP; Power drive module; DC servo motor; Two-dimensional motion controller; Experiment

0 Introduction

The motion controller is the core of a CNC system, and its control strength and performance directly affect the machining quality and efficiency of the CNC system. Most advanced servo motion controllers abroad adopt the Zero Phase Error Tracking Controller (ZPETC) proposed by Tumizuka. Furthermore, to overcome tracking errors caused by system model uncertainties and interference, a Disturbance Observer (DOB) is introduced. Given that domestically developed DC servo motion controllers have not yet widely applied these research results, this paper designs a simple and advanced 2D DC servo real-time motion controller for engraving machines, based on the absorption and assimilation of foreign technologies. Repeated experiments demonstrate that the motion controller features stable operation, high tracking accuracy, and fast machining speed. Once put into production, it will significantly improve the cost-effectiveness and market competitiveness of domestically produced engraving machines.

1 Hardware Design of DC Servo Controller for Engraving Machine

1.1 DC Servo Engraving Machine System Structure

The system structure diagram of the developed DC servo engraving machine is shown in Figure 1. The host computer (selecting a suitable processing chip based on the complexity of the interpolation algorithm, such as a 51 series microcontroller or DSP) provides discrete reference speed signals according to the trajectory coordinates generated by the engraving software and a certain interpolation algorithm, and transmits these signals to the DC servo motion controller in real time via serial port. The motion controller, based on the given X and Y axis reference speed signals (which can be obtained through discrete integration of the reference displacement signals), and combined with the actual X and Y axis displacement outputs fed back from the encoder, calculates two sets of PWM signals for the X and Y axes using a DC motor servo control algorithm integrating a ZPETC controller, PD controller, and interference observer. These two sets of PWM signals are used to trigger the power drive modules (L6203) of the X and Y axis motors, respectively, controlling the X and Y axis motors of the engraving machine to complete the actual processing task.

1.2 Control Chip Selection

Given the characteristics of 2D engraving machine processing platforms, the host computer engraves complex graphic contours in a single operation, generating reference speed signals with a total data volume of tens or even more megabytes through interpolation algorithms. If the motion controller receives all the reference speed signals at once and then generates PWM signals to drive the motor to begin engraving, it not only requires a considerable amount of external RAM to store temporary data, but also increases the system's hardware cost and complexity. Furthermore, receiving data can take several minutes or even longer, thereby reducing the system's processing efficiency.

To reduce system hardware costs and improve processing efficiency, the motion control chip must possess real-time control capabilities. This means that it must generate a PWM signal to drive the motor and begin the engraving process simultaneously with the received reference speed signal. This requires the control chip to have sufficient time to receive real-time reference speed data while simultaneously executing complex motion control algorithms. This paper selects the TMS320C2812 32-bit fixed-point DSP as the control chip for the DC servo motion controller. This chip has a main frequency of up to 150 MHz, and its built-in 128 k×16-bit Flash memory can be used to store the motion control program. The on-chip 18 k×16-bit SRAM can be used to store a small amount of real-time reference speed signal and intermediate variables required in the control algorithm. As shown in Figure 1, the on-chip asynchronous serial communication (SCI) module, along with an external asynchronous serial transceiver (MAX3160), can be used to receive the reference speed signal from the host computer in real time, with a transmission rate of up to 1 Mbps.

The Quadrature Encoded Pulse (QEP) unit on the Event Manager (EV) module can be used to receive the encoder's feedback displacement signal in real time. The comparator unit can generate the PWM signal to drive the motor in hardware. In summary, a single TMS320C2812 chip, along with three peripheral components (power supply chip, asynchronous serial transceiver, and level conversion chip), can form a complete DC servo motion controller, effectively resolving the contradiction between system control performance and hardware cost and complexity.

1.3 Feedback Displacement Detection

To realize the position closed-loop control algorithm, the motion controller needs to detect the actual displacement signal output by the motor in real time. Each event manager module (EVA/EVB) of TMS320C2812 has an orthogonal encoder pulse (QEPA/QEPB) circuit [4]. Select pins CAP1/QEP1 and CAP2/QEP2 as the input ports of the shaft motor encoder, and pins CAP3/QEP3 and CAP4/QEP4 as the input ports of the l-axis motor encoder. The orthogonal encoder pulse input unit (QEP) can count the leading and trailing edges of the pulse and can determine the counting direction according to the phase sequence relationship of the two pulses. The internal timer (counter) 12 and T4 are used as counters of QEPA and QEPB, respectively. The initial value of the control register of T4 is set to 0x1870, that is, its counting mode is directional increment/decrement mode, and the counting direction signal is generated by the QEP circuit. Since the clock frequency generated by counter 2 (or 4) in the QEP logic is 4 times that of each input pulse sequence, and the pulse equivalent of the encoder selected by the system is 25μm, the pulse equivalent of the counter in this system is 6.25μm. In addition, the encoder output is a 5V level signal, which needs to be converted into a 3.3V level signal by the SN74CBTD3384C chip before being sent to the encoder input pin of the DSP.

It is worth noting that the counter register (T2CNT or T4CNT) needs to be reset to 0xTFFF during system initialization or after reading its value in each control cycle. This serves two purposes: first, to prevent counter overflow during system startup (e.g., T2CNT is set to 0 while the counting direction is decreasing); and second, to prevent the accumulated displacement pulse equivalent from exceeding the counter's counting range during continuous unidirectional operation, thus preventing overflow. Resetting the counter to 0x7FFF ensures that the pulse increment (decrement) in each control cycle does not exceed 0x7FFF, thus reducing the counter's limitation on the X-Y axis motion range. The system's current displacement can be obtained by software by accumulating the displacement increment (decrement) detected in each control cycle.

1.4 Power Drive and Protection

The engraving machine uses a 9234C130-R5 series DC servo motor as its DC servo actuator. Its rated voltage is 19.1V, armature resistance is 1.89Ω, maximum speed is 6000r/min, and maximum operating current is approximately 10A. An L6203 is selected as the motor power drive module, with a maximum operating voltage of 48V and peak current of 5A. The chip and its peripheral circuit diagram are shown in Figure 2.

The transfer function of a DC motor can be simplified to [3]:

Equation (1) can be expressed as:

In the formula, J is the equivalent moment of inertia and B is the equivalent coefficient of viscous friction.

Taking the X-axis as the research object, the system's step response was experimentally measured to yield: Js = 3.35 × 10⁻⁴ V / (mm / sec²), B = 1.5 × 10⁻² (mm / sec²), and the forward starting voltage was approximately 2.8 V. When the system's DC power supply provided a maximum voltage of 20 V and the system reached steady state, the measured steady-state speed of the motor was approximately 1320 mm/s, verifying the accuracy of the readings. The measured peak armature current during acceleration was ia ≈ 4.6 A, and during steady state, ia ≈ 0.52 A, with a rise time г ≈ 0.8 s. At this point, the system provided a maximum acceleration of approximately 1.68 g. To ensure timely system tracking and normal operating current of module L6203 and the motor, the actual system acceleration was set to 1.2 g. When the motor's acceleration exceeded a certain range (motor stalling or being artificially accelerated beyond a certain range), the actual output acceleration of the motor could be measured through feedback speed measurement. The system software design limits the acceleration a < 2g. When the actual single-axis acceleration a > 2g, it is treated as a fault to protect the actuator motor and L6203 chip from operating within the normal current range.

Pins 5 and 7 of the L6203 are the input interfaces for the two PWM pulse control signals of the H-bridge. The two pulse signals are complementary. That is, when the pulse signal at pin 5 is high, pin 7 is low, and the motor armature voltage is positive; otherwise, it is negative. Pin 1 is the L6203 enable signal. When a logic high level is applied to pin 1, the L6203 is in the enabled working state. To implement the fault protection function of this engraving machine control system, the system's reset signals include manual reset and software reset, both connected to the DSP's reset pin, thereby realizing the DSP reset operation and ensuring the normal operation of the system. The software reset (by writing a low level to a specific address, which is then decoded and sent to the reset terminal) is triggered when there is a system data transmission error or the engraving machine tool hits the left or right limit switches of the platform. The reset signal is sent to pin 1 in the form of a logic low level, putting the H-bridge into freewheeling mode and causing the motor to stop quickly.

2. Experimental Results and Analysis

For the designed DC servo system of the engraving machine, a third-order low-pass filter was used as the interference observer, with г=0.004 selected. The PD controller parameters were repeatedly verified through simulation and experiments, and were set as Kp=110 and Td=0.29214. The parameters of the nonlinear friction compensation model were selected through repeated experiments as: Uc+ =2.8 V, Uc- = -1.7 V. The designed ZPETC is:

Although the parameters of each module in the controller only show the controller parameters of the X-axis motor, the design process and method of the X-axis motor controller are exactly the same.

Taking the shaft reference displacement signal for a 10 mm radius circle processed by an engraving machine as an example, see Figure 3. The experimental results in Figure 4 show that the tracking error of a traditional controller containing only PID control reaches a maximum of 75 μm. The maximum tracking error of the designed 2D DC servo real-time motion controller, which integrates a ZPETC controller, a PD controller, and an interference observer, has been controlled within 20 μm, as shown in Figure 5.

Figure 5. Experimental tracking error of the X-axis of the two-dimensional DC servo motion controller.

3. Conclusion

This paper applies a motion control algorithm integrating a ZPETC controller, a PD controller, and an interference observer to a 2D DC servo real-time motion controller for a CNC engraving machine. A TMS320C2812 32-bit fixed-point DSP is used as the control core, handling real-time data reception, displacement detection, complex motion control algorithms, PWM signal generation, and protection signal generation. The hardware design of the motion control system is completed using a dedicated DC motor power drive module L6203. Experimental results show that the designed 2D DC servo real-time motion controller features simple structure, strong real-time performance, and good tracking capabilities, and is expected to be widely used in high-end CNC engraving machines.

References

[1] Tumizuka. M. Zero Phase Error Tracking Algorithm for DigitalControl [J] ASME Journal of DynamicSystems, Measurement, and Control, 1987, 109: 65-68

[2] Lee, H. S. Robust Motion Tracking Controller for High-accuracyPositioning Systems [J]. IEEE Transactions on Industry. Application, 1996, 43(1): 48-55.

[3] Tomizuka M. Robust Digital Motion Controllers for Mechanicalsystems[J]. Robotics and Autonomous Systems, 1996, (19): 43.149

[4] Texas Instruments Inc. TMS320C28x Series DSP CPU and Peripherals [M]. Beijing: Tsinghua University Press, 2005.

[5] Wang Lianhong, Zhang Jing. Design of serial communication between TMS320F2812DSP and PC [J]. DSP Development and Application, 2006, 173-175.

[6] Guo Qingding. Application research in servo tracking control of CNC machine tools [J]. Modular Machine Tools & Automated Manufacturing Technology, 2004: 53-55.

Read next

CATDOLL 115CM Cici TPE (Natural Tone)

Height: 115cm Weight: 19.5kg Shoulder Width: 29cm Bust/Waist/Hip: 57/53/64cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm An...

Articles 2026-02-22