Method for detecting the operating status of a motion module driven by a stepper motor
The detection system, composed of a stepper motor controller and a displacement sensor, monitors the status of the motion module in real time, solving the problems of high detection costs and abnormal status when driven by multiple stepper motors, and realizing flexible and accurate monitoring of the motion module status.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-09
- Publication Date
- 2026-04-07
AI Technical Summary
Existing technologies, when multiple stepper motors drive multiple motion modules, suffer from high detection costs and unreasonable mechanical transmission, leading to undetectable abnormal states and an inability to determine whether the target position has been reached.
The detection system consists of a stepper motor controller, a motion module operation status detection unit, a stepper motor driver, and a host computer. Combined with an encoder and a displacement sensor, it judges the status of the motion module through detection holes and signal analysis, and detects and alarms abnormalities in real time.
It reduces testing costs, improves the flexibility and accuracy of testing, and avoids damage to motion modules and personal injury.
Smart Images

Figure CN115642838B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a motion module driven by a stepper motor, and more particularly to a method for detecting the operating status of a motion module driven by a stepper motor. Background Technology
[0002] Currently, the operational status detection of motion modules driven by stepper motors is mostly achieved directly using encoders. The operational status detection of motion modules includes: operational pauses, stepper motor jamming, impacts, and reaching the target position. However, when using multiple stepper motors to drive multiple motion modules, multiple encoders need to be selected and matched, making the use of motion modules inflexible and increasing detection costs. More importantly, when the mechanical transmission between the stepper motor and the motion module (load) is unreasonable, abnormal operational status of the motion module cannot be detected, and it is impossible to determine whether it has reached the target position. Summary of the Invention
[0003] The purpose of this invention is to provide a method for detecting the operating status of a motion module driven by a stepper motor, thereby reducing detection costs and preventing damage to the motion module and injury to operators.
[0004] To achieve the above objectives, the present invention adopts the following technical solution:
[0005] The stepper motor-driven motion module operation status detection method of the present invention employs the following detection system, including:
[0006] The stepper motor controller is used to parse the stepper motor-related commands sent by the host computer and control the motor to run according to preset parameters and methods.
[0007] The motion module operation status detection unit is used to receive the STEP signal (stepping pulse signal), DIR signal (stepping motor rotation direction control signal), and EN signal (stepping motor driver enable signal) sent by the stepping motor controller and send them to the stepping motor driver to detect the operation status of the motion module in real time; when it is determined that the motion module is operating abnormally, it causes the stepping motor driver to stop outputting pulse control signals and sends motion module operation abnormality alarm information to the host computer;
[0008] The stepper motor driver is used to receive the STEP signal, DIR signal, and EN signal sent by the motion module operation status detection unit, and drive the stepper motor to run according to preset parameters; when it receives the stepper motor stop running control signal, it controls the stepper motor to stop running.
[0009] The host computer is used to communicate with the stepper motor controller, the motion module operation status detection unit, and the stepper motor driver;
[0010] The detection method is as follows:
[0011] Step 1: Mount the code disk on the rotating shaft of the stepper motor. The rotating shaft is connected to the driven shaft of the motion module via a transmission belt. The code disk is a disc with multiple detection holes evenly distributed along the circumference. The number of detection holes is set according to the detection accuracy.
[0012] Step 2: Install a displacement sensor on the frame corresponding to the position of the motion trajectory line of the detection hole. When the displacement sensor detects the detection hole, it outputs a high-level or low-level detection signal and sends it to the motion module operation status detection unit.
[0013] Step 3: After the stepper motor controller receives the motor-related command sent by the host computer, the stepper motor controller parses the command and sends the STEP signal, DIR signal, and EN signal to the motion module running status detection unit.
[0014] Step 4: The motion module operation status detection unit sends the received STEP signal, DIR signal, and EN signal to the stepper motor driver, and the stepper motor driver drives the stepper motor to run according to preset parameters;
[0015] Step 5: The motion module operation status detection unit detects the operation status of the motion module in real time. The steps are as follows:
[0016] Step 5.1 First, set the width of the detection hole as one detection cycle, that is, the time taken for the displacement sensor to detect one width of the detection hole along the motion trajectory line of the detection hole during the rotation of the encoder disk driven by the stepper motor;
[0017] Step 5.2: During the operation of the stepper motor, the motion module operation status detection unit counts the STEP signal within one detection cycle. Simultaneously, it detects whether the detection signal output by the displacement sensor changes from high to low or vice versa within one detection cycle. If there is a high or low level change, the motion module is considered to be operating normally, and the STEP signal count is reset to zero. If there is no high or low level change, the motion module is considered to be operating abnormally, the STEP signal count is not zero, the STEP signal of the stepper motor driver is cut off, the stepper motor stops running, and an alarm message indicating motion module malfunction is sent to the host computer.
[0018] Optionally, the motion module operation status detection unit includes a displacement sensor, a level conversion module, a microcontroller, and a stepper motor STEP signal control module.
[0019] The displacement sensor is used to detect the detection hole on the code disk. When the detection hole is detected, it outputs a high-level or low-level detection signal to the level conversion module.
[0020] The level conversion module is used to convert the detection signal output by the displacement sensor and the STEP signal from the stepper motor and then output them to the microcontroller.
[0021] The microcontroller analyzes and processes the detection signal sent by the level conversion module and the STEP signal of the stepper motor in real time to determine the operating status of the motion module. When the motion module is malfunctioning, it sends a stop control signal to the stepper motor driver and sends an alarm message about the motion module malfunction to the host computer.
[0022] Furthermore, the level conversion module includes a first optocoupler U1 and a second optocoupler U2; the primary side of the first optocoupler U1 is connected to the STEP signal of the stepper motor, and the secondary side of the first optocoupler U1 is connected to the STEP signal input terminal of the microcontroller; the primary side of the second optocoupler U2 is connected to the detection signal output terminal of the displacement sensor, and the secondary side of the second optocoupler U2 is connected to the displacement signal input terminal of the microcontroller.
[0023] The stepper motor STEP signal control module includes a third optocoupler U3. The primary side of the third optocoupler U3 is connected to the control signal output terminal of the microcontroller, and the secondary side of the third optocoupler U3 is connected to the STEP signal input terminal of the stepper motor driver.
[0024] This invention employs a motion module operation status detection unit to detect the operation status of the motion module in real time. It can support the detection of the operation status of motion modules driven by 8 stepper motors, and can be expanded to increase the number of detection channels as needed. Each channel only requires one encoder and one sensor, which reduces the space occupied by the detection device and the manufacturing cost, reduces the complexity of the circuit board wiring harness connection, and greatly improves the accuracy of motion module operation status detection. Attached Figure Description
[0025] Figure 1 This is a schematic diagram of the installation position of the encoder disk shown in this invention.
[0026] Figure 2 This is a schematic diagram of the detection system shown in this invention.
[0027] Figure 3 yes Figure 1 A schematic diagram of the motion module operation status detection unit.
[0028] Figure 4 , Figure 5 yes Figure 3 The circuit diagram of the level conversion module described in the document.
[0029] Figure 6 yes Figure 3 The circuit diagram of the STEP signal control module for the stepper motor described in the article. Detailed Implementation
[0030] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings. These embodiments are implemented based on the technical solution of the present invention, and detailed implementation methods and specific working processes are given. However, the scope of protection of the present invention is not limited to the following embodiments.
[0031] The method for detecting the operating status of a motion module driven by a stepper motor described in this invention will now be described using the detection of the operating status of one motion module as an example; of course, the detection of the operating status of the motion module can also be extended to multiple modules.
[0032] like Figure 2 As shown, the detection system includes:
[0033] The stepper motor controller is used to parse the stepper motor-related commands sent by the host computer and control the motor to run according to preset parameters and methods.
[0034] The motion module operation status detection unit is used to receive the STEP signal, DIR signal, and EN signal sent by the stepper motor controller, and send the received STEP signal, DIR signal, and EN signal to the stepper motor driver to detect the operation status of the motion module in real time. When the motion module is found to be operating abnormally, the stepper motor driver stops outputting pulse control signals and sends an alarm message of motion module operation abnormality to the host computer to prompt relevant personnel to troubleshoot and handle the fault.
[0035] The stepper motor driver receives the STEP, DIR, and EN signals sent by the motion module's running status detection unit and drives the stepper motor to run according to preset parameters; when it receives a stepper motor stop control signal, it controls the stepper motor to stop running.
[0036] The host computer is used to communicate with the stepper motor controller, the motion module operation status detection unit, and the stepper motor driver.
[0037] The testing steps are as follows:
[0038] Step 1, as follows Figure 1 As shown, the code disk 1 is mounted on the stepper motor shaft 2 of the motion module being tested. The code disk 1 rotates with the stepper motor shaft 2. The shaft 2 is connected to the driven shaft of the motion module through the transmission belt 3. 30 detection holes 4 are evenly distributed on the surface of the code disk 1 along the circumferential direction. The width of the detection hole 4 along the circumferential direction is equal to the width between adjacent detection holes 4 along the circumferential direction.
[0039] Step 2: Install displacement sensor 6 on the frame at the position corresponding to the motion trajectory line 5 of detection hole 4. When the displacement sensor detects the detection hole, it outputs a high-level detection signal; when the displacement sensor does not detect the detection hole, it outputs a low-level detection signal and sends the detection signal to the motion module running status detection unit.
[0040] Step 3: After the stepper motor controller receives the motor-related commands sent by the host computer, the stepper motor controller parses the command and sends the STEP signal (stepping pulse signal), DIR signal (stepper motor rotation direction control signal), and EN signal (stepper motor driver enable signal) to the motion module running status detection unit.
[0041] Step 4: The motion module operation status detection unit sends the received STEP signal, DIR signal, and EN signal to the stepper motor driver, and the stepper motor driver drives the stepper motor to rotate according to the preset parameters.
[0042] Step 5: The motion module operation status detection unit detects the operation status of the motion module in real time. The steps are as follows:
[0043] Step 5.1 First, set the width of the detection hole as one detection cycle, that is, the time taken for the displacement sensor 6 to detect the width of one detection hole along the motion trajectory line 5 of the detection hole 4 during the rotation of the encoder disk 1 driven by the stepper motor.
[0044] Step 5.2: During the operation of the stepper motor, the motion module operation status detection unit counts the STEP signal within one detection cycle. Simultaneously, it detects whether the detection signal output by the displacement sensor 6 changes from high to low level within one detection cycle, i.e., whether there is a high / low level change in the signal output by the displacement sensor 6. If there is a high / low level change, the motion module is judged to be operating normally, and the STEP signal count is reset to zero. If there is no high / low level change, the motion module is judged to be operating abnormally, the STEP signal count value is not zero, the STEP signal of the stepper motor driver is cut off, the stepper motor stops running, and an alarm message for motion module operation abnormality is sent to the host computer, prompting relevant personnel to troubleshoot and handle the fault.
[0045] Beneficially or exemplaryly, such as Figure 1 , 3 As shown, the motion module operation status detection unit includes a displacement sensor 6, a level conversion module, a microcontroller, and a stepper motor STEP signal control module;
[0046] The displacement sensor 6 is used to detect the detection hole 4 on the code disk 1. When the detection hole 4 is detected, it outputs a high-level detection signal to the level conversion module. When the detection hole 4 is not detected, it outputs a low-level detection signal to the level conversion module.
[0047] The level conversion module is used to convert the detection signal output by displacement sensor 6 and the STEP signal from stepper motor and then output them to the microcontroller.
[0048] The microcontroller analyzes and processes the detection signals sent by the level conversion module and the STEP signals of the stepper motor in real time to determine the operating status of the motion module. When the motion module is malfunctioning, it stops the stepper motor driver from outputting pulse control signals and sends an alarm message about the motion module malfunction to the host computer.
[0049] Beneficially or exemplaryly, such as Figure 4 , 5 As shown, the level conversion module includes a first optocoupler U1 and a second optocoupler U2.
[0050] like Figure 4 As shown, the primary side of the first optocoupler U1 is connected to the stepper motor STEP signal and the stepper motor power supply VCC; specifically, pin 2 of the primary side of the first optocoupler U1 is connected to the stepper motor STEP signal, and pin 1 of the primary side of the first optocoupler U1 is connected to the stepper motor power supply VCC. The secondary side of the first optocoupler U1 is connected to the STEP signal input terminal of the microcontroller; specifically, pin 7 of the secondary side of the first optocoupler U1 is connected to the STEP signal input terminal J1 of the microcontroller.
[0051] like Figure 5 As shown, the primary side of the second optocoupler U2 is connected to the detection signal output terminal of the displacement sensor 6, and the secondary side of the second optocoupler U2 is connected to the displacement signal input terminal of the microcontroller. Specifically, pin 1 of the primary side of the second optocoupler U2 is connected to the operating power supply +5VD of the displacement sensor 6, and pin 2 is connected to the detection signal output terminal J3 of the displacement sensor 6; pin 7 of the secondary side of the second optocoupler U2 is connected to the displacement signal input terminal J4 of the microcontroller.
[0052] Beneficially or exemplaryly, such as Figure 6 As shown, the stepper motor STEP signal control module includes a third optocoupler U3. The primary side (pin 1 and pin 2) of the third optocoupler U3 is connected to the control signal output terminal J5 of the microcontroller. The secondary side pin 4 of the third optocoupler U3 is connected to the STEP signal J6 output to the stepper motor driver. Pin 3 is connected to the STEP signal of the stepper motor controller.
[0053] Specifically, when the level received by the microcontroller's displacement signal input terminal J4 does not change between high and low levels within a detection cycle, the microcontroller's control signal output terminal J5 outputs a high level to pin 2 of the third optocoupler U3. Pin 1 of the third optocoupler U3 is connected to the 3.3VDD power supply terminal. At this time, the primary side photodiode of the third optocoupler U3 is cut off, the secondary side phototransistor is not conducting, and the secondary side pin 4 of the third optocoupler U3 has no STEP signal output to the stepper motor driver. That is, the STEP signal output to the stepper motor driver is cut off, thereby controlling the stepper motor to stop working, thereby controlling the motion module to stop moving, and sending motion module operation abnormality alarm information to the host computer.
[0054] The microcontroller in this invention can also be an FPGA, DSP, or ARM controller; the optocoupler can also be a level conversion chip or a MOS transistor; the material of the code disk is not limited and can be made of metal, plastic, or other materials; the detection hole on the code disk can be a round hole, a rectangular hole, or a hole of other shapes.
[0055] It should be noted that in the description of this invention, terms such as "front," "rear," "left," "right," "vertical," "horizontal," "inner," and "outer" indicating orientation or positional relationships are based on the orientation or positional relationships shown in the accompanying drawings. They are used only for the convenience of describing this invention and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
Claims
1. A method for detecting the operating status of a motion module driven by a stepper motor, characterized in that: The following detection system is used, including: The stepper motor controller is used to parse the stepper motor-related commands sent by the host computer and control the motor to run according to preset parameters and methods. The motion module operation status detection unit is used to receive the STEP signal, DIR signal, and EN signal sent by the stepper motor controller, and send the received STEP signal, DIR signal, and EN signal to the stepper motor driver to detect the operation status of the motion module in real time; when it is determined that the motion module is operating abnormally, the stepper motor driver stops outputting pulse control signals and sends motion module operation abnormality alarm information to the host computer. The stepper motor driver is used to receive the STEP signal, DIR signal, and EN signal sent by the motion module operation status detection unit, and drive the stepper motor to run according to preset parameters; when it receives the stepper motor stop running control signal, it controls the stepper motor to stop running. The host computer is used to communicate with the stepper motor controller, the motion module operation status detection unit, and the stepper motor driver; The detection method is as follows: Step 1: Mount the code disk on the rotating shaft of the stepper motor. The rotating shaft is connected to the driven shaft of the motion module via a transmission belt. The code disk is a disc with multiple detection holes evenly distributed along the circumference. The number of detection holes is set according to the detection accuracy. Step 2: Install a displacement sensor on the frame corresponding to the position of the motion trajectory line of the detection hole. When the displacement sensor detects the detection hole, it outputs a high-level or low-level detection signal and sends it to the motion module operation status detection unit. Step 3: After the stepper motor controller receives the motor-related commands sent by the host computer, the stepper motor controller parses the relevant instructions and sends the STEP signal, DIR signal, and EN signal to the motion module running status detection unit. Step 4: The motion module operation status detection unit sends the received STEP signal, DIR signal, and EN signal to the stepper motor driver, and the stepper motor driver drives the stepper motor to run according to preset parameters; Step 5: The motion module operation status detection unit detects the operation status of the motion module in real time. The steps are as follows: Step 5.1 First, set the width of the detection hole as one detection cycle, that is, the time taken for the displacement sensor to detect one width of the detection hole along the motion trajectory line of the detection hole during the process of the stepper motor driving the code disk to rotate. Step 5.2: During the operation of the stepper motor, the motion module operation status detection unit counts the STEP signal within one detection cycle. Simultaneously, it detects whether the detection signal output by the displacement sensor changes from high to low or vice versa within one detection cycle, i.e., whether the signal output by the displacement sensor changes between high and low levels. If there is a change between high and low levels, the motion module is judged to be operating normally, and the STEP signal count is reset to zero. If there is no change between high and low levels, the motion module is judged to be operating abnormally, the STEP signal count value is not zero, the STEP signal of the stepper motor driver is cut off, the stepper motor stops running, and an alarm message for motion module operation abnormality is sent to the host computer.
2. The detection method according to claim 1, characterized in that: The motion module operation status detection unit includes a displacement sensor, a level conversion module, a microcontroller, and a stepper motor STEP signal control module; The displacement sensor is used to detect the detection hole on the code disk. When the detection hole is detected, it outputs a high-level or low-level detection signal to the level conversion module. The level conversion module is used to convert the detection signal output by the displacement sensor and the STEP signal from the stepper motor and then output them to the microcontroller. The microcontroller analyzes and processes the detection signal sent by the level conversion module and the STEP signal of the stepper motor in real time to determine the operating status of the motion module. When the motion module is malfunctioning, it causes the stepper motor driver to stop outputting pulse control signals and sends an alarm message about the motion module malfunction to the host computer.
3. The detection method according to claim 2, characterized in that: The level conversion module includes a first optocoupler U1 and a second optocoupler U2; the primary side of the first optocoupler U1 is connected to the STEP signal of the stepper motor, and the secondary side of the first optocoupler U1 is connected to the STEP signal input terminal of the microcontroller; the primary side of the second optocoupler U2 is connected to the detection signal output terminal of the displacement sensor, and the secondary side of the second optocoupler U2 is connected to the displacement signal input terminal of the microcontroller. The stepper motor STEP signal control module includes a third optocoupler U3. The primary side of the third optocoupler U3 is connected to the control signal output terminal of the microcontroller, and the secondary side of the third optocoupler U3 is connected to the STEP signal input terminal of the stepper motor driver.
Citation Information
Patent Citations
Wireless and remote energy-saving heating control system
CN104832978A
Out-of-step detecting mechanism of stepping motor
CN202014220U
Motion module operation state detection system driven by stepping motor
CN219266790U