Four-channel handheld code spraying gun and control method thereof

By combining a four-channel handheld inkjet gun with multi-sensor data synchronization and dynamic parameter adjustment, the problem of coverage and positioning of handheld inkjet printing equipment on complex surfaces has been solved, achieving high-precision printing effects that are adaptable to multiple materials, thereby improving production efficiency and inkjet printing quality.

CN121004840APending Publication Date: 2025-11-25GUANGDONG POWER GRID CO LTD DONGGUAN POWER SUPPLY BUREAU
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511480960.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-16
Publication Date
2025-11-25

AI Technical Summary

Technical Problem

Existing handheld inkjet printers suffer from limited coverage, printing blind spots, and positioning deviations when operating at short distances. They are also unable to adapt to complex surfaces and lack intelligent adaptation mechanisms, resulting in poor printing quality and low production efficiency.

Method used

It employs a four-channel handheld inkjet printer, combined with a gyroscope, distance sensor, and vision camera for real-time data acquisition. A hardware synchronization mechanism ensures data synchronization, and the inkjet printing parameters are dynamically adjusted using a data preset layer and an analysis layer to achieve material self-adaptation and high-precision printing.

Benefits of technology

It improves printing coverage and clarity, reduces positioning deviation, adapts to various material requirements, simplifies operation processes, and enhances production efficiency and coding quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121004840A_ABST
    Figure CN121004840A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of code spraying guns, in particular to a four-channel handheld code spraying gun and a control method thereof.The four-channel handheld code spraying gun comprises a lower computer and an upper computer, and the lower computer comprises a holding handle, a code spraying body installed on the holding handle, a display screen arranged on the code spraying body and a gyroscope arranged in the code spraying body; a state signal indicating lamp is arranged at the top end of the code spraying body, a spraying head is arranged on one side of the code spraying body, distance sensors are arranged at the left end and the right end of the spraying head, and a visual camera attached to the side edge of the spraying head is arranged on the side edge of the code spraying body. Due to the 15-degree inclined design of the spray head and the four-channel spray hole layout, the 10cm short-distance spray coverage area is increased by more than 40%, and the spray printing blind areas of corners and concave-convex surfaces are effectively improved; meanwhile, the inclination angle guides the liquid flow direction, rebound interference is reduced, the distribution uniformity of ink droplets is improved by 35%, the ink flying rate is reduced, and the code spraying definition is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of code spraying, in particular to a four-channel handheld code spraying gun and a control method thereof. BACKGROUND

[0002] In the field of industrial production and commodity packaging, handheld code spraying equipment is widely used in various product identification, traceability code printing and production date marking scenarios due to its flexible and convenient characteristics. However, the existing handheld code spraying technology faces many challenges in actual application: on the one hand, the vertical spraying design of the nozzle has the problems of limited coverage area and difficulty in adapting to complex surfaces when working at a short distance, which easily leads to blind areas in the corners and recesses, affecting the integrity of the spraying; on the other hand, the positioning deviation problem in the code spraying process is prominent, affected by factors such as the hand-holding stability of the operator, the surface characteristics of different materials (such as flatness, reflectivity, and ink absorption difference), and the coordination accuracy of sensor data, the positioning deviation of traditional handheld code spraying equipment is generally as high as ±2-3mm, which is difficult to meet the high-precision code spraying requirements, not only causing the offset and blur of the sprayed content, but also possibly leading to unqualified batch product identification, increasing production cost and rework rate.

[0003] In addition, the traditional equipment lacks an intelligent adaptation mechanism for different materials, and the same code spraying parameters cannot meet the spraying requirements of various materials such as plastic, paper and metal, so the operator needs to frequently manually adjust the parameters, which is low in efficiency and highly dependent on operating experience. At the same time, there are problems such as time asynchronization and abnormal data interference in the process of multi-sensor data collection, which further aggravates the positioning deviation and limits the application range and performance improvement of handheld code spraying equipment. Therefore, there is an urgent need for a new type of handheld code spraying technology with optimized nozzle structure, intelligent positioning calibration and material self-adaptation function to solve the pain points of existing technology and improve code spraying quality and production efficiency. SUMMARY

[0004] In view of the deficiencies of the prior art, the present application provides a four-channel handheld code spraying gun and a control method thereof, thereby solving the technical problems mentioned in the background art.

[0005] To achieve the above purpose, the present application is implemented by the following technical scheme: a four-channel handheld code spraying gun, comprising a lower computer and an upper computer, the lower computer comprising a holding handle and a code spraying body mounted on the holding handle, a display screen being provided on the back of the holding handle, a gyroscope being provided in the code spraying body, a status signal indicator light being provided at the top end of the code spraying body, a nozzle being provided on one side of the code spraying body, distance sensors being provided on the left and right ends of the nozzle, and a vision camera being provided on the side of the code spraying body and adhering to the side of the nozzle;

[0006] The control system of the upper computer comprises:

[0007] Data preset layer, for pre-storing key parameters including optimal spray distance D0, tilt threshold α0 and shake threshold S0 according to material type, providing reference for deviation judgment;

[0008] Data collection layer, for collecting data in real time through the distance sensor, visual camera and gyroscope, and adopting hardware synchronization mechanism for time stamp alignment to ensure data synchronization;

[0009] Data analysis layer, for calculating distance deviation P1, attitude deviation P2, visual deviation P3 and total deviation P based on the parameters of the data preset layer and real-time data of the data collection layer, and triggering avoidance strategy.

[0010] Optionally, the spray head is provided with linearly arranged spray holes, the spray head is provided with linearly arranged spray holes, the spray head is arranged downwardly at an angle of 15° relative to the horizontal line, one end of the spray hole is connected with a communication pipeline, and an electromagnetic valve is arranged on the communication pipeline.

[0011] Optionally, the inside of the holding handle is provided with a battery, an ink cartridge is mounted on the code body, and the ink cartridge is connected with the spray hole through a ink pumping pump and a communication pipeline.

[0012] On the other hand, a control method is provided, which is executed by any of the four-channel handheld code spray guns, and includes the following steps:

[0013] Step S1: initialization and parameter preset stage

[0014] Material type identification and parameter loading: starting the code spray gun, scanning the surface of the material to be sprayed by the visual camera, and loading the parameters of the data preset layer;

[0015] Step S2: multi-sensor data collection

[0016] Collecting data based on the distance sensor, visual camera and gyroscope:

[0017] The distance sensor collects the spray distance D in real time;

[0018] The gyroscope extracts the gyroscope tilt angle α and the horizontal shake displacement S;

[0019] The visual camera outputs the visual tilt angle α_vis and the coordinate deviation X;

[0020] Data synchronization processing: filtering data through time stamp alignment and abnormality judgment;

[0021] Step S3: deviation calculation and strategy execution stage

[0022] Multi-dimensional deviation calculation:

[0023] Distance deviation P1 = |D - D0| × k1, wherein k1 is a material correction coefficient;

[0024] Posture deviation P2 = √[(D × tan α)² + S²];

[0025] Visual deviation P3 = |α_vis - α| + X;

[0026] Total deviation P = √(P1² + P2² + P3²);

[0027] Graded alarm and dynamic correction: trigger adjustment according to deviation over-limit;

[0028] Step S4: printing execution and data feedback stage

[0029] Printing operation and real-time adjustment: perform printing based on the inclination design of the nozzle, ensuring that P does not exceed the material threshold;

[0030] Data feedback and parameter optimization: record deviation values and optimize preset layer parameters.

[0031] Optionally, the avoidance strategy triggered by the data analysis layer includes graded alarm:

[0032] When P1 is over-limit, the status signal indicator light flashes green, and the display screen prompts "too close / distance too far" and displays the difference between D and D0;

[0033] When P2 is over-limit, the display screen displays an arrow to prompt adjustment, and when the inclination angle α > 5°, the printing is forced to pause, and the ink pump stops working;

[0034] When P3 is over-limit, switch the algorithm of the visual camera to high-precision mode, prompt the alignment mark, reduce the printing speed from 5 cm / s to 3 cm / s, and adjust the ink amount through the electromagnetic valve control;

[0035] When the total deviation P is over-limit, pause the printing and prompt adjustment, and if it is over-limit for 3 consecutive times, automatically enable the simple mode and relax the precision to ±1.5 mm.

[0036] Optionally, the filtering data through timestamp alignment and abnormality determination processing includes:

[0037] Add a unified timestamp to the data collected by each sensor, and modify it to the time when the trigger signal is sent through delay compensation.

[0038] Optionally, the filtering data through timestamp alignment and abnormality determination processing includes:

[0039] For the data collected by the distance sensor: if the current data and the previous frame difference > 2mm and 2 frames jump in succession, mark it as invalid, call the average value of the previous 5 frames to replace it;

[0040] For the data collected by the gyroscope: adopt 5-frame sliding window filtering, eliminate jitter data exceeding the mean value ± 3 times the standard deviation, and automatically calibrate zero drift when stationary;

[0041] For the data collected by the vision camera: when the feature matching degree < 60% or the brightness exceeds the gray scale range of 50-200, mark the vision data as invalid, and temporarily switch to the data collected by the gyroscope priority mode.

[0042] Compared with the prior art, the beneficial effects are:

[0043] 1. The 15° inclination design of the nozzle and the four-channel nozzle layout increase the coverage area of 10cm short-distance spraying by more than 40%, effectively improving the printing blind area of corners, concave and convex surfaces; at the same time, the inclination angle guides the liquid flow direction, reduces the rebound interference, and improves the droplet distribution uniformity by 35%, reduces the ink flying rate, and improves the code clarity.

[0044] 2. The data preset layer presets different parameters for different materials (plastic, paper, metal, etc.), and the data analysis layer dynamically adjusts the deviation calculation weight according to the material characteristics (such as rough material focusing on distance deviation, high-reflectivity material weakening visual deviation), so that the equipment can adapt to the code printing needs of 10+ types of materials, reduce batch defects caused by material differences, and is especially suitable for small and medium batch, multi-variety production scenes. The surface of the gun body is made of anti-slip rubber material combined with the ergonomic design of the thumb position, which reduces the hand-held jitter amplitude by 60%; at the same time, through real-time visual prompts (such as distance difference display, inclination direction arrow), the operator can quickly master the use skills without professional training, and the new employee's on-the-job time is shortened by 70%. The data preset layer automatically matches the best key parameters such as spray distance and inclination threshold according to the material type, and adjusts the dynamic weight through the data analysis layer (such as increasing the distance deviation weight for rough materials), realizes the "select and use" of 10+ types of materials, and does not need to manually adjust repeatedly. The parameter setting time of a single task is shortened from 15 minutes to 30 seconds. BRIEF DESCRIPTION OF DRAWINGS

[0045] The above description is only a summary of the technical solutions of the present application. In order to more clearly understand the technical means of the present application and can be implemented according to the content of the specification, the following will be described in detail with the preferred embodiments of the present application and with the help of the drawings.

[0046] Figure 1 It is a schematic diagram of the overall structure of the present application;

[0047] Figure 2 It is a schematic diagram of the cross-sectional structure of the front of the present application;

[0048] Figure 3 Structure diagram of the top of the present application;

[0049] Figure 4 Structure diagram of the top of the present application;

[0050] The reference signs are as follows

[0051] 1. holding handle; 2, switch; 3, code spraying body; 4, nozzle; 5, distance sensor; 6, visual camera; 7, ink cartridge; 8, ink pumping pump; 9, electromagnetic valve; 10, status signal indicator; 11, battery; 12, gyroscope; 13, display screen. DETAILED DESCRIPTION

[0052] The preferred embodiments of the present application will be described in detail with reference to the accompanying drawings, however the present application can be realized in various different forms, and therefore the present application is not limited to the embodiments described below;

[0053] Embodiment 1

[0054] This embodiment introduces a four-channel handheld code spraying gun, the code spraying gun comprising an upper computer and a lower computer;

[0055] Please refer to Figures 1-3 The lower computer comprises a holding handle 1 and a code spraying body 3 mounted on the holding handle 1, and a switch 2 is arranged at the thumb position of the holding handle 1, and a display screen 13 is mounted on the back of the holding handle 1, and a main control board (STM32H7) is arranged in the display screen 13, and the outer surface of the holding handle 1 is covered with a layer of anti-slip rubber material, by covering the outer surface of the holding handle 1 with a layer of anti-slip rubber material, it can be ensured that the operator can prevent shaking when holding the code, so that the whole device will not slide due to the smooth surface of the holding handle 1 during holding, thereby causing the phenomenon of unstable holding;

[0056] The nozzle 4 is provided on one side of the code spraying body 3, the linearly arranged nozzle holes are provided in the nozzle 4, the nozzle 4 is designed to be inclined to hold the handle 1 at an angle of 5° to the distance sensor 5, the nozzle 4 is arranged to be inclined downward at an angle of 15° to the horizontal line, which can adapt to the 10cm short-distance spraying angle of the state signal indicator 10, ensure the spraying effect, and the spraying at a larger angle can expand the coverage area. Compared with vertical spraying, the liquid flow can cover a wider area when the nozzle 4 is arranged to be inclined downward at an angle of 15°. The arrangement of the inclination angle can guide the flow field direction and avoid the interference caused by the rebound of the liquid flow. When the state signal indicator 10 sprays at a distance of 10cm, the inclination angle of 15° can better control the direction and trajectory of the liquid flow, so that it is more evenly distributed on the surface of the spraying object, and the coverage effect of the flow field on different shaped surfaces is improved. The nozzle 4 is arranged to be inclined downward at an angle of 15°, which can change the motion trajectory of the liquid droplets, so that some corners or concave-convex surfaces that are difficult to reach by vertical spraying can be covered when the state signal indicator 10 sprays at a distance of 10cm, the blind area of spraying is reduced, and the uniformity and integrity of the spraying are improved.

[0057] As can be clearly observed from the switch 2 in the drawing, one end of the linearly arranged nozzle holes is connected to a communication pipeline, an ink extraction pump 8 is fixedly connected to one end of the communication pipeline, the ink extraction pump 8 extracts ink, an electromagnetic valve 9 is sleeved on the outer surface of the electromagnetic valve 9 at the connection between the ink extraction pump 8 and the electromagnetic valve 9, the electromagnetic valve 9 can independently control the ink in each nozzle hole, can adjust the ink ejection amount in each nozzle hole, and the electromagnetic valve 9 is controlled by a control system;

[0058] An ink cartridge 7 is connected to one end of the ink extraction pump 8, and an ink sensor is arranged in the ink cartridge 7, the signal transmission of the ink sensor is received by a state signal indicator 10 on the top of the code spraying body 3, when the ink in the ink cartridge 7 is used up, the state signal indicator 10 will flash red, thereby reminding the operator to add ink to the ink cartridge 7; and a gyroscope 12 is arranged in the code spraying body 3.

[0059] As can be observed from the drawing, Figure 1 It can be observed that distance sensors 5 are arranged at the left and right ends of the nozzle 4, and the surfaces of the distance sensors 5 are flush with the surface of the nozzle 4, so that the distance between the positioning distance sensor 5 and the spraying object will be more accurate, and the distance sensor 5 will continuously collect the distance between the distance sensor 5 and the spraying object;

[0060] A vision camera 6 is installed on the side of the inkjet printer body 3, contacting the side of the printhead 4. The vision camera 6 uses the vision of an industrial camera with a resolution of 2000×2000 pixels. Compared with a camera with a resolution of 1000×1000 pixels, it can more accurately identify the edges and corners of the target object, reducing positioning deviation by more than 50%. The high frame rate of the vision camera 6 allows for more real-time tracking of the target object's movement, timely adjustment of the inkjet printing position, and avoids positioning deviations caused by the movement of the target object.

[0061] The host computer includes a control system, which comprises:

[0062] The data preset layer, in the initialization phase, is the system's "basic rule base," used to pre-store key parameters based on material type, including optimal spray distance D0, tilt threshold α0, and sway threshold S0, providing a benchmark for deviation judgment.

[0063] The data collection layer is used to collect data in real time through the distance sensor 5, vision camera 6 and gyroscope 12, and to use a hardware synchronization mechanism to align timestamps to ensure data synchronization.

[0064] The data analysis layer is used to calculate the distance deviation P1, attitude deviation P2, visual deviation P3 and total deviation P based on the parameters of the data preset layer and the real-time data of the data collection layer, and to trigger the avoidance strategy.

[0065] Furthermore, the key parameters can be set in the following ways: if the material type is determined to be microplastic after being scanned by vision camera 6, the parameters set are: optimal spray distance D0 = 8 ± 1 mm; visual tilt threshold α0 ≤ 2°; gyroscope sway threshold S0 ≤ 0.3 mm.

[0066] If the type of the object to be sprayed, as determined by the vision camera 6, is paper, the optimal spray distance D0 is 6±1mm; the visual tilt threshold α0≤3° (slightly larger tilt is allowed); the gyroscope sway threshold S0≤0.5mm. The core reason is that it is determined by the physical characteristics of the paper, the coding requirements, the visual recognition logic, and the actual application scenario. The essence is to find the optimal balance between "recognition stability" and "operational flexibility" to adapt to the characteristics of the paper.

[0067] If the type of object to be sprayed, as determined by the vision camera 6, is metal, the optimal spray distance D0 = 5 ± 1 mm (close to the surface to avoid ink splatter); the visual tilt threshold α0 ≤ 1.5° (for high precision requirements); and the gyroscope sway threshold S0 ≤ 0.2 mm.

[0068] Specifically, during the inkjet printing process, positioning deviations originate from three independent dimensions:

[0069] Distance deviation P1: Vertical distance error between the spray gun and the object surface (unit: mm)

[0070] Posture deviation P2: Equivalent displacement error caused by spray gun tilting and shaking (unit: mm)

[0071] Visual bias P3: Coordinate and angle errors caused by camera recognition (unit: mm)

[0072] Typically, monitoring three threshold dimensions separately is required, which is complex. This embodiment combines the errors of three different physical dimensions into a dimensionless total deviation P through a mathematical model, and sets a unified threshold standard for different materials, greatly simplifying the operation and judgment.

[0073] The following example, using metallic materials, demonstrates the vector synthesis process from "individual thresholds" to "comprehensive thresholds":

[0074] Step 1: Set the threshold values ​​for each item (based on material properties)

[0075] Spray distance deviation P1 ≤ 1mm (for smooth metal surfaces, high requirements)

[0076] Equivalent tilt displacement: When the optimal spray distance D0 = 5mm and the maximum allowable tilt angle α = 1.5°, the equivalent displacement is 0.13mm after geometric conversion (D0 × tanα).

[0077] Shaking deviation S ≤ 0.2mm (high stability is required for metal inkjet printing)

[0078] Step 2: Calculate the total deviation P using vector synthesis.

[0079] Formula: P = √(P1² + P2² + P3²) (i.e., Euclidean distance in three-dimensional space)

[0080] Substituting the values: P = √(1² + 0.13² + 0.2²) ≈ √1.0569 ≈ 1.03mm

[0081] Step 3: Rounding down the project to set the final threshold

[0082] The calculated value of 1.03mm is rounded down to ≤1.0mm and used as the total deviation threshold for metal inkjet printing.

[0083] And so on.

[0084] For plastic types: the final single threshold obtained by vector synthesis is ≤1.1mm.

[0085] For paper type: the final single threshold after vector synthesis is ≤1.2mm.

[0086] The following section introduces the data synchronization mechanism.

[0087] Timestamp alignment (accuracy ±1ms) is used to ensure that distance, attitude, and visual data at the same moment can be correlated and analyzed. The sampling frequencies of the handheld inkjet printer's distance sensor (100Hz), gyroscope (200Hz), and vision camera (30Hz) differ significantly. Relying solely on software timestamps can easily lead to "data misalignment," necessitating hardware synchronization to force alignment of sampling times.

[0088] Unified clock source: A high-precision RTC real-time clock (accuracy ±5ppm) is integrated on the main control board (STM32H7) to allocate the same clock signal to the three sensors, ensuring that the "time base is consistent" for each sensor and avoiding time deviation caused by independent clock drift (the original solution did not solve the problem of clock source difference).

[0089] Trigger signal linkage: Set "synchronous trigger pulse" (frequency 30Hz, matching the minimum sampling frequency of the vision camera), and the trigger signal is sent to three sensors simultaneously:

[0090] Distance sensor 5: Upon receiving the trigger signal, it immediately acquires one spray distance data (abandoning the original 100Hz continuous sampling and retaining only the trigger time-varying data to reduce redundancy).

[0091] Gyroscope 12: After receiving the trigger signal, it outputs the tilt angle and wobbling displacement at the current moment (the instantaneous value at the trigger moment is extracted from the 200Hz sample and the data is ensured to be complete by interpolation algorithm).

[0092] Vision Camera 6: The trigger signal is directly used as the photo capture trigger signal, ensuring that the camera captures images at the same time as other sensors.

[0093] Delay compensation: Measure the “signal response delay” of each sensor in advance (e.g., the distance sensor needs 0.2ms to receive the trigger signal and output data, and the vision camera needs 0.8ms). Preset the “delay compensation value” in the main control board and uniformly correct the timestamp of the output data of each sensor to the “trigger signal emission time”. The final synchronization accuracy is improved to ±0.1ms (1 / 10 of the original solution of ±1ms).

[0094] Abnormal data filtering: Remove jump values ​​of the sensor affected by oil / reflection (if the single jump value of the distance sensor is greater than 2mm, it is marked as invalid).

[0095] The following section introduces the multi-dimensional deviation judgment and dynamic correction functions of the data analysis layer.

[0096] The data analysis layer is the core decision-making unit. By integrating preset parameters with real-time collected data, it calculates the total deviation and triggers avoidance strategies (hints and adjustments).

[0097] 1. Deviation Calculation Model (Based on Three-Layer Data Fusion)

[0098] The calculation logic for the total positioning deviation P:

[0099] P = √(P1² + P2² + P3²)

[0100] in:

[0101] P1 (distance deviation data source is distance sensor 5) = |D-D0|×k1 (k1 is the material correction coefficient: k1=1.2 for rough materials, k1=1.0 for smooth materials).

[0102] P2 (attitude deviation data source is gyroscope 12) = √[(D×tanα)²+S²] (α is the tilt angle of the gyroscope, S is the horizontal sway displacement).

[0103] P3 (visual deviation data source is visual camera 6) = |α_vis-α|+X (α_vis is the visual recognition tilt angle, X is the visual positioning coordinate deviation).

[0104] Note that α is the gyroscope tilt angle, S is the horizontal sway displacement, α_vis is the visual recognition tilt angle, and X is the visual positioning coordinate deviation, all of which are collected from the distance sensor 5, the visual camera 6, and the gyroscope 12.

[0105] If P1 exceeds the preset layer parameters, the status signal indicator 10 on the inkjet printer body 3 will flash green, the display screen will prompt "distance too close / too far", and display the current difference between D and D0. At this time, the operator can adjust the distance between them through the prompts on the display screen, so as to make the spraying positioning more accurate.

[0106] If P2 exceeds the preset parameters, the display screen on the inkjet printer 3 will show a left or right arrow prompt. The operator can use this guidance to further complete the spraying positioning and prevent the positioning deviation from being too large. When P2 exceeds the preset value by more than 5°, the spraying will be forcibly stopped, and the ink pump 8 in the inkjet printer 3 will be forcibly stopped to extract ink. Even if the operator keeps pressing the switch 2, there will be no spraying operation.

[0107] If P3 exceeds the preset layer parameters, the vision algorithm will automatically switch (from fast recognition to high-precision recognition mode); prompt "align with positioning mark" (if the material has a preset positioning point); the inkjet body 3 will reduce the printing speed (from 5cm / s to 3cm / s) to allow sufficient recognition time for the vision system. The main control board (STM32H7) controls the solenoid valves on the connecting pipes connected to the nozzles to further control the amount of ink passing through each connecting pipe, thereby changing the printing speed.

[0108] If the total deviation P exceeds the parameters set in the preset layer, printing will be forcibly paused and "Please adjust posture / distance" will be displayed; the current deviation data will be recorded (for subsequent parameter optimization); if the deviation exceeds the limit 3 times in a row, "Simplified Mode" will be automatically called to relax the accuracy to ±1.5mm (relaxing the accuracy but ensuring that it can be recognized).

[0109] The positioning deviation can be reduced to ±0.5~1mm using the above method.

[0110] The analysis layer dynamically adjusts the calculation weights to account for the differences in the properties of different materials.

[0111] For rough materials (such as stone): increase the weight of distance deviation P1 (because the unevenness of the surface easily amplifies the influence of distance), and tighten the gyroscope threshold (S≤0.2mm).

[0112] Highly reflective materials (such as metals): reduce visual bias (P) 33 The weight of gyroscope data is increased (because reflection can easily lead to recognition errors);

[0113] For flexible materials (such as films): relax the spray distance threshold (D±1.5mm), but strictly control the tilt angle (α≤1.5°) to avoid aggravating material wrinkles and deviations.

[0114] In summary: Initialization: Operator selects material type → Data preset layer loads corresponding parameters (D0, α threshold, etc.);

[0115] Real-time data acquisition: Distance sensors, gyroscopes, and vision cameras simultaneously upload data to the analysis layer;

[0116] Deviation calculation: P1, P2, and P3 are calculated according to the model in the analysis layer, and the total deviation P is synthesized.

[0117] Strategy execution: Alarms and prompts are triggered based on the type of deviation, allowing operators to make adjustments;

[0118] Data feedback: After printing is completed, the system records the actual deviation value and optimizes the preset layer parameters (if P1 exceeds the standard multiple times for a certain material, its D0 will be automatically reduced by 0.5mm).

[0119] Through the collaboration of the three-tier architecture, the following can be achieved:

[0120] Positioning deviation control: reduced from ±2-3mm in traditional handheld systems to ±0.5-1mm (meeting the needs of most industrial marking).

[0121] Lowered operating threshold: No professional training is required; the system guides operators through real-time prompts for adjustments.

[0122] Improved material adaptability: Parameters are adaptive for 10+ common materials, reducing batch defects caused by material differences.

[0123] Example 2

[0124] Please refer to Figure 4 As shown, this embodiment provides a control method executed by any of the four-channel handheld inkjet printers described in Embodiment 1, which has the same function and beneficial effects, and includes the following steps:

[0125] Step S1: Initialization and Parameter Preset Phase

[0126] Material type identification and parameter loading: The operator starts the inkjet gun and scans the surface of the material to be printed through the vision camera 6, loading the parameters of the preset data layer;

[0127] Step S2: Multi-sensor data acquisition

[0128] S21: Data collected based on the distance sensor 5, vision camera 6, and gyroscope 12:

[0129] Distance sensor 5: After receiving the 30Hz trigger signal, it collects the spray distance D in real time (accuracy ±0.1mm), abandons the 100Hz continuous sampling, and only retains the trigger moment data.

[0130] Gyroscope 12: Extracts the tilt angle α and horizontal sway displacement S at the trigger moment from the 200Hz sampling, and completes the data through an interpolation algorithm.

[0131] Vision Camera 6: The trigger signal directly drives the image capture, acquiring a 2000×2000 pixel image, identifying target edges and locating markers, and outputting the visual tilt angle α_vis and coordinate deviation X;

[0132] S22: Data synchronization processing: Filtering data through timestamp alignment and anomaly detection;

[0133] S221: Timestamp Alignment

[0134] A uniform timestamp (accuracy ±0.1ms) is added to the data from each sensor, and the data is corrected to the moment the trigger signal is emitted through delay compensation (e.g., 0.2ms delay for distance sensor and 0.8ms delay for camera).

[0135] S222: Sensor anomaly detection

[0136] Distance sensor 5: If the difference between the current data and the previous frame is greater than 2mm and there is a jump in 2 consecutive frames, it is marked as invalid and the average value of the previous 5 frames is used as a replacement.

[0137] Gyroscope 12: Employs a 5-frame sliding window filter to remove jitter data exceeding the mean ± 3 times the standard deviation, and automatically calibrates zero drift when stationary (corrected when tilt angle drift > 0.5° / min).

[0138] When the feature matching degree of visual camera 6 is less than 60% or the brightness exceeds the gray level range of 50-200 (where 0 represents pure black and 255 represents pure white), the visual data is marked as invalid and temporarily switched to the data priority mode acquired by gyroscope 12.

[0139] S223: Material property adaptation filtration

[0140] Paper products: Distance fluctuation is allowed to be ≤1.5mm (to accommodate wrinkles), and the jump threshold is relaxed from 2mm to 1.5mm;

[0141] Metallic materials: Two consecutive frames of reflective abrupt changes are required to determine an anomaly, in order to avoid accidental deletion of data due to single interference.

[0142] Step S3: Deviation Calculation and Strategy Execution Phase

[0143] S31: Multidimensional Deviation Calculation

[0144] Distance deviation P1: P1=|D-D0|×k1 (k1=1.0 for flat materials, k1=1.2 for rough materials).

[0145] Attitude deviation P2: P2 = √[(D × tanα)² + S²];

[0146] Visual bias P3: P3 = |α_vis - α| + X;

[0147] Total deviation P: P = √(P1² + P2² + P3²).

[0148] S32: Graded alarm and dynamic correction: Adjustment is triggered based on deviation exceeding the limit;

[0149] When P1 exceeds the limit, the status signal indicator 10 flashes green, and the display screen 13 prompts "distance too close / too far" and displays the difference between D and D0;

[0150] When P2 exceeds the limit, the display screen 13 shows an arrow prompting to adjust the posture, and when the tilt angle α > 5°, printing is forcibly paused and the ink pump 8 stops working;

[0151] When P3 exceeds the limit, the algorithm of vision camera 6 is switched to high precision mode, prompting the alignment mark, the printing speed is reduced from 5cm / s to 3cm / s, and the ink volume is adjusted by solenoid valve 9.

[0152] When the total deviation P exceeds the limit, printing will be paused and an adjustment prompt will be given. If the deviation exceeds the limit three times in a row, the simplified mode will be automatically activated, which will relax the accuracy to ±1.5mm.

[0153] Step S4: Printing Execution and Data Feedback Stage

[0154] S41: Printing operation and real-time adjustment: Printing is performed based on the tilt design of the printhead 4 to ensure that P does not exceed the material threshold.

[0155] The four-channel nozzles independently control the ink volume, and the 15° tilted printhead expands the coverage area when spraying at a short distance of 10cm, avoiding ink splatter and blind spots.

[0156] Distance sensor 5 monitors the spray distance in real time, gyroscope 12 corrects hand shake, and vision camera 6 dynamically tracks the target position to ensure P≤1.1mm (plastic) / 1.2mm (paper) / 1.0mm (metal).

[0157] S42: Data Feedback and Parameter Optimization: Record deviation values ​​and optimize preset layer parameters;

[0158] After printing is completed, the system records the actual deviation value and material parameters. If P1 of a certain material exceeds the standard multiple times, the D0 threshold is automatically lowered (e.g., D0 for metals is adjusted from 5mm to 4.5mm) and the preset layer database is optimized.

[0159] Finally, it should be noted that the above embodiments are merely examples for clearly illustrating the present invention and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. A four-channel handheld inkjet printer, comprising a lower-level machine and a upper-level machine, characterized in that, The lower unit includes a grip handle (1) and a coding body (3) mounted on the grip handle (1). The grip handle (1) has a display screen (13) on its back. The coding body (3) has a gyroscope (12) inside. The top of the coding body (3) has a status signal indicator light (10). The coding body (3) has a printhead (4) on one side. The printhead (4) has a distance sensor (5) on both the left and right ends. The coding body (3) has a vision camera (6) attached to the side of the printhead (4). The host computer includes a control system, which comprises: The data preset layer is used to pre-store key parameters according to the material type, including the optimal spray distance D0, tilt threshold α0 and sway threshold S0, to provide a benchmark for deviation judgment; The data collection layer is used to collect data in real time through the distance sensor (5), vision camera (6) and gyroscope (12), and to use a hardware synchronization mechanism to align the timestamps to ensure data synchronization; The data analysis layer is used to calculate the distance deviation P1, attitude deviation P2, visual deviation P3 and total deviation P based on the parameters of the data preset layer and the real-time data of the data collection layer, and to trigger the avoidance strategy.

2. The four-channel handheld inkjet printer as described in claim 1, characterized in that, The nozzle (4) is provided with a linear arrangement of nozzle holes. The nozzle (4) is inclined downward at 15° relative to the horizontal line. One end of the nozzle hole is connected to a connecting pipe, and a solenoid valve (9) is provided on the connecting pipe.

3. A four-channel handheld inkjet printer as described in claim 1, characterized in that, The handle (1) is equipped with a battery (11), and the ink cartridge (7) is installed on the inkjet body (3). The ink cartridge (7) is connected to the nozzle through an ink pump (8) and a connecting pipe.

4. A control method, executed by a four-channel handheld inkjet printer according to any one of claims 1 to 3, characterized in that, Includes the following steps: Step S1: Initialization and Parameter Preset Phase Material type identification and parameter loading: Start the inkjet printer, scan the surface of the material to be printed through the vision camera (6), and load the parameters of the preset data layer; Step S2: Multi-sensor data acquisition Data is collected based on the distance sensor (5), vision camera (6), and gyroscope (12): Distance sensor (5) collects spray distance D in real time; The gyroscope (12) extracts the tilt angle α and horizontal sway displacement S of the gyroscope; The visual camera (6) outputs the visual tilt angle α_vis and the coordinate deviation X; Data synchronization processing: Filtering data through timestamp alignment and anomaly detection; Step S3: Deviation Calculation and Strategy Execution Phase Multidimensional deviation calculation: Distance deviation P1 = |D - D0| × k1, where k1 is the material correction factor; Attitude deviation P2 = √[(D × tan α)² + S²]; Visual bias P3 = |α_vis - α| + X; Total deviation P = √(P1² + P2² + P3²). Tiered alarm and dynamic correction: Adjustments are triggered based on deviation exceeding limits; Step S4: Printing Execution and Data Feedback Stage Printing operation and real-time adjustment: Printing is performed based on the tilt design of the printhead (4) to ensure that P does not exceed the material threshold; Data feedback and parameter optimization: Record deviation values ​​and optimize preset layer parameters.

5. The control method as described in claim 4, characterized in that, The avoidance strategies triggered by the data analysis layer include tiered alerts: When P1 exceeds the limit, the status signal indicator (10) flashes green, and the display screen (13) prompts "distance too close / too far" and displays the difference between D and D0; When P2 exceeds the limit, the display screen (13) shows an arrow prompting to adjust the posture, and when the tilt angle α > 5°, the printing is forcibly paused and the ink pump (8) stops working; When P3 exceeds the limit, the algorithm of the vision camera (6) is switched to high precision mode, prompting the alignment mark, the printing speed is reduced from 5cm / s to 3cm / s, and the ink volume is adjusted by the solenoid valve (9). When the total deviation P exceeds the limit, printing will be paused and an adjustment prompt will be given. If the deviation exceeds the limit three times in a row, the simplified mode will be automatically activated, which will relax the accuracy to ±1.5mm.

6. The control method as described in claim 4, characterized in that, The data filtering process involving timestamp alignment and anomaly detection includes: A unified timestamp is added to the data collected by each sensor, and the data is corrected to the time when the trigger signal is issued through delay compensation.

7. The control method as described in claim 4, characterized in that, The data filtering process involving timestamp alignment and anomaly detection includes: For the data collected by the distance sensor (5): if the difference between the current data and the previous frame is greater than 2mm and there is a jump in 2 consecutive frames, it is marked as invalid and the average value of the previous 5 frames is called to replace it; For the data collected by the gyroscope (12): a 5-frame sliding window filter is used to remove jitter data that exceeds the mean ± 3 times the standard deviation, and zero drift is automatically calibrated when the device is stationary; For data collected by the visual camera (6): if the feature matching degree is <60% or the brightness exceeds the gray level range of 50-200, the visual data is invalid and the system is temporarily switched to the data priority mode collected by the gyroscope (12).