Steering engine controller with DSP reset safety protection
By using a passive resistor-designed PWM signal optocoupler isolation protection circuit in the servo controller, the problem of servo damage caused by abnormal DSP reset is solved, achieving a balance between low cost, reliable safety protection, and control accuracy.
Patent Information
- Application Number
- CN202611133873.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-29
- Publication Date
- 2026-11-06
AI Technical Summary
When the DSP is abnormally reset, the existing servo controller causes the PWM output pin to enter a high-impedance state, resulting in abnormal optocoupler output. This can easily damage the servo drive mechanism, and existing solutions are costly or affect control accuracy.
The PWM signal optocoupler isolation protection circuit adopts a passive resistor design. It forms a conduction loop through current limiting resistor and pull-down resistor to ensure stable output level of optocoupler, prevent open-loop operation of servo motor, and is compatible with existing DSP+optocoupler isolation architecture.
It achieves low-cost, reliable DSP reset safety protection, avoiding servo motor damage, while not affecting the frequency, duty cycle, and transmission accuracy of the PWM signal, making it suitable for new equipment design and existing equipment upgrades.
Smart Images

Figure CN123047367A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of servo control technology, and in particular to a servo controller with DSP reset safety protection. Background Technology
[0002] Currently, high-precision servo controllers generally use DSP as the main control core. Relying on the high-speed computing power and high-precision PWM peripherals of the DSP, the servo's rotation angle and speed are precisely controlled by outputting PWM pulse signals. In order to achieve electrical isolation between the low-voltage main control circuit and the high-voltage motor drive circuit, existing servo controllers generally use high-speed optocouplers to complete the isolated transmission of PWM signals.
[0003] The existing PWM signal transmission and control architecture of servo controllers can be mainly divided into three categories: The first category is to directly set an isolation optocoupler between the PWM output terminal of the DSP and the back-end drive circuit, using a high-speed optocoupler to achieve isolated transmission of the PWM signal. Since the output logic of the high-speed optocoupler is inverted with the input signal, the back-end drive circuit needs to be configured with a logic inverting circuit to convert the optocoupler output signal into a PWM signal in phase with the DSP output before inputting it into the motor drive module. This solution does not have a level-locking design for the high impedance state of the DSP reset. The second category is to use a dedicated DSP chip or FPGA chip with built-in IO pin state locking function. Through the internal hardware safety module of the chip, the PWM output pin is forced to be set to a certain level during the reset phase to prevent the pin from entering a high impedance state. The third category is to add logic chips such as flip-flops and latches between the optocoupler output terminal and the inverting logic circuit. When the DSP is abnormally reset, the latch is triggered to work, forcibly latching the PWM signal output by the optocoupler to a high level, and outputting a safe low level after inversion.
[0004] The aforementioned existing technologies have significant drawbacks: First, when a general-purpose DSP chip experiences an abnormal reset, all GPIO pins, including the PWM output pin, enter a high-impedance state, exhibiting extremely high impedance to the outside world. This prevents the output from clearly indicating high or low levels, easily causing the internal LEDs of the optocoupler to mis-conduct, resulting in a continuous low-level output from the optocoupler. After inversion, this triggers the servo motor to operate at full speed in an open-loop manner, which can easily damage the servo motor's transmission mechanism. Second, dedicated DSP chips with built-in IO reset locking functions are 30% to 200% more expensive than general-purpose DSP chips, significantly increasing the hardware cost of the controller. Furthermore, the selection range of these chips is narrow, as current mainstream general-purpose DSPs do not possess this pin locking function and are incompatible with existing mature main control solutions. Third, adding additional logic chips introduces PWM signal transmission delay, altering the signal duty cycle and directly reducing the servo motor control accuracy. Simultaneously, the latch is susceptible to false triggering by electromagnetic interference in the field, causing the PWM signal to be locked during normal operation and leading to servo motor malfunctions. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention provides a servo controller with DSP reset safety protection, aiming to achieve state locking throughout the servo's entire operating cycle, thereby improving the controller's safety and reliability. It offers a hardware solution that is extremely simple in structure, low in cost, and easy to implement, requiring no modification to the DSP main control program or the addition of complex chips and circuits. It is compatible with existing mainstream hardware architectures and possesses strong versatility. Through reasonable component parameter matching, it ensures that the protection circuit does not affect the frequency, duty cycle, high and low level amplitude, transmission accuracy, and response speed of the PWM signal during normal operation, achieving a dual balance between safety protection and control performance. The technical solution adopted by this invention is as follows:
[0006] A servo controller with DSP reset safety protection includes a DSP power supply circuit, a DSP signal processing circuit and peripheral circuits, a 485 communication circuit, a CAN bus interface circuit, and a PWM signal optocoupler isolation protection circuit.
[0007] The DSP power supply circuit consists of an external 5V power input, an LDO voltage regulator, and a filter capacitor. It is used to provide a stable operating voltage for all digital and analog devices in the servo controller.
[0008] The DSP signal processing circuit, with a general-purpose DSP chip as its core, is equipped with a DSP clock circuit, a reset circuit, and an emulation interface circuit to form a complete minimum operating system, which undertakes the control functions of instruction parsing, data processing, signal acquisition, PWM and direction signal output.
[0009] The 485 communication circuit, as a standard serial communication interface unit for data interaction with an external upper control system, is used to realize bidirectional data transmission between the servo controller and the onboard information processor.
[0010] The CAN bus interface circuit uses CAN bus differential communication to enable real-time data interaction between the DSP chip and the angular displacement sensor.
[0011] The PWM signal optocoupler isolation protection circuit is used for electrical isolation transmission and abnormal reset protection of PWM signals.
[0012] Optionally, the DSP chip is used to receive control commands from the host computer via the 485 communication circuit; receive feedback signals from the angular displacement sensor acquired by the CAN bus interface circuit; perform error calculation and closed-loop control operations on the command signals and feedback signals; output PWM speed control signals and FR direction control signals based on the calculation results; and enter a high-impedance output state during abnormal reset.
[0013] Optionally, the DSP signal processing circuit receives instructions from the host computer, completes instruction decoding, data verification, and status identification; it collects feedback information on the servo motor's angular displacement and speed in real time through the CAN bus interface circuit, providing a basis for closed-loop control; it performs real-time calculations based on the error between the instruction and feedback, and dynamically adjusts the duty cycle and direction of the output signal; it outputs a PWM signal to control the servo motor's speed and an FR signal to control the servo motor's direction of movement.
[0014] Optionally, when the DSP chip, which serves as the main control core in the DSP signal processing circuit and peripheral circuits, experiences an abnormal reset, its PWM output pin enters a high-impedance state, and safety protection is achieved by the PWM signal optocoupler isolation protection circuit.
[0015] Optionally, the 485 communication circuit includes a 485 communication controller, a 485 communication interface, a bus matching resistor, and filtering and protection devices.
[0016] Optionally, the CAN bus interface circuit includes a CAN transceiver, CAN bus interface terminals, bus impedance matching resistors, and ESD electrostatic protection devices.
[0017] Optionally, the CAN transceiver is used to convert the TTL level CAN transmit signal output by the DSP chip into a CAN bus differential signal, and at the same time convert the CAN differential signal on the bus into a TTL level receive signal that the DSP chip can recognize, thus completing electrical isolation and level conversion.
[0018] Optionally, the PWM signal optocoupler isolation protection circuit uses the high-speed optocoupler HT2355 as the core isolation device and consists of a current-limiting resistor, a pull-down resistor, the high-speed optocoupler HT2355, and a power supply circuit.
[0019] Optionally, when the DSP chip is abnormally reset and the PWM output pin of the DSP chip enters a high-impedance state, the PWM signal optocoupler isolation protection circuit forms a conduction loop through the pull-down resistor and the current-limiting resistor, forcing the optocoupler input side to obtain a stable drive current, so that the optocoupler output is fixed at a high level, and after being inverted by the motor drive module, it outputs a low level, forcing the servo motor to stop rotating.
[0020] Optionally, when the DSP chip is not reset, the PWM1 pin of the DSP chip normally outputs a PWM signal with alternating high and low levels. The PWM signal drives the high-speed optocoupler HT2355 to turn on and off according to the signal frequency through the current limiting resistor.
[0021] This invention provides a servo controller with DSP reset safety protection. The technical solution provided by the embodiments of this invention brings at least the following beneficial effects:
[0022] (1) Low hardware cost: Only one surface mount resistor with matching parameters needs to be added, which is much lower than existing solutions such as dedicated chips, logic chips, and switching circuits, and hardly increases the hardware cost of the controller.
[0023] (2) Higher reliability: Protection is achieved by using passive resistors, eliminating the risk of failure of active chips, introducing no new failure nodes, requiring no timing matching, and achieving safety locking automatically in pure hardware, thus avoiding protection failure caused by timing abnormalities.
[0024] (3) High versatility: No need to modify the core circuit of the existing DSP+optical isolation servo control architecture, it can be directly applied to the design of new equipment and the upgrading and transformation of existing equipment, and is compatible with mainstream general-purpose DSP chips.
[0025] (4) Lossless control performance: The pull-down resistor parameters are optimized and matched so that they have no effect on the level, duty cycle, frequency, transmission accuracy and response speed of the PWM signal during normal operation, thus ensuring both safety protection and control accuracy.
[0026] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0027] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0028] Figure 1 This is a schematic diagram of the composition of a servo controller;
[0029] Figure 2 This is a schematic diagram of the circuit principle of the servo controller;
[0030] Figure 3 This is a schematic diagram of the optocoupler isolation circuit for PWM signals.
[0031] Note: Figure 2 This is a simplified circuit diagram of the whole machine, only showing the optocoupler isolation connection relationship, and the resistor parameters are not labeled; Figure 3 This is a detailed schematic diagram of the core PWM signal optocoupler isolation protection circuit of this invention, with complete annotations of the current-limiting resistor, pull-down resistor values, and wiring connections. It also details the resistor parameters and the implementation method of the protection circuit. Figure 3 The records shall prevail. Detailed Implementation
[0032] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0033] Before describing the technical solution of the present invention in detail, the technical background and technical terms involved in the technical solution will be explained first:
[0034] An LDO (Low Dropout Regulator) is a commonly used linear DC power supply chip that converts a relatively high input DC voltage into a stable, low-noise, and low-ripple low-voltage DC voltage required by the circuit, providing a clean operating power supply for sensitive digital / analog devices such as DSPs, sensors, and optocouplers. In this invention, the LDO voltage regulator regulates the externally input 5V power supply to 3.3V, providing a stable and clean operating voltage for the DSP chip, peripheral circuits, and PWM optocoupler isolation circuit, ensuring reliable operation of the DSP and signal circuits.
[0035] This invention provides a servo controller with DSP reset safety protection. Figure 1 This is a schematic diagram of the composition of a servo controller with DSP reset safety protection. Figure 2 This is a circuit diagram of a servo controller. The servo controller includes a DSP power supply circuit, a DSP signal processing circuit and peripheral circuits, a 485 communication circuit, a CAN bus interface circuit, and a PWM signal optocoupler isolation protection circuit. It should be noted that... Figure 2 The system omits peripheral communication and power filtering modules such as input / output filter capacitors, 485 communication circuits, and CAN bus interface circuits, resulting in a complete architecture based on... Figure 1 The details and specific implementation methods described herein shall prevail. The functions and connections of each part are as follows:
[0036] 1. DSP power supply circuit
[0037] The DSP power supply circuit is the basic power supply unit for the entire servo controller. It consists of an external 5V power input, an LDO voltage regulator, and filter capacitors. It provides a stable, low-noise, and ripple-free operating voltage for all digital and analog devices in the servo controller, ensuring the reliable operation of the DSP chip, signal processing unit, communication interface, optocoupler isolation circuit, etc.
[0038] (1) Circuit composition and device function
[0039] External 5V power input terminal: Provides raw power to the entire controller and is the system energy input port.
[0040] LDO voltage regulator: As a core voltage regulator, it accurately converts the input 5V voltage to 3.3V, meeting the rated operating voltage requirements of devices such as DSP chips, high-speed optocouplers, and sensors. LDOs have low dropout voltage, low noise, and linear voltage regulation characteristics, which can avoid voltage fluctuations from interfering with PWM signals and control logic. The LDO voltage regulator synchronously outputs a stable 1.9V voltage, which is specifically supplied to the core unit of the DSP chip, meeting the low-voltage operation requirements of the DSP core and ensuring the stable operation of the DSP's high-speed operation, PWM peripherals, and bus communication units.
[0041] Input / output filter capacitors: These are placed at the input and output terminals of the LDO respectively to filter out high-frequency noise, voltage spikes, and ripple on the power lines, improve power supply purity, and prevent signal transmission distortion and circuit malfunction.
[0042] (2) Specific functions
[0043] Voltage conversion: Converts the externally input 5V DC voltage to a stable 3.3V standard voltage to match the operating level of the DSP and peripheral devices.
[0044] Voltage regulation and anti-fluctuation: When the input voltage or load current changes, the output voltage accuracy remains unchanged, avoiding voltage drops or overshoots that could cause chip reset or signal abnormalities.
[0045] Noise suppression: By using an LDO linear regulator and filter capacitors, electromagnetic interference in the power supply system is suppressed, providing a clean power supply for the DSP, communication circuits, and PWM signal circuits.
[0046] System power supply distribution: The output 3.3V voltage supplies the DSP signal processing circuit, CAN bus interface circuit, 485 communication circuit and PWM signal optocoupler isolation protection circuit respectively, so as to achieve a unified and stable power supply for the entire system.
[0047] (3) Connection relationship
[0048] Input terminal: Connect to an external 5V power supply and connect the input filter capacitor to ground.
[0049] Core path: 5V voltage is input to the input pin of the LDO voltage regulator, and after regulation, 3.3V is output from the output pin.
[0050] Output terminal: Connect the output filter capacitor to ground and lead out power supply lines to supply power to all modules that require 3.3V, such as the DSP chip, clock circuit, communication interface circuit, and optocoupler isolation circuit.
[0051] It should be noted that, Figure 1The DSP power supply circuit omits the power supply lines to the 485 communication circuit, CAN bus interface circuit, and PWM signal optocoupler isolation protection circuit, retaining only the core control signal link; in practical applications, the 3.3V voltage output by the DSP power supply circuit synchronously powers all digital modules.
[0052] 2. DSP signal processing circuit and peripheral circuits
[0053] The DSP signal processing circuit and peripheral circuits are the core control and computing units of the servo controller. They undertake all control functions such as instruction parsing, data processing, signal acquisition, PWM and direction signal output, and provide the basic hardware support required for the DSP chip to start, run and debug. They are the core part of the entire controller to achieve high-precision closed-loop control.
[0054] (1) Circuit composition
[0055] The DSP signal processing circuit and peripheral circuits are based on a general-purpose DSP chip, and are equipped with a DSP clock circuit, reset circuit, and simulation interface circuit, which together constitute a complete minimum operating system.
[0056] 1) DSP chip
[0057] As the main control core, it possesses high-speed computing capabilities and high-precision PWM peripherals, used for:
[0058] Receives control commands from the host computer via the 485 communication circuit;
[0059] Receive feedback signals from angular displacement sensors acquired by the CAN bus interface circuit;
[0060] Perform error calculation and closed-loop control operations on command signals and feedback signals;
[0061] Based on the calculation results, output PWM speed control signal and FR direction control signal;
[0062] Upon abnormal reset, it enters a high-impedance output state.
[0063] 2) DSP clock circuit
[0064] Composed of a crystal oscillator and matching capacitors, it provides a stable and high-precision operating clock for the DSP chip, ensuring the accuracy of the operation timing, PWM output frequency, and communication baud rate. It is the foundation for the DSP to achieve high-speed operation and precise timing control.
[0065] 3) Reset circuit
[0066] Used to output a low-pulse reset signal to the DSP chip during power-on, power-off, or abnormal operating conditions, so as to realize the reliable reset of the DSP, restore the system to the initial safe state, and avoid program crashes or control logic disorder.
[0067] 4) Simulation interface circuit
[0068] It provides hardware interfaces for DSP programming, online debugging, and program updates, and is used for program download, debugging, and later maintenance during the development phase, but does not participate in normal operation control.
[0069] (2) Circuit function
[0070] Control command reception and parsing: Receives commands from the host computer via the communication interface, and completes command decoding, data verification, and status identification.
[0071] Sensor feedback signal acquisition: Real-time acquisition of feedback information such as servo angular displacement and speed via CAN bus interface, providing a basis for closed-loop control.
[0072] Closed-loop control calculation: Based on the error between the command and feedback, real-time calculation is performed to dynamically adjust the duty cycle and direction of the output signal.
[0073] Control signal output: Output PWM signal to control the servo speed, and output FR signal to control the servo direction.
[0074] System timing and status management: With the support of clock and reset circuits, the system is guaranteed to operate stably and enters the reset protection state in case of abnormality.
[0075] (3) Connection relationship
[0076] Power supply connection: The input terminal connects to the 3.3V (IO peripheral power supply) and 1.9V (core power supply) output from the DSP power supply circuit to supply power to the DSP chip, clock, reset, and emulation interface.
[0077] Clock connection: The crystal output of the clock circuit is connected to the DSP clock pin to provide a reference clock signal.
[0078] Reset connection: The output of the reset circuit is connected to the DSP reset pin for power-on reset and abnormal reset.
[0079] Communication connections: The serial communication pin is connected to the 485 communication circuit to realize command reception and status feedback; the CAN controller pin is connected to the CAN bus interface circuit to realize sensor signal acquisition.
[0080] Control signal output connection: The PWM output pin is connected to the input terminal of the PWM signal optocoupler isolation protection circuit; the FR direction signal pin is connected to the input terminal of the isolation optocoupler N2, and is then connected to the subsequent motor drive module after isolation by the isolation optocoupler N2.
[0081] Debugging interface connection: The simulation interface circuit is connected to the DSP debugging pin for program burning and online debugging.
[0082] (4) Working Logic
[0083] After the servo controller is powered on, the DSP power supply circuit provides 3.3V, and the reset circuit outputs a reset signal to initialize the DSP. The clock circuit starts, providing stable timing for the DSP. The DSP obtains control commands through the 485 communication circuit and position feedback through the CAN bus interface. After error calculation, it outputs PWM and FR signals to achieve high-precision closed-loop control of the servo. When the DSP experiences an abnormal reset, its PWM output pin enters a high-impedance state, and safety protection is achieved by the subsequent PWM signal optocoupler isolation protection circuit.
[0084] 3.485 communication circuit
[0085] The RS-485 communication circuit is a standard serial communication interface unit for data interaction between the servo controller and the external upper control system. It adopts the industrial-grade RS-485 differential communication standard and features strong anti-interference capability, long transmission distance, and high reliability. It is used to realize bidirectional data transmission between the servo controller and the onboard information processor and is the key channel for command issuance and status feedback of the entire control system.
[0086] (1) Circuit composition
[0087] The 485 communication circuit includes a 485 communication controller, a 485 communication interface, bus matching resistors, and filtering and protection devices.
[0088] 485 Communication Controller: The core transceiver chip, which completes the mutual conversion between TTL level and RS-485 differential level, and realizes electrical isolation and level matching between the DSP and the external bus.
[0089] 485 communication interface: used to connect to an external RS-485 bus, usually containing two differential signal lines, A and B, for connecting to upper-level devices such as onboard information processors.
[0090] Bus matching resistor: Connected in parallel between differential signal lines A and B, it is used for impedance matching, reducing signal reflection, and improving the stability of long-distance communication.
[0091] Filtering and protection devices: including current-limiting resistors and ESD protection diodes, are used to suppress surges, static electricity and electromagnetic interference on the bus and protect the communication chip from damage.
[0092] (2) Circuit function
[0093] Level conversion: Converts the TTL level transmit signal output by the DSP into an RS-485 standard differential signal and sends it to the external bus; at the same time, it converts the RS-485 differential signal on the bus into a TTL level receive signal that the DSP can recognize.
[0094] Control command reception: Receives servo control commands from the onboard information processor, including target position, target speed, and start / stop commands, and transmits them to the DSP for parsing and execution.
[0095] Status information feedback: The real-time angle, real-time speed, fault status, power supply status and other information of the servo motor collected and calculated by the DSP are fed back to the host computer through the 485 bus to realize system status monitoring.
[0096] Anti-interference communication: Differential signal transmission is used, which can still maintain stable communication in the environment of strong electromagnetic interference, ensuring that control commands and feedback data are not lost or distorted.
[0097] (3) Connection relationship
[0098] Power supply connection: A stable operating voltage, usually 3.3V or 5V, is provided by the DSP power supply circuit to ensure the normal operation of the communication chip.
[0099] Connection to the DSP signal processing circuit: The transmit pin TXD is connected to the DSP's UART transmitter; the receive pin RXD is connected to the DSP's UART receiver; the transmit / receive enable pins DE / RE are controlled by the DSP's general-purpose I / O ports to achieve half-duplex communication switching.
[0100] Connection with external systems: The A and B differential signal lines of the communication interface are directly connected to the RS-485 bus of the onboard information processor to form a complete upper and lower level communication link.
[0101] Protection and matching connection: Matching resistors, ESD protection tubes and other devices are connected close to the 485 interface and the communication controller.
[0102] (4) Working Logic
[0103] After the system powers on, the 485 communication circuit initializes along with the entire device and enters standby receiving mode. When the onboard information processor sends control commands, the 485 communication circuit converts the differential signal into a TTL signal and sends it to the DSP; the DSP then executes closed-loop control after parsing the command. When the DSP needs to upload the servo status, it enables the 485 transceiver and converts the status data into an RS-485 signal to send to the host computer on the bus. The entire communication process is stable, real-time, and reliable, without affecting PWM control or the DSP reset protection function.
[0104] 4. CAN bus interface circuit
[0105] The CAN bus interface circuit is a dedicated communication interface circuit in the servo controller used to achieve real-time and reliable data interaction between the DSP and the angular displacement sensor. It adopts the CAN bus differential communication method and has the characteristics of strong anti-interference capability, high communication speed and strong multi-node networking capability. It is specifically used to collect feedback signals such as position and speed output by the servo angular displacement sensor in real time, providing the necessary feedback data support for the DSP to achieve high-precision closed-loop control.
[0106] (1) Circuit composition
[0107] The CAN bus interface circuit includes a CAN transceiver, CAN bus interface terminals, bus impedance matching resistors, and ESD electrostatic protection devices.
[0108] CAN transceiver: As a core component of the circuit, it is responsible for converting the TTL level CAN transmit signal output by the DSP into a CAN bus differential signal, and at the same time converting the CAN differential signal on the bus into a TTL level receive signal that the DSP can recognize, thus completing electrical isolation and level conversion.
[0109] CAN bus interface terminal: Includes two differential signal lines, CAN_H and CAN_L, used for physical connection with the CAN communication port of the servo motor angular displacement sensor.
[0110] Bus matching resistor: Typically a 120Ω terminating resistor, connected between CAN_H and CAN_L, used for impedance matching, suppressing signal reflection, and ensuring stable long-distance, high-speed communication.
[0111] ESD protection and filtering devices: Used to suppress static electricity, surges and high-frequency electromagnetic interference on the bus, protect the CAN transceiver and DSP from damage, and improve the reliability of the circuit in complex environments.
[0112] (2) Circuit function
[0113] Real-time acquisition of feedback signals: Receives feedback data necessary for closed-loop control, such as the actual rotation angle, speed, and status information of the servo motor, sent by the servo motor angular displacement sensor in real time, and transmits it to the DSP.
[0114] Level and Protocol Conversion: This function converts TTL level signals on the DSP side to differential signals on the CAN bus, enabling protocol matching between digital signals and bus signals.
[0115] Strong anti-interference data transmission: Differential signal transmission is used, which can maintain data stability even in strong electromagnetic interference environment and avoid signal distortion or frame loss.
[0116] Bus protection and stability: Through terminal matching, electrostatic protection and other designs, the stability of CAN bus communication is ensured, without affecting the real-time performance and safety of servo control.
[0117] (3) Connection relationship
[0118] Power supply connection: The DSP power supply circuit provides a stable operating voltage of 3.3V or 5V to ensure the normal operation of the CAN transceiver.
[0119] Connection to the DSP signal processing circuit: The CAN transmitter TX is connected to the CAN_TX pin of the DSP; the CAN receiver RX is connected to the CAN_RX pin of the DSP; thus realizing bidirectional data communication between the DSP and the sensor.
[0120] Connection with external angular displacement sensor: The CAN_H and CAN_L differential signal lines are directly connected to the CAN communication interface of the servo motor angular displacement sensor to form a closed-loop feedback communication link.
[0121] Matching and protection connections: The terminating matching resistor is connected across CAN_H and CAN_L, and the ESD protection transistor is connected in parallel between the bus terminal and ground.
[0122] (4) Working Logic
[0123] After the servo controller is powered on, the CAN bus interface circuit initializes along with the servo controller and enters real-time receiving mode. The angular displacement sensor continuously transmits data such as the current servo angle and displacement via the CAN bus; the CAN transceiver converts the bus differential signal into a TTL signal and sends it to the DSP. The DSP performs error calculation based on the command signal received from the 485 communication circuit and the feedback signal acquired from the CAN bus, and outputs PWM and FR direction signals in real time to achieve high-precision closed-loop control of the servo. This circuit is only responsible for feedback data acquisition and transmission, and does not participate in PWM signal processing or reset safety protection, nor does it affect the protection logic of the servo controller.
[0124] 5. PWM signal optocoupler isolation protection circuit
[0125] The PWM signal optocoupler isolation protection circuit is the core circuit of this invention for DSP reset safety protection. It combines the dual functions of electrical isolation transmission of the PWM signal and abnormal reset protection. It addresses the issues of abnormal output from the optocoupler unit and full-speed open-loop rotation of the servo motor caused by the PWM output pin entering a high-impedance state during a DSP abnormal reset, while ensuring the transmission accuracy, response speed, and signal integrity of the PWM signal during normal servo operation. This circuit uses a high-speed optocoupler paired with a current-limiting resistor and a pull-down resistor of matching resistance to form a passive protection circuit. This achieves electrical isolation transmission of the PWM signal between the low-voltage DSP main control circuit and the high-voltage motor drive circuit. When the DSP experiences an abnormal reset and the PWM pin enters a high-impedance state, the current-limiting resistor and pull-down resistor form a stable conduction circuit, forcing the optocoupler to output a safe level, thus achieving abnormal reset protection for servo motor shutdown without changing the PWM signal frequency, duty cycle, or transmission accuracy during normal operation. The circuit principle of the PWM signal optocoupler isolation circuit is as follows: Figure 3 As shown.
[0126] (1) Circuit composition
[0127] The PWM signal optocoupler isolation protection circuit uses the high-speed optocoupler HT2355 as the core isolation device. It consists of a current-limiting resistor, a pull-down resistor, the high-speed optocoupler HT2355, and a power supply circuit. All components are passive or standard isolation devices, and the circuit structure is extremely simple with no complex logic chips.
[0128] The high-speed optocoupler HT2355 achieves electrical isolation between the DSP's low-voltage control terminal and the high-voltage terminal of the subsequent motor drive, blocking high-voltage interference and crosstalk, while simultaneously completing the transmission and logic switching of PWM signals.
[0129] Current limiting resistor: Connected in series between the PWM output terminal of the DSP and the cathode input terminal of the high-speed optocoupler, it is used to limit the operating current of the LED at the input terminal of the optocoupler and protect the optocoupler and DSP pins. The resistance value is 330Ω; the other end of the current limiting resistor is grounded to GND.
[0130] Pull-down resistor: One end is connected to the 3.3V power supply and the anode input terminal of the high-speed optocoupler, and the other end is connected to the anode of the high-speed optocoupler LED. It is used to provide a defined current path to the input side of the optocoupler when the DSP is reset and the PWM pin is in a high impedance state, so as to realize level clamping and safety protection. The resistance value is 200Ω.
[0131] The circuit connection logic of the above current-limiting resistor and pull-down resistor is as follows: the 3.3V power supply is connected to the anode of the high-speed optocoupler HT2355 through the 200Ω pull-down resistor; the PWM1 pin of the DSP is connected to the cathode of the high-speed optocoupler through the 330Ω current-limiting resistor, and the lower end of the 330Ω current-limiting resistor is grounded.
[0132] Power supply circuit: The input side of the optocoupler is provided with a 3.3V operating voltage by the DSP power supply circuit, and the output side of the optocoupler is connected to a 12V drive voltage to meet the level requirements of the subsequent motor drive module.
[0133] (2) Circuit connection relationship
[0134] Input side connection: Connect one end of the PWM1 output pin of the DSP chip to the current limiting resistor, and connect the other end of the current limiting resistor to the anode input terminal of the high-speed optocoupler HT2355; connect one end of the cathode input terminal of the high-speed optocoupler HT2355 to the pull-down resistor, and connect the other end of the pull-down resistor to ground (GND); connect the 3.3V power supply terminal to the power supply pin on the input side of the optocoupler.
[0135] Output side connection: The output terminal of the high-speed optocoupler HT2355 is connected to the PWM signal input terminal of the subsequent motor drive module; the motor drive module integrates an inverter to restore the optocoupler output signal to a control signal in phase with the original DSP output; the power supply terminal of the optocoupler output is connected to a 12V operating voltage, and the ground terminal is reliably connected to the system ground.
[0136] Overall matching relationship: The resistance values of the current limiting resistor and the pull-down resistor are matched according to the output current capability of the DSP pin and the optocoupler conduction current threshold to ensure that the PWM signal is not affected during normal operation and that the optocoupler outputs a safe level reliably during reset.
[0137] (3) Circuit function
[0138] PWM signal isolation transmission: The PWM speed control signal output by the DSP is electrically isolated and transmitted to the motor drive module without changing the signal frequency, duty cycle, or level characteristics, thus achieving strong and weak current isolation.
[0139] DSP Reset Safety Protection: When the DSP is abnormally reset and the PWM output pin enters a high-impedance state, a conduction loop is formed through the pull-down resistor and the current-limiting resistor, forcing the optocoupler input side to obtain a stable drive current, so that the optocoupler output is fixed at a high level. After being inverted by the motor drive module, the output is low level, forcing the servo motor to stop rotating and preventing open-loop full-speed runaway.
[0140] Does not affect normal control performance: When the servo is working normally, the pull-down resistor does not interfere with the high and low levels, duty cycle and rise and fall edges of the PWM signal, does not increase transmission delay, and ensures that the servo control accuracy and dynamic response speed are not affected by the protection circuit.
[0141] (4) Working principle
[0142] Normal operating mode: Without DSP reset, the PWM1 pin outputs a PWM signal alternating between high and low levels. The PWM signal drives the high-speed optocoupler HT2355 to turn on and off according to the signal frequency via a current-limiting resistor. The pull-down resistor value is appropriately matched to ensure it does not pull down the normal PWM level, change the duty cycle, or generate additional delay. The PWM signal output by the high-speed optocoupler, which is inverted from the DSP input, is restored to an in-phase PWM signal by the internal inverter of the motor drive module, driving the servo motor to achieve high-precision closed-loop control.
[0143] DSP Reset Protection Mode: In case of an abnormal DSP reset, the PWM1 pin enters a high-impedance state and cannot output a definite high or low level. At this time, the 3.3V power supply forms a stable current path with ground through a current-limiting resistor, a pull-down resistor, and another resistor, providing continuous conduction current to the high-speed optocoupler input. The optocoupler output maintains a constant high level, which is sent to the motor drive module and converted to a stable low level by an inverter. This low-level signal causes the motor drive module to stop outputting drive power, keeping the servo motor stationary. This prevents the servo motor from running at full speed or in an open-loop manner from the hardware perspective, achieving reset safety protection.
[0144] The PWM signal optocoupler isolation protection circuit uses only a single passive pull-down resistor to achieve reset protection, without the need for dedicated chips, logic devices, or software configuration; it is fully compatible with the existing DSP+optocoupler isolation servo control architecture and can be directly used in new designs and upgrades of existing equipment; the protection action is automatically completed by hardware, with rapid response, no timing errors, and no electromagnetic interference; it does not affect the PWM signal quality during normal operation, thus balancing safety protection and control accuracy.
[0145] The servo controller's workflow is as follows: After the servo controller is connected to a 5V external power supply, it enters the power-on startup phase: The DSP power supply circuit converts the 5V voltage to a stable 3.3V via an LDO regulator, supplying power to the DSP chip, 485 communication circuit, CAN bus interface circuit, and PWM signal optocoupler isolation protection circuit; the reset circuit outputs a low-pulse reset signal to initialize the DSP, the clock circuit provides the reference operating timing for the DSP, the 485 communication circuit and CAN bus interface circuit both enter standby receiving state, the PWM signal optocoupler isolation protection circuit completes power-on self-test, and the entire unit enters the ready-to-work state. Subsequently, the servo controller enters the command receiving and closed-loop control phase: The onboard information processor sends servo deflection commands via the RS-485 bus, the 485 communication circuit converts the differential command signal into a TTL level signal and sends it to the DSP; simultaneously, the servo angular displacement sensor outputs the current steering angle feedback signal in real time via the CAN bus, which is converted by the CAN bus interface circuit and transmitted to the DSP; the DSP performs error calculations on the target command and the actual feedback signal, dynamically adjusts and outputs PWM speed control signals and FR direction control signals based on the calculation results. Finally, the signal output and safety execution phase begins: During normal operation, the PWM signal output by the DSP is transmitted to the high-speed optocoupler HT2355 via a current-limiting resistor. The pull-down resistor does not affect the signal waveform or transmission accuracy. The optocoupler outputs an inverted PWM signal, which is restored by the inverter inside the motor drive module and drives the servo to operate precisely according to the command. If the DSP experiences an abnormal reset due to interference, its PWM output pin immediately enters a high-impedance state. At this time, the 3.3V power supply forms a stable path through the current-limiting resistor and the pull-down resistor, driving the optocoupler to continuously output a high level. After inversion, it becomes a low level and is input to the motor drive module, forcing the servo to stop rotating and avoiding open-loop full rotation, thus achieving reset safety protection.
[0146] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A servo controller with DSP reset safety protection, characterized in that, The servo controller includes a DSP power supply circuit, a DSP signal processing circuit and peripheral circuits, a 485 communication circuit, a CAN bus interface circuit, and a PWM signal optocoupler isolation and protection circuit. The DSP power supply circuit consists of an external 5V power input, an LDO voltage regulator, and a filter capacitor. It is used to provide a stable operating voltage for all digital and analog devices in the servo controller. The DSP signal processing circuit, with a general-purpose DSP chip as its core, is equipped with a DSP clock circuit, a reset circuit, and an emulation interface circuit to form a complete minimum operating system, which undertakes the control functions of instruction parsing, data processing, signal acquisition, PWM and direction signal output. The 485 communication circuit, as a standard serial communication interface unit for data interaction with an external upper control system, is used to realize bidirectional data transmission between the servo controller and the onboard information processor. The CAN bus interface circuit uses CAN bus differential communication to enable real-time data interaction between the DSP chip and the angular displacement sensor. The PWM signal optocoupler isolation protection circuit is used for electrical isolation transmission and abnormal reset protection of PWM signals.
2. The servo controller with DSP reset safety protection according to claim 1, characterized in that, The DSP chip is used to receive control commands from the host computer via the 485 communication circuit; receive feedback signals from the angular displacement sensor collected by the CAN bus interface circuit; perform error calculation and closed-loop control operations on the command signals and feedback signals; output PWM speed control signals and FR direction control signals based on the calculation results; and enter a high-impedance output state during abnormal reset.
3. The servo controller with DSP reset safety protection according to claim 2, characterized in that, The DSP signal processing circuit receives instructions from the host computer and completes instruction decoding, data verification, and status identification. It collects feedback information on the servo motor's angular displacement and speed in real time through the CAN bus interface circuit, providing a basis for closed-loop control. Based on the error between the instruction and the feedback, it performs real-time calculations and dynamically adjusts the duty cycle and direction of the output signal. It outputs a PWM signal to control the servo motor's speed and an FR signal to control the servo motor's direction of movement.
4. The servo controller with DSP reset safety protection according to claim 3, characterized in that, When the DSP chip, which is the main control core in the DSP signal processing circuit and peripheral circuits, experiences an abnormal reset, its PWM output pin enters a high-impedance state, and safety protection is achieved by the PWM signal optocoupler isolation protection circuit.
5. The servo controller with DSP reset safety protection according to claim 1, characterized in that, The 485 communication circuit includes a 485 communication controller, a 485 communication interface, bus matching resistors, and filtering and protection devices.
6. The servo controller with DSP reset safety protection according to claim 1, characterized in that, The CAN bus interface circuit includes a CAN transceiver, CAN bus interface terminals, bus impedance matching resistors, and ESD electrostatic protection devices.
7. The servo controller with DSP reset safety protection according to claim 6, characterized in that, The CAN transceiver is used to convert the TTL level CAN transmit signal output by the DSP chip into a CAN bus differential signal, and at the same time convert the CAN differential signal on the bus into a TTL level receive signal that the DSP chip can recognize, thus completing electrical isolation and level conversion.
8. The servo controller with DSP reset safety protection according to claim 1, characterized in that, The PWM signal optocoupler isolation protection circuit uses the high-speed optocoupler HT2355 as the core isolation device and consists of a current-limiting resistor, a pull-down resistor, the high-speed optocoupler HT2355, and a power supply circuit.
9. The servo controller with DSP reset safety protection according to claim 8, characterized in that, When the DSP chip is abnormally reset and the PWM output pin of the DSP chip enters a high-impedance state, the PWM signal optocoupler isolation protection circuit forms a conduction loop through the pull-down resistor and the current-limiting resistor, forcing the optocoupler input side to obtain a stable drive current, so that the optocoupler output is fixed at a high level, and after being inverted by the motor drive module, it outputs a low level, forcing the servo motor to stop rotating.
10. The servo controller with DSP reset safety protection according to claim 8, characterized in that, When the DSP chip is not reset, the PWM1 pin of the DSP chip normally outputs a PWM signal with alternating high and low levels. The PWM signal drives the high-speed optocoupler HT2355 to turn on and off according to the signal frequency through the current limiting resistor.
