PROCEDURE AND SYSTEM FOR INSPECTING A COMPONENT WITH LEADS TO DETERMINE ITS FITNESS FOR ASSEMBLY

Abstract: Procedure and system for inspecting a component (1) with leads to determine its fitness for assembly before the component is placed on a circuit board. In the procedure, a narrow illuminating beam (10) is directed at a light-sensitive detector (11). The component (1) and the illuminating beam (10) are moved in relation to each other so that the position as a function of time is known and that the leads (4) of the component pass through the illuminating beam. The illuminating beam thus reaches the light-sensitive detector when it falls between leads, whereas when it falls on leads, the leads cast a shadow, preventing the beam from reaching the light-sensitive detector. The pulse produced by the light-sensitive detector as a result of the illuminating beam being intercepted by the shadowing effect of the leads is registered. Based on the pulse, the width of the lead row and/or the distance between adjacent lead rows are/is computed. The computed width and/or distance are/is compared with a specified allowed respective limit value. The component is placed on the circuit board if the width and/or the distance between adjacent lead rows computed on the basis of the measurement are/is within the allowed limits, or alternatively the component is rejected and removed without placing it on the circuit board if the measured value/values differ undesirably from the allowed limit values.

Description: PROCEDURE AND SYSTEM FOR INSPECTING A COMPONENT WITH LEADS TO DETERMINE ITS FITNESS FOR ASSEMBLY FIELD OF THE INVENTION The present invention relates to a procedure and system for inspecting a component with leads to determine its fitness for assembly in conjunction with automatic circuit board assembly performed using an assembly robot before the component is placed on a circuit board, said component having a row of at least two leads to be inserted into corresponding holes in the circuit board, said robot being equipped with a gripper for taking hold of the component . BACKGROUND OF THE INVENTION For automatic placement of components on a circuit board, usually an assembly robot is used in a computer-controlled assembly robot cell provided with a circuit board conveyor, which brings the circuit board to an assembly station located within the working area of the robot. The assembly robot is preferably a xyzw-robot (also called as a xyzrz-robot) which refers to a robot having four degrees of freedom (x, y, z, w) . The robot is provided with grippers for tak- ing hold of a component. The robot is capable of three-dimensional motion in x, y and z directions which form the three degrees of freedom and the rotation of the grippers about z-axis forms the fourth degree of freedom (w) . The robot is e.g. a portal robot working in the space above the circuit board conveyor. It fetches one component at a time from a component feed device and places it in a specified location on the circuit board. Before being placed on the circuit board, the component must be inspected to determine whether it is fit for assembly. The leads of the component must be aligned in a sufficiently straight line and they must not have too much sideways bends because in that case they would not go through the holes in the circuit board. It is also important to check the position of the leads of the component in relation to the gripper. In prior art, vision procedures and systems based on machine vision for inspecting electronic components to determine their fitness for assembly are known. This type of systems based on machine vision are manufactured e.g. by the American companies Adept Technology Inc. (San Jose, USA) and Cognex Corporation (Massachusetts, USA) . A prior-art system comprises an upward directed camera disposed at a fixed location beside a circuit board conveyor. A robot first takes each component, with the leads pointing downward, onto the optics of the camera, which takes a picture of the tips of the leads from below, whereupon a vision program comprised in the system computes the positions of the leads on the basis of the image and compares them with approved reference values. If the vision software finds that the detected lead positions are not within acceptable tolerances, i.e. one or more leads have been bent, then the software instructs the robot to reject the component and get a new one for inspection and assembly. A problem with this prior-art procedure and system is that it is very expensive as it incorporates many components: a camera, lighting, a machine vision processor with software to develop applications, a video monitor to display images, user interface etc. A further problem is that there are many factors impairing the reliability of machine vision. The image may be blurred due to reflections, and the con- trast between the component body and the leads may be poor. Also, the colour of the component body visible on the background of the leads may cause blurring of the image. The leads may not be distinct enough from the background. In order to be able to distinguish the leads from the background of the component bodies of different colours one would need to arrange different kind of illuminations specific for each colour. In principle, this problem could be solved in the machine vision system by taking two pictures of the component from its two sides from one end of the lead row instead of photographing it from below. Such a solution is applicable in the case of small components that fit completely in the image area of the camera. However, the problems associated with the machine vision system become more pronounced especially in the case of large components that do not fit in the image area of the camera. To achieve a reliable and sufficiently accurate inspection result, it is necessary to use macro optics and a small image area. For instance, a large connector, which may have as many as hundreds of leads arranged in straight rows in two di- rections perpendicular to each other, will not fit in the image area at once, so that, in order to produce a picture of the entire row of leads, the camera would have to be moved in relation to the component or vice versa during the inspection to produce two or more pictures of the same component. A complicated camera scanning method like this, intended for surface mounted components, is described in specification US 5,805,722. In the case of large components with long rows of leads, the long row of leads cannot be reliably inspected using a camera even if pictures are taken from the end of the row. The reason for this is the poor depth resolution and parallax error of the required camera optics. There are also systems in which a picture of the component is taken in motion, but this imposes great demands on the vision software, which therefore becomes heavy and expensive. A further problem is that taking the component aside from the route between the component feed device and the circuit board in order to take a picture of it significantly retards the assembly process. The object of the present invention is to eliminate the drawbacks described above. A specific object of the present invention is to disclose a simple, cheap and reliable inspection procedure and system for inspecting a component to determine its fitness for assembly without substantially retarding the assembly process. A further object of the invention is to dis- close a procedure and system that allow a component fitness inspection to be performed while the component is being transferred to an assembly station, without stopping the transferring motion. An additional object of the invention is to disclose a procedure and system by which it is possible to reliably inspect the leads of components and ascertain that the leads have not been bent, on all components regardless of the number of leads (e.g. 2 - 500) and the colour and lead profile of the component. As for the features characteristic of the invention, reference is made to the claims. BRIEF DESCRIPTION OF THE INVENTION In the procedure of the invention, a narrow illuminating beam is directed at a light-sensitive detector; the component and the illuminating beam are moved in relation to each other in the direction of the width and/or length of the row of leads so that the position as a function of time is known and so that the leads of the component pass through the illuminating beam, the illuminating beam thus reaching the light-sensitive detector when it falls between leads, whereas when it falls on leads, the leads cast a shadow, preventing the beam from reaching the light- sensitive detector; the pulse produced by the light- sensitive detector as a result of the illuminating beam being intercepted by the shadowing effect of the leads is registered; based on the pulse, the width of the lead row and/or the distance between adjacent leads rows are/is computed; the width of the lead row and/or the distance between adjacent leads rows are/is compared with a specified allowed respective limit value; and the component is placed on the circuit board if the width and/or the distance between adjacent lead rows computed on the basis of the measurement are/is within the allowed limits, or alterna- tively the component is rejected and removed without placing it on the circuit board if the measured value/values differ from the allowed limit values. Width of the lead row refers to the width perpendicular to the length of the row. In an ideal case, the row width corresponds to the width of one lead, i.e. when the leads are in a straight line. A lateral divergence of a lead increases the width of the row. The row width can be assigned a limit value that it must not exceed. The invention is based on the insight that measuring the width of the lead row and/or the distance between two adjacent rows is a sufficient expedient for detecting bent leads. The invention has the advantage that it provides a fast and reliable procedure that does not re- tard the assembly process and is applicable for use with all components with leads regardless of the number of leads. The system is cheap, its production costs are about a tenth of the costs of a machine vision system and it is more reliable than the latter. Furthermore, the procedure and system allow a component to be inspected while it is being trans- ferred to an assembly station, without stopping the transferring movement. A further advantage provided by the invention is that an inspection of leads can be performed on all components no matter how many leads (e.g. 2 - 500) the component has, regardless of component colour and lead profile. In an embodiment of the procedure, component is taken hold of and moved by means of a gripper of an xyzw-robot. In an embodiment of the procedure, the lead row of the component is inspected by moving the component in relation to a stationary illuminating beam. In an embodiment of the procedure, the compo- nent is passed cross the illuminating beam in the direction of the width and/or length of the row of the leads . In an embodiment of the procedure, the width of the lead row and/or the distance between adjacent lead rows is computed on the basis of the start and end instants of the pulse. In an embodiment of the procedure, the illuminating beam is directed at the light-sensitive detector in a horizontal plane in the x-direction. For example, in the coordinate system of the assembly robot, x-direction refers to a horizontal direction which is the same as the direction of motion of the circuit board conveyor. In this case, y-direction means a horizontal direction perpendicular to the x- direction. The circuit board lies on a xy-plane. z- direction again means a vertical direction. However, it is to be noted that the invention is not bound to a coordinate system like this, but instead other coordinate systems are possible. In one embodiment of the procedure, before being moved through the illuminating beam, the compo- nent is rotated (about the z-axis) so that the lead row becomes parallel to the illuminating beam. In an embodiment of the procedure, before being moved through an illuminating beam, the component is set to a position where the lead row lies in the x- direction in a horizontal plane, and the component is moved in the y-direction through the illuminating beam. In an embodiment of the procedure, before be- ing moved through an illuminating beam, the component is set to a position where the lead row lies in a horizontal plane in the y-direction, which is perpendicular to the x-direction, and the component is moved in the y-direction through the illuminating beam. In an embodiment of the procedure, the component is moved simultaneously in the x and y directions through an illuminating beam. In an embodiment of the procedure, before being moved through an illuminating beam, the component is set in the z-direction, which is perpendicular to the x and y directions, to a position where the plane of the illuminating beam intersects the leads at a suitable specified distance from their free ends. The illuminating beam intersects the leads more preferably adjacent to the free ends of the leads, and not in the vicinity of the component body to which the leads are fixed. In an embodiment of the procedure, the lead row of the component is inspected by moving the compo- nent through a horizontal illuminating beam, which preferably is parallel to the x-direction, first in one direction and then turning the component horizontally through 90° and moving it again through the same illuminating beam. In an embodiment of the procedure, two parallel illuminating beams placed at a distance from each other, preferably in the x-direction, are provided. The lead row of the component is inspected using a first illuminating beam; the component is turned horizontally through 90°. Then the lead row of the component is inspected using a second illuminating beam. In an embodiment of the procedure, two illuminating beams perpendicular to each other are provided. The lead row is inspected by moving the component through both illuminating beams. In an embodiment of the procedure, while the component is being moved through an illuminating beam, the supposed position coordinates of a specified lead of the component are registered from the control unit of the robot on the basis of position data for the gripper of the robot. Next, based on a pulse regis- tered by the light-sensitive detector and corresponding to the specified lead, the actual position coordinates of said specified lead are computed. The supposed position coordinates of the lead are compared with the computed actual position coordinates, and if they differ from each other, then the position coordinates of the lead of the component are calibrated so as to make them correspond to the computed actual value to allow the insertion coordinates for the placement to be determined. In an embodiment of the procedure the illuminating beam is generated using a laser. In the scope of the invention, instead of a laser, any other applicable light sources capable of generating a sufficiently narrow light beam can be used. According to the invention, the system comprises an inspection device comprising a light source for the generation of an illuminating beam and a light-sensitive detector at which the illuminating beam is directed; means for moving the component and the illuminating beam relative to each other so that the position as a function of time is known and so that the leads of the component pass through the illu- minating beam, the illuminating beam thus reaching the light-sensitive detector when it falls between leads, whereas when it falls on leads, the leads cast a shadow, preventing the beam from reaching the light - sensitive detector; means for registering the pulse produced by the light-sensitive detector as a result of the illuminating beam being intercepted by the shadowing effect of the leads; means for computing the width of the lead row and/or the distance between ad- jacent lead rows on the basis of the pulse; and means for comparing the computed width of the lead row and/or the computed distance between adjacent lead rows with a specified allowed limit value. In an embodiment of the system, the system comprises means arranged to register the supposed position coordinates of a specified lead of the component from the control unit of a robot on the basis of position data for the gripper of the robot; means arranged to compute, based on the pulse registered by the light-sensitive detector and corresponding to the specified lead, the actual position coordinates of said specified lead; and means arranged to compare the supposed position coordinates of the lead with the computed actual position coordinates and, if they dif- fer from each other, to calibrate the position coordinates of the lead of the component so as to make them correspond to the computed actual value to allow the insertion coordinates for the placement to be determined. In an embodiment of the system, the means for moving the component are disposed to move the component in the widthways and/or lengthways direction of the lead row. In an embodiment of the system, the inspec- tion device is fixedly mounted in place. The xyzw- robot is arranged to move the component in relation to the illuminating beam. In an embodiment of the system, the light source is so disposed that the illuminating beam is horizontal . In an embodiment of the system, the asssembly robot is a xyzw-robot. In an embodiment of the system, the light source is so disposed that the illuminating beam is parallel to the x-direction in the coordinate system of the xyzw-robot while the circuit board lies in the xy-plane. In an embodiment of the system, the system comprises two adjacent inspection devices with illuminating beams parallel to each other and at a distance from each other. In an embodiment of the system, the system comprises two inspection devices with illuminating beams perpendicular to each other. In an embodiment of the system, at least one of the inspection devices is disposed between the com- ponent feed device and the circuit board conveyor. In an embodiment of the system, the inspection device/devices is/are so disposed with respect to the circuit board assembly station that the inspection of leads can be performed during the robot movement transferring the component between the component feed station and the circuit board, without stopping the transferring movement and substantially without diverging from the transfer route between the component feed station and the assembly station. In an embodiment of the system, the light source is a laser. In the scope of the invention, instead of a laser, any other applicable light sources capable of generating a sufficiently narrow light beam can be used. In an embodiment of the system the diameter of the illuminating beam is smaller than or equal to the thickness of the lead. In an embodiment of the system diameter of the illuminating beam is of the order of 0.1 mm. In a further procedure of the invention a narrow illuminating beam is directed at a light- sensitive detector; the component and the illuminating beam are moved in relation to each other so that the position as a function of time is known and so that the leads of the component pass through the illuminating beam, the illuminating beam thus reaching the light-sensitive detector when it falls between leads, whereas when it falls on a lead, the lead prevents the beam from reaching the light-sensitive detector; the pulse produced by the light-sensitive detector as a result of the illuminating beam being intercepted by the shadowing effect of the lead is registered; based on the pulse, the width of the lead and/or the distance between adjacent leads is computed; the width of the lead and/or the distance between adjacent leads are/is compared with a specified allowed respective limit value; and the component is placed on the circuit board if the width and/or the distance between adjacent leads computed on the basis of the measurement are/is within the allowed limits, or alternatively the component is rejected and removed without placing it on the circuit board if the measured value/values differ from the allowed limit values. For the components having lead rows which are in an angle other than perpendicular to each other, for example 45°, as the component is viewed from a side, it is also possible to see all leads instead of lead rows. Therefore it is possible with the procedure of the invention to inspect also individual leads and detect missing leads. In the following, the invention will be de- scribed in detail by the aid of a few examples of its embodiments with reference to the attached drawings, wherein BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 presents a diagrammatic side view of a laboratory robot cell provided with an embodiment of the inspection system of the invention, Fig. 2 presents a diagrammatic top view of the laboratory robot cell in Fig. 1, Fig. 3 presents a block diagram representing a principle of a system according to the invention, Fig. 4 and 5 present diagrams illustrating a certain phase of the procedure of the invention, Fig. 6 and 7 present diagrams illustrating another phase of the procedure of the invention, Fig. 8 presents an end view of a connector with several rows of leads, to be inspected using the procedure and system of the invention, Fig. 9 presents the connector in Fig. 8 as seen from the direction IX-IX, Fig. 10 represents the signal produced by the light-sensitive detector during the inspection of the rows 6 of leads of the connector in Fig. 8 and 9, together with the output signal of the robot's axis of motion. Fig. 11 - 14 present diagrammatic views of a first, second, third and fourth embodiments of the procedure and system, illustrating the routes and directions of the transfer of components from the component feed station via the lead inspection stage to the circuit board. Fig. 15 presents a diagrammatic block diagram of a fifth embodiment of the system. Fig. 16 presents a diagrammatic block diagram of a special PC-card of the system of Fig. 15. DETAILED DESCRIPTION OF THE INVENTION Fig. 1 and 2 present an assembly robot cell provided with a system according to the invention for inspecting the leads of components, which automatically inspects each component before placing it on a circuit board to determine whether the component has any bent leads and whether it can be placed on the circuit board at all or whether it must be rejected and removed. In addition, based on the information obtained from the inspection procedure, the system auto- matically optimises the setting coordinates for the component if this is necessary due to a possible inaccuracy in the manner the component is held by the gripper or similar reasons. The assembly robot cell comprises a circuit board conveyor 21, which brings the circuit board 3 to an assembly station, where it is fixed in a predetermined precise position. The circuit board conveyor 21 is located in the working area of an overhead xyzw- portal robot 2 with four degrees of freedom. The coor- dinate system of the robot has been so defined that the x-direction is a horizontal direction corresponding to the direction of motion of the circuit board conveyor 21. The y-direction is a horizontal direction perpendicular to the x-direction. The z-direction is a vertical direction. The letter "w" in the term "xyzw- robot" refers to that the gripper is also rotatable about the z-axis. The assembly cell is provided with a number of component feed devices 20 located in the working area of the robot, each device feeding a specified component type . The robot can take one component at a time from the component feed device 20 and hold it in its grip. Disposed between the component feed device 20 and the circuit board conveyor 21 are inspection devices 8 according to the invention, the example in Fig. 2 comprising two such devices placed side by side . The inspection device 8 comprises a laser 9, from which a narrow laser beam 10 is directed in the x-direction at a light-sensitive detector 11 placed at a distance. In this example, the laser beam 10 is sta- tionary. The diameter of the laser beam 10 is disposed to be equal to or slightly smaller than the thickness of the leads 4 to be inspected so that lead 4 is able to break the laser beam 10 and prevent its visibility to the detector 11 when the laser beam hits the lead. Fig. 3 presents the main components of the system as a simplified block diagram. The robot 2 and its control system constitute means 12 by which the component 1 can be moved in relation to the illuminating beam 10 so that the position of the component as a function of time is known, in the widthways and/or lengthways direction of the lead row 5, 6 so that the leads of the component 1 pass through the illuminating beam e.g. as illustrated in Fig. 4 - 7. Between two successive lead rows, the illuminating beam 10 reaches the light-sensitive detector 11, and when the laser beam comes to a lead row and falls on a lead, it cannot reach the light-sensitive detector. Further referring to Fig. 3, the system comprises a first set of registering means 13, which register the impulse 14 produced by the light-sensitive detector 11 (see Fig. 10) as a result of the illuminating beam 10 being intercepted by the shadowing effect of a lead. The pulse consists of on/off states of the detector. When the laser beam is intercepted by a lead, the detector 11 goes to the off' state. When the laser beam again reaches the detector, the detector 11 goes to the "on 1 state. Furthermore, the system comprises computing means 15, which compute the width 1 of the lead row and/or the distance e between adjacent lead rows on the basis of the starting and ending instants of the "on 1 and "off states of the pulse obtained from the light-sensitive detector 11, the speed at which the component was moved by the robot through the laser beam being known. Moreover, the system comprises comparing means 16, which compare the computed width 1 of the lead row and/or the computed distance e between adjacent lead rows to predetermined allowed values. The system instructs the robot to set the component on the circuit board if the width 1 of the lead row and/or the distance e between adjacent lead rows as computed from the measurement are/is within the al- lowed limit values. If the width 1 of the lead row and/or the distance e between adjacent lead rows as computed from the measurement are/is not within the allowed limit values, then the system will instruct the robot to reject the component 1 and remove it without placing it on the circuit board 3 if the measured value/measured values differ from the allowed limit values. After the above-described inspection and based on it, the same system can accurately measure the position coordinates of the leads of the component 1 held by the gripper 7. For this purpose, the system comprises a second set of registering means 17, designed to register from the robot control unit the supposed position coordinates of a specified lead of the component on the basis of the position data of the gripper 7 of the robot. Furthermore, the system comprises a second set of computing means 18, designed to compute the actual position coordinates of a specified lead on the basis of the pulse registered by the light-sensitive detector 11, corresponding to said specified lead, e.g. the first lead at the end of the component. Moreover, the system comprises a second set of comparing means 19, designed to compare the supposed position coordinates of the lead to the computed actual position coordinates, and if they differ from each other, to calibrate the position coordinates of the lead of the component so as to make them corre- spond to the computed actual value to allow the insertion coordinates for the placement to be determined The computing and comparing means comprised in the system can be implemented as computer software in a computer controlling the robot. The implementation of one embodiment is described in more detail with reference to Figs. 15 and 16. Fig. 4 presents an elongated connector component 1 with a large number of leads 4, shown in the figure as being directed perpendicularly to the image plane . The leads 4 are arranged in three longitudinal rows 6, each comprising 24 leads. The rows 6 are so arranged that the leads are aligned with each other in the transverse direction, thus forming 24 transverse rows 5. For any bends in the leads to be reliably detected, both rows 5 and rows 6 have to be inspected. In the situation illustrated in Fig. 4, the 24 transverse rows 5 are being inspected and the component 1 is being moved through a laser beam 10. Between the rows 5, the laser beam can reach the detector 11, turning it to the "on 1 state. In Fig. 5, the laser beam falls on a lead and the light-sensitive detector 11 is in the "off 1 state. In Fig. 6 and 7, the longitudinal rows 6 are being inspected in a corresponding manner. Fig. 8 shows a magnified end view of the connector 1 in Fig. 4 - 7 and Fig. 9 presents the same connector as seen from its lead side. Line T represents the level at which the laser beam passes as the component 1 is being moved in relation to the beam. In the left-hand and middle lead rows 6, some leads protrude to one side, and these are detected because the widths 1 1 and 1 2 of the pulses 14 received from the detector 11 exceed the allowed limit values. The pulse for the row 6 on the right has a normal width, which means that the row contains no protruding leads. It is also possible to measure the interspaces e x and e 2 be- tween the leads and compare them to allowed limit values. The square wave in the upper part of Fig. 10 represents the output signal obtained from an encoder connected to the motor of the robot motion shaft, and this signal provides information regarding the position of the gripper of the robot. By comparing it with the pulse 14, the exact coordinates of a given lead are obtained, from which it is possible to compute the position of the lead and therefore the position of the component in relation to the gripper and correct the position coordinates of the component if this is necessary to ensure successful placement of the component . Fig. 11 illustrates an embodiment which uses only one laser beam 10, which is disposed in the x- direction between the component feeder 20 and the circuit board 3 to be assembled, extending across the route along which the component 1 is transferred. For the sake of clarity, the robot is not shown in Fig. 11 - 14. The component 1 is taken by the robot first in a lengthways orientation in the y-direction through the laser beam 10, whereupon it is turned by the gripper through 90° in a horizontal plane, moved back and then taken again through the same laser beam 10 in the y- direction. If the component passes the inspection, then it will be placed in its specified location on the circuit board. Fig. 12 presents an embodiment corresponding to that in Fig. 2, differing from the embodiment in Fig. 11 in that the embodiment in Fig. 12 comprises two adjacent laser beams 10 disposed in the x- direction on the route of component transfer between the component feeder 20 and the circuit board 3 to be assembled. As this embodiment involves no backward movement, it works faster than the previous embodiment . The component 1 is first taken in a lengthways orientation in the y-direction through a first illumi- nating beam, then turned horizontally through 90° and taken through a second illuminating beam, still in the y-direction. Fig. 13 presents an embodiment which uses two laser beams 10, one of which is oriented in the x- direction and the other in the y-direction, i.e. the beams are perpendicular to each other. The component 1 is moved in the y-direction through the laser beam oriented in the x-direction, and in the x-direction through the laser beam oriented in the y-direction. Fig. 14 presents an embodiment which uses two laser beams 10, one of which is oriented in the x- direction and the other in the y-direction, i.e. the beams are perpendicular to each other. The component 1 is moved simultaneously through both laser beams in both the x and y directions, so the direction of motion of the component is at an angle to the illuminating beam. This is the fastest embodiment. In addition, as indicated by broken lines in the figure, the system may comprise several laser beams 10 oriented in the y- direction. These beams can be disposed in suitable locations relative to the circuit board so that the inspection will involve as few turns as possible in the route of the component regardless of where in the cir- cuit board area the component is to be placed. Fig. 15 presents a system of a further embodiment of the invention. A narrow laser beam 10 is projected horizontally in front of the component feeders 20, as illustrated also in Fig. 2. The system com- prises a laser source 9 and a light-sensitive detector 11 which are mounted in opposite sides of the machine frame . When robot picks the component 1 up from the feeder 20 (see Fig. 2) and moves it to the circuit board (PCB board) 3, component leads 4 will cross the laser beam 10. Every time the lead 4 crosses the laser beam, a signal is generated. The light-sensitive detector 11, later called as laser receiver, is connected to a special PC-card later called as a LLC Card 22 (Laser based Lead Check) , which will record the current absolute (or incement) pulse-encoder counts from axis encoders 23 of the xyzw-robot whenever an edge is detected from the signal generated by the laser receiver 11. Based on this information a special PC-software calculates the position of the component leads related to the po- sition of the gripper. Information is furthermore fed to the motion controller 24 of the xyzw-robot 12 via ethernet link 25 (or via any other media) and motion controller 24 will then automatically correlate the possible posi- tion or orientation error before inserting the component onto PCB board. At the same time the system checks that all leads 4 do exist and that they are in correct positions. In case of fault component, component is re- jected and new component will be picked automatically from the feeder. To accomplish the whole task, system needs some basic information about the structure of the component: lead count, lead width, offset between leads, the number of lead rows, height of the leads. This information will be given from the user interface (not shown) of the assembly robot cell as an expanded information about the feeders. System can be constructed by using one or several laser beams 10, as illustrated also in Figs. 2, 12, 13 and 14. If only one laser beam is used, system can check the lead count and position error only from one direction (i.e. y-error) . To get both x and y errors, another laser beam is needed. Between first and second laser beams, component is then rotated 90 degrees, as illustrated in Fig. 12. For rotation error detection, component is slightly rotated so that leads which are supposed to be in line have slight (or if offset between leads in same row is big enough, leads from another line will be seen through offsets from first line) different width then. Based on this width information, rotation error of the component related to the gripper can be calculated. Fig. 16 presents a block diagram of said spe- cial PC card 22, called the LLC card, designed for signal handling and calculation in the system of the invention. Major task of the LLC-card is to capture the pulse encoder signal (without losing information) from the axis encoder 23 whenever an edge is detected in an incoming signal at the laser sensor input. LLC- card is equipped with a special circuitry, edge recognition and memory addressing circuitry 26 to detect these edges. Pulse counter circuits 27 are used for counting the pulses coming from axis encoders 23 so that the LLC-card 22 knows the actual position (absolute) of the moving axes. Whenever an edge in the pulse obtained from the detector 11 is detected, a current pulse encoder count is saved onto the dual port RAM memory 28 (which enables the read and write tasks to be made simultaneously) of the LLC-card. If laser sensor input changes, recording will be made into a different address. A bus interface logic 29 enables this information to be transferred from LLC-card into PC's memory. Bus can be any common bus used in PC (ISA, PCI etc) . The invention is not restricted to the examples of its embodiments described above, but many variations are possible within the scope of the inventive idea defined in the claims.

Claims: CLAIMS 1. Procedure for inspecting a component with leads to determine its fitness for assembly in con- junction with automatic circuit board assembly performed using an assembly robot before the component is placed on a circuit board, said component having a row of at least two leads to be inserted into corresponding holes in the circuit board, said robot being equipped with a gripper for taking hold of the component, characterised in that a narrow illuminating beam is directed at a light-sensitive detector, the component and the illuminating beam are moved in relation to each other in the direction of the width and/or length of the row of leads so that the position as a function of time is known and so that the leads of the component pass through the illuminating beam, the illuminating beam thus reaching the light-sensitive detector when it falls between leads, whereas when it falls on leads, the leads cast a shadow, preventing the beam from reaching the light- sensitive detector, the pulse produced by the light-sensitive de- tector as a result of the illuminating beam being intercepted by the shadowing effect of the leads is registered, based on the pulse, the width of the lead row and/or the distance between adjacent leads rows are/is computed, the width of the lead row and/or the distance between adjacent leads rows are/is compared with a specified allowed respective limit value, and the component is placed on the circuit board if the width and/or the distance between adjacent lead rows computed on the basis of the measurement are/is within the allowed limits, or alternatively the compo- nent is rejected and removed without placing it on the circuit board if the measured value/values differ from the allowed limit values. 2. Procedure as defined in claim 1, char - ac t eri sed in that the component is taken hold of and moved by means of a gripper of an xyzw-robot. 3. Procedure as defined in claim 1 or 2 , charac t eri s ed in that the lead row of the component is inspected by moving the component in re- lation to a stationary illuminating beam. 4. Procedure as defined in any one of claims 1 - 3, charac t e ri s ed in that the component is passed cross the illuminating beam in the direction of the width and/or length of the row of the leads . 5. Procedure as defined in any one of claims 1 - 4, charact eri s ed in that the width of the lead row and/or the distance between adjacent lead rows are/is computed on the basis of the start and end instants of the pulse. 6. Procedure as defined in any one of claims 1 - 5, charac t eri s ed in that the illuminating beam is directed at the light-sensitive detector in a horizontal plane in the x-direction. 7. Procedure as defined in any one of claims 1 - 6, charac t eri s ed in that, before being moved through the illuminating beam, the component is rotated so that the lead row becomes parallel to the illuminating beam. 8. Procedure as defined in any one of claims 1 - 7, charac t eri s ed in that, before being moved through the illuminating beam, the component is set to a position where the lead row lies in a horizontal plane in the x-direction, and the component is moved in the y-direction through the illuminating beam. 9. Procedure as defined in any one of claims 1 - 8, charac t e ri se d in that, before being moved through an illuminating beam, the component is set to a position where the lead row lies in a horizontal plane in the y-direction, which is perpendicular to the x-direction, and the component is moved in the y-direction through the illuminating beam. 10. Procedure as defined in any one of claims 1 - 9, characteri sed in that the component is moved simultaneously in the x and y directions through an illuminating beam. 11. Procedure as defined in any one of claims 1 - 10, characteri sed in that, before being moved through an illuminating beam, the component is adjusted in the z-direction, which is perpendicular to the x and y directions, to a position where the plane of the illuminating beam intersects the leads adjacent to their free ends. 12. Procedure as defined in any one of claims 1 - 11, characteri sed in that the lead row of the component is inspected by moving the component through a horizontal illuminating beam preferably oriented in the x-direction, first in one direction and then turning the component horizontally through 90° and moving it again through the same illuminating beam. 13. Procedure as defined in any one of claims 1 - 11, characteri sed in that two parallel illuminating beams placed at a distance from each other and preferably oriented in the x-direction are provided; the lead row of the component is inspected using a first illuminating beam; the component is turned horizontally through 90°; and the lead row of the component is inspected using a second illuminating beam. 14. Procedure as defined in any one of claims 1 - 11, characteri sed in that two illuminating beams perpendicular to each other are provided; the lead row is inspected by moving the component through both illuminating beams. 15. Procedure as defined in any one of claims 1 - 14, characteri sed in that, while the component is being moved through an illuminating beam, the supposed position coordinates of a specified lead of the component are registered from the control unit of the robot on the basis of position data for the gripper of the robot, based on the pulse registered by the light- sensitive detector and corresponding to the specified lead, the actual position coordinates of said specified lead are computed, and the supposed position coordinates of the lead are compared with the computed actual position coordinates, and if they differ from each other, then the position coordinates of the lead of the component are calibrated so as to make them correspond to the computed actual value to allow the insertion coordinates for the placement to be determined. 16. Procedure as defined in any one of claims 1 - 15, characteri sed in that the illuminating beam is generated using a laser. 17. System for inspecting a component (1) with leads to determine its fitness for assembly in conjunction with automatic circuit board assembly performed using an assembly robot (2) before the component is placed on a circuit board (3) , said component having a row (5, 6) of at least two leads (4) to be inserted into corresponding holes in the circuit board, said robot being equipped with a gripper (7) for taking hold of the component, character i sed in that the system comprises - an inspection device (8) comprising a light source (9) for the generation of an illuminating beam (10) and a light-sensitive detector (11) at which the illuminating beam is directed, - means (12) for moving the component (1) and the illuminating beam (10) relative to each other so that the position as a function of time is known and so that the leads of the component pass through the illuminating beam, the illuminating beam thus reaching the light-sensitive detector when it falls between leads, whereas when it falls on leads, the leads cast a shadow, preventing the beam from reaching the light- sensitive detector, - means (13) for registering the pulse (14) produced by the light-sensitive detector as a result of the illuminating beam being intercepted by the shadowing effect of the leads, - means (15) for computing the width (1) of the lead row and/or the distance (e) between adjacent lead rows on the basis of the pulse, and - means (16) for comparing the computed width of the lead row and/or the computed distance between adjacent lead rows with a specified allowed limit value. 18. System as defined in claim 17, char acteri sed in that the system comprises - means (17) arranged to register the supposed position coordinates of a specified lead of the component from the control unit of a robot on the basis of position data for the gripper of the robot, - means (18) arranged to compute, based on the pulse registered by the light-sensitive detector and corresponding to the specified lead, the actual position coordinates of said specified lead, and - means (19) arranged to compare the supposed position coordinates of the lead with the computed actual position coordinates and, if they differ from each other, to calibrate the position coordinates of the lead of the component so as to make them correspond to the computed actual value to allow the insertion coordinates for the placement to be determined. 19. System as defined in claim 17 or 18, charact eri sed in that the means (12) for moving the component (1) are disposed to move the component in the widthways and/or lengthways direction of the lead row (5, 6) . 20. System as defined in any one of claims 17 - 19, charac t eri sed in that the inspection device (8) is fixedly mounted in place ; and that the robot (2) has been arranged to move the component in relation to the illuminating beam (10) . 21. System as defined in any one of claims 17 - 20, charac t eri s ed in that the light source (9) is so disposed that the illuminating beam (10) is horizontal . 22. System as defined in any one of claims 17 - 21, charac t eri sed in that the assembly robot is a xyzw-robot. 23. System as defined in any one of claims 17 - 22, charac t eri sed in that the light source (9) is so disposed that the illuminating beam (10) is parallel to the x-direction in the coordinate system of the robot while the circuit board (3) lies in the xy-plane . 24. System as defined in any one of claims 17 - 23, charac t eri sed in that the system comprises two adjacent inspection devices, (8) in which the illuminating beams are parallel (10) to each other and at a distance from each other. 25. System as defined in any one of claims 17 - 24, charac t eri s ed in that the system comprises two inspection devices (8) , in which the illuminating beams (10) are perpendicular to each other. 26. System as defined in any one of claims 17 - 25, charac t eri s ed in that at least one in- spection device (8) is disposed between the component feed device (20) and the circuit board conveyor (21) . 27. System as defined in any one of claims 17 - 26, characteri sed in that the inspection device/devices (8) is/are so disposed with respect to the circuit board assembly station so that the inspec- tion of leads can be performed during the robot movement transferring the component between the component feed station (20) and the circuit board, substantially without stopping the transferring movement and substantially without diverging from the transfer route between the component feed station and the assembly station. 28. System as defined in any one of claims 17 - 27, charac t e ri s e d in that the light source (9) is a laser. 29. System as defined in any one of claims 17 - 28, charac te ri s ed in that the diameter of the illuminating beam (10) is smaller than or equal to the thickness of the lead (4) . 30. System as defined in any one of claims 17 - 29, charac t e ri s ed in that the diameter of the illuminating beam (10) is of the order of 0.1 mm. 31. Procedure for inspecting a component with leads to determine its fitness for assembly in conjunction with automatic circuit board assembly per- formed using an assembly robot before the component is placed on a circuit board, said component having leads to be inserted into corresponding holes in the circuit board, said robot being equipped with a gripper for taking hold of the component , charac teri s ed in that a narrow illuminating beam is directed at a light-sensitive detector, the component and the illuminating beam are moved in relation to each other so that the position as a function of time is known and so that the leads of the component pass through the illuminating beam, the illuminating beam thus reaching the light- sensitive detector when it falls between leads, whereas when it falls on a lead, the lead prevents the beam from reaching the light-sensitive detector, the pulse produced by the light-sensitive de- tector as a result of the illuminating beam being intercepted by the shadowing effect of the lead is registered, based on the pulse, the width of the lead and/or the distance between adjacent leads is com- puted, the width of the lead and/or the distance between adjacent leads are/is compared with a specified allowed respective limit value, and the component is placed on the circuit board if the width and/or the distance between adjacent leads computed on the basis of the measurement are/is within the allowed limits, or alternatively the component is rejected and removed without placing it on the circuit board if the measured value/values differ from the allowed limit values.

Inventors: MORRIS JOSEPH, MORRIS, JOSEPH
Applicants: MORRIS JOSEPH, PMJ AUTOMEC OYJ, MORRIS, JOSEPH
Application year: 2000
Main classification: H05K13
IPC codes: G01B11, H05K13