Resistor pin welding defect detection device based on machine vision
By combining servo motors, linear motors, and analysis modules, flexible and accurate detection of soldering defects in resistor pins is achieved, solving the problems of resistor damage and inflexible adjustment in existing devices, and improving detection efficiency and stability.
Patent Information
- Application Number
- CN202511080932.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-04
- Publication Date
- 2025-11-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing machine vision-based resistor pin welding defect detection devices have problems such as potential physical damage to resistors during the detection process, insufficient flexibility in adjusting the detection position, complex operation, and high cost.
The system employs a servo motor, screw, and guide rod to achieve flexible height adjustment of the vision detector; a linear motor and moving clamping block to clamp the circuit board; and a telescopic spring and positioning block to prevent damage to the circuit board. Combined with an analysis module, the system performs precise analysis of image data and detects welding defects through grayscale value comparison and logical judgment.
It improves the convenience and accuracy of adjusting the detection position, reduces the risk of resistor damage, enhances the automation and stability of the detection, and enables multi-angle detection and accurate defect identification of resistor pins.
Smart Images

Figure CN120927705A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of welding defect detection devices, and more particularly to a machine vision-based device for detecting welding defects in resistor leads. Background Technology
[0002] With the rapid development of emerging technologies such as 5G communication, artificial intelligence, and the Internet of Things, electronic devices are evolving rapidly towards miniaturization, integration, and high performance, placing higher demands on the quality and reliability of electronic components. Resistors, as one of the most fundamental and widely used components in electronic circuits, have crucially important pin soldering quality. Soldering defects, such as incomplete soldering, missing solder, or uneven soldering, can lead to short circuits, open circuits, or unstable signal transmission, seriously affecting the normal operation of electronic devices. Therefore, accurate and efficient testing of resistor pin soldering quality has become a key link in ensuring the quality of electronic products. Existing machine vision-based resistor pin welding defect detection devices suffer from several drawbacks. Firstly, existing automated detection equipment uses contact detection methods, such as probe detection, which, while achieving a certain degree of automation, may cause physical damage to the resistor due to the contact between the probe and the pin during the detection process, affecting product performance. Secondly, the sample fixing and detection position adjustment of existing detection devices are not flexible enough to meet the detection needs of resistors of different specifications and models. Furthermore, the equipment is complex to operate and has high debugging and maintenance costs. Therefore, the above-mentioned technical problems need to be addressed. Summary of the Invention
[0003] The purpose of this invention is to address the shortcomings of existing technologies by proposing a machine vision-based device for detecting defects in resistor pin welding.
[0004] To achieve the above objectives, the present invention adopts the following technical solution: a machine vision-based resistor pin welding defect detection device, comprising a main body and a detection chamber opened on one side of the main body, a display screen installed on the upper end of the other side of the main body, a plurality of control buttons installed on the lower end of the display screen, a lifting adjustment mechanism installed on the inner side of the detection chamber on the control buttons and the display screen, a movable support mechanism slidably installed on the lower end of the lifting adjustment mechanism, and the movable support mechanism including a clamping mechanism installed on the upper end; The testing chamber is equipped with intelligent control components, including an analysis module; The analysis module analyzes the image data transmitted from the acquisition module, eliminates abnormal image data, determines the pin position by comparing the gray values of gray blocks, and then compares the welding point area, welding length, and welding width. When the welding point area, welding length, and welding width exceed the preset threshold, an alarm signal is generated and transmitted to the execution module.
[0005] Preferably, a closed frame plate is hinged to one side of the opening of the detection chamber, and an acrylic plate is fixedly connected to the closed frame plate.
[0006] Preferably, the movable support mechanism includes a T-shaped fixing block fixedly connected to the middle of the bottom surface of the detection chamber, a movable slider slidably engaged at the upper end of the T-shaped fixing block, and a support block horizontally fixedly connected at the upper end of the movable slider.
[0007] Preferably, the clamping mechanism includes a groove vertically downwardly formed on the support block, in which a first linear motor and a second linear motor are mounted opposite each other, and a movable clamping block is slidably mounted opposite the first linear motor and the second linear motor. A telescopic spring is fixedly connected to both sides of the movable clamping block, and the other end of the telescopic spring is fixedly connected to one side of the positioning block.
[0008] Preferably, the lifting and adjusting mechanism includes a servo motor installed on the upper part of the main body. The output end of the servo motor passes through the main body and is snapped into the middle of the top of the screw. The screw is rotatably installed in one corner of the inner side of the detection chamber, and a guide rod is vertically installed on the inner side of the screw. Both ends of the guide rod are fixedly connected to the inner wall of the detection chamber.
[0009] Preferably, both the screw and the guide rod vertically penetrate the lifting plate, the lifting plate and the screw are threaded together, and a visual detector is bolted to the lower end of the lifting plate in the middle of the detection chamber.
[0010] Preferably, the intelligent control component includes a data acquisition module, an analysis module, and an execution module;
[0011] The acquisition module acquires image data from the resistor pins and transmits the acquired image data to the analysis module. The execution module receives the warning signals from the analysis module, acquires the analysis module's judgments on welding area, welding length, and welding width, combines the judgments on welding area, welding length, and welding width, and classifies and issues warnings based on the combination of abnormal items.
[0012] Preferably, the analysis module performs the following steps to analyze image anomalies: P1: The acquired image data is converted to grayscale. The grayscale-processed image is then segmented into several grayscale blocks of the same size according to pixel block size. The grayscale values of the grayscale blocks are recorded, and their positions are marked according to the row and column numbers of the segmented grayscale blocks. Several grayscale blocks marked at arbitrary positions are randomly selected, and the grayscale values of the selected grayscale blocks from multiple image data detected at the same time are obtained and averaged. and standard deviation The calculation, using the calculated mean and standard deviation Gray value fluctuation range The setting involves marking grayscale data outside the fluctuation range as outliers, removing outliers, and then averaging the remaining detected grayscale data. The calculation, using the calculated mean This serves as the grayscale value data corresponding to the grayscale block; P2: Select the grayscale value data of the grayscale block. Preset grayscale value of the same numbered preset grayscale block Compare and calculate the difference in grayscale values. ;Average the grayscale value differences between all selected grayscale blocks and preset grayscale blocks with the same number. The calculation is performed, and the calculation difference corresponding to the grayscale block is selected. with the mean The difference between The difference of randomly selected grayscale blocks on the same image Compare; P3: If the difference between grayscale blocks is randomly selected All within range If the grayscale value is within the acceptable range, the grayscale fluctuation is considered normal, and welding defects can be identified; otherwise, a random selection is made again from the same image. The group randomly selects grayscale blocks, and then performs the judgment again. If There are differences in more than half of the randomly selected grayscale blocks in the group. Not in range If the grayscale image acquisition is abnormal, the image data is discarded, and the welding defects are judged using the remaining image data.
[0013] Preferably, the analysis module performs the following steps to analyze welding anomalies: T1: Analyze images of soldered leads without welding defects, traverse the grayscale images, and find the grayscale values in the images that deviate from the corresponding grayscale values of the leads. The grayscale blocks within the range are then used to calculate the pin area based on the number and size of the grayscale blocks. Grayscale blocks with matching grayscale values and areas are marked as pin grayscale blocks. A pin with a grayscale value similar to that of a resistor is identified as a resistor location. The grayscale values of the grayscale blocks on the other side of the pin are then evaluated. T2: If the gray value of the corresponding gray block Gray values of pin gray blocks The difference is quite large ( Not here Within the range, If the grayscale block is a preset scaling factor and its adjacent grayscale block is a pin grayscale block, then the corresponding grayscale block is determined to be a solder joint grayscale block; the number of consecutively numbered solder joint grayscale blocks... To conduct statistics, the quantity The product of the grayscale block size and the grayscale block size is recorded as the area of the solder joint; the solder joint width is the area in the same direction as the pin extension direction at the corresponding position, and the solder joint length is the area perpendicular to the pin extension direction. T3: Measure the area of solder joints on the pins in the detection image. area of the preset welding point If a comparison is made, Not here If within the specified range, the welding area is deemed abnormal; if exist Within the specified range, the length and width data of the welded joints are compared, and if any non-compliance is detected, the weld is considered complete. Welding length data within the range or not When the welding width data is within the specified range, an alarm signal is generated, and the gray block with the smallest number of rows and columns corresponding to the welding point is selected for anomaly marking, and the alarm signal is transmitted to the execution module.
[0014] Compared with the prior art, the beneficial effects of the present invention are: 1. The combination of servo motor, screw, and guide rod facilitates flexible adjustment of the height of the vision detector, improving the convenience and accuracy of detection position adjustment, thereby enabling multi-angle detection of resistor pins; the combination of first linear motor, second linear motor, and moving clamping block facilitates quick clamping of the circuit board, improving the automation and stability of the clamping operation, thereby enabling stable clamping of the circuit board; the combination of telescopic spring and positioning block helps prevent damage to the circuit board during clamping, improving the protective and reliable nature of clamping, thereby enabling safe fixing of the circuit board, ultimately solving the problems of resistor damage and insufficient flexibility in detection adjustment during the detection process of resistor pin welding defect detection device; 2. By filtering anomalies in image data through the analysis module, the filtering efficiency for non-periodic noises such as sudden strong light and equipment vibration is improved compared with traditional methods. When grayscale deviation is detected for the first time, it is recursively verified through n sets of grayscale blocks to avoid misjudgment by a single sample. The grayscale difference between the pin and the solder joint and the logic of adjacent blocks are used to achieve accurate solder joint edge positioning. The area, length and width of the solder joint are decomposed into independent dimensional parameters, and a three-dimensional comparison is performed in combination with preset standards to accurately locate the defect type and prevent subsequent process parameter adjustments from being disordered due to incorrect defect root cause positioning. Attached Figure Description
[0015] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0016] Figure 1 This is a schematic diagram of the overall three-dimensional structure proposed in this invention; Figure 2 This is a schematic diagram of the overall three-dimensional structure proposed in this invention from a bottom-view perspective; Figure 3 This is a schematic diagram of the partial overall three-dimensional structure proposed in this invention; Figure 4 This is a schematic diagram of the internal partial overall three-dimensional structure proposed in this invention; Figure 5 This is a schematic diagram of the internal partial overall side view structure proposed in this invention; Figure 6 The present invention proposes Figure 5 Enlarged structural diagram of part A in the middle; Figure 7 This is a schematic diagram of the side cross-sectional structure proposed in this invention; Figure 8 This is a flowchart of the system proposed in this invention.
[0017] The components in the diagram are numbered as follows: 1. Main body; 2. Closed frame plate; 3. Acrylic plate; 4. Display screen; 5. Control button; 6. Servo motor; 7. T-shaped fixing block; 8. Moving slider; 9. Support block; 10. First linear motor; 11. Second linear motor; 12. Moving clamping block; 13. Lifting plate; 14. Guide rod; 15. Screw; 16. Vision detector; 17. Telescopic spring; 18. Positioning block. Detailed Implementation
[0018] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0019] Example: See Figure 1-8The machine vision-based resistor pin welding defect detection device of the present invention includes a main body 1 and a detection chamber opened on one side of the main body 1. A display screen 4 is installed on the upper end of the other side of the main body 1. A plurality of control buttons 5 are installed on the lower end of the display screen 4. A lifting adjustment mechanism is installed on the inner side of the detection chamber on the control buttons 5 and the display screen 4. A movable support mechanism is slidably installed on the lower end of the lifting adjustment mechanism. The movable support mechanism includes a clamping mechanism installed on the upper end. The display screen 4 and the control buttons 5 facilitate the provision of a human-machine interface. A closed frame plate 2 is hinged to one side of the opening of the detection chamber. An acrylic plate 3 is fixedly connected to the closed frame plate 2. The closed frame plate 2 and the acrylic plate 3 facilitate the isolation of the internal and external environment of the detection chamber and prevent dust from interfering with the detection accuracy. The movable support mechanism includes a T-shaped fixing block 7 fixedly connected to the middle of the bottom surface of the detection chamber. A movable slider 8 is slidably engaged on the upper end of the T-shaped fixing block 7. A support block 9 is horizontally fixedly connected to the upper end of the movable slider 8. The T-shaped fixing block 7 and the movable slider 8 facilitate the horizontal sliding of the support block 9 on the T-shaped fixing block 7. The T-shaped fixing block 7 is fixed to the bottom surface of the detection chamber. Its cross-section is a "T"-shaped groove structure. The boss at the bottom of the movable slider 8 slides and engages with the T-shaped groove to form a stable horizontal guide rail. The support block 9 is fixed to the upper end of the slider with bolts. The operator can manually push and pull the support block to make the slider slide in the T-slot and adjust the resistor on the circuit board to the center of the visual detector's field of view. The groove of the clamping mechanism is opened on the upper surface of the support block 9. The first linear motor 10 and the second linear motor 11 are installed on the left and right sides respectively. The output shaft of the motor is connected to the moving clamp 12 through the slider. When the motor starts, the moving clamp moves relative to the groove guide rail. After contacting the resistor, it continues to push and compress the telescopic spring 17. The elastic force generated by the spring deformation makes the positioning block 18 fit against both sides of the circuit board. The elastic coefficient of the spring is selected as 0.5N / mm. When the clamp moves 2mm, the clamping force reaches 1N, which can ensure that the circuit board has no displacement (static friction force ≥0.6N when the friction coefficient is 0.6) and avoid rigid clamping causing the resistor lead to bend. Compared with traditional mechanical clamps, this flexible clamping design reduces the component damage rate from 8% to less than 1%.
[0020] In this invention, the clamping mechanism includes a vertically downward groove on the support block 9, in which a first linear motor 10 and a second linear motor 11 are mounted opposite each other. A movable clamping block 12 is slidably mounted between the first linear motor 10 and the second linear motor 11. A telescopic spring 17 is fixedly connected to both sides of the movable clamping block 12. The other end of the telescopic spring 17 is fixedly connected to one side of the positioning block 18. The telescopic spring 17 and the positioning block 18 ensure that the resistance does not shift during the detection process, thus guaranteeing the stability of image acquisition. The lifting adjustment mechanism includes a servo motor 6 mounted on the upper part of the main body 1, with the output end of the servo motor 6 penetrating through the main body. Body 1 is snapped into the middle of the top of screw 15. Screw 15 is rotatably installed in one corner of the inner side of the inspection chamber, and guide rod 14 is vertically installed on the inner side of screw 15. Both ends of guide rod 14 are fixedly connected to the inner wall of the inspection chamber. Through servo motor 6 and screw 15, vertical and precise lifting of lifting plate 13 can be achieved. Screw 15 and guide rod 14 are both vertically inserted through lifting plate 13. Lifting plate 13 and screw 15 are threadedly connected. The lower end of lifting plate 13 is located in the middle of the inspection chamber and is bolted to a vision detector 16. The vision detector 16 helps to keep the lens axis perpendicular to the resistor pin, improving the acquisition accuracy of welding defect images. Traditional probe testing acquires electrical signals through physical contact with the pins. The probe pressure (typically 2-5N) can easily cause thin pins (less than 0.1mm) to bend. In contrast, this device's clamping mechanism provides flexible pressure via a telescopic spring, with a maximum clamping force of only 1N, applied to the circuit board rather than the pins, avoiding direct contact. Taking a 0603 resistor as an example, with a pin diameter of 0.3mm and a copper alloy material (yield strength 200MPa), the stress generated by 1N pressure is... 14MPa < yield strength, so no plastic deformation will occur; at the same time, visual inspection can acquire images without contact, which is 3 times more efficient than probe inspection (probes need to inspect point by point, while vision can acquire the entire area at once), and can identify appearance defects that probes cannot detect (such as cracks on the solder surface).
[0021] The testing chamber is equipped with intelligent control components, which include a data acquisition module, an analysis module, and an execution module. The acquisition module acquires image data from the resistor pins and transmits the acquired image data to the analysis module. The analysis module analyzes the image data transmitted from the acquisition module, removes abnormal image data, determines the pin position by comparing the gray values of gray blocks, and then compares the welding point area, welding length, and welding width. When the welding point area, welding length, and welding width exceed the preset threshold, an alarm signal is generated and transmitted to the execution module. The acquired image data is converted to grayscale. The grayscale-processed image is then segmented into several equal-sized grayscale blocks according to pixel size. The grayscale values of these blocks are recorded, and their positions are marked according to their row and column numbers. Several randomly selected grayscale blocks are then analyzed by acquiring their grayscale values from multiple image data detected simultaneously, and the average value is calculated. and standard deviation The calculation, using the calculated mean and standard deviation Gray value fluctuation range The setting involves marking grayscale data outside the fluctuation range as outliers, removing outliers, and then averaging the remaining detected grayscale data. The calculation, using the calculated mean This serves as the grayscale value data corresponding to the grayscale block; Select grayscale value data of grayscale blocks Preset grayscale value of the same numbered preset grayscale block Compare and calculate the difference in grayscale values. ;Average the grayscale value differences between all selected grayscale blocks and preset grayscale blocks with the same number. The calculation is performed, and the calculation difference corresponding to the grayscale block is selected. with the mean The difference between The difference of randomly selected grayscale blocks on the same image For comparison, if the difference between randomly selected grayscale blocks is used... All within range If the grayscale value is within the acceptable range, the grayscale fluctuation is considered normal, and welding defects can be identified; otherwise, a random selection is made again from the same image. The group randomly selects grayscale blocks, and then performs the judgment again. If There are differences in more than half of the randomly selected grayscale blocks in the group. Not in range If the grayscale image acquisition is abnormal, the image data is discarded, and the welding defect is judged using the remaining image data. The preset grayscale value corresponding to the preset grayscale block is obtained through image analysis of a large number of lead-welded products without soldering defects. The images of lead-welded products without soldering defects are analyzed, and the grayscale images are traversed to find the grayscale values in the images that deviate from the corresponding grayscale values of the lead-welded products within a certain range. The grayscale blocks within the specified range are then analyzed. Based on the number and size of the grayscale blocks, the pin area is calculated. Grayscale blocks with matching grayscale values and areas are marked as pin grayscale blocks. A pin with a grayscale value similar to a resistor is identified as a resistor location. The grayscale values of the grayscale blocks on the other side of the pin are then evaluated. If the corresponding grayscale value... Gray values of pin gray blocks The difference is quite large ( Not here Within the range, If the grayscale block is a preset scaling factor and its adjacent grayscale block is a pin grayscale block, then the corresponding grayscale block is determined to be a solder joint grayscale block; the number of consecutively numbered solder joint grayscale blocks... To conduct statistics, the quantity The product of the grayscale block size and the grayscale block size is recorded as the area of the solder joint; the solder joint width is the area in the same direction as the pin extension direction at the corresponding position of the solder joint area, and the solder length is the area perpendicular to the pin extension direction. The grayscale block size is set to 10×10 pixels, based on the conversion of the smallest defect detection unit (0.1mm): assuming a camera resolution of 1000×1000 pixels and a field of view of 10×10mm, then 1 pixel = 0.01mm, and the 10×10 pixel block corresponds to a 0.1×0.1mm area, which can precisely identify a 0.1mm cold solder joint defect; a preset scaling factor is used. To distinguish between solder joints and leads: the grayscale value of solder is about 200 (range 0-255), while that of lead oxide layer is about 160. The 20% difference (160×1.2=192) can effectively filter out interference. As a parameter deviation threshold, process fluctuations in resistance welding (such as solder volume fluctuations of ±10% and temperature fluctuations of ±5℃) are comprehensively considered to ensure a balance between detection sensitivity and anti-interference capability; for precision resistors (such as ±0.1% accuracy), the deviation can be adjusted through the system interface. Adjusted to 0.1 to increase the stringency of the test; In a large number of images of soldered leads without welding defects, the average grayscale value of the corresponding numbered grayscale block is the preset grayscale value of the corresponding preset grayscale block; the average area of the corresponding solder joint is the preset solder joint area; and the average values of the corresponding solder length and width data are the preset solder length data. and preset welding width data ; The area of the solder joints on the pins in the detection image area of the preset welding point If a comparison is made, Not here If the area is within the specified range, the welding area is determined to be abnormal; if exist Within the specified range, the length and width data of the welded joints are compared, and if any non-compliance is detected, the weld is considered complete. Welding length data within the range or not When the welding width data is within the range, an alarm signal is generated, and the gray block with the smallest number of rows and columns in the gray block corresponding to the welding point is selected for anomaly marking, and the alarm signal is transmitted to the execution module; After receiving the warning signal, the execution module acquires the welding area, welding length, and welding width. If the abnormality is "insufficient area + insufficient length", it is determined to be a cold solder joint or the pin is not fully inserted into the pad. The amount of solder is seriously insufficient and the longitudinal coverage is small, indicating that the solder does not wet the contact surface between the bottom of the pin and the pad. This may be due to insufficient pin insertion depth (such as the pin only being inserted into the pad by 1 / 3) or a blockage in the solder supply system causing a sudden decrease in the amount of solder. The combination of "insufficient area + insufficient length" indicates inadequate solder wetting, which may be caused by two reasons: ① Insufficient pin insertion depth (e.g., the standard insertion depth should be 80% of the pad thickness; if only 50% is inserted, the longitudinal coverage length of the solder joint will inevitably be shortened); ② A sudden decrease in solder supply (e.g., a 30% drop in the solder feed motor speed). In this case, the solder joint will appear in the image as having a longitudinal edge more than 0.3mm from the pin end (standard ≤ 0.1mm), and an area less than 80% of the standard value. Conversely, "excessive area + excessive width" is often accompanied by an abnormal grayscale value at the pad edge. The blackening occurs when the soldering temperature exceeds 280℃, causing the copper foil on the solder pads to oxidize and form a black copper oxide layer. The solder's fluidity increases at high temperatures, spreading laterally to adjacent pads. In this case, the temperature needs to be lowered to 250℃ and the oxidized pads cleaned. This multi-parameter correlation analysis is more accurate than single-parameter detection. For example, in a batch of resistors with an "excessive width" defect, correlation temperature data revealed that 85% of the abnormal components had soldering temperatures exceeding 300℃. This led to a shift in process adjustment from "reducing solder volume" to "lowering heating temperature." If the abnormality is "excessive area + excessive length", it is determined that the solder is spreading due to solder gushing or pin misalignment. If the amount of solder exceeds the standard by more than 40% and extends excessively in the longitudinal direction, it may be due to a soldering machine nozzle malfunction (such as a solenoid valve failure causing continuous solder flow), or the pin is tilted by more than 15° during installation, causing the solder to accumulate in the misaligned direction. If the abnormality is "insufficient area + too narrow width", it is determined to be uneven solder distribution or pin offset. The solder joint has a narrow lateral coverage area and a small total area, indicating that the solder only fills the local area between the pin and the pad. This may be due to uneven temperature field during soldering (such as insufficient heating on one side) or pin offset from the center of the pad by more than 0.2mm. If the abnormality is "excessive area + excessive width", it is determined to be pad damage or solder overflow. The horizontal dimension of the solder joint exceeds the pad boundary and the area is too large. If it is accompanied by abnormal gray value of the pad edge (blackening, 20% lower than the standard pad), it may be due to excessive soldering temperature causing oxidation of the pad copper foil, and the solder penetrating to the bottom of the pad, causing the width to be artificially increased. If the abnormality is "insufficient length + too narrow width", it is determined to be due to pin misalignment and insufficient solder. The longitudinal and lateral dimensions of the solder joint are insufficient. This may be because the pin is inserted into the pad at an angle (such as 30°) while the solder supply is reduced by 20%, resulting in the solder joint being distributed in a "flat" shape. If the abnormality is "too long in length + too wide in width", it is determined to be due to excessive solder and excessive soldering temperature. The solder joint is excessively extended in both the longitudinal and transverse directions. If the gray value of the solder joint is too bright (15% higher than the standard solder joint), it indicates that the solder is too fluid at high temperature and forms a "pancake" shape after cooling. This may be because the soldering temperature exceeds the standard by more than 30°C. If the abnormality is "insufficient area + insufficient length + excessive width", it is determined that the welding process parameters are seriously deviated (temperature too low + time too short + insufficient solder). If all three parameters are below the standard value, it indicates that the welding process does not meet the basic process requirements. This may be due to incorrect soldering machine parameter settings (such as the temperature being set to 180℃ instead of 250℃), or a 50% reduction in the solder wire feeding speed. If the abnormal situation is "excessive area + excessive length + excessive width", it is determined that the soldering system is out of control (such as the soldering machine continuously supplying solder). If all three parameters exceed the standard value by more than 40%, it is very likely that the soldering machine solenoid valve is stuck, resulting in unlimited solder supply, or the program error causes the soldering time to be extended to 3 times the standard value. The execution module classifies warning levels based on the combination of abnormal items. For a Level 1 response (single abnormality), the buzzer sounds briefly once, the display shows the abnormal parameters and location, and production can continue, but requires monitoring by the production line inspector. For a Level 2 response (combination of two abnormalities), the buzzer sounds three times consecutively, the display highlights the abnormal combination (e.g., "area + length abnormality"), and the current workstation is locked, requiring technician confirmation before unlocking. For a Level 3 response (combination of three abnormalities), the buzzer sounds continuously and the soldering machine power is cut off, a red warning page pops up on the display, forcing the production line to stop. The line can only be restarted after an engineer has completed troubleshooting and recorded the findings. Level 1 response (single anomaly) is for occasional minor defects, such as solder joint area being 12% less than the standard value (on the edge of the ±15% threshold). In this case, the buzzer sounds once, the abnormal location is marked on the display and recorded in the background, and the solder supply for subsequent workpieces is automatically increased by 5% to maintain production continuity through dynamic compensation. Level 2 response (two anomalies), such as "insufficient area + insufficient length", indicates that the process parameters have deviated from the standard. The buzzer sounds three times and the workstation is locked. Technicians need to check the deviation data through the system (e.g., pin insertion depth is only 0.5mm, the standard is 0.8mm), adjust the tooling, and unlock it with a password. Level 3 response (three anomalies), such as "area + length + width all exceed the tolerance by 40%", is very likely due to the soldering machine's solenoid valve being stuck, causing continuous solder supply. In this case, the system immediately cuts off the soldering machine's power supply, pops up a red warning page displaying the fault code (e.g., E03 - solenoid valve abnormality), forces a shutdown, and links the MES system to generate a repair work order. This mechanism reduces the loss of batch defects from an average of 500 pieces / time to less than 10 pieces.
[0022] Working Principle: In the use of this invention, the operator first manually opens the closed frame plate 2 hinged to the opening of the detection chamber, exposing the interior of the detection chamber. Then, the moving slider 8 is pulled out through the T-shaped fixing block 7. The circuit board to be monitored is then placed on the support block 9, and the position of the support block 9 can be manually adjusted to place the resistor in the appropriate area for visual inspection. Then, by connecting the power to the first linear motor 10 and the second linear motor 11, the corresponding moving clamping block 12 is driven to move towards the circuit board. After the moving clamping block 12 contacts the resistor, the compression spring 17 is moved to make the positioning block 18 tightly fit against both sides of the circuit board, achieving non-contact flexible clamping (avoiding probe contact damage), ensuring the circuit board is stable and the resistor is not deformed. The compression spring 17 ensures that the circuit board is firmly clamped, preventing displacement during the detection process and avoiding damage to the resistor due to excessive clamping force. After fixing, The sliding slider 8 is pushed into the inspection chamber, and then the sealing frame 2 is manually closed. The acrylic plate 3 isolates external dust and light interference, creating a stable inspection environment. At this moment, the servo motor 6 is started, driving the screw 15 to rotate. Since the lifting plate 13 and the screw 15 are connected by threads, and the guide rod 14 restricts the lifting plate 13 to move only in the vertical direction, the vision detector 16 is lowered to the optimal shooting position, so that the lens axis is perpendicular to the resistor pin (accuracy ±0.1mm) to ensure clear imaging and that the lens can clearly capture the image of the solder joint of the resistor pin. The control system compares the acquired image with the preset standard image and uses machine vision algorithms to analyze parameters such as the solder shape, solder joint size, and pin position of the pin. If defects such as poor solder joint, missing solder, excessive solder, or pin misalignment are detected, the system marks the resistor as a non-conforming product and displays the defect type and location on the display screen 4.
[0023] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A machine vision-based resistor pin welding defect detection device, comprising a main body (1) and a detection chamber formed on one side of the main body (1), characterized in that: The main body (1) has a display screen (4) installed on the upper side of the other side. The display screen (4) has multiple control buttons (5) installed on the lower side of the display screen (4). The control buttons (5) and the inner side of the detection chamber on one side of the display screen (4) are equipped with a lifting adjustment mechanism. The lower end of the lifting adjustment mechanism is slidably equipped with a mobile support mechanism. The mobile support mechanism includes a clamping mechanism installed on the upper end. The testing chamber is equipped with intelligent control components, including an analysis module; The analysis module analyzes the image data transmitted from the acquisition module, eliminates abnormal image data, determines the pin position by comparing the gray values of gray blocks, and then compares the welding point area, welding length, and welding width. When the welding point area, welding length, and welding width exceed the preset threshold, an alarm signal is generated and transmitted to the execution module.
2. The machine vision-based resistor pin welding defect detection device according to claim 1, characterized in that: A closed frame plate (2) is hinged to one side of the opening of the detection chamber, and an acrylic plate (3) is fixedly connected to the closed frame plate (2).
3. The machine vision-based resistor pin welding defect detection device according to claim 2, characterized in that: The movable support mechanism includes a T-shaped fixing block (7) fixedly connected to the middle of the bottom surface of the detection chamber. A movable slider (8) is slidably engaged at the upper end of the T-shaped fixing block (7). A support block (9) is horizontally fixedly connected at the upper end of the movable slider (8).
4. The machine vision-based resistor pin welding defect detection device according to claim 3, characterized in that: The clamping mechanism includes a groove vertically downwardly opened on the support block (9), in which a first linear motor (10) and a second linear motor (11) are installed opposite each other. A movable clamping block (12) is slidably installed between the first linear motor (10) and the second linear motor (11). A telescopic spring (17) is fixedly connected to the movable clamping blocks (12) on both sides. The other end of the telescopic spring (17) is fixedly connected to one side of the positioning block (18).
5. The machine vision-based resistor pin welding defect detection device according to claim 4, characterized in that: The lifting and adjusting mechanism includes a servo motor (6) installed on the upper part of the main body (1). The output end of the servo motor (6) passes through the main body (1) and is snapped into the middle of the top of the screw (15). The screw (15) is rotatably installed in one corner of the inner side of the detection chamber, and a guide rod (14) is vertically installed on the inner side of the screw (15). Both ends of the guide rod (14) are fixedly connected to the inner wall of the detection chamber.
6. The machine vision-based resistor pin welding defect detection device according to claim 5, characterized in that: The screw (15) and guide rod (14) both pass vertically through the lifting plate (13). The lifting plate (13) and screw (15) are threaded together, and the lower end of the lifting plate (13) is located in the middle of the detection chamber and a visual detector (16) is installed by bolts.
7. The machine vision-based resistor pin soldering defect detection device according to claim 1, characterized in that: The intelligent control component includes a data acquisition module, an analysis module, and an execution module; The acquisition module acquires image data from the resistor pins and transmits the acquired image data to the analysis module. The execution module receives the warning signals from the analysis module, acquires the analysis module's judgments on welding area, welding length, and welding width, combines the judgments on welding area, welding length, and welding width, and classifies and issues warnings based on the combination of abnormal items.
8. The machine vision-based resistor pin welding defect detection device according to claim 1, characterized in that: The analysis module performs the following steps to analyze image anomalies: P1: The acquired image data is converted to grayscale. The grayscale-processed image is then segmented into several grayscale blocks of the same size according to pixel block size. The grayscale values of the grayscale blocks are recorded, and their positions are marked according to the row and column numbers of the segmented grayscale blocks. Several grayscale blocks marked at arbitrary positions are randomly selected, and the grayscale values of the selected grayscale blocks from multiple image data detected at the same time are obtained and averaged. and standard deviation The calculation, using the calculated mean and standard deviation Gray value fluctuation range The setting involves marking grayscale data outside the fluctuation range as outliers, removing outliers, and then averaging the remaining detected grayscale data. The calculation, using the calculated mean This serves as the grayscale value data corresponding to the grayscale block; P2: Select the grayscale value data of the grayscale block. Preset grayscale value of the same numbered preset grayscale block Compare and calculate the difference in grayscale values. ;Average the grayscale value differences between all selected grayscale blocks and preset grayscale blocks with the same number. The calculation is performed, and the calculation difference corresponding to the grayscale block is selected. with the mean The difference between The difference of randomly selected grayscale blocks on the same image Compare; P3: If the difference between grayscale blocks is randomly selected All within range If the grayscale value is within the acceptable range, the grayscale fluctuation is considered normal, and welding defects can be identified; otherwise, a random selection is made again from the same image. The group randomly selects grayscale blocks, and then performs the judgment again. If There are differences in more than half of the randomly selected grayscale blocks in the group. Not in range If the grayscale image acquisition is abnormal, the image data is discarded, and the welding defects are judged using the remaining image data.
9. The machine vision-based resistor pin welding defect detection device according to claim 8, characterized in that: The analysis module performs the following steps to analyze welding anomalies: T1: Analyze images of soldered leads without welding defects, traverse the grayscale images, and find the grayscale values in the images that deviate from the corresponding grayscale values of the leads. The grayscale blocks within the range are then used to calculate the pin area based on the number and size of the grayscale blocks. Grayscale blocks with matching grayscale values and areas are marked as pin grayscale blocks. A pin with a grayscale value similar to that of a resistor is identified as a resistor location. The grayscale values of the grayscale blocks on the other side of the pin are then evaluated. T2: If the gray value of the corresponding gray block Gray values of pin gray blocks The difference is quite large ( Not here Within the range, If the grayscale block is a preset scaling factor and its adjacent grayscale block is a pin grayscale block, then the corresponding grayscale block is determined to be a solder joint grayscale block; the number of consecutively numbered solder joint grayscale blocks... To conduct statistics, the quantity The product of the grayscale block size and the grayscale block size is recorded as the area of the solder joint; the solder joint width is the area in the same direction as the pin extension direction at the corresponding position, and the solder joint length is the area perpendicular to the pin extension direction. T3: Detect the area of solder joints on the pins in the image. area of the preset welding point If a comparison is made, Not here If the area is within the specified range, the welding area is determined to be abnormal. like exist Within the specified range, the length and width data of the welded joints are compared, and if any non-compliance is detected, the weld is considered complete. Welding length data within the range or not When the welding width data is within the specified range, an alarm signal is generated, and the gray block with the smallest number of rows and columns corresponding to the welding point is selected for anomaly marking, and the alarm signal is transmitted to the execution module.