Special-shaped plug-in machine safety detection system and method
By using the camera and Raspberry Pi control module in the special-shaped plug-in machine for image processing and key point detection, replacing the traditional safety light curtain, the problem of safety light curtain occupying space and interfering with transportation is solved, and more efficient safety detection and production efficiency is achieved.
Patent Information
- Application Number
- CN202510375425.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-06-27
AI Technical Summary
In the safety detection system of traditional special-shaped plug-in machines, the layout of the safety light curtain occupies the space resources inside the special-shaped plug-in machine, and may interfere with the transportation of the substrate and affect production efficiency.
The first camera, the second camera and the Raspberry Pi control module are used instead of the traditional safety light curtain. Through image processing and key point detection, it is determined whether the operator is close to or contacting the plug-in axis, and whether the plug-in axis is in an unretracted state after completing the plug-in, generating a risk level and triggering an alarm.
It effectively saves space resources inside the special-shaped plug-in machine, avoids interference from the safety light curtain on substrate transportation, and improves operational safety, ensuring the safety of operators and equipment.
Smart Images

Figure CN120214949A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial automation safety, and particularly to a safety detection system and method for a special-shaped plug-in machine. Background Art
[0002] In a traditional safety detection system for a special-shaped plug-in machine, a safety light curtain is usually installed inside the special-shaped plug-in machine to monitor the telescopic state of the plug-in shaft. When the plug-in shaft fails to fully retract after plugging, it may collide with the electronic components already installed on the substrate, resulting in damage to the circuit board. To prevent such situations, the system detects the position of the plug-in shaft through the safety light curtain and issues a safety alarm signal when an abnormality is detected. However, the special-shaped plug-in machine usually also has a substrate transportation mechanism inside, which is responsible for transporting the substrate to a designated position for plugging operations. Since the safety light curtain is large in volume and is usually installed on one side of the substrate transportation mechanism, while the plug-in shaft is arranged above the substrate transportation mechanism to monitor the state of the plug-in shaft, this layout not only occupies the limited space resources inside the special-shaped plug-in machine, but may also interfere with the transportation process of the substrate, affecting the overall production efficiency. Summary of the Invention
[0003] Aiming at the above defects, the present invention proposes a safety detection system and method for a special-shaped plug-in machine, aiming to solve the problem that in a traditional safety detection system for a special-shaped plug-in machine, a safety light curtain with a large volume is installed on one side of the substrate transportation mechanism to detect the telescopic state of the plug-in shaft after plugging, but this layout of the safety light curtain not only occupies the limited space resources inside the special-shaped plug-in machine, but may also interfere with the substrate transportation.
[0004] To achieve this purpose, the present invention adopts the following technical solutions:
[0005] A safety detection system for a special-shaped plug-in machine includes a special-shaped plug-in machine body, a first camera, a second camera, an alarm module, a Raspberry Pi control module, and a relay. The special-shaped plug-in machine body includes a frame, a substrate transportation mechanism, a plurality of feeding mechanisms, a three-axis driving mechanism, a light source board, a plurality of plug-in shafts, and a power supply;
[0006] The substrate transportation mechanism is arranged inside the frame in the left-right direction and is used for transporting the substrate. A plurality of the feeding mechanisms are evenly distributed on the front and rear sides of the substrate transportation mechanism and are used for providing and transporting the electronic components to be inserted. The three-axis driving mechanism is arranged inside the frame and is located above the substrate transportation mechanism and the feeding mechanisms. The light source board and a plurality of the plug-in shafts are both arranged on the three-axis driving mechanism, and the three-axis driving mechanism is used for driving the light source board to move back and forth and left and right and driving the plug-in shafts to move back and forth, left and right, and up and down;
[0007] A gripper is provided at the end of each of the plurality of plug shafts. The gripper is used to grip and release the electronic components to be inserted. The first camera and the second camera are respectively installed at the left rear side and the right rear side inside the frame. The first camera and the second camera are symmetrically distributed left and right. The first camera is used to collect images including the operator's body and the substrate, and the second camera is used to collect images including the light source board and the plug shafts. The Raspberry Pi control module is electrically connected to the power supply through the relay. The Raspberry Pi control module is used to receive and process the images including the operator's body and the substrate and the images including the light source board and the plug shafts, and detect the key points of the operator's body, the light source board and the plug shafts to determine whether the operator approaches or contacts the plug shafts, and whether the plug shafts are in an unretained state after the plugging operation. If the operator approaches or contacts the plug shafts, or the plug shafts are in an unretained state after the plugging operation, a corresponding risk level is generated. The alarm module is provided on the top of the frame. The alarm module is used to automatically trigger an alarm task according to the corresponding risk level.
[0008] Preferably, the three-axis driving mechanism includes two first lead screw motor modules, a second lead screw motor module, a moving frame, a light source board mounting bracket, and a plurality of cylinders. The first lead screw motor module includes a first slider, and the second lead screw motor module includes a second slider.
[0009] The two first lead screw motor modules are horizontally arranged on the left and right sides of the frame. The two first lead screw motor modules are both arranged in the front-rear direction. The second lead screw motor module is arranged in the left-right direction. The left and right ends of the second lead screw motor module are respectively slidably arranged on the first sliders of the two first lead screw motor modules. The moving frame is slidably arranged on the second slider of the second lead screw motor module. The top of the light source board mounting bracket and the plurality of cylinders are all installed inside the moving frame. The light source board is installed at the bottom of the light source board mounting bracket. The first ends of the plurality of plug shafts are respectively connected to the driving ends of the corresponding cylinders.
[0010] At least two rectangular openings are formed in the light source board. The rectangular openings are used to provide a retractable space for the plug shafts.
[0011] Preferably, the Raspberry Pi control module includes:
[0012] An image processing sub-module, which is used to preprocess the images including the operator's body and the substrate and the images including the light source board and the plug shafts respectively, to obtain the preprocessed images including the operator's body and the substrate and the preprocessed images including the light source board and the plug shafts.
[0013] The YOLOv-Pose model construction sub-module is used to construct the YOLOv-Pose model;
[0014] The YOLOv-Pose model training sub-module is used to train the YOLOv-Pose model to obtain the trained YOLOv-Pose model;
[0015] The detection sub-module is used to input the pre-processed image containing the operator's human body and the substrate and the pre-processed image containing the light source board and the plug-in shaft into the trained YOLOv-Pose model for detection, and output the key points of the operator's human body, the light source board and the plug-in shaft.
[0016] Preferably, the Raspberry Pi control module further includes:
[0017] The acquisition sub-module is used to acquire the key point coordinate information of the light source board and the plug-in shaft;
[0018] The calculation sub-module is used to calculate the Euclidean distance between the key points of the light source board and the key points of the plug-in shaft. The specific calculation formula is as follows:
[0019]
[0020] Where d represents the Euclidean distance between the key points of the light source board and the key points of the plug-in shaft, (x1, y1) represents the key point coordinates of the plug-in shaft, and (x2, y2) represents the key point coordinates of the light source board;
[0021] The judgment sub-module is used to judge whether the Euclidean distance d between the key points of the light source board and the key points of the plug-in shaft is less than the preset safety threshold D threshold , if so, it means that the plug-in shaft is in the non-retracted state, and if not, it means that the plug-in shaft is in the retracted state.
[0022] Another aspect of the present application provides a safety detection method for a special-shaped plug-in machine. The method includes the following steps:
[0023] Step S1: Place the substrate at the left end of the substrate transportation mechanism, and the substrate moves to the right under the action of the substrate transportation mechanism;
[0024] Step S2: When the substrate is transported to the designated position on the substrate transportation mechanism, start the three-axis drive mechanism. The three-axis drive mechanism drives the plug-in shaft to move, so that the gripper at the end of the plug-in shaft can grab the electronic component to be inserted in the feeding mechanism and install the electronic component to be inserted at the position on the substrate where it needs to be installed;
[0025] During the insertion operation of the insertion shaft, steps S3 - S5 are synchronously executed;
[0026] Step S3: The first camera collects an image containing the operator's body and the substrate, and the second camera collects an image containing the light source board and the insertion shaft, and transmits the image containing the operator's body and the substrate and the image containing the light source board and the insertion shaft to the Raspberry Pi control module;
[0027] Step S4: The Raspberry Pi control module receives and processes the image containing the operator's body and the substrate and the image containing the light source board and the insertion shaft, and detects the key points of the operator's body, the light source board, and the insertion shaft to determine whether the operator is approaching or contacting the insertion shaft, and whether the insertion shaft is in an unretracted state after the insertion operation is completed. If the operator is approaching or contacting the insertion shaft, or the insertion shaft is in an unretracted state after the insertion operation is completed, a corresponding risk level is generated and transmitted to the alarm module;
[0028] Step S5: The alarm module receives the corresponding risk level and automatically triggers an alarm task accordingly;
[0029] Step S6: When the substrate has completed the insertion operation of all the electronic components to be inserted that need to be installed, a circuit board is formed, and under the action of the substrate transportation mechanism, the circuit board is transported to the right end of the substrate transportation mechanism for blanking.
[0030] Preferably, in step S4, it specifically includes the following sub - steps:
[0031] Step S41: Pre - process the image containing the operator's body and the substrate and the image containing the light source board and the insertion shaft respectively to obtain the pre - processed image containing the operator's body and the substrate and the pre - processed image containing the light source board and the insertion shaft;
[0032] Step S42: Build a YOLOv - Pose model;
[0033] Step S43: Train the YOLOv - Pose model to obtain the trained YOLOv - Pose model;
[0034] Step S44: Input the pre - processed image containing the operator's body and the substrate and the pre - processed image containing the light source board and the insertion shaft into the trained YOLOv - Pose model for detection, and output the key points of the operator's body, the light source board, and the insertion shaft.
[0035] Preferably, in step S4, it specifically further includes the following sub - steps:
[0036] Step S45: Obtain the key point coordinate information of the light source board and the plug-in shaft;
[0037] Step S46: Calculate the Euclidean distance between the key points of the light source board and the key points of the plug-in shaft. The specific calculation formula is as follows:
[0038]
[0039] where d represents the Euclidean distance between the key points of the light source board and the key points of the plug-in shaft, (x1, y1) represents the key point coordinates of the plug-in shaft, and (x2, y2) represents the key point coordinates of the light source board;
[0040] Step S47: Determine whether the Euclidean distance d between the key points of the light source board and the key points of the plug-in shaft is less than the preset safety threshold D threshold , if so, it indicates that the plug-in shaft is in the non-retracted state, and if not, it indicates that the plug-in shaft is in the retracted state.
[0041] The technical solution provided by the embodiment of the present application may include the following beneficial effects:
[0042] In this solution, through the mutual cooperation of the first camera, the second camera and the Raspberry Pi control module, it is possible to detect whether the operator is approaching or contacting the plug-in shaft, and whether the plug-in shaft is in the non-retracted state after completing the plug-in, thus effectively ensuring the safety of the operator and the special-shaped plug-in machine body. Compared with the traditional method of using a safety light curtain to detect the telescopic state of the plug-in shaft after completing the plug-in, this solution uses the first camera, the second camera and the Raspberry Pi control module to replace the safety light curtain for detection. In this way, not only can the limited space resources inside the special-shaped plug-in machine be effectively saved, but also the transportation of the substrate can be prevented from being blocked by the safety light curtain. Description of the Drawings
[0043] Figure 1 is a schematic structural diagram of a safety detection system for a special-shaped plug-in machine in the present invention;
[0044] Figure 2 is Figure 1 a partial enlarged view of area A in
[0045] Figure 3 is a schematic diagram of one of the embodiments of the present invention.
[0046] Among them, 1 is the special-shaped component insertion machine body; 2 is the first camera; 3 is the second camera; 4 is the alarm module; 11 is the frame; 12 is the substrate transportation mechanism; 13 is the feeding mechanism; 14 is the three-axis drive mechanism; 15 is the light source board; 16 is the insertion shaft; 141 is the first lead screw motor module; 142 is the second lead screw motor module; 143 is the moving frame; 144 is the light source board mounting bracket; 150 is the rectangular opening; 160 is the gripper. Specific embodiments
[0047] The following details the embodiments of the present invention. The examples of the embodiments are shown in the drawings, where the same or similar reference numerals denote the same or similar elements or elements with the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary and are only used to explain the present invention and should not be construed as a limitation of the present invention.
[0048] A safety detection system for a special-shaped component insertion machine includes a special-shaped component insertion machine body 1, a first camera 2, a second camera 3, an alarm module 4, a Raspberry Pi control module (not shown in the figure), and a relay (not shown in the figure). The special-shaped component insertion machine body 1 includes a frame 11, a substrate transportation mechanism 12, a plurality of feeding mechanisms 13, a three-axis drive mechanism 14, a light source board 15, a plurality of insertion shafts 16, and a power supply (not shown in the figure);
[0049] The substrate transportation mechanism 12 is arranged inside the frame 11 in the left-right direction. The substrate transportation mechanism 12 is used to transport substrates. A plurality of the feeding mechanisms 13 are evenly distributed on the front and rear sides of the substrate transportation mechanism 12. The feeding mechanism 13 is used to provide and transport the electronic components to be inserted. The three-axis drive mechanism 14 is arranged inside the frame 11. The three-axis drive mechanism 14 is located above the substrate transportation mechanism 12 and the feeding mechanism 13. The light source board 15 and a plurality of the insertion shafts 16 are both arranged on the three-axis drive mechanism 14. The three-axis drive mechanism 14 is used to drive the light source board 15 to move back and forth and left and right, and to drive the insertion shafts 16 to move back and forth, left and right, and up and down;
[0050] At the ends of several of the plug-in shafts 16, there are gripping and releasing members 160 provided. The gripping and releasing members 160 are used for gripping and releasing the electronic components to be inserted. The first camera 2 and the second camera 3 are respectively installed at the left rear side and the right rear side inside the frame 11. The first camera 2 and the second camera 3 are symmetrically distributed left and right. The first camera 2 is used to collect images including the operator's body and the substrate, and the second camera 3 is used to collect images including the light source board 15 and the plug-in shafts 16. The Raspberry Pi control module is electrically connected to the power supply through the relay. The Raspberry Pi control module is used to receive and process the images including the operator's body and the substrate, and the images including the light source board 15 and the plug-in shafts 16, and detect the key points of the operator's body, the light source board 15 and the plug-in shafts 16, so as to judge whether the operator approaches or touches the plug-in shafts 16, and whether the plug-in shafts 16 are in an unretrated state after the plug-in operation is completed. If the operator approaches or touches the plug-in shafts 16, or the plug-in shafts 16 are in an unretrated state after the plug-in operation is completed, a corresponding risk level is generated. The alarm module 4 is arranged at the top of the frame 11. The alarm module 4 is used to automatically trigger an alarm task according to the corresponding risk level.
[0051] A safety detection system for a special-shaped plug-in machine in this solution. In this embodiment, as Figures 1-3 shown, the substrate transportation mechanism 12 is a conveyor belt. The feeding mechanism 13 is a vibrating bowl or a vertical taping feeder. When it is necessary to provide and transport the electronic components to be inserted as bulk components, the vibrating bowl is used. When it is necessary to provide and transport the electronic components to be inserted as taped components, the vertical taping feeder is used. The gripping and releasing member 160 is a fixture or a suction nozzle. When a plug-in operation needs to be performed, the operator first places the substrate at the left end of the substrate transportation mechanism 12. Under the action of the substrate transportation mechanism 12, when the substrate is transported to the designated position on the substrate transportation mechanism 12, the three-axis driving mechanism 14 is started. The three-axis driving mechanism 14 drives the plug-in shaft 16 to move, so that the gripping and releasing member 160 at the end of the plug-in shaft 16 can grab the electronic component to be inserted in the feeding mechanism 13 and install the electronic component to be inserted at the position on the substrate where it needs to be installed. When the substrate completes the plug-in operation of all the electronic components to be inserted that need to be installed, a circuit board is formed. The circuit board continues to be transported to the right end of the substrate transportation mechanism 12 for blanking under the action of the substrate transportation mechanism 12.
[0052] During the operation of the plugin, the first camera 2 captures images including the operator's body and the substrate, and the second camera 3 captures images including the light source board 15 and the plugin shaft 16. In this embodiment, the first camera 2 is a wide-angle camera, and the second camera 3 is a normal camera. The Raspberry Pi control module receives and processes the images including the operator's body and the substrate, and the images including the light source board 15 and the plugin shaft 16, and detects the key points of the operator's body, the light source board 15, and the plugin shaft 16 to determine whether the operator is approaching or contacting the plugin shaft 16, and whether the plugin shaft 16 is in an unretracted state after the plugin operation is completed. If the operator approaches or contacts the plugin shaft 16, or the plugin shaft 16 is in an unretracted state after the plugin operation is completed, a corresponding risk level is generated. The alarm module 4 automatically triggers an alarm task according to the corresponding risk level, thereby effectively ensuring the safety of the operator and the special-shaped plugin machine body 1. In one embodiment, the alarm module 4 is an alarm light. When the Raspberry Pi control module detects that the operator is approaching but not contacting the plugin shaft 16, the risk level can be determined to be a minor danger, and the alarm light will flash yellow light in time. When the Raspberry Pi control module detects that the operator contacts the plugin shaft 16 or the plugin shaft 16 is in an unretracted state after the plugin operation is completed, the risk level can be determined to be a serious danger, and the alarm light will flash red light in time.
[0053] Furthermore, since the Raspberry Pi control module is electrically connected to the power supply of the special-shaped plugin machine body 1 through the relay, when the Raspberry Pi control module detects that the operator contacts the plugin shaft 16 or the plugin shaft 16 is in an unretracted state after the plugin operation is completed, that is, when the risk level is a serious danger, the Raspberry Pi control module will control the relay to disconnect the power supply of the special-shaped plugin machine body 1, thereby ensuring the safety of the operator and the special-shaped plugin machine body 1. When the plugin shaft 16 moves forward and backward or left and right, the light source board 15 also moves forward and backward or left and right together with the plugin shaft 16. The setting of the light source board 15 can effectively reduce problems such as image shadows, overexposure, or underexposure caused by uneven or insufficient light, making the images captured by the first camera 2 and the second camera 3 clearer.
[0054] In this solution, through the mutual cooperation of the first camera 2, the second camera 3 and the Raspberry Pi control module, it is possible to detect whether the operator approaches or contacts the plug-in shaft 16, and whether the plug-in shaft 16 is in an unretracted state after the plug-in operation is completed, thus effectively ensuring the safety of the operator and the special-shaped plug-in machine body 1. Compared with the traditional method of using a safety light curtain to detect the telescopic state of the plug-in shaft after the plug-in operation is completed, this solution uses the first camera 2, the second camera 3 and the Raspberry Pi control module instead of the safety light curtain for detection. This not only effectively saves the limited space resources inside the special-shaped plug-in machine, but also avoids the safety light curtain from blocking the transportation of the substrate.
[0055] Preferably, the three-axis drive mechanism 14 includes two first lead screw motor modules 141, a second lead screw motor module 142, a moving frame 143, a light source board mounting bracket 144, and a number of air cylinders (not shown in the figure). The first lead screw motor module 141 includes a first slider (not shown in the figure), and the second lead screw motor module 142 includes a second slider (not shown in the figure).
[0056] The two first lead screw motor modules 141 are horizontally installed on the left and right sides of the frame 11 in parallel. The two first lead screw motor modules 141 are both arranged in the front-rear direction. The second lead screw motor module 142 is arranged in the left-right direction. The left and right ends of the second lead screw motor module 142 are respectively slidably arranged on the first sliders of the two first lead screw motor modules 141. The moving frame 143 is slidably arranged on the second slider of the second lead screw motor module 142. The top of the light source board mounting bracket 144 and a number of the air cylinders 145 are both installed inside the moving frame 143. The light source board 15 is installed at the bottom of the light source board mounting bracket 144. The first ends of a number of the plug-in shafts 16 are respectively connected to the driving ends of the corresponding air cylinders.
[0057] The light source board 15 is provided with at least two rectangular openings 150, and the rectangular openings 150 are used to provide a retractable space for the plug-in shafts 16.
[0058] In this embodiment, as Figures 1-3As shown, both the first lead screw motor module 141 and the second lead screw motor module 142 are structures of the prior art. The first lead screw motor module 141 further includes a first stepper motor (not marked in the figure), a first long strip mounting seat (not marked in the figure), a first lead screw (not marked in the figure), and a first guide rail (not marked in the figure). The first stepper motor is installed on one side of the first long strip mounting seat. The first lead screw and the first guide rail are both arranged inside the first long strip mounting seat. The first lead screw and the first guide rail are arranged in parallel. One end of the first lead screw is connected to the driving end of the first stepper motor. The first slider is arranged on the first guide rail and is threadedly connected to the first lead screw. By starting the first stepper motor, the first stepper motor can drive the first slider to perform a linear motion. The second lead screw motor module 142 further includes a second stepper motor (not marked in the figure), a second long strip mounting seat (not marked in the figure), a second lead screw (not marked in the figure), and a second guide rail (not marked in the figure). The second stepper motor is installed on one side of the second long strip mounting seat. The second lead screw and the second guide rail are both arranged inside the second long strip mounting seat. The second lead screw and the second guide rail are arranged in parallel. One end of the second lead screw is connected to the driving end of the second stepper motor. The second slider is arranged on the second guide rail and is threadedly connected to the second lead screw. By starting the second stepper motor, the second stepper motor can drive the second slider to perform a linear motion.
[0059] When the plug shaft 16 or the light source board 15 needs to move back and forth, it can be achieved by starting the first lead screw motor module 141; when the plug shaft 16 or the light source board 15 needs to move left and right, it can be achieved by starting the second lead screw motor module 142; when the plug shaft 16 needs to move up and down, it can be achieved by starting the cylinder. Further explanation, during the up and down telescopic movement of the plug shaft 16, the rectangular opening 150 can effectively prevent the light source board 15 from blocking the movement of the plug shaft 16, so that the gripper 160 at the end of the plug shaft 16 can grip and release the electronic components to be inserted.
[0060] Preferably, the Raspberry Pi control module includes:
[0061] An image processing sub-module for preprocessing the images containing the operator's body and the substrate and the images containing the light source board 15 and the plug shaft 16 respectively, to obtain the preprocessed images containing the operator's body and the substrate and the preprocessed images containing the light source board 15 and the plug shaft 16;
[0062] A YOLOv8-Pose model construction sub-module for constructing a YOLOv8-Pose model;
[0063] A YOLOv8-Pose model training sub-module for training the YOLOv8-Pose model to obtain a trained YOLOv8-Pose model;
[0064] The detection sub-module is used to input the pre-processed images containing the operator's body and the substrate and the pre-processed images containing the light source board 15 and the plug-in shaft 16 into the trained YOLOv8-Pose model for detection, and output the key points of the operator's body, the light source board 15 and the plug-in shaft 16.
[0065] In this embodiment, by setting the image processing sub-module, it is beneficial to improve the quality of the images containing the operator's body and the substrate and the images containing the light source board 15 and the plug-in shaft 16. By setting the YOLOv8-Pose model construction sub-module, a solid foundation can be laid for subsequent detection tasks. The YOLOv8-Pose model has a small computational amount and faster inference speed on low-computing-power embedded devices such as Raspberry Pi. At the same time, the YOLOv8-Pose model is more suitable for tracking target points, such as the end of the plug-in shaft, the hands and heads of the human body, etc. By setting the YOLOv8-Pose model training sub-module, the feature extraction and key point detection capabilities of the YOLOv8-Pose model can be effectively improved. In practical applications, the detection sub-module can quickly and accurately identify the key points in the images containing the operator's body, the light source board 15 and the plug-in shaft 16, which not only significantly improves the detection efficiency but also greatly enhances the detection accuracy.
[0066] Preferably, the Raspberry Pi control module further includes:
[0067] An acquisition sub-module for acquiring the key point coordinate information of the light source board 15 and the plug-in shaft 16;
[0068] A calculation sub-module for calculating the Euclidean distance between the key points of the light source board 15 and the key points of the plug-in shaft 16. The specific calculation formula is as follows:
[0069]
[0070] Where d represents the Euclidean distance between the key points of the light source board 15 and the key points of the plug-in shaft 16, (x1, y1) represents the key point coordinates of the plug-in shaft 16, and (x2, y2) represents the key point coordinates of the light source board 15;
[0071] A judgment sub-module for judging whether the Euclidean distance d between the key points of the light source board 15 and the key points of the plug-in shaft 16 is less than the preset safety threshold D threshold , if so, it means that the plug-in shaft 16 is in the non-retracted state, and if not, it means that the plug-in shaft 16 is in the retracted state.
[0072] In this embodiment, the preset safety threshold D thresholdIt is 5 cm. Through the mutual cooperation of the acquisition sub-module, the calculation sub-module and the judgment sub-module, the analysis of the key point position relationship between the light source board 15 and the plug-in shaft 16 is realized, so as to effectively distinguish the non-retracted state and the retracted state of the plug-in shaft 16.
[0073] On the other hand, the present application provides a safety detection method for a special-shaped plug-in machine, and the method includes the following steps:
[0074] Step S1: Place the substrate at the left end of the substrate transportation mechanism 12, and the substrate moves to the right under the action of the substrate transportation mechanism 12;
[0075] Step S2: When the substrate is transported to the designated position on the substrate transportation mechanism 12, start the three-axis driving mechanism 14, and the three-axis driving mechanism 14 drives the plug-in shaft 16 to move, so that the gripper 160 at the end of the plug-in shaft 16 can grab the electronic component to be inserted in the feeding mechanism 13 and install the electronic component to be inserted at the position on the substrate where it needs to be installed;
[0076] During the plug-in operation of the plug-in shaft 16, steps S3-S5 are synchronously executed;
[0077] Step S3: Collect an image containing the operator's body and the substrate through the first camera 2, and the second camera 3 collects an image containing the light source board 15 and the plug-in shaft 16, and transmits the image containing the operator's body and the substrate and the image containing the light source board 15 and the plug-in shaft 16 to the Raspberry Pi control module;
[0078] Step S4: The Raspberry Pi control module receives and processes the image containing the operator's body and the substrate and the image containing the light source board 15 and the plug-in shaft 16, and detects the key points of the operator's body, the light source board 15 and the plug-in shaft 16 to judge whether the operator is close to or in contact with the plug-in shaft 16, and whether the plug-in shaft 16 is in the non-retracted state after the plug-in operation is completed. If the operator is close to or in contact with the plug-in shaft 16, or the plug-in shaft 16 is in the non-retracted state after the plug-in operation is completed, a corresponding risk level is generated and transmitted to the alarm module 4;
[0079] Step S5: The alarm module 4 receives the corresponding risk level and automatically triggers an alarm task accordingly;
[0080] Step S6: When the substrate completes the plug-in operation of all the electronic components to be inserted that need to be installed, a circuit board is formed, and the circuit board is transported to the right end of the substrate transportation mechanism 12 for blanking under the action of the substrate transportation mechanism 12.
[0081] A safety detection method for a special-shaped component insertion machine in this solution realizes the detection of whether an operator approaches or contacts the component insertion shaft 16 and whether the component insertion shaft 16 is in an unretracted state after completing component insertion by executing steps S1 - S6, thereby effectively ensuring the safety of the operator and the special-shaped component insertion machine body 1. Compared with the traditional method of using a safety light curtain to detect the telescopic state of the component insertion shaft after completing component insertion, this solution uses a first camera 2, a second camera 3, and a Raspberry Pi control module to replace the safety light curtain for detection. This not only effectively saves the limited space resources inside the special-shaped component insertion machine but also avoids the safety light curtain from blocking the transportation of the substrate.
[0082] Preferably, in step S4, it specifically includes the following sub-steps:
[0083] Step S41: Preprocess the images containing the operator's body and the substrate and the images containing the light source board 15 and the component insertion shaft 16 respectively to obtain the preprocessed images containing the operator's body and the substrate and the preprocessed images containing the light source board 15 and the component insertion shaft 16;
[0084] Step S42: Construct a YOLOv8 - Pose model;
[0085] Step S43: Train the YOLOv8 - Pose model to obtain the trained YOLOv8 - Pose model;
[0086] Step S44: Input the preprocessed images containing the operator's body and the substrate and the preprocessed images containing the light source board 15 and the component insertion shaft 16 into the trained YOLOv8 - Pose model for detection, and output the key points of the operator's body, the light source board 15, and the component insertion shaft 16.
[0087] In this embodiment, in step S41, by preprocessing the images including the operator's body and the substrate and the images including the light source board 15 and the plug-in shaft 16 respectively, it is beneficial to improve the quality of the images including the operator's body and the substrate and the images including the light source board 15 and the plug-in shaft 16. In step S42, by constructing the YOLOv8-Pose model, it is beneficial to lay a solid foundation for subsequent detection tasks. In step S43, by collecting a large number of historical image datasets to train the YOLOv8-Pose model, it is beneficial to improve the feature extraction and key point detection capabilities of the YOLOv8-Pose model. In step S44, by inputting the preprocessed images including the operator's body and the substrate and the preprocessed images including the light source board 15 and the plug-in shaft 16 into the trained YOLOv8-Pose model for detection, the key points in the images including the operator's body, the light source board 15 and the plug-in shaft 16 can be quickly and accurately identified.
[0088] Preferably, in step S4, it specifically further includes the following sub-steps:
[0089] Step S45: Obtain the key point coordinate information of the light source board 15 and the plug-in shaft 16;
[0090] Step S46: Calculate the Euclidean distance between the key points of the light source board 15 and the key points of the plug-in shaft 16. The specific calculation formula is as follows:
[0091]
[0092] Where d represents the Euclidean distance between the key points of the light source board 15 and the key points of the plug-in shaft 16, (x1, y1) represents the key point coordinates of the plug-in shaft 16, and (x2, y2) represents the key point coordinates of the light source board 15;
[0093] Step S47: Determine whether the Euclidean distance d between the key points of the light source board 15 and the key points of the plug-in shaft 16 is less than the preset safety threshold D threshold , if so, it means that the plug-in shaft 16 is in the non-retracted state, and if not, it means that the plug-in shaft 16 is in the retracted state.
[0094] In this embodiment, by executing steps S45 - S47, the analysis of the key point position relationship between the light source board 15 and the plug-in shaft 16 is realized, so as to effectively distinguish the non-retracted state and the retracted state of the plug-in shaft 16.
[0095] In addition, each functional unit in various embodiments of the present invention may be integrated into one processing module, may exist physically separately for each unit, or two or more units may be integrated into one module. The above integrated module may be implemented in the form of hardware or in the form of a software functional module. When the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0096] Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.
Claims
1. A safety detection system for special-shaped plug-in machines, characterized in that: It includes a special-shaped plug-in machine body, a first camera, a second camera, an alarm module, a Raspberry Pi control module and a relay. The special-shaped plug-in machine body includes a frame, a substrate transport mechanism, a plurality of feeding mechanisms, a three-axis driving mechanism, a light source board, a plurality of plug-in axes and a power supply; The substrate transport mechanism is arranged inside the frame along the left-right direction, the substrate transport mechanism is used to transport the substrate, a plurality of the feeding mechanisms are evenly distributed on the front and rear sides of the substrate transport mechanism, the feeding mechanism is used to provide and transport the electronic components to be inserted, the three-axis driving mechanism is arranged inside the frame, the three-axis driving mechanism is located above the substrate transport mechanism and the feeding mechanism, the light source board and a plurality of the plug-in shafts are arranged on the three-axis driving mechanism, the three-axis driving mechanism is used to drive the light source board to move forward and backward and left and right, and drive the plug-in shaft to move forward and backward, left and right, and up and down; The ends of several of the plug-in shafts are provided with a grasping and releasing member, which is used to grasp and release the electronic components to be inserted, the first camera and the second camera are respectively installed on the left rear side and the right rear side inside the rack, the first camera and the second camera are symmetrically distributed on the left and right sides, the first camera is used to collect images containing the operator's body and the substrate, and the second camera is used to collect images containing the light source board and the plug-in shaft; the Raspberry Pi control module is electrically connected to the power supply through the relay, the Raspberry Pi control module is used to receive and process images containing the operator's body and the substrate and images containing the light source board and the plug-in shaft, and detect key points of the operator's body, the light source board and the plug-in shaft to determine whether the operator is close to or in contact with the plug-in shaft, and whether the plug-in shaft is in an unretracted state after completing the plug-in operation, if the operator is close to or in contact with the plug-in shaft, or the plug-in shaft is in an unretracted state after completing the plug-in operation, a corresponding risk level is generated; The alarm module is arranged on the top of the rack, and is used for automatically triggering an alarm task according to a corresponding risk level.
2. A safety detection system for special-shaped plug-in machines according to claim 1, characterized in that: The three-axis driving mechanism includes two first screw motor modules, a second screw motor module, a moving frame, a light source board mounting frame and a plurality of cylinders, the first screw motor module includes a first slider, and the second screw motor module includes a second slider; The two first screw motor modules are mounted parallel to each other on the left and right sides of the frame, the two first screw motor modules are arranged along the front-to-back direction, the second screw motor module is arranged along the left-to-right direction, the left and right ends of the second screw motor module can be slidably arranged on the first sliders of the two first screw motor modules, the movable frame can be slidably arranged on the second sliders of the second screw motor module, the top of the light source board mounting frame and the plurality of cylinders are installed inside the movable frame, the light source board is installed on the bottom of the light source board mounting frame, and the head ends of the plurality of plug-in shafts are respectively connected to the driving ends of the corresponding cylinders; The light source plate is provided with at least two rectangular openings, and the rectangular openings are used to provide a retractable space for the plug-in shaft.
3. A safety detection system for special-shaped plug-in machines according to claim 1, characterized in that: The Raspberry Pi control module includes: An image processing submodule, used to preprocess the image containing the operator's body and the substrate and the image containing the light source board and the plug-in shaft, respectively, to obtain an image containing the operator's body and the substrate and an image containing the light source board and the plug-in shaft after preprocessing; YOLOv-Pose model construction submodule, used to build the YOLOv-Pose model; The YOLOv-Pose model training submodule is used to train the YOLOv-Pose model to obtain the trained YOLOv-Pose model; The detection submodule is used to input the preprocessed image containing the operator's body and the substrate and the preprocessed image containing the light source board and the plug-in axis into the trained YOLOv-Pose model for detection, and output the key points of the operator's body, the light source board and the plug-in axis.
4. A safety detection system for special-shaped plug-in machines according to claim 3, characterized in that: The Raspberry Pi control module also includes: An acquisition submodule, used for acquiring key point coordinate information of the light source board and the plug-in axis; The calculation submodule is used to calculate the Euclidean distance between the key point of the light source board and the key point of the plug-in axis. The specific calculation formula is as follows: Wherein, d represents the Euclidean distance between the key point of the light source board and the key point of the plug-in axis, (x1, y1) represents the coordinates of the key point of the plug-in axis, and (x2, y2) represents the coordinates of the key point of the light source board; A judgment submodule is used to judge whether the Euclidean distance d between the key point of the light source board and the key point of the plug-in axis is less than a preset safety threshold D threshold If so, it means that the plug-in shaft is in an unretracted state; if not, it means that the plug-in shaft is in a retracted state.
5. A safety detection method for a special-shaped plug-in machine, applied to the safety detection system for a special-shaped plug-in machine as claimed in any one of claims 1 to 4, characterized in that: The method comprises the following steps: Step S1: placing a substrate at the left end of the substrate transport mechanism, and the substrate moves to the right under the action of the substrate transport mechanism; Step S2: when the substrate is transported to the designated position on the substrate transport mechanism, the three-axis driving mechanism is started, and the three-axis driving mechanism drives the plug-in shaft to move, so that the grabbing and releasing member at the end of the plug-in shaft can grab the electronic component to be installed in the feeding mechanism, and install the electronic component to be installed at the position to be installed on the substrate; During the plug-in operation of the plug-in shaft, steps S3-S5 are executed synchronously; Step S3: The first camera collects an image including the operator's body and the substrate, and the second camera collects an image including the light source board and the plug-in shaft, and transmits the image including the operator's body and the substrate and the image including the light source board and the plug-in shaft to the Raspberry Pi control module; Step S4: the Raspberry Pi control module receives and processes an image including an operator's body and a substrate and an image including the light source board and the plug-in shaft, and detects key points of the operator's body, the light source board and the plug-in shaft to determine whether the operator is close to or in contact with the plug-in shaft, and whether the plug-in shaft is in an unretracted state after completing the plug-in operation. If the operator is close to or in contact with the plug-in shaft, or the plug-in shaft is in an unretracted state after completing the plug-in operation, a corresponding risk level is generated, and the corresponding risk level is transmitted to the alarm module; Step S5: the alarm module receives the corresponding risk level and automatically triggers an alarm task accordingly; Step S6: After the insertion operation of all the electronic components to be installed is completed on the substrate, a circuit board is formed. The circuit board is transported to the right end of the substrate transport mechanism for unloading under the action of the substrate transport mechanism.
6. A safety detection method for a special-shaped insertion machine according to claim 5, characterized in that: In step S4, the following sub-steps are specifically included: Step S41: preprocessing the image containing the operator's body and the substrate and the image containing the light source board and the plug-in shaft respectively to obtain the image containing the operator's body and the substrate and the image containing the light source board and the plug-in shaft after preprocessing; Step S42: construct a YOLOv-Pose model; Step S43: training the YOLOv-Pose model to obtain a trained YOLOv-Pose model; Step S44: input the preprocessed image containing the operator's body and the substrate and the preprocessed image containing the light source board and the plug-in axis into the trained YOLOv-Pose model for detection, and output the key points of the operator's body, the light source board and the plug-in axis.
7. A safety detection method for a special-shaped insertion machine according to claim 6, characterized in that: In step S4, the following sub-steps are specifically included: Step S45: obtaining key point coordinate information of the light source board and the plug-in axis; Step S46: Calculate the Euclidean distance between the key point of the light source board and the key point of the plug-in axis. The specific calculation formula is as follows: Wherein, d represents the Euclidean distance between the key point of the light source board and the key point of the plug-in axis, (x1, y1) represents the coordinates of the key point of the plug-in axis, and (x2, y2) represents the coordinates of the key point of the light source board; Step S47: Determine whether the Euclidean distance d between the key point of the light source board and the key point of the plug-in axis is less than a preset safety threshold D threshold If so, it means that the plug-in shaft is in an unretracted state; if not, it means that the plug-in shaft is in a retracted state.