A 3D printer laser scanning galvanometer driving method
By using a drive and control system and closed-loop control technology, the problems of large space occupation and insufficient temperature monitoring in the laser scanning galvanometer system of 3D printers have been solved, achieving miniaturized design and high-precision positioning, reducing costs and improving system reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUNAN ZHONGNAN INTELLIGENT LASER TECH CO LTD
- Filing Date
- 2023-12-06
- Publication Date
- 2026-04-24
AI Technical Summary
Existing laser scanning galvanometer systems for 3D printers have many types of boards and occupy a large space, making them unsuitable for the miniaturization design requirements of desktop nylon 3D printers. At the same time, the lack of galvanometer operating temperature monitoring makes fault protection difficult.
A drive control system is used for drive control, including a power module, a microcontroller module, an X-axis drive module and a Y-axis drive module on the circuit board. The microcontroller module performs position analysis and trajectory interpolation, and the photoelectric encoder is used to realize closed-loop control. A single-chip microcomputer (MCU) is used for synchronous drive, and a temperature sensor is integrated for temperature monitoring.
This technology enables miniaturized spatial design of 3D printers, improves positioning accuracy, ensures the reliability and precise control of the galvanometer system, reduces costs, and enhances fault protection capabilities.
Smart Images

Figure CN117565392B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of electronic control technology, specifically relating to a method for driving and controlling a laser scanning galvanometer in a 3D printer. Background Technology
[0002] 3D printing, also known as additive manufacturing or rapid prototyping, is a technology that uses digital model files as a basis and employs powdered metals or plastics and other bondable materials to construct objects layer by layer. The laser scanning galvanometer is a core component of a 3D printer. The control system controls the deflection of the X and Y axis laser scanning galvanometer motors through a protocol interface, thereby achieving scanning along the X and Y axes. Simultaneously, it controls the laser to emit laser light, thus achieving specific shape shaping.
[0003] Conventional 3D printing systems or laser scanning and marking systems require multiple control boards for laser scanning, including scanning control cards, interface processing cards, X-axis drive cards, and Y-axis drive cards. This results in a large number of boards and a large footprint, making them unsuitable for the compact design requirements of desktop nylon 3D printers.
[0004] On the other hand, the working cavity temperature of a 3D printer is very high, and the galvanometer body is also quite sensitive to temperature. Conventional laser scanning marking systems do not monitor the working temperature of the galvanometer, and laser scanning galvanometer faults require protocol transmission, which means that the host computer system cannot quickly perform fault protection.
[0005] In summary, there is an urgent need to provide a laser scanning galvanometer driving and control method for 3D printers that meets the requirements of miniaturized spatial design and high positioning accuracy. Summary of the Invention
[0006] The purpose of this invention is to provide a laser scanning galvanometer driving and control method for 3D printers that meets the requirements of miniaturized spatial design and high positioning accuracy.
[0007] The above objective is achieved through the following technical solution: a method for driving and controlling a laser scanning galvanometer in a 3D printer, using a driving and control system for drive control. The driving and control system includes a circuit board and a control circuit mounted on the circuit board. The control circuit includes a power module, a microcontroller module, an X-axis drive module, and a Y-axis drive module. The power module, X-axis drive module, and Y-axis drive module are electrically connected to the microcontroller module. The method for driving and controlling a laser scanning galvanometer in a 3D printer includes the following steps:
[0008] S1, The host computer sends the marking command to the drive and control system to plan the image coordinates and process delay parameters of the two-dimensional plane of the laser scanning galvanometer;
[0009] S2, the microcontroller module receives the marking command, performs position analysis and trajectory interpolation on the command content, and obtains the position coordinates of the X-axis motor and Y-axis motor motion trajectory;
[0010] S3. Calculate the analog voltage values output to the X-axis drive module and Y-axis drive module based on the position coordinate values in step S2. If the complete graphic to be worked on includes multiple running paths, the analog voltage calculation of the multiple running paths of the complete graphic is completed during the calculation, and trajectory interpolation is performed separately for each running path.
[0011] S4. Determine whether it is laser marking or graphic preview according to the instructions from the host computer. If it is laser marking, proceed to step S5; if it is graphic preview, proceed to step S9.
[0012] S5, the microcontroller module sets the corresponding time delay according to the process delay parameters to start the laser for graphic marking, and the microcontroller module outputs the calculated analog voltage to the X-axis drive module and Y-axis drive module to perform position movement;
[0013] S6, the X-axis drive module and the Y-axis drive module respectively drive the X-axis motor and the Y-axis motor to swing for operation;
[0014] S7. Determine whether the position action of the running path is completed. If yes, the microcontroller module sets the corresponding time delay to turn off the laser according to the process delay parameters, completes the laser marking of the running path, and executes step S8; otherwise, return to step S6.
[0015] S8. Determine whether the laser marking of multiple running paths of the complete graphic has been completed. If not, return to step S3; if yes, complete the laser marking on the two-dimensional plane and end the process.
[0016] S9, the microcontroller module sets the corresponding time delay according to the process delay parameters to turn on the positioning light for graphic preview, and the microcontroller module outputs the calculated analog voltage to the X-axis drive module and Y-axis drive module to perform position actions;
[0017] S10, the X-axis drive module and the Y-axis drive module respectively drive the X-axis motor and the Y-axis motor to swing for operation;
[0018] S11, determine whether the position action of the running path is completed. If yes, the drive control system sets the corresponding time delay to turn off the positioning light according to the process delay parameters, completes the graphic preview of the running path, and executes step S12; if no, return to step S10.
[0019] S12, determine whether the graphic preview of multiple running paths of the complete graphic has been completed. If not, return to step S3; if yes, complete the graphic preview on the two-dimensional plane and end the process.
[0020] The host computer of this invention communicates with the drive control system via a bus to control the drive control system, which in turn receives instructions from the host computer. The drive board can drive the X-axis and Y-axis motors of the scanning galvanometer, thereby achieving scanning control on a two-dimensional plane. Different analog drive voltages correspond to different deflection angles of the motors. Both the X-axis and Y-axis motors are equipped with photoelectric encoders, which are mechanically connected and fastened to the motors, and can oscillate coaxially with the motor shafts. The drive control system controls the laser to emit laser light for scanning. The drive board simultaneously controls a positioning light (which can be a red LED) for trajectory indication and positioning before scanning, facilitating workpiece position transitions and assisting in optical path adjustment.
[0021] The control logic for the laser and positioning light is as follows: the positioning light is used for auxiliary positioning, mainly for indication; the laser is used to sinter the nylon powder to achieve shape shaping; the switching control of the laser or red light involves trajectory shaping. After the drive and control system performs position calculation and trajectory interpolation, when the position action start function is executed, the laser or positioning light is turned on. During this process, a positive or negative delay can be applied based on the process parameters sent from the host computer. A positive delay means that the laser or positioning light is turned on after a certain time following the start of the position action, while a negative delay means that the laser or positioning light is turned on before the start of the position action. The positive or negative delay is adjusted according to the specific process debugging situation. After the drive and control system completes the position action, the laser or positioning light is turned off. Again, a positive delay can be applied based on the process parameters sent from the host computer. A positive delay means that the laser or positioning light is turned off after a certain time following the position is reached. Based on process debugging experience, negative delays are generally not allowed, meaning that the laser or positioning light cannot be turned off before the position is reached.
[0022] The control logic of this invention employs open-loop position control on the host computer side and closed-loop position control on the drive side. The host computer sends position and speed information to the drive board via a bus. The drive board receives the position and speed information, performs position calculation, and then performs trajectory interpolation to plan a real-time trajectory. However, the drive control system does not feed back the real-time position of the two-axis motors to the host computer; it only feeds back a processing completion flag. After the host computer sends the position and performs trajectory interpolation, it outputs an analog voltage. The X-axis and Y-axis drive modules receive the analog voltage and drive the two-axis motors through power amplifiers. The encoders on the two-axis motors feed back the motor position information to the drive control system in real time. The X-axis and Y-axis drive modules of the drive control system perform closed-loop feedback control of the position, thereby achieving precise control. The repeatability of the two-axis motors can reach the μrad level. This drive control system uses oscillation control for both the X-axis and Y-axis motors, without rotation control.
[0023] A further technical solution is that the control circuit also includes an X-axis motor interface, a Y-axis motor interface, a laser interface, a positioning light interface, and a host computer communication interface. The X-axis motor interface and the Y-axis motor interface are respectively used for electrical connection with the X-axis motor and the Y-axis motor of the laser scanning galvanometer. The X-axis drive module and the Y-axis drive module are respectively electrically connected to the X-axis motor interface and the Y-axis motor interface. The laser interface, the positioning light interface, and the host computer communication interface are respectively used for electrical connection with the laser of the laser scanning galvanometer, the positioning light, and the host computer. The microcontroller module is electrically connected to the laser interface, the positioning light interface, and the host computer communication interface.
[0024] In application, both the X-axis motor end and the Y-axis motor end are equipped with positioning light lamp interfaces and lasers. The positioning light lamp interfaces and lasers are electrically connected to the drive and control system through the positioning light lamp interfaces and laser interfaces.
[0025] A further technical solution is that the microcontroller module is an MCU. In steps S5 and S9, the DAC module in the MCU outputs the analog voltage after position calculation and trajectory interpolation to the X-axis drive module and the Y-axis drive module. Specifically, the X-axis DAC channel and the Y-axis DAC channel output the analog voltage to the X-axis drive module and the Y-axis drive module respectively. The X-axis DAC channel and the Y-axis DAC channel can be triggered simultaneously to ensure synchronization of the X-axis motor and the Y-axis motor at the control level. When scanning the laser trajectory, the specific drive control implementation is as follows: the main control chip of the microcontroller module uses a single Cortex-M4 core MCU, STM32F407VGT6. The MCU communicates with the host computer via a USB bus using a USB 2.0 interface, with a maximum speed of 12Mbps in FullSpeed mode. The drive type uses a CDC communication device-level solution for virtual serial port simulation. The host computer acts as the USB Master, and the drive system acts as the USB Slave. TTL IO signals are used to control the laser, and the signals output by the MCU are converted to TTL levels through a bus transceiver. At the same time, the status feedback of the laser can be received and input to the MCU through optocoupler isolation. For the analog voltage output after position calculation and trajectory interpolation, the on-chip 12-bit DAC module of STM32F407VGT6 is used directly, with one DAC channel for the X-axis and one for the Y-axis.
[0026] A further technical solution is that, in step S2, the analog voltage output from the X-axis DAC channel is transformed by an X-axis operational amplifier conversion circuit, and the transformation formula is as follows:
[0027] OUT_X = 5.26 - 3.3 × IN_X
[0028] Wherein, IN_X is the voltage output by the DAC module through the X-axis DAC channel, with a theoretical output range of 0V to 3.3V; OUT_X is the output voltage of the X-axis operational amplifier converter circuit, with a designed output range of -5V to 5V; the X-axis drive module includes a PID control module, an X-axis differential amplifier module, and an X-axis power amplifier module. The X-axis motor is equipped with an X-axis photoelectric encoder, which is used to input the real-time position information of the X-axis motor as a current signal to the X-axis differential amplifier module. The X-axis differential amplifier module filters and amplifies the received current signal, converts it into a voltage signal, and inputs it to the X-axis PID control module; the phase line of the X-axis motor is equipped with an X-axis sampling resistor, which samples the operating current of the X-axis motor in real time and inputs it to the X-axis PID control module. The X-axis operational amplifier converter circuit outputs an analog control voltage to the X-axis PID control module. The X-axis PID control module performs PID servo closed-loop drive and outputs the control quantity to the X-axis power amplifier for power amplification, thereby driving the X-axis motor.
[0029] Thus, through the above calculation formula, it can be guaranteed that within this range, the voltage range of IN_X, calculated backward from the formula, is 0.079V to 3.109V. This aims to ensure that the DAC operates as linearly as possible, avoiding the nonlinear regions at both ends. The encoder on the X-axis motor feeds back the motor's position information to the drive and control system in real time. The X-axis drive module performs closed-loop feedback control on the position, thereby achieving precise control. The repeatability of the X-axis motor can reach the μrad level.
[0030] A further technical solution is that, in step S2, the analog voltage output from the Y-axis DAC channel is transformed by a Y-axis operational amplifier conversion circuit, and the transformation formula is as follows:
[0031] OUT_Y = 5.26 - 3.3 × IN_Y
[0032] Wherein, IN_Y is the voltage output by the DAC module through the Y-axis DAC channel, with a theoretical output range of 0V to 3.3V; OUT_Y is the output voltage of the Y-axis operational amplifier converter circuit, with a designed output range of -5V to 5V; the Y-axis drive module includes a PID control module, a Y-axis differential amplifier module, and a Y-axis power amplifier module. The Y-axis motor is equipped with a Y-axis photoelectric encoder, which is used to input the real-time position information of the Y-axis motor as a current signal to the Y-axis differential amplifier module. The Y-axis differential amplifier module filters and amplifies the received current signal and inputs it to the Y-axis PID control module; the phase line of the Y-axis motor is equipped with a Y-axis sampling resistor, which samples the operating current of the Y-axis motor in real time and inputs it to the Y-axis PID control module. The Y-axis operational amplifier converter circuit outputs an analog control voltage to the Y-axis PID control module. The Y-axis PID control module performs PID servo closed-loop drive and outputs the control quantity to the Y-axis power amplifier for power amplification, thereby driving the Y-axis motor.
[0033] Thus, within this range, the voltage range of IN_Y can be calculated backwards from the formula to be 0.079V to 3.109V. The purpose is to make the DAC work as much as possible in the linear region and avoid the nonlinear regions at both ends. The encoder on the Y-axis motor feeds back the motor's position information to the drive and control system in real time. The Y-axis drive module performs closed-loop feedback control on the position, thereby achieving precise control. The repeatability of the Y-axis motor can reach the μrad level.
[0034] A further technical solution is that the control circuit is equipped with a temperature interface, which is electrically connected to a temperature sensor for detecting and acquiring the operating temperature inside the reflective lens cavity of the laser scanning galvanometer. The temperature interface is electrically connected to the microcontroller module. In practical applications, the temperature sensor is preferably a platinum resistance thermometer, which detects and acquires the operating temperature inside the reflective lens cavity of the laser scanning galvanometer and feeds back the detected temperature to the microcontroller module in real time through the temperature interface. The microcontroller module can then perform a series of monitoring and protection measures based on the set temperature threshold.
[0035] A further technical solution is that the host computer communication interface is a USB interface, which is the main bus interface for communication with the host computer.
[0036] Compared to existing technologies, this invention enables simplified control of the laser scanning galvanometer in 3D printers, using a single MCU for control. It eliminates the need for data transmission via the XY2-100 communication bus and the need for an external DAC chip for position voltage output, utilizing an on-chip DAC module to save costs. Secondly, the single-chip microcontroller enables the drive and control of the laser scanning galvanometer, including the control of the X-axis and Y-axis motors, the laser, the positioning beam, and temperature monitoring within the galvanometer's reflector cavity. Thirdly, the control logic of this drive and control system employs open-loop position control on the host computer and closed-loop position control on the drive end. The laser control logic includes a time delay control strategy for the corresponding switching moments, allowing for the addition of a time delay before the laser is turned on or off to meet process debugging requirements. Furthermore, the DAC is designed to operate primarily in the linear region, avoiding nonlinear regions at both ends. Finally, the X-axis and Y-axis motor positions are obtained from the photoelectric encoder as analog small-signal uA-level current signals, which are filtered and amplified by a differential amplifier circuit and converted into V-level voltage signals before being input to the PID control module, resulting in high positioning accuracy. Attached Figure Description
[0037] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0038] Figure 1 This is a flowchart illustrating a laser scanning galvanometer driving and control method for a 3D printer according to one embodiment of the present invention.
[0039] Figure 2 This is a schematic diagram of the control logic of a laser scanning galvanometer for a 3D printer according to one embodiment of the present invention.
[0040] Figure 3 This is a schematic diagram of the laser scanning galvanometer driving principle of a 3D printer according to one embodiment of the present invention. Detailed Implementation
[0041] The present invention will now be described in detail with reference to the accompanying drawings. This description is merely illustrative and explanatory, and should not be construed as limiting the scope of protection of the present invention. Furthermore, those skilled in the art can combine the features in the embodiments described herein and in different embodiments accordingly based on the description in this document.
[0042] The embodiments of the present invention are as follows, with reference to Figure 1A method for driving and controlling a laser scanning galvanometer in a 3D printer, comprising a driving and control system including a circuit board and a control circuit mounted on the circuit board, the control circuit including a power module, a microcontroller module, an X-axis drive module, and a Y-axis drive module, wherein the power module, X-axis drive module, and Y-axis drive module are electrically connected to the microcontroller module, and the method includes the following steps:
[0043] S1, the host computer sends the marking command to the drive and control system, which corresponds to the drawing path of the graphic and plans the image coordinates and process delay parameters of the two-dimensional plane of the laser scanning galvanometer.
[0044] S2, the microcontroller module receives the marking command, performs position analysis and trajectory interpolation on the command content, and obtains the position coordinates of the X-axis motor and Y-axis motor motion trajectory;
[0045] S3. Calculate the analog voltage values output to the X-axis drive module and Y-axis drive module based on the position coordinate values in step S2. If the complete graphic to be worked on includes multiple running paths, the analog voltage calculation of the multiple running paths of the complete graphic is completed during the calculation, and trajectory interpolation is performed separately for each running path.
[0046] S4. Determine whether it is laser marking or graphic preview according to the instructions from the host computer. If it is laser marking, proceed to step S5; if it is graphic preview, proceed to step S9.
[0047] S5, the microcontroller module sets the corresponding time delay according to the process delay parameters to start the laser for graphic marking, and the microcontroller module outputs the calculated analog voltage to the X-axis drive module and Y-axis drive module to perform position movement;
[0048] S6, the X-axis drive module and the Y-axis drive module respectively drive the X-axis motor and the Y-axis motor to swing for operation;
[0049] S7. Determine whether the position action of the running path is completed. If yes, the microcontroller module sets the corresponding time delay to turn off the laser according to the process delay parameters, completes the laser marking of the running path, and executes step S8; otherwise, return to step S6.
[0050] S8. Determine whether the laser marking of multiple running paths of the complete graphic has been completed. If not, return to step S3; if yes, complete the laser marking on the two-dimensional plane and end the process.
[0051] S9, the microcontroller module sets the corresponding time delay according to the process delay parameters to turn on the positioning light for graphic preview, and the microcontroller module outputs the calculated analog voltage to the X-axis drive module and Y-axis drive module to perform position actions;
[0052] S10, the X-axis drive module and the Y-axis drive module respectively drive the X-axis motor and the Y-axis motor to swing for operation;
[0053] S11, determine whether the position action of the running path is completed. If yes, the drive control system sets the corresponding time delay to turn off the positioning light according to the process delay parameters, completes the graphic preview of the running path, and executes step S12; if no, return to step S10.
[0054] S12, determine whether the graphic preview of multiple running paths of the complete graphic has been completed. If not, return to step S3; if yes, complete the graphic preview on the two-dimensional plane and end the process.
[0055] The host computer of this invention communicates with the drive control system via a bus to control the drive control system, which in turn receives instructions from the host computer. The drive board can drive the X-axis and Y-axis motors of the scanning galvanometer, thereby achieving scanning control on a two-dimensional plane. Different analog drive voltages correspond to different deflection angles of the motors. Both the X-axis and Y-axis motors are equipped with photoelectric encoders, which are mechanically connected and fastened to the motors, and can oscillate coaxially with the motor shafts. The drive control system controls the laser to emit laser light for scanning. The drive board simultaneously controls a positioning light (which can be a red LED) for trajectory indication and positioning before scanning, facilitating workpiece position transitions and assisting in optical path adjustment.
[0056] The control logic for the laser and positioning light is as follows: the positioning light is used for auxiliary positioning, mainly for indication; the laser is used to sinter the nylon powder to achieve shape shaping; the switching control of the laser or red light involves trajectory shaping. After the drive and control system performs position calculation and trajectory interpolation, when the position action start function is executed, the laser or positioning light is turned on. During this process, a positive or negative delay can be applied based on the process parameters sent from the host computer. A positive delay means that the laser or positioning light is turned on after a certain time following the start of the position action, while a negative delay means that the laser or positioning light is turned on before the start of the position action. The positive or negative delay is adjusted according to the specific process debugging situation. After the drive and control system completes the position action, the laser or positioning light is turned off. Again, a positive delay can be applied based on the process parameters sent from the host computer. A positive delay means that the laser or positioning light is turned off after a certain time following the position is reached. Based on process debugging experience, negative delays are generally not allowed, meaning that the laser or positioning light cannot be turned off before the position is reached.
[0057] like Figure 2The control logic of this invention employs open-loop position control on the host computer side and closed-loop position control on the drive side. The host computer sends position and speed information to the drive board via a bus. The drive board receives the position and speed information, performs position calculation, and then performs trajectory interpolation to plan a real-time trajectory. However, the drive control system does not feed back the real-time position of the two-axis motors to the host computer; it only feeds back a processing completion flag. After the host computer sends the position and performs trajectory interpolation, it outputs an analog voltage. The X-axis drive module and Y-axis drive module receive the analog voltage and drive the two-axis motors through a power amplifier. The encoders on the two-axis motors feed back the motor position information to the drive control system in real time. The X-axis drive module and Y-axis drive module of the drive control system perform closed-loop feedback control of the position, thereby achieving precise control. The repeatability of the two-axis motors can reach the μrad level. This drive control system uses oscillation control for both the X-axis and Y-axis motors, without rotation control.
[0058] Based on the above embodiments, in another embodiment of the present invention, the control circuit further includes an X-axis motor interface, a Y-axis motor interface, a laser interface, a positioning light interface, and a host computer communication interface. The X-axis motor interface and the Y-axis motor interface are respectively used for electrical connection with the X-axis motor and the Y-axis motor of the laser scanning galvanometer. The X-axis drive module and the Y-axis drive module are respectively electrically connected to the X-axis motor interface and the Y-axis motor interface. The laser interface, the positioning light interface, and the host computer communication interface are respectively used for electrical connection with the laser of the laser scanning galvanometer, the positioning light, and the host computer. The microcontroller module is electrically connected to the laser interface, the positioning light interface, and the host computer communication interface.
[0059] In application, both the X-axis motor end and the Y-axis motor end are equipped with positioning light lamp interfaces and lasers. The positioning light lamp interfaces and lasers are electrically connected to the drive and control system through the positioning light lamp interfaces and laser interfaces.
[0060] Based on the above embodiments, in another embodiment of the present invention, such as... Figure 1 and Figure 3The microcontroller module is an MCU. In steps S5 and S9, the DAC module in the MCU outputs the analog voltage after position calculation and trajectory interpolation to the X-axis drive module and the Y-axis drive module. Specifically, the X-axis DAC channel and the Y-axis DAC channel output the analog voltage to the X-axis drive module and the Y-axis drive module respectively. The X-axis DAC channel and the Y-axis DAC channel can be triggered simultaneously to ensure synchronization of the X-axis motor and the Y-axis motor at the control level. When scanning the laser trajectory, the specific drive control implementation is as follows: the main control chip of the microcontroller module uses a single Cortex-M4 core MCU, STM32F407VGT6. The MCU communicates with the host computer via a USB bus using a USB 2.0 interface, with a maximum speed of 12Mbps in Full Speed mode. The drive type uses a CDC communication device-level solution for virtual serial port simulation. The host computer acts as the USB Master, and the drive system acts as the USB Slave. TTL IO signals are used to control the laser, and the signals output by the MCU are converted to TTL levels through a bus transceiver. At the same time, the status feedback of the laser can be received and input to the MCU through optocoupler isolation. For the analog voltage output after position calculation and trajectory interpolation, the on-chip 12-bit DAC module of STM32F407VGT6 is used directly, with one DAC channel for the X-axis and one for the Y-axis.
[0061] Based on the above embodiments, in another embodiment of the present invention, such as... Figure 3 In step S2, the analog voltage output from the X-axis DAC channel is transformed by the X-axis operational amplifier conversion circuit, and the transformation formula is as follows:
[0062] OUT_X = 5.26 - 3.3 × IN_X
[0063] Wherein, IN_X is the voltage output by the DAC module through the X-axis DAC channel, with a theoretical output range of 0V to 3.3V; OUT_X is the output voltage of the X-axis operational amplifier converter circuit, with a designed output range of -5V to 5V; the X-axis drive module includes a PID control module, an X-axis differential amplifier module, and an X-axis power amplifier module. The X-axis motor is equipped with an X-axis photoelectric encoder, which is used to input the real-time position information of the X-axis motor as a current signal to the X-axis differential amplifier module. The X-axis differential amplifier module filters and amplifies the received current signal, converts it into a voltage signal, and inputs it to the X-axis PID control module; the phase line of the X-axis motor is equipped with an X-axis sampling resistor, which samples the operating current of the X-axis motor in real time and inputs it to the X-axis PID control module. The X-axis operational amplifier converter circuit outputs an analog control voltage to the X-axis PID control module. The X-axis PID control module performs PID servo closed-loop drive and outputs the control quantity to the X-axis power amplifier for power amplification, thereby driving the X-axis motor.
[0064] Thus, through the above calculation formula, it can be guaranteed that within this range, the voltage range of IN_X, calculated backward from the formula, is 0.079V to 3.109V. This aims to ensure that the DAC operates as linearly as possible, avoiding the nonlinear regions at both ends. The encoder on the X-axis motor feeds back the motor's position information to the drive and control system in real time. The X-axis drive module performs closed-loop feedback control on the position, thereby achieving precise control. The repeatability of the X-axis motor can reach the μrad level.
[0065] Based on the above embodiments, in another embodiment of the present invention, such as... Figure 3 In step S2, the analog voltage output from the Y-axis DAC channel is transformed by the Y-axis operational amplifier conversion circuit, and the transformation formula is as follows:
[0066] OUT_Y = 5.26 - 3.3 × IN_Y
[0067] Wherein, IN_Y is the voltage output by the DAC module through the Y-axis DAC channel, with a theoretical output range of 0V to 3.3V; OUT_Y is the output voltage of the Y-axis operational amplifier converter circuit, with a designed output range of -5V to 5V; the Y-axis drive module includes a PID control module, a Y-axis differential amplifier module, and a Y-axis power amplifier module. The Y-axis motor is equipped with a Y-axis photoelectric encoder, which is used to input the real-time position information of the Y-axis motor as a current signal to the Y-axis differential amplifier module. The Y-axis differential amplifier module filters and amplifies the received current signal and inputs it to the Y-axis PID control module; the phase line of the Y-axis motor is equipped with a Y-axis sampling resistor, which samples the operating current of the Y-axis motor in real time and inputs it to the Y-axis PID control module. The Y-axis operational amplifier converter circuit outputs an analog control voltage to the Y-axis PID control module. The Y-axis PID control module performs PID servo closed-loop drive and outputs the control quantity to the Y-axis power amplifier for power amplification, thereby driving the Y-axis motor.
[0068] Thus, within this range, the voltage range of IN_Y can be calculated backwards from the formula to be 0.079V to 3.109V. The purpose is to make the DAC work as much as possible in the linear region and avoid the nonlinear regions at both ends. The encoder on the Y-axis motor feeds back the motor's position information to the drive and control system in real time. The Y-axis drive module performs closed-loop feedback control on the position, thereby achieving precise control. The repeatability of the Y-axis motor can reach the μrad level.
[0069] Based on the above embodiments, in another embodiment of the present invention, the control circuit is provided with a temperature interface. This temperature interface is electrically connected to a temperature sensor for detecting and collecting the operating temperature within the reflective lens cavity of the laser scanning galvanometer. The temperature interface is electrically connected to the microcontroller module. In practical applications, the temperature sensor is preferably a platinum resistance thermometer, which detects and collects the operating temperature within the reflective lens cavity of the laser scanning galvanometer and feeds the detected temperature back to the microcontroller module in real time via the temperature interface. The microcontroller module can then perform a series of monitoring and protection measures based on a set temperature threshold.
[0070] Based on the above embodiments, in another embodiment of the present invention, such as... Figure 3 The host computer communication interface is a USB interface, which is the main bus interface for communication with the host computer.
[0071] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for driving and controlling a laser scanning galvanometer in a 3D printer, comprising a driving and control system, wherein the driving and control system includes a circuit board and a control circuit disposed on the circuit board, characterized in that... The control circuit includes a power supply module, a microcontroller module, an X-axis drive module, and a Y-axis drive module. The power supply module, X-axis drive module, and Y-axis drive module are electrically connected to the microcontroller module. The 3D printer laser scanning galvanometer driving and control method includes the following steps: S1, The host computer sends the marking command to the drive and control system to plan the image coordinates and process delay parameters of the two-dimensional plane of the laser scanning galvanometer; S2, the microcontroller module receives the marking command, performs position analysis and trajectory interpolation on the command content, and obtains the position coordinates of the X-axis motor and Y-axis motor motion trajectory; S3. Calculate the analog voltage values output to the X-axis drive module and Y-axis drive module based on the position coordinate values in step S2. If the complete graphic to be worked on includes multiple running paths, the analog voltage calculation of the multiple running paths of the complete graphic is completed during the calculation, and trajectory interpolation is performed separately for each running path. S4. Determine whether it is laser marking or graphic preview according to the instructions from the host computer. If it is laser marking, proceed to step S5; if it is graphic preview, proceed to step S9. S5, the microcontroller module sets the corresponding time delay according to the process delay parameters to start the laser for graphic marking, and the microcontroller module outputs the calculated analog voltage to the X-axis drive module and Y-axis drive module to perform position movement; S6, the X-axis drive module and the Y-axis drive module respectively drive the X-axis motor and the Y-axis motor to swing for operation; S7. Determine whether the position action of the running path is completed. If yes, the microcontroller module sets the corresponding time delay to turn off the laser according to the process delay parameters, completes the laser marking of the running path, and executes step S8; otherwise, return to step S6. S8. Determine whether the laser marking of multiple running paths of the complete graphic has been completed. If not, return to step S3; if yes, complete the laser marking on the two-dimensional plane and end the process. S9, the microcontroller module sets the corresponding time delay according to the process delay parameters to turn on the positioning light for graphic preview, and the microcontroller module outputs the calculated analog voltage to the X-axis drive module and Y-axis drive module to perform position actions; S10, the X-axis drive module and the Y-axis drive module respectively drive the X-axis motor and the Y-axis motor to swing for operation; S11, determine whether the position action of the running path is completed. If yes, the drive control system sets the corresponding time delay to turn off the positioning light according to the process delay parameters, completes the graphic preview of the running path, and executes step S12; if no, return to step S10. S12, determine whether the graphic preview of multiple running paths of the complete graphic has been completed. If not, return to step S3; if yes, complete the graphic preview on the two-dimensional plane and end the process.
2. The 3D printer laser scanning galvanometer driving and control method according to claim 1, characterized in that, The control circuit also includes an X-axis motor interface, a Y-axis motor interface, a laser interface, a positioning light interface, and a host computer communication interface. The X-axis motor interface and the Y-axis motor interface are used for electrical connection with the X-axis motor and the Y-axis motor of the laser scanning galvanometer, respectively. The X-axis drive module and the Y-axis drive module are electrically connected to the X-axis motor interface and the Y-axis motor interface, respectively. The laser interface, the positioning light interface, and the host computer communication interface are used for electrical connection with the laser of the laser scanning galvanometer, the positioning light, and the host computer, respectively. The microcontroller module is electrically connected to the laser interface, the positioning light interface, and the host computer communication interface.
3. The 3D printer laser scanning galvanometer driving and control method according to claim 2, characterized in that, The microcontroller module is an MCU. In steps S5 and S9, the DAC module in the MCU outputs the analog voltage after position calculation and trajectory interpolation to the X-axis drive module and the Y-axis drive module. The X-axis DAC channel and the Y-axis DAC channel are used to output the analog voltage to the X-axis drive module and the Y-axis drive module respectively. The X-axis DAC channel and the Y-axis DAC channel can be triggered simultaneously to ensure the synchronization of the X-axis motor and the Y-axis motor at the control level.
4. The 3D printer laser scanning galvanometer driving and control method according to claim 3, characterized in that, In step S2, the analog voltage output from the X-axis DAC channel is transformed by the X-axis operational amplifier conversion circuit, and the transformation formula is as follows: OUT_X = 5.26 - 3.3 × IN_X Wherein, IN_X is the voltage output by the DAC module through the X-axis DAC channel, with a theoretical output range of 0V to 3.3V; OUT_X is the output voltage of the X-axis operational amplifier converter circuit, with a designed output range of -5V to 5V; the X-axis drive module includes a PID control module, an X-axis differential amplifier module, and an X-axis power amplifier module. The X-axis motor is equipped with an X-axis photoelectric encoder, which is used to input the real-time position information of the X-axis motor as a current signal to the X-axis differential amplifier module. The X-axis differential amplifier module filters and amplifies the received current signal, converts it into a voltage signal, and inputs it to the X-axis PID control module; the phase line of the X-axis motor is equipped with an X-axis sampling resistor, which samples the operating current of the X-axis motor in real time and inputs it to the X-axis PID control module. The X-axis operational amplifier converter circuit outputs an analog control voltage to the X-axis PID control module. The X-axis PID control module performs PID servo closed-loop drive and outputs the control quantity to the X-axis power amplifier for power amplification, thereby driving the X-axis motor.
5. The 3D printer laser scanning galvanometer driving and control method according to claim 4, characterized in that, In step S2, the analog voltage output from the Y-axis DAC channel is transformed by the Y-axis operational amplifier conversion circuit, and the transformation formula is as follows: OUT_Y = 5.26 - 3.3 × IN_Y Wherein, IN_Y is the voltage output by the DAC module through the Y-axis DAC channel, with a theoretical output range of 0V to 3.3V; OUT_Y is the output voltage of the Y-axis operational amplifier converter circuit, with a designed output range of -5V to 5V; the Y-axis drive module includes a PID control module, a Y-axis differential amplifier module, and a Y-axis power amplifier module. The Y-axis motor is equipped with a Y-axis photoelectric encoder, which is used to input the real-time position information of the Y-axis motor as a current signal to the Y-axis differential amplifier module. The Y-axis differential amplifier module filters and amplifies the received current signal and inputs it to the Y-axis PID control module; the phase line of the Y-axis motor is equipped with a Y-axis sampling resistor, which samples the operating current of the Y-axis motor in real time and inputs it to the Y-axis PID control module. The Y-axis operational amplifier converter circuit outputs an analog control voltage to the Y-axis PID control module. The Y-axis PID control module performs PID servo closed-loop drive and outputs the control quantity to the Y-axis power amplifier for power amplification, thereby driving the Y-axis motor.
6. The 3D printer laser scanning galvanometer driving and control method according to any one of claims 1 to 5, characterized in that, The control circuit is equipped with a temperature interface, which is electrically connected to a temperature sensor for detecting and collecting the working temperature inside the reflective lens cavity of the laser scanning galvanometer. The temperature interface is electrically connected to the microcontroller module.
7. The 3D printer laser scanning galvanometer driving and control method according to claim 6, characterized in that, The host computer communication interface is a USB interface, which is the main bus interface for communication with the host computer.
Citation Information
Patent Citations
Driving control card for laser scanning galvanometer of 3D printer
CN222178709U