Automatic control method and system for forming bottom plate of 3D printer based on machine vision

By using machine vision and closed-loop control technology, the gap between the forming base plate of the 3D printer is accurately detected and automatically adjusted, solving the problems of low efficiency and insufficient precision in existing technologies. This achieves high-precision and automated gap control, improving printing stability and efficiency.

CN121552684AInactive Publication Date: 2026-02-24HAINAN VOCATIONAL COLLEGE OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610067959.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-19
Publication Date
2026-02-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The gap control of the current 3D printer forming plate relies on manual calibration, which is inefficient, inaccurate, and highly subjective. In addition, traditional visual inspection has problems such as large image noise interference and inaccurate edge extraction, making it difficult to achieve high-precision closed-loop control.

Method used

The system employs machine vision combined with closed-loop control. It acquires images of the gap between the nozzle and the forming base plate through a vision acquisition unit, performs noise reduction and enhancement preprocessing, extracts the gap edges using the Canny edge detection algorithm, converts them into actual gap dimensions by combining camera calibration parameters, and matches the optimal Z-axis displacement adjustment strategy through multi-layer condition judgment to form closed-loop control.

Benefits of technology

It achieves high-precision and automated control of the forming base plate, avoids mechanical wear, adapts to different printing needs, improves the intelligence and accuracy of control, and ensures the stability of printing quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121552684A_ABST
    Figure CN121552684A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of additive manufacturing, in particular to a 3D printer forming bottom plate automatic control method and system based on machine vision, and the method comprises the steps that equipment calibration and parameter setting are conducted, and a gap image of a nozzle and a bottom plate is visually collected and preprocessed; an actual gap value is obtained through Canny edge detection and camera calibration, and an optimal Z-axis adjustment strategy is judged and matched through multiple layers of conditions; and the driving execution unit performs visual verification after adjustment, closed-loop control is formed, and meanwhile, multi-calibration-point detection and dynamic compensation in printing are adopted. Non-contact accurate control is achieved, different consumables are adapted, the automation degree is high, the printing quality and efficiency are improved, and the problems in the prior art are effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of additive manufacturing technology, and more specifically, to an automatic control method and system for a 3D printer forming base plate based on machine vision. Background Technology

[0002] In 3D printing technology, the precision of the gap between the nozzle and the forming plate directly determines the adhesion of the printed part's substrate, the quality of the finished product, and its dimensional accuracy, making it one of the core parameters affecting the success or failure of printing. Currently, the gap control of the forming plate in 3D printers largely relies on manual calibration, achieved by manually adjusting the plate screws or Z-axis height. This method suffers from drawbacks such as low efficiency, insufficient precision, and strong subjectivity. Differences in operator experience can easily lead to gaps that are too large or too small, causing problems such as warping, detachment, or nozzle scratching the forming plate.

[0003] Some automatic calibration solutions use contact sensors to detect gaps, but these are prone to wear on the nozzle or base plate and cannot capture the dynamic changes in gaps during printing in real time. Non-contact solutions suffer from problems such as high image noise interference, inaccurate edge extraction, and large gap conversion errors, making it difficult to achieve high-precision closed-loop control. Therefore, there is an urgent need for an efficient, accurate, and non-contact automatic control technology for the forming base plate to address the many shortcomings of existing calibration methods and improve the stability and reliability of 3D printing. Summary of the Invention

[0004] In view of this, in order to address the shortcomings of the prior art, the present invention proposes an automatic control method and system for 3D printer forming base plate based on machine vision, aiming to solve at least one of the problems mentioned in the background art.

[0005] This invention provides an automatic control method for the molding base plate of a 3D printer based on machine vision, including the following steps: starting calibration of the target device and setting control parameters; The visual acquisition unit acquires an image of the gap between the nozzle of the target device and the forming base plate, and performs noise reduction and enhancement preprocessing on the image; First, the Canny edge detection algorithm is used to extract the upper and lower edges of the gap between the lower end of the nozzle and the forming base plate from the preprocessed image. Then, the edge pixel distance is converted into the actual gap size by combining the preset camera calibration parameters. The average value of the calculation results of a preset number of consecutive valid images is taken as the final actual gap value. Then, the image validity verification and gap deviation level identification are completed sequentially through multi-level condition judgment. The optimal Z-axis displacement adjustment strategy is matched by combining the adjustment step rules corresponding to the deviation level and the historical adjustment records. The adjustment strategy drives the execution unit to adjust the Z-axis displacement, and the adjustment effect is verified by visual inspection, thus forming a closed-loop control.

[0006] In some embodiments, the calibration and control parameter setting for the target device includes: The control parameters include a target gap threshold, an image clarity threshold, a maximum number of retry attempts, and an abnormal alarm threshold. The target gap threshold is adaptively set according to the type of printing consumables. When the printing consumable is PLA, the target gap threshold is preset to a first threshold. When the printing consumable is ABS, the target gap threshold is preset to a second threshold.

[0007] In some embodiments, the visual acquisition unit includes an industrial CMOS camera and a ring LED light source. The image preprocessing process includes first removing image noise by Gaussian filtering, then converting the image into a binary image by adaptive threshold segmentation, and finally using morphological opening operation to eliminate small interference areas and highlight gap edges.

[0008] In some embodiments, the multi-layer condition judgment includes three layers of conditions: The first layer is for image validity determination, which includes calculating the standard deviation of gray values ​​in the preprocessed image. When the standard deviation of gray values ​​is greater than or equal to a preset sharpness threshold, the image is determined to be valid; when the standard deviation of gray values ​​is less than the preset sharpness threshold, the image is determined to be invalid and the visual acquisition unit is driven to adjust parameters and re-acquire. The second layer is the gap deviation level judgment, which includes calculating the absolute value of the deviation between the actual gap value and the target gap threshold, and classifying it into four levels: qualified, slight deviation, moderate deviation and severe deviation according to the magnitude of the absolute value of the deviation. The third layer is for determining the effectiveness of the adjustment, including determining that the adjustment is effective when the absolute value of the adjusted deviation is less than or equal to a preset first absolute value threshold; recording the number of adjustments and returning to the rematch adjustment strategy when the absolute value of the adjusted deviation is greater than the first absolute value threshold; and determining that the adjustment is invalid when the number of adjustments reaches the preset maximum number of retries.

[0009] In some embodiments, the adjustment strategy corresponding to the gap deviation level includes: When the absolute value of the deviation is less than or equal to the first absolute value threshold, it is determined to be qualified and no adjustment is required; When the absolute value of the deviation is greater than the first absolute value threshold and less than or equal to the preset second absolute value threshold, it is determined to be a slight deviation, and a small step adjustment strategy is adopted, with the adjustment step being the preset first step threshold. When the absolute value of the deviation is greater than the second absolute value threshold and less than or equal to the preset third absolute value threshold, it is determined to be a moderate deviation, and a medium step adjustment strategy is adopted, with the adjustment step being the preset second step threshold. When the absolute value of the deviation is greater than the third absolute value threshold, it is determined to be a severe deviation. A large step adjustment strategy is adopted, and the step size is adjusted to the preset third step size threshold. At the same time, it is marked as a key monitoring object.

[0010] In some embodiments, the execution unit includes a Z-axis stepper motor, a ball screw, and a drive controller; The closed-loop control process includes: after the adjustment is completed, the image acquisition and preprocessing, gap size calculation and deviation level judgment process are re-executed. When the absolute value of the deviation value after adjustment is less than or equal to the first absolute value threshold, the adjustment is determined to be effective and the subsequent calibration process is entered. Otherwise, the number of adjustments is recorded and the adjustment strategy is rematched. If the number of adjustments reaches the preset maximum number of retries and still does not meet the target, the alarm unit is triggered to issue an alarm signal.

[0011] In some embodiments, when the target device is being calibrated for the first time or is identified as the key monitoring object, the drive nozzle is moved to five calibration points at the four corners and the center of the molding base plate. Image acquisition, preprocessing, deviation judgment and adjustment verification are performed on each calibration point in sequence. When the gaps of all calibration points meet the standards, the entire base plate gap calibration is determined to be complete. If a calibration point fails to meet the standard after multiple adjustments, the flatness of the base plate is determined to be abnormal and an alarm is triggered.

[0012] In some embodiments, during the printing process, the visual acquisition unit acquires a gap image every preset number of printing layers or a preset threshold time interval, and repeatedly executes the image preprocessing, gap size calculation and deviation level judgment process. Continue printing as long as the gap value is within the target threshold range; When the gap value exceeds the threshold, dynamic compensation is performed; If the dynamic compensation fails to restore the acceptable gap after a preset number of attempts, an alarm will be triggered and printing will be paused.

[0013] In some embodiments, the alarm unit uses a combination of buzzer sound and LED indicator flashing alarm. When there is an abnormality in image acquisition, ineffective adjustment, or abnormal flatness of the base plate, the buzzer sounds continuously and the LED indicator flashes red.

[0014] A second embodiment of the automatic control system for a 3D printer molding base plate based on machine vision, according to an embodiment of this application, includes: The initialization module is configured to initiate calibration and control parameter settings for the target device; The acquisition and processing module is configured to acquire an image of the gap between the nozzle of the target device and the forming base plate through the vision acquisition unit, and to perform noise reduction and enhancement preprocessing on the image; The decision module is configured to first use the Canny edge detection algorithm to extract the upper and lower edges of the gap between the lower end of the nozzle and the forming base plate from the preprocessed image, and then convert the edge pixel distance into the actual gap size by combining the preset camera calibration parameters. The average value of the calculation results of a preset number of consecutive valid images is taken as the final actual gap value. Then, the image validity verification and gap deviation level identification are completed sequentially through multi-level condition judgment. The optimal Z-axis displacement adjustment strategy is matched by combining the adjustment step rules corresponding to the deviation level and historical adjustment records. The verification module is configured to drive the execution unit to perform Z-axis displacement adjustment according to the adjustment strategy, and verify the adjustment effect through visual inspection to form a closed-loop control.

[0015] Compared with existing technologies, the advantages of this invention are as follows: It employs machine vision combined with closed-loop control to achieve automatic control of the molding base plate, significantly improving control intelligence and accuracy. Non-contact image acquisition avoids mechanical wear interference, and combined with Canny edge detection and camera calibration, gap measurement accuracy is higher and stability is stronger. Through adaptive parameter setting of consumables and multi-level deviation level judgment, the optimal adjustment strategy can be matched to adapt to different printing needs, solving the problem of poor parameter adaptability in traditional solutions.

[0016] Multi-calibration point comprehensive testing ensures base plate flatness, and a dynamic compensation mechanism corrects gap deviations in real time during printing, combined with closed-loop verification to avoid cumulative errors. Fully automated operation replaces manual leveling, significantly improving efficiency and reducing reliance on human intervention. An alarm mechanism responds promptly to abnormal situations, ensuring printing safety. This overall solution effectively addresses the pain points of existing technologies, such as low accuracy, poor stability, and insufficient automation, contributing to the development of 3D printing towards higher precision and automation.

[0017] The above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure.

[0018] Other features and aspects of this disclosure will become clearer from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description

[0019] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0020] Figure 1 A flowchart of an automatic control method for a 3D printer molding base plate based on machine vision, provided in an embodiment of the present invention; Figure 2 This is a functional block diagram of an automatic control system for a 3D printer molding base plate based on machine vision, provided in an embodiment of the present invention. Detailed Implementation

[0021] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the disclosure to those skilled in the art. It should be noted that, unless otherwise specified, embodiments and features in the embodiments of the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0022] See Figure 1 As shown in the first embodiment, an automatic control method for a 3D printer forming base plate based on machine vision, according to an embodiment of this application, includes the following steps: S100, Start calibration and control parameter setting for the target equipment; S200. Obtain an image of the gap between the nozzle of the target device and the forming base plate through the vision acquisition unit, and perform noise reduction and enhancement preprocessing on the image; S300: First, the Canny edge detection algorithm is used to extract the upper and lower edges of the gap between the lower end of the nozzle and the forming base plate from the preprocessed image. Combined with the preset camera calibration parameters, the edge pixel distance is converted into the actual gap size. The average value of the calculation results of a preset number of consecutive valid images is taken as the final actual gap value. Then, the image validity verification and gap deviation level identification are completed in sequence through multi-level condition judgment. Combined with the adjustment step rules corresponding to the deviation level and historical adjustment records, the optimal Z-axis displacement adjustment strategy is matched. S400. Drive the execution unit to adjust the Z-axis displacement according to the adjustment strategy, and verify the adjustment effect through visual detection to form a closed-loop control.

[0023] It should be understood that its working principle lies in constructing a fully automated closed-loop control system of "initialization-detection-decision-adjustment-verification," eliminating the drawbacks of traditional manual or mechanical contact control. Specifically, firstly, it provides a benchmark for subsequent control by starting calibration and setting control parameters, ensuring the standardization and pertinence of the control process; then, it uses a vision acquisition unit to acquire images of the gap between the nozzle and the forming base plate, and improves image quality through noise reduction and enhancement preprocessing, laying the foundation for subsequent accurate detection. In the core decision-making stage, the upper and lower edges of the gap are accurately extracted using the Canny edge detection algorithm, and the conversion from pixel distance to actual size is completed by combining preset camera calibration parameters. The average value of a preset number of valid images (preferably 3-5 frames) is used as the final actual gap value, which can reduce the detection error caused by noise in a single frame image; then, image validity verification and gap deviation level identification are achieved through multi-layer condition judgment, and the optimal Z-axis displacement adjustment strategy is matched by the deviation level adjustment step rule and historical adjustment records, which can avoid blind adjustment and improve adjustment efficiency. Finally, the Z-axis displacement adjustment is completed by the drive execution unit according to the adjustment strategy, and the adjustment effect is verified by visual inspection. This closed-loop control ensures adjustment accuracy and avoids problems such as inadequate or excessive adjustment. The core of the overall method framework constructed in this embodiment is to rely on the non-contact detection advantages of machine vision and combine it with closed-loop control logic to achieve precise and automated control of the gap of the forming base plate. The preset number of continuous effective image frames can be adjusted according to the actual detection accuracy requirements. Generally, 3-5 frames are selected to ensure accuracy without excessively occupying detection time.

[0024] In some specific embodiments, the calibration and control parameter setting for the target device includes: The control parameters include a target gap threshold, an image clarity threshold, a maximum number of retry attempts, and an abnormal alarm threshold. The target gap threshold is adaptively set according to the type of printing consumables. When the printing consumable is PLA, the target gap threshold is preset to a first threshold. When the printing consumable is ABS, the target gap threshold is preset to a second threshold.

[0025] It should be understood that its working principle lies in providing a precise and adaptable benchmark for the overall control process by clearly defining the types and setting rules of core control parameters, thus avoiding control failure or insufficient accuracy due to parameter ambiguity. The control parameters encompass four core dimensions: target gap threshold, image clarity threshold, maximum number of adjustment retry attempts, and abnormal alarm threshold. These correspond to the gap control target, image validity judgment criteria, adjustment tolerance boundary, and abnormal early warning benchmark, forming a complete parameter support system. The key innovation lies in the consumable adaptive setting of the target gap threshold. This is because different printing consumables have different physical properties and require different gaps between the printhead and the substrate: PLA consumables have a lower melting point and moderate fluidity, so the target gap threshold is preset to the first threshold (preferably 0.1-0.2mm) to ensure smooth extrusion and tight adhesion to the substrate; ABS consumables have a higher melting point and greater cooling shrinkage rate, so the target gap threshold is preset to the second threshold (preferably 0.15-0.25mm) to avoid adhesion to the substrate during cooling shrinkage due to an excessively small gap, or weak interlayer adhesion due to an excessively large gap. It should be noted that the image clarity threshold is preferably set to 30 (standard deviation of grayscale value), the maximum number of retries is preset to 3, and the abnormal alarm threshold can be set to 1.5 times the target gap threshold. These threshold parameters have been verified by a large number of experiments and can balance control accuracy and efficiency.

[0026] In some specific embodiments, the visual acquisition unit includes an industrial CMOS camera and a ring LED light source. The image preprocessing process includes first removing image noise through Gaussian filtering, then converting the image into a binary image through adaptive threshold segmentation, and finally using morphological opening operation to eliminate small interference areas and highlight gap edges.

[0027] It should be understood that its working principle lies in improving the quality and usability of gap images by optimizing hardware configuration and image preprocessing algorithms, providing a high-quality data source for subsequent edge detection and size calculation. The vision acquisition unit uses an industrial CMOS camera and a ring LED light source. The industrial CMOS camera has the advantages of high frame rate and high resolution (preferably 1920×1080 resolution, 30fps frame rate), which can quickly and clearly capture gap details; the ring LED light source can provide a uniform lighting environment, avoiding shadows caused by unilateral lighting that would blur the gap edges, and ensuring the contrast between the gap area and the background in the image. The image preprocessing process adopts a progressive workflow of "noise reduction-binarization-interference removal": First, Gaussian filtering is used to remove image noise, with a 3×3 or 5×5 Gaussian kernel selected. This effectively filters ambient light interference and camera sensor noise while preserving edge details. Then, adaptive threshold segmentation is used to convert the image into a binary image. This algorithm can automatically adjust the segmentation threshold according to the local grayscale distribution of the image. Compared with fixed threshold segmentation, it is more adaptable to image processing under different lighting conditions and can accurately distinguish the gap area from the nozzle and base plate areas. Finally, morphological opening operation (erosion followed by dilation) is used to eliminate small interference areas. A 2×2 structuring element is selected, which can remove small bright spots or dark spots formed by noise residue in the binary image, further highlighting the continuity and integrity of the gap edge, and ensuring that the subsequent Canny edge detection can accurately extract the upper and lower edges of the gap.

[0028] In some specific embodiments, the multi-layer condition judgment includes three layers of conditions: The first layer is for image validity determination, which includes calculating the standard deviation of gray values ​​in the preprocessed image. When the standard deviation of gray values ​​is greater than or equal to a preset sharpness threshold, the image is determined to be valid; when the standard deviation of gray values ​​is less than the preset sharpness threshold, the image is determined to be invalid and the visual acquisition unit is driven to adjust parameters and re-acquire. The second layer is the gap deviation level judgment, which includes calculating the absolute value of the deviation between the actual gap value and the target gap threshold, and classifying it into four levels: qualified, slight deviation, moderate deviation and severe deviation according to the magnitude of the absolute value of the deviation. The third layer is for determining the effectiveness of the adjustment, including determining that the adjustment is effective when the absolute value of the adjusted deviation is less than or equal to a preset first absolute value threshold; recording the number of adjustments and returning to the rematch adjustment strategy when the absolute value of the adjusted deviation is greater than the first absolute value threshold; and determining that the adjustment is invalid when the number of adjustments reaches the preset maximum number of retries.

[0029] It should be understood that its working principle is to first ensure the validity of image data through a hierarchical and progressive judgment logic, then accurately identify the gap deviation level, and finally verify the adjustment effect, providing logical support for the matching of the optimal adjustment strategy and the realization of closed-loop control. The core purpose of the first layer of image validity judgment is to eliminate the interference of invalid images on the control results. The standard deviation of the gray value of the image can reflect the contrast and detail richness of the image. When the standard deviation of the gray value is greater than or equal to the preset sharpness threshold (30), it indicates that the image contrast is high and the gap details are clear, which can be used for subsequent calculations. When it is less than the threshold, it indicates that the image is blurry (possibly due to insufficient lighting, camera focal length deviation, etc.). At this time, the visual acquisition unit is driven to adjust the parameters (such as increasing the exposure time, adjusting the light source brightness, and refocusing) to re-acquire data to ensure data reliability. The second-level gap deviation level judgment is crucial for achieving precise adjustment. It divides the gap into four levels by calculating the absolute value of the deviation between the actual gap value and the target gap threshold. The supplementary thresholds are as follows: the first absolute value threshold (pass threshold) is 0.05mm, the second absolute value threshold (slight-moderate boundary) is 0.1mm, and the third absolute value threshold (moderate-severe boundary) is 0.2mm. That is, an absolute deviation value ≤ 0.05mm is passable, 0.05-0.1mm is slight deviation, 0.1-0.2mm is moderate deviation, and > 0.2mm is severe deviation. Different levels correspond to different adjustment strategies to avoid a "one-size-fits-all" approach that leads to insufficient accuracy or low efficiency. The third-level adjustment validity judgment ensures the effectiveness of closed-loop control. When the absolute value of the adjusted deviation value is ≤ 0.05mm, the adjustment is considered adequate. If it exceeds this threshold, the number of adjustments is recorded, and a rematch strategy is implemented. If the adjustment count reaches the preset maximum retry count (3 times) and the target is still not met, the adjustment is deemed invalid, and a subsequent alarm is triggered to avoid repeated ineffective adjustments that waste time.

[0030] In some specific embodiments, the adjustment strategy corresponding to the gap deviation level includes: When the absolute value of the deviation is less than or equal to the first absolute value threshold, it is determined to be qualified and no adjustment is required; When the absolute value of the deviation is greater than the first absolute value threshold and less than or equal to the preset second absolute value threshold, it is determined to be a slight deviation, and a small step adjustment strategy is adopted, with the adjustment step being the preset first step threshold. When the absolute value of the deviation is greater than the second absolute value threshold and less than or equal to the preset third absolute value threshold, it is determined to be a moderate deviation, and a medium step adjustment strategy is adopted, with the adjustment step being the preset second step threshold. When the absolute value of the deviation is greater than the third absolute value threshold, it is determined to be a severe deviation. A large step adjustment strategy is adopted, and the step size is adjusted to the preset third step size threshold. At the same time, it is marked as a key monitoring object.

[0031] It should be understood that its working principle lies in matching differentiated adjustment step sizes according to different gap deviation levels to achieve the control objective of "precise fine-tuning and efficient coarse-tuning," balancing adjustment accuracy and efficiency. This strategy is based on the core logic of "the larger the deviation, the larger the adjustment step size," while avoiding overshoot due to excessive step size. The specific step size thresholds are as follows: the preset first step size threshold (small step size) is 0.02mm, the second step size threshold (medium step size) is 0.05mm, and the third step size threshold (large step size) is 0.1mm. When the absolute value of the deviation is ≤0.05mm (qualified), no adjustment is needed, and the process can proceed directly to the next step, avoiding meaningless adjustments that could affect printing efficiency. When the absolute value of the deviation is between 0.05-0.1mm (slight deviation), a small step size of 0.02mm is used to precisely correct minor deviations and prevent overshoot caused by large step sizes. When the absolute value of the deviation is between 0.1-0.2mm (moderate deviation), a medium step size of 0.05mm is used to improve adjustment efficiency while ensuring accuracy. When the absolute value of the deviation is >0.2mm (severe deviation), a large step size of 0.1mm is used to quickly narrow the deviation range and mark it as a key monitoring target. Subsequent checks will be conducted through multiple calibration points or more frequent dynamic compensation to ensure control accuracy. This adjustment strategy, combined with historical adjustment records, avoids the problem of repeated adjustments. For example, if a calibration point has repeatedly shown slight deviations in the past, the step size can be appropriately optimized during this adjustment to improve the targeting of the adjustment.

[0032] In some specific embodiments, the execution unit includes a Z-axis stepper motor, a ball screw, and a drive controller; The closed-loop control process includes: after the adjustment is completed, the image acquisition and preprocessing, gap size calculation and deviation level judgment process are re-executed. When the absolute value of the deviation value after adjustment is less than or equal to the first absolute value threshold, the adjustment is determined to be effective and the subsequent calibration process is entered. Otherwise, the number of adjustments is recorded and the adjustment strategy is rematched. If the number of adjustments reaches the preset maximum number of retries and still does not meet the target, the alarm unit is triggered to issue an alarm signal.

[0033] It should be understood that its working principle lies in achieving precise adjustment of Z-axis displacement through high-precision actuators, and ensuring complete correction of gap deviations and avoiding cumulative errors through a "adjustment-verification" loop logic. The actuator uses a Z-axis stepper motor, ball screw, and drive controller. The stepper motor has the advantages of high positioning accuracy and fast response speed. Combined with the ball screw (preferably with a lead of 1mm), the rotational motion of the motor can be precisely converted into linear displacement. The drive controller can receive adjustment strategy signals and control the rotation angle of the motor to achieve precise control of the adjustment step distance. Closed-loop control is one of the core advantages of this application. The specific process is as follows: After the execution unit completes the Z-axis displacement adjustment, the vision acquisition unit re-acquires the gap image at that position, repeating the image preprocessing, gap size calculation, and deviation level judgment process. If the absolute value of the adjusted deviation is ≤0.05mm (the acceptable threshold), the adjustment is deemed effective, and the process proceeds to the subsequent calibration process (such as other calibration point detection or print preparation). If it is still greater than 0.05mm, the number of adjustments is recorded, and the adjustment strategy is re-matched. When the number of adjustments reaches the preset maximum retry count (3 times) and still fails to meet the standard, the alarm unit is triggered to issue an alarm signal, reminding the operator to troubleshoot the fault (such as mechanical jamming, sensor malfunction, etc.). This closed-loop control logic can promptly detect problems with inadequate adjustment, ensuring that each adjustment action achieves the expected effect and avoiding the accumulation of deviations that affect print quality.

[0034] In some specific embodiments, when the target device is being calibrated for the first time or is identified as the key monitoring object, the drive nozzle is moved to the four corners and the center of the molding base plate, a total of five calibration points. Image acquisition, preprocessing, deviation judgment and adjustment verification are performed on each calibration point in sequence. When the gap of all calibration points meets the standard, the entire base plate gap calibration is determined to be completed. If a calibration point fails to meet the standard after multiple adjustments, the flatness of the base plate is determined to be abnormal and an alarm is triggered.

[0035] It should be understood that its working principle lies in ensuring the overall flatness of the forming base plate through comprehensive testing at multiple calibration points, avoiding the problem of partial compliance but overall non-compliance caused by single-point calibration. The forming base plate may have slight warping or unevenness, and single-point calibration alone cannot reflect the overall situation. Therefore, five calibration points are selected: four corners and the center. These five points can fully cover the key areas of the base plate, ensuring the comprehensiveness of the calibration results. The specific process is as follows: When the target device is being calibrated for the first time or is marked as a key monitoring object, the system drives the printhead to move sequentially to these five calibration points. For each calibration point, image acquisition, preprocessing, deviation judgment, and adjustment verification are performed. Only when the gap values ​​of all calibration points reach the qualified threshold (≤0.05mm) is the entire base plate gap calibration considered complete, ensuring consistent gap accuracy at all positions on the base plate. If a certain calibration point still fails to meet the standard after three adjustments, the flatness of the base plate is determined to be abnormal (possibly due to base plate deformation, installation deviation, etc.). At this time, the alarm unit is triggered to prevent subsequent printing from causing poor local adhesion of printed parts or scratching of the printhead due to uneven base plate. This multi-calibration-point process can significantly improve the comprehensiveness and reliability of base plate calibration, and is especially suitable for new equipment commissioning or equipment that may deform after long-term use.

[0036] In some specific embodiments, during the printing process, the visual acquisition unit acquires a gap image every preset number of printing layers or a preset threshold time interval, and repeatedly executes the image preprocessing, gap size calculation and deviation level judgment process; Continue printing as long as the gap value is within the target threshold range; When the gap value exceeds the threshold, dynamic compensation is performed; If the dynamic compensation fails to restore the acceptable gap after a preset number of attempts, an alarm will be triggered and printing will be paused.

[0037] It should be understood that its working principle lies in real-time monitoring of gap changes during the printing process, promptly correcting deviations caused by factors such as temperature changes and mechanical vibrations, and ensuring stable printing quality throughout the process. During the printing process, changes in ambient temperature, fluctuations in filament extrusion pressure, and equipment vibrations can all cause changes in the gap between the printhead and the base plate. If not corrected in time, this will lead to inconsistent quality between printed layers. Therefore, the triggering conditions for the visual acquisition unit are set as follows: every preset number of printed layers (preferably 5 layers) or a preset threshold time interval (preferably 10 minutes), a gap image is automatically acquired, and the image preprocessing, gap size calculation, and deviation level judgment process are repeatedly executed. When the gap value is within the target threshold range (e.g., 0.1-0.2mm for PLA), normal printing continues; when the gap value exceeds the threshold, dynamic compensation is immediately performed, and the corresponding step distance is matched and adjusted according to the adjustment strategy of claim 5; when dynamic compensation fails to restore the gap to the qualified range after a preset number of times (preferably 3 times), an alarm is triggered and printing is paused to avoid the production of a large number of defective products. This dynamic compensation mechanism enables "full-process monitoring and real-time correction," overcoming the shortcomings of traditional technologies that only calibrate before printing and cannot address dynamic deviations during the printing process.

[0038] In some specific embodiments, the alarm unit adopts a combination of buzzer sound and LED indicator flashing alarm method. When there is abnormal image acquisition, ineffective adjustment or abnormal flatness of the base plate, the buzzer sounds continuously and the LED indicator flashes red.

[0039] It should be understood that its working principle is to promptly alert operators to equipment malfunctions through a direct and conspicuous alarm method, preventing the fault from escalating and ensuring the safety and reliability of the printing process. The alarm unit uses a combination of buzzer sound and LED indicator flashing, which can attract the operator's attention more quickly than a single alarm method, and is especially suitable for noisy workshop environments. Specific trigger scenarios include image acquisition abnormalities (such as three consecutive invalid image acquisitions), ineffective adjustments (a certain position still does not meet the standard after three adjustments), and abnormal plate flatness (a certain calibration point fails to meet the standard after multiple adjustments). When these abnormalities occur, the buzzer sounds continuously (preferably at a frequency of 1kHz), and the LED indicator flashes red (preferably flashing once per second). At the same time, the system can record the type of abnormality and the time of occurrence, facilitating subsequent troubleshooting by operators. This alarm mechanism clearly defines the boundaries of abnormality warnings, can promptly terminate ineffective control or printing actions, reduce equipment wear and material waste, and improve the overall stability and safety of the system.

[0040] See Figure 2 As shown in the second embodiment, an automatic control system for a 3D printer molding base plate based on machine vision, according to an embodiment of this application, includes: The initialization module is configured to initiate calibration and control parameter settings for the target device; The acquisition and processing module is configured to acquire an image of the gap between the nozzle of the target device and the forming base plate through the vision acquisition unit, and to perform noise reduction and enhancement preprocessing on the image; The decision module is configured to first use the Canny edge detection algorithm to extract the upper and lower edges of the gap between the lower end of the nozzle and the forming base plate from the preprocessed image, and then convert the edge pixel distance into the actual gap size by combining the preset camera calibration parameters. The average value of the calculation results of a preset number of consecutive valid images is taken as the final actual gap value. Then, the image validity verification and gap deviation level identification are completed sequentially through multi-level condition judgment. The optimal Z-axis displacement adjustment strategy is matched by combining the adjustment step rules corresponding to the deviation level and historical adjustment records. The verification module is configured to drive the execution unit to perform Z-axis displacement adjustment according to the adjustment strategy, and verify the adjustment effect through visual inspection to form a closed-loop control.

[0041] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program goods. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program goods embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0042] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program goods according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0043] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0044] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0045] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the claims of the present invention.

Claims

1. An automatic control method for a 3D printer forming base plate based on machine vision, characterized in that, Includes the following steps: Start calibration and control parameter setting for the target equipment; The visual acquisition unit acquires an image of the gap between the nozzle of the target device and the forming base plate, and performs noise reduction and enhancement preprocessing on the image; First, the Canny edge detection algorithm is used to extract the upper and lower edges of the gap between the lower end of the nozzle and the forming base plate from the preprocessed image. Then, the edge pixel distance is converted into the actual gap size by combining the preset camera calibration parameters. The average value of the calculation results of a preset number of consecutive valid images is taken as the final actual gap value. Then, the image validity verification and gap deviation level identification are completed sequentially through multi-level condition judgment. The optimal Z-axis displacement adjustment strategy is matched by combining the adjustment step rules corresponding to the deviation level and the historical adjustment records. The adjustment strategy drives the execution unit to adjust the Z-axis displacement, and the adjustment effect is verified by visual inspection, thus forming a closed-loop control.

2. The automatic control method for a 3D printer forming base plate based on machine vision according to claim 1, characterized in that, The process of starting calibration and setting control parameters for the target device includes: The control parameters include a target gap threshold, an image clarity threshold, a maximum number of retry attempts, and an abnormal alarm threshold. The target gap threshold is adaptively set according to the type of printing consumables. When the printing consumable is PLA, the target gap threshold is preset to a first threshold. When the printing consumable is ABS, the target gap threshold is preset to a second threshold.

3. The automatic control method for a 3D printer forming base plate based on machine vision according to claim 2, characterized in that, The visual acquisition unit includes an industrial CMOS camera and a ring LED light source. The image preprocessing process includes first removing image noise through Gaussian filtering, then converting the image into a binary image through adaptive threshold segmentation, and finally using morphological opening operation to eliminate small interference areas and highlight gap edges.

4. The automatic control method for the forming base plate of a 3D printer based on machine vision according to claim 3, characterized in that, The multi-level condition judgment includes three levels of conditions: The first layer is for image validity determination, which includes calculating the standard deviation of gray values ​​in the preprocessed image. When the standard deviation of gray values ​​is greater than or equal to a preset sharpness threshold, the image is determined to be valid; when the standard deviation of gray values ​​is less than the preset sharpness threshold, the image is determined to be invalid and the visual acquisition unit is driven to adjust parameters and re-acquire. The second layer is the gap deviation level judgment, which includes calculating the absolute value of the deviation between the actual gap value and the target gap threshold, and classifying it into four levels: qualified, slight deviation, moderate deviation and severe deviation according to the magnitude of the absolute value of the deviation. The third layer is for determining the effectiveness of the adjustment, including determining that the adjustment is effective when the absolute value of the adjusted deviation is less than or equal to a preset first absolute value threshold; recording the number of adjustments and returning to the rematch adjustment strategy when the absolute value of the adjusted deviation is greater than the first absolute value threshold; and determining that the adjustment is invalid when the number of adjustments reaches the preset maximum number of retries.

5. The automatic control method for a 3D printer forming base plate based on machine vision according to claim 4, characterized in that, The adjustment strategies corresponding to the gap deviation levels include: When the absolute value of the deviation is less than or equal to the first absolute value threshold, it is determined to be qualified and no adjustment is required; When the absolute value of the deviation is greater than the first absolute value threshold and less than or equal to the preset second absolute value threshold, it is determined to be a slight deviation, and a small step adjustment strategy is adopted, with the adjustment step being the preset first step threshold. When the absolute value of the deviation is greater than the second absolute value threshold and less than or equal to the preset third absolute value threshold, it is determined to be a moderate deviation, and a medium step adjustment strategy is adopted, with the adjustment step being the preset second step threshold. When the absolute value of the deviation is greater than the third absolute value threshold, it is determined to be a severe deviation. A large step adjustment strategy is adopted, and the step size is adjusted to the preset third step size threshold. At the same time, it is marked as a key monitoring object.

6. The automatic control method for a 3D printer forming base plate based on machine vision according to claim 5, characterized in that, The execution unit includes a Z-axis stepper motor, a ball screw, and a drive controller; The closed-loop control process includes: after the adjustment is completed, the image acquisition and preprocessing, gap size calculation and deviation level judgment process are re-executed. When the absolute value of the deviation value after adjustment is less than or equal to the first absolute value threshold, the adjustment is determined to be effective and the subsequent calibration process is entered. Otherwise, the number of adjustments is recorded and the adjustment strategy is rematched. If the number of adjustments reaches the preset maximum number of retries and still does not meet the target, the alarm unit is triggered to issue an alarm signal.

7. The automatic control method for a 3D printer forming base plate based on machine vision according to claim 6, characterized in that, When the target device is being calibrated for the first time or is identified as a key monitoring object, the drive nozzle is moved to the four corners and the center of the molding base plate, totaling five calibration points. Image acquisition, preprocessing, deviation judgment and adjustment verification are performed on each calibration point in sequence. When the gap of all calibration points meets the standard, the entire base plate gap calibration is deemed complete. If a calibration point fails to meet the standard after multiple adjustments, the flatness of the base plate is determined to be abnormal and an alarm is triggered.

8. The automatic control method for a 3D printer forming base plate based on machine vision according to claim 7, characterized in that, During the printing process, the visual acquisition unit acquires a gap image every preset number of printing layers or a preset threshold time interval, and repeatedly executes the image preprocessing, gap size calculation and deviation level judgment process. Continue printing as long as the gap value is within the target threshold range; When the gap value exceeds the threshold, dynamic compensation is performed; If the dynamic compensation fails to restore the acceptable gap after a preset number of attempts, an alarm will be triggered and printing will be paused.

9. The automatic control method for a 3D printer forming base plate based on machine vision according to claim 8, characterized in that, The alarm unit uses a combination of buzzer sound and LED indicator flashing alarm. When there is an abnormality in image acquisition, ineffective adjustment, or abnormal flatness of the base plate, the buzzer will sound continuously and the LED indicator will flash red.

10. An automatic control system for a 3D printer forming base plate based on machine vision, characterized in that, The automatic control method for a 3D printer forming base plate based on machine vision, as described in any one of claims 1 to 9, comprises: The initialization module is configured to initiate calibration and control parameter settings for the target device; The acquisition and processing module is configured to acquire an image of the gap between the nozzle of the target device and the forming base plate through the vision acquisition unit, and to perform noise reduction and enhancement preprocessing on the image; The decision module is configured to first use the Canny edge detection algorithm to extract the upper and lower edges of the gap between the lower end of the nozzle and the forming base plate from the preprocessed image, and then convert the edge pixel distance into the actual gap size by combining the preset camera calibration parameters. The average value of the calculation results of a preset number of consecutive valid images is taken as the final actual gap value. Then, the image validity verification and gap deviation level identification are completed sequentially through multi-level condition judgment. The optimal Z-axis displacement adjustment strategy is matched by combining the adjustment step rules corresponding to the deviation level and historical adjustment records. The verification module is configured to drive the execution unit to perform Z-axis displacement adjustment according to the adjustment strategy, and verify the adjustment effect through visual inspection to form a closed-loop control.