Switch socket assembly line state monitoring method based on visual inspection

By setting up a line scan camera and calibration fixture on the switch and socket assembly line, and adapting the scanning speed to the production line cycle, high-precision and high-stability automated inspection is achieved. This solves the problems of low inspection efficiency and low accuracy in existing technologies, and improves the inspection efficiency and product quality of the production line.

CN121576938APending Publication Date: 2026-02-27WENZHOU GUIPAI ELECTRIC APPLIANCE CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511863848.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-11
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

In the existing technology, the detection of switch and socket terminal assembly has problems such as reference offset error, incompatibility between scanning speed and production line cycle, and inability to quickly locate the root cause of error in the detection results, resulting in low detection efficiency and low accuracy, making it difficult to meet the requirements of high precision and high stability.

Method used

By setting the line scan camera lens parallel to the terminal insertion direction, fixing the calibration fixture, calculating the calibration coefficient K, and performing precise measurements based on the baseline L0, combined with the scanning speed and production line cycle time, millimeter-level detection of terminal insertion depth and pin spacing is achieved. Visual recognition and edge detection technologies are used to automatically determine whether the result is qualified or not, and the machine will automatically stop and prompt when the detection result is unqualified.

Benefits of technology

It achieves millimeter-level detection accuracy for terminal insertion depth and pin spacing, improving the reliability and accuracy of detection results, reducing manual intervention, shortening fault response time, improving the efficiency of full inspection on the production line, and ensuring product quality and electrical safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121576938A_ABST
    Figure CN121576938A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of visual inspection, and particularly discloses a switch socket assembly line state monitoring method based on visual inspection, which comprises the following steps: S1, enabling a lens center line to coincide with a terminal path, and setting a scanning speed based on an assembly line; s2, the number of pixels is measured, a calibration coefficient is calculated, a datum line is preset in the datum plane, the vertical distance between the edge of the top end of the terminal and the datum line is recognized, and the actual insertion depth of the terminal is calculated; s3, collecting a side image of the terminal, and setting a top edge point based on an edge image; and S4, measuring a vertical pixel distance between a top edge point in the edge image and the reference line, converting the vertical pixel distance into an actual depth, calculating an error, and detecting a qualified rate. According to the scheme, the millimeter-level detection precision is realized through standardized calibration coefficient and datum line setting, the scanning speed adaptation logic is established, and the universality of different scenes is enhanced; and error judgment is quantified and shutdown early warning is linked, so that the fault response time is shortened, and the full-inspection efficiency 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 visual detection, in particular to a switch socket assembly pipeline state monitoring method based on visual detection. BACKGROUND

[0002] With the development of smart home industry, switch socket terminal assembly precision is crucial to electrical safety, and the industry requires terminal insertion depth, pin pitch and other parameter detection precision to reach millimeter level. Current production lines are mostly assembly lines for batch operation, and traditional manual sampling inspection is low in efficiency and strong in subjectivity, which is difficult to meet the full inspection demand, and high-precision automatic detection technology is urgently needed.

[0003] In the prior art, some enterprises use industrial vision solutions to capture terminal images through linear array cameras, extract parameters by combining edge detection, calculate sizes based on physical structures such as shell edges, and calibrate cameras with standard blocks to preliminarily realize automatic quality judgment and improve detection efficiency and consistency.

[0004] However, the existing solutions have obvious deficiencies. First, there is no standardized method for setting reference lines, which relies on manual marking, and measurement errors may be introduced due to differences in operation. Second, there is no adaptation logic for scanning speed, pipeline beat and terminal size, and improper speed selection may cause image stretching or compression, affecting parameter calculation accuracy. Third, the detection result can only determine whether it is qualified or not, and when the qualified rate is abnormal, it is difficult to quickly locate the error source, which requires manual inspection of equipment, prolongs the downtime of the assembly line, and is difficult to meet the high-precision and high-stability detection requirements. SUMMARY

[0005] The purpose of the present application is to provide a switch socket assembly pipeline state monitoring method based on visual detection to solve the above technical problems.

[0006] The purpose of the present application can be achieved by the following technical solutions: The switch socket assembly pipeline state monitoring method based on visual detection comprises the following steps: S1: Set the linear array camera lens parallel to the terminal insertion direction, make the lens center line coincide with the terminal path, set the scanning speed v based on the pipeline, fix the calibration fixture in the terminal assembly area of the conveying belt, and the calibration fixture represents the preset spacing block L; S2: Scan the calibration fixture at the scanning speed v to measure the number of pixels N of the terminal pin pitch in the image, and calculate the calibration coefficient K=L / N; The upper edge of the socket shell terminal hole is recorded as the reference surface, and a reference line L0 is pre-set in the reference surface; The vertical distance s between the terminal top edge and the reference line L0 is recognized by visual recognition, and the actual insertion depth D of the terminal is calculated as s x K; S3: triggering the linear array camera scanning when detecting the terminal being transported to the assembling position, collecting the terminal side image, extracting the profile edge of the terminal side image and recording as the edge image, and setting the top edge point based on the edge image; S4: measuring the vertical pixel distance Dp of the top edge point P and the reference line L0 in the edge image, converting into the actual depth Ds=Dp x K, calculating the error W=|Ds-D| / D, and recording the corresponding switch socket as qualified if the error W<γ, otherwise recording as unqualified, and γ is a preset standard error; When the qualified rate is lower than a preset value, stopping assembling and prompting the staff to check the switch socket assembling line.

[0007] As a further scheme of the present application, in the step S1, the method for setting the scanning speed v based on the line includes: Obtaining the beat TT of the line, setting the scanning speed v=λ x TT, and λ represents a preset adjustment coefficient.

[0008] As a further scheme of the present application, in the step S4, a maximum detection number M is preset, and when the switch socket assembling line completes M products, the reference line L0 is reset.

[0009] As a further scheme of the present application, in the step S3, the method for setting the top edge point based on the edge image includes: Searching the top edge point P in the edge image along the direction perpendicular to the reference line L0, and the top edge point P has no continuous pixel point above and has continuous pixel point below.

[0010] As a further scheme of the present application, in the step S3, a waiting time t is preset, and when the line encoder detects that the terminal is transported to the assembling position and the inserting action is completed, the linear array camera scanning is triggered to collect the terminal side image after the waiting time t.

[0011] As a further scheme of the present application, in the step S2, the vertical distance s of the terminal top edge and the reference line L0 is repeatedly measured Y times, and the average value is taken as the value of the vertical distance s, and Y represents a preset measurement number.

[0012] As a further scheme of the present application, in the step S4, if the switch socket is unqualified for Z times continuously, the line is immediately stopped and the staff is prompted to check, and Z represents a preset abnormal threshold.

[0013] As a further scheme of the present application: in step S4, when the switch socket is recorded as unqualified, the insertion coefficient x=Ds-D of the switch socket terminal is calculated, the average value X of the insertion coefficient is calculated, and the depth adjustment Dx=X*K is calculated. If the depth adjustment Dx>0, the cylinder stroke is adjusted to be shortened by Dx. If the depth adjustment Dx<0, the cylinder stroke is adjusted to be increased by |Dx|.

[0014] The present application has the following advantages: the present scheme establishes a standardized calibration coefficient K by fixing a calibration fixture, and presets a reference line L0 on the upper edge reference surface of the terminal hole of the socket shell, thereby replacing manual marking and eliminating reference deviation errors caused by operation differences. The present scheme realizes accurate conversion between pixel distance and actual size by means of the calibration coefficient, ensures millimeter-level detection accuracy of parameters such as terminal insertion depth and pin pitch, and improves result reliability. In terms of scene adaptability, the present scheme establishes an adaptation logic between scanning speed and terminal size by linkage calibration of the preset scanning speed and the calibration fixture, effectively avoids image stretching or compression distortion, ensures parameter calculation accuracy under different specifications of terminals and different pipeline tempos, and enhances scheme universality. In terms of production guarantee, the present scheme realizes accurate determination by quantifying errors W, automatically triggers a stop prompt when the qualified rate is lower than a preset value, forces timely troubleshooting, greatly shortens fault response time compared with manual troubleshooting, and reduces the quantity of unqualified products. At the same time, the present scheme simplifies the standardized calibration process, replaces manual marking and repeated debugging, significantly improves pipeline full-detection efficiency, and meets batch production requirements. The present scheme does not require complex equipment modification, reduces labor costs while reducing resource waste, improves product yield and production stability, provides reliable technical support for electrical safety of switch sockets, and has outstanding industrial application value. BRIEF DESCRIPTION OF DRAWINGS

[0015] The present application will be further described below in conjunction with the drawings.

[0016] Figure 1 FIG. 1 is a flowchart of a switch socket assembly pipeline state monitoring method based on visual detection according to the present application. DETAILED DESCRIPTION

[0017] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings of the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0018] Please refer to Figure 1 FIG. 1 is a flowchart of a switch socket assembly pipeline state monitoring method based on visual detection according to the present application. S1: Set the lens of the linear array camera parallel to the terminal insertion direction, make the lens center line coincide with the terminal path, set the scanning speed v based on the pipeline, fix the calibration fixture in the terminal assembly area of the conveyor, and the calibration fixture represents the pre-set spacing block L; S2: Scan the calibration fixture at the scanning speed v to form an image, measure the pixel number N of the terminal pin spacing in the image, and calculate the calibration coefficient K=L / N; Mark the upper edge of the terminal hole of the socket shell as the reference surface, and pre-set the reference line L0 in the reference surface; Calculate the actual insertion depth D of the terminal by visual recognition of the vertical distance s of the terminal top edge to the reference line L0, D=s×K; S3: Trigger the linear array camera scanning when the terminal is detected to be transported to the assembly position, collect the side image of the terminal, extract the profile edge of the side image of the terminal and mark it as the edge image, and set the top edge point based on the edge image; S4: Measure the vertical pixel distance Dp of the top edge point P in the edge image to the reference line L0, convert it to the actual depth Ds=Dp×K, calculate the error W=|Ds-D| / D, if the error W<γ, mark the corresponding switch socket as qualified, otherwise mark it as unqualified, and γ is the pre-set standard error; Stop assembling when the qualified rate is lower than the pre-set value and prompt the worker to check the switch socket assembly pipeline.

[0019] It should be noted that the installation and positioning of the linear array camera and the parameter preset work, first of all, through the three-dimensional adjustment platform to carry on the precise calibration to the camera, ensure that the camera lens optical axis and the insertion direction of the terminal of the switch socket keep parallel, eliminate the imaging angle deviation caused by the lens tilt. At the same time, with the help of laser positioning instrument auxiliary adjustment camera space position, make the lens center line and the conveying path of the terminal on the assembly line coincide, the conveying path is the fixed motion trail of the terminal in the assembly process, the center line coincidence design can guarantee the consistency of the image acquisition angle of the terminal side, provide stable imaging basis for subsequent size measurement. Then combined with the production line of switch socket terminal preset running rhythm, comprehensive consideration of the transmission stability and image acquisition integrity of the terminal, initially set the initial scanning speed v of the linear array camera. The value of the initial scanning speed needs to strictly match the rated transmission speed range of the assembly line, both to avoid incomplete image acquisition caused by too fast speed, also prevent the impact of production efficiency caused by too slow speed, ensure the coordination of detection process and production rhythm. Finally, install the detachable standard calibration fixture in the terminal assembly core area of the conveying belt, which is located in the fixed station after the terminal is inserted and assembled, before entering the detection area, which can guarantee the consistency of the calibration process and the actual detection environment. The calibration fixture is made of high-strength wear-resistant alloy material, which has excellent structural stability and size durability. Its surface is processed to form a standard spacing block L corresponding to the pin spacing of the terminal to be detected. The dimensional accuracy of the block L needs to be one order of magnitude higher than the final detection requirement to meet the reference accuracy requirement of millimeter level detection. At the same time, the surface of the fixture is set with high-contrast marking line by laser engraving process. The width and color of the marking line are optimized by optics, which can be quickly recognized and captured by the linear array camera, effectively improving the clarity and recognition efficiency of scanning imaging, and providing reliable physical size reference for the accurate calculation of subsequent calibration coefficient.

[0020] Start the linear array camera to scan the calibration fixture at the preset scanning speed v to ensure that the camera captures images covering the entire area of the standard spacing block L on the calibration fixture. Keep the light intensity uniform and stable during the imaging process to avoid environmental light interference causing image detail blur. Then, through image preprocessing algorithm, the collected calibration image is processed by noise reduction and enhancement, highlighting the edge features corresponding to the block L. Then, the sub-pixel level edge detection technology is used to accurately locate the feature points at both ends of the block L. Through pixel coordinate calculation, the pixel number N between the two points is obtained. Combined with the known actual size L of the standard spacing block, the calibration coefficient K is accurately solved according to the calculation formula K=L / N. This coefficient will be the core basis for the conversion of pixel distance and actual physical size in the future, ensuring the accuracy of size measurement.

[0021] Simultaneously, the system pre-configures the reference plane and reference line, explicitly setting the upper edge of the terminal hole on the socket housing as the measurement reference plane. This reference plane is perpendicular to the terminal insertion direction, possessing stable structural characteristics and repeatability. Within the reference plane, the edge contour is automatically identified using an algorithm. A reference line L0 is pre-set based on the design reference requirements for terminal assembly. The reference line L0 is parallel to the terminal insertion direction and passes through the central symmetrical position of the reference plane, ensuring the uniformity of the measurement reference. During subsequent inspection, a visual recognition algorithm accurately captures the contour curve of the terminal's top edge, extracts key feature points of the edge, calculates the vertical distance s between this feature point and the reference line L0, and then multiplies the pixel distance s by the calibration coefficient K. That is, through the calculation method D=s×K, the actual insertion depth D of the terminal is obtained, realizing the conversion from pixel dimension to physical dimension.

[0022] When the production line detects that the switch socket terminal has been precisely delivered to the preset assembly position via the photoelectric sensor, it immediately sends a trigger signal to the line scan camera to ensure that the scanning action is precisely synchronized with the terminal position, avoiding imaging deviations caused by trigger delays. The camera starts scanning according to preset parameters, maintaining constant light source brightness during acquisition and focusing on the key detection area on the side of the terminal to ensure that the image clearly presents the core features such as the terminal outline and pin shape, without interference from reflections or shadows. Subsequently, the acquired terminal side image is preprocessed with grayscale conversion and noise reduction, and the outline edges are extracted using the Canny edge detection algorithm to generate an edge image that retains only key edge information. Based on the grayscale gradient changes of the edge image, the continuous edge outline at the top of the terminal is automatically identified, and the feature point at the very top of the outline is selected as the top edge point. This point must meet the requirements of positional stability and recognizability to provide a precise positioning reference for subsequent depth measurement.

[0023] In the generated edge image, the system obtains the coordinate information of the top edge point P through a pixel coordinate positioning algorithm. Simultaneously, it retrieves the preset baseline L0 coordinate parameters and uses a vertical distance calculation model to solve for the vertical pixel distance Dp between the two points. During the calculation process, image noise interference is automatically masked to ensure the accuracy of the pixel distance data. Then, the calibration coefficient K obtained from the previous calibration is called, and the pixel-dimensional distance Dp is converted into the actual insertion depth Ds of the terminal using the conversion formula Ds = Dp × K, achieving a precise mapping from image data to physical dimensions.

[0024] To quantify the test results, an error assessment index is introduced. Based on the design standard value D of the terminal insertion depth, the relative error W between the actual measured value and the standard value is calculated using the formula W=|Ds-D| / D. The system presets a standard error γ, which is determined based on industry safety standards and product quality requirements and is used to define the acceptance threshold. When the calculated relative error W is less than the preset standard error γ, the terminal assembly accuracy of the switch socket is deemed to meet the requirements, and the product is recorded as qualified, generating a qualified test report. If the relative error W is greater than or equal to γ, the product is deemed unqualified, and the specific parameters of the unqualified item are recorded simultaneously for subsequent traceability.

[0025] To ensure the overall quality stability of the production line, the system calculates the pass rate in real time and continuously tracks the percentage of qualified products through a built-in pass rate monitoring module. When the pass rate falls below a preset threshold, the system immediately triggers a production line shutdown command and simultaneously issues a fault alert to staff via an audible and visual alarm. The system also displays abnormal pass rate warnings and related test data on the control terminal, providing data support for staff to quickly pinpoint the root cause of the fault, preventing the mass production of defective products, minimizing production losses, and ensuring the continuity and stability of the production process.

[0026] In another preferred embodiment of the present invention, the method for setting the scanning speed v based on the pipeline includes: Obtain the cycle time TT of the pipeline, and set the scanning speed v=λ×TT, where λ represents the preset adjustment coefficient.

[0027] It is worth noting that, to achieve a balance between inspection accuracy and production efficiency, the scanning speed needs to be set based on the core parameters of the production line. First, the actual cycle time TT of the production line is obtained. The scanning speed v of the linear scan camera is then set using the formula v = λ × TT, where λ is a preset adjustment coefficient. The value of λ needs to be adapted to the terminal size and imaging accuracy requirements: the smaller the terminal size and the higher the accuracy requirement, the closer λ should be to 1 to avoid image distortion; during mass production, λ can be appropriately increased to ensure synchronization between inspection and cycle time, ensuring that the scanning speed is neither too fast leading to image compression nor too slow affecting production efficiency. This setting method achieves scene adaptation through parameter linkage, providing a standardized speed configuration solution for industrial vision inspection.

[0028] In another preferred embodiment of the present invention, a maximum number of tests M is preset, and the baseline L0 is reset after each M products are completed on the switch and socket assembly line.

[0029] Understandably, to ensure long-term testing accuracy stability, a baseline reset mechanism needs to be established. A maximum testing quantity M is preset, the value of which needs to be determined based on the stability of the production environment and terminal specifications, typically within a batch range of 100 to 500 pieces. A smaller value is used for high-frequency production or environments with strong interference. After each M pieces of the switch and socket assembly line has been tested, the system automatically triggers the baseline reset process. Based on the latest acquired features of the upper edge of the terminal hole on the terminal housing, it re-identifies, repositions, and generates a baseline L0, replacing the original baseline. This operation can offset baseline offsets caused by equipment vibration, changes in ambient light, etc., ensuring the consistency of the subsequent testing baseline and providing continuous assurance for millimeter-level accuracy requirements.

[0030] In another preferred embodiment of the present invention, the method for setting the top edge point based on the edge image includes: Search for the top edge point P in the edge image along the direction perpendicular to the baseline L0. The top edge point P has no consecutive pixels above it and has consecutive pixels below it.

[0031] It is important to note that the search direction is first defined as perpendicular to the baseline L0, and the scan proceeds gradually from baseline L0 towards the top of the terminal. During the search, three consecutive pixels are used as the judgment unit. When a pixel P is detected and meets two core conditions, it can be identified as the top edge point: firstly, there are no consecutive valid pixels above the point, meaning there is no extension of the terminal outline; secondly, there are consecutive pixels below the point with grayscale values ​​meeting a set threshold, meaning it connects with the main outline of the terminal. Simultaneously, isolated noise pixels are automatically filtered during the search, and the stability of the point P's positioning is ensured through multi-frame image verification, avoiding misjudgments due to image interference and providing a reliable positioning basis for subsequent depth measurements.

[0032] In another preferred embodiment of the present invention, a pre-set waiting time t is provided. When the production line encoder detects that the terminal has been delivered to the assembly position and the insertion action has been completed after the waiting time t, the line scan camera is triggered to scan and acquire the side image of the terminal.

[0033] It should be noted that the preset reasonable waiting time t is determined based on the completion time of the terminal insertion action and the stability of the equipment. When the production line encoder detects that the terminal has been accurately delivered to the assembly position and confirms that the insertion action has been completely completed, the system starts timing. After the preset waiting time t has elapsed, ensuring that the terminal position is stable and there is no mechanical vibration interference, the line scan camera is then triggered to start scanning and acquire an image of the side of the terminal. This avoids image blurring or information loss due to premature triggering, ensuring image clarity and detection accuracy.

[0034] In another preferred embodiment of the present invention, the vertical distance between the top edge of the terminal and the baseline L0 is measured repeatedly Y times by visual recognition, and the average value is taken as the value of the vertical distance s, where Y represents the preset number of measurements.

[0035] Understandably, to reduce measurement errors and improve the reliability of vertical distance data, a method of averaging multiple measurements is adopted. When measuring the vertical distance between the top edge of the visual recognition terminal and the baseline L0, the measurement is repeated Y times. The value of Y needs to be determined by combining accuracy requirements and efficiency, typically set to 3 to 5 times. Each measurement is performed independently, automatically shielding against random noise interference. After completing Y measurements, the system removes outliers and calculates the arithmetic mean of the valid measurement results, using this average as the final vertical distance s. This method can offset the random errors of a single measurement, significantly improving data accuracy and providing a basis for subsequent actual insertion depth calculations, meeting the stringent requirements of millimeter-level detection.

[0036] In another preferred embodiment of the present invention, if the switch and socket fail to meet the standard for Z consecutive times, the production line is immediately stopped and the staff is prompted to check, where Z represents a preset abnormal threshold.

[0037] It is worth noting that, to quickly prevent the mass production of defective products, a preset anomaly threshold Z is set. This threshold must be determined in conjunction with production stability and quality control requirements to ensure timely response to quality risks. When the detection system determines that a switch or socket is defective for Z consecutive times, it immediately triggers an emergency shutdown command on the production line to prevent the production of more defective products. Simultaneously, the control system issues an audible and visual warning to staff, displaying the continuous defective detection data and anomaly points to guide rapid problem investigation.

[0038] In another preferred embodiment of the present invention, when the switch socket is marked as unqualified, the insertion coefficient of the switch socket terminal is set to x=Ds-D, the mean value of the insertion coefficient X and the depth adjustment Dx=X×K are calculated. If the depth adjustment Dx>0, the cylinder stroke is shortened by Dx. If the depth adjustment Dx<0, the cylinder stroke is increased by |Dx|.

[0039] It is worth noting that when a switch or socket is deemed unqualified, the terminal insertion coefficient x is first calculated. This coefficient is the difference between the actual insertion depth Ds and the standard depth D, i.e., x = Ds - D. The system automatically calculates the insertion coefficient of unqualified products, calculates the average X, and then derives the depth adjustment amount Dx = X × K based on the calibration coefficient K. If Dx > 0, it indicates that the actual depth exceeds the standard, and the cylinder stroke needs to be shortened by Dx; if Dx < 0, it indicates that the actual depth is insufficient, and the cylinder stroke needs to be increased by |Dx|. This closed-loop adjustment mechanism can correct assembly deviations in real time, continuously optimize terminal insertion accuracy, reduce the defect rate, and ensure stable production quality.

[0040] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the present invention should still fall within the scope of the present invention.

Claims

1. A method for monitoring the status of a switch and socket assembly line based on vision inspection, characterized in that, Includes the following steps: S1: Set the line scan camera lens to be parallel to the terminal insertion direction, make the center line of the lens coincide with the terminal path, set the scanning speed v based on the pipeline, and fix the calibration fixture in the terminal assembly area of ​​the conveyor belt. The calibration fixture represents the preset spacing block L. S2: Scan the calibration fixture at a scanning speed v, measure the number of pixels N of the terminal pin spacing in the image, and calculate the calibration coefficient K=L / N; The upper edge of the terminal hole of the socket housing is marked as the reference surface, and the reference line L0 is pre-set in the reference surface; The actual insertion depth of the terminal, D = s × K, is calculated by visually recognizing the vertical distance s between the top edge of the terminal and the baseline L0. S3: When the terminal is detected to be delivered to the assembly position, the line scan camera is triggered to scan, acquire the side image of the terminal, extract the outline edge of the side image of the terminal and record it as the edge image, and set the top edge point based on the edge image; S4: Measure the vertical pixel distance Dp between the top edge point P and the baseline L0 in the edge image, convert it into the actual depth Ds=Dp×K, calculate the error W=|Ds-D| / D, if the error W<γ, the corresponding switch socket is recorded as qualified, otherwise it is recorded as unqualified, where γ is the preset standard error; When the pass rate is lower than the preset value, assembly is stopped and staff are prompted to check the switch and socket assembly line.

2. The method for monitoring the status of a switch and socket assembly line based on vision detection according to claim 1, characterized in that, In step S1, the method for setting the scanning speed v based on the pipeline includes: Obtain the cycle time TT of the pipeline, and set the scanning speed v=λ×TT, where λ represents the preset adjustment coefficient.

3. The method for monitoring the status of a switch and socket assembly line based on vision detection according to claim 1, characterized in that, In step S4, a maximum number of tests M is preset. After the switch and socket assembly line completes M products, the baseline L0 is reset.

4. The method for monitoring the status of a switch and socket assembly line based on vision detection according to claim 1, characterized in that, In step S3, the method for setting the top edge point based on the edge image includes: Search for the top edge point P in the edge image along the direction perpendicular to the baseline L0. The top edge point P has no consecutive pixels above it and has consecutive pixels below it.

5. The method for monitoring the status of a switch and socket assembly line based on vision detection according to claim 1, characterized in that, In step S3, a pre-set waiting time t is set. When the production line encoder detects that the terminal has been delivered to the assembly position and the insertion action has been completed after the waiting time t, the line scan camera is triggered to scan and acquire the side image of the terminal.

6. The method for monitoring the status of a switch and socket assembly line based on vision detection according to claim 1, characterized in that, In step S2, the vertical distance between the top edge of the terminal and the baseline L0 is measured repeatedly Y times by visual recognition, and the average value is taken as the value of the vertical distance s, where Y represents the preset number of measurements.

7. The method for monitoring the status of a switch and socket assembly line based on vision detection according to claim 1, characterized in that, In step S4, if the switch and socket fail Z times consecutively, the production line will be stopped immediately and the staff will be prompted to check. Z represents the preset abnormal threshold.

8. The method for monitoring the status of a switch and socket assembly line based on vision detection according to claim 1, characterized in that, In step S4, when the switch socket is marked as unqualified, let the insertion coefficient of the switch socket terminal be x=Ds-D, calculate the mean value of the insertion coefficient X and the depth adjustment Dx=X×K. If the depth adjustment Dx>0, adjust the cylinder stroke to shorten Dx. If the depth adjustment Dx<0, adjust the cylinder stroke to increase |Dx|.

Citation Information

Patent Citations

  • Image-based terminal quality detection method

    CN106705850A

  • A machine vision method for minitype wiring terminal quality testing

    CN107895362A

  • Terminal connecting piece detection method based on industrial vision

    CN112184677A

  • Visual inspection method for connector pins

    CN114708262A