Homemade OpenPnP Component Installer

    Back in 2012, my work began in the field of electronics, while the Internet introduced me to many good people, some of whom we communicate to this day. Usually we share our experiences, successes and failures, discuss new electronics, various ideas and what’s new you can develop or explore.

    Since then, a certain tradition was born at the beginning of each year to compile a TODO sheet, in which any ideas, including delusions, were recorded. In the process, the list was replenished, and at the end of the year the results were summed up, which turned out to be not.

    On New Year's holidays I went through the old screw and accidentally stumbled upon those very records. It was found that everything is somehow already implemented. All but one, SMD installer.

    We discussed the idea of ​​its creation more than once, but the mechanic frightened us - what if it didn't work out. Therefore, it is still it was more like an impossible dream.

    Under the influence of nostalgia, it was useful to watch videos, sigh, realizing that the dream remained a dream. Then, purely out of curiosity, I looked at what the world opensource offers and came across Openpnp. I won’t say that I haven’t heard about it before, but as a few, those who repeated the design, it was very alarming. This time their site was studied in more detail, among other things, there was a bom list, firmware for the controller and a program for the PC. Then, having turned off the brain for a second, I ordered the first part from the list and decided that it was too late to retreat.

    I hope from this introduction it became clear that the author had not previously assembled pick and place machines. There was no purpose and make a commercial product. Therefore, I do not exclude that later in the text there will be errors in terms and some conclusions may be incorrect. It was just interesting for me to repeat the device, deal with its principles and try my hand. I would like to share this with the reader.

    The first thing that is misleading is what OpenPnP is all about. Even today it is difficult to answer this question. Iron can be very different, for example, at the heart of my build is iron from OpenBuilds and the Smoothieboard controller, both companies have nothing to do with OpenPnP. You can easily throw out any component of the piece of iron and change it to another. The principles remain common: there is a PC program of the same name into which you download pick and place from your tracer, then the program issues commands to the controller, go there, turn it on.

    Appearance of the program.



    As mentioned above, the main frame is taken from OpenBuilds, V-slot slats are used as guides. For me, they were a discovery, in a nutshell, it is difficult to explain all their advantages, but it is very easy to make any constructions of them.



    If you need something to attach to the rail, then threaded plates are inserted into the side, their official name is t-nut.



    They are single and double. It looks like an ordinary plate with thread, I even thought about finding something similar in local stores at the beginning, since they are not cheap. However, do not be fooled by their apparent simplicity. They have a thread protruding above the plate and this turned out to be very important when tightening the screw. The mount is very solid.

    How is the movement along the axes? The basic idea is to insert a carriage into the side depressions, to the top platform of which you can attach anything.



    The carriage itself is simple - it is a plate with four rollers. The position of the rollers is adjusted by the eccentric nuts, they help adjust the pressure of the wheels to the rail. It depends on how tight it will move.

    An end plate is attached to the rail from each end.



    On the side of the plate there are holes to which a Nema17 motor is attached. A gear wheel is put on the motor, which pulls the belt, the belt is attached to the carriage with two ends. Thus, when the motor turns in one direction, the carriage moves forward, when in the other - back.



    At the second end of the rail just shaft, which slides the belt.



    Now the subtleties that have arisen. End plate I do not know how hard it is in the original, the fact is that the prices for openbuilds are mostly adequate, but not an adequate price for delivery. Therefore, almost everything was bought with Ali. Including this detail.

    The plates are very easy to bend, and the lower "ear" and strives to break off. In the original assembly, the frame is fastened just for him, I also had to use the side holes. But otherwise it did not play a role, kept dead on the rail.

    About rails. This is one of the few parts that I bought in Russia, because there is an opinion that they are being driven from China bent. Check whether this desire was not, but to buy them from the locals was still a quest. According to ads, they are everywhere, in fact or not available, or no one wants to contact you because of 3m. Very often, under the guise of a V-slot, they offer a T-slot, which are very similar and more accessible. There is an opinion that they are replaceable in this case, but did not dare to check. As a result, they were available only in one place, it came to pay for the delivery more than the price of the rails themselves.

    Screws. In the original, all fasteners with hexagon heads. In the beginning it was not clear why. Firstly, it is difficult to get them the right length, and secondly, they are much more expensive. Therefore, I took part of the fastener for a cross-head screwdriver, honestly regretted it more than once. Hexagon at times easier to unscrew, and when you still do not understand how it works, you had to unscrew it 10 times.

    Field size The length of the original slats 400x400. I think many, like me, rarely collect large size boards. Therefore, the size seemed to me huge. In practice, this was not the case. Though a small part, but the limit switches eat up, another part goes to the corner plates, another part to the head, etc. As a result, the real field is slightly more than 250x250, and this is not so much anymore.

    Springs for belt tension. In the beginning, I ignored them. It seemed like a useless thing. In practice, in the first runs along the Y axis there was always a small error. As a result, I had to figure out what springs are with the strange 7/32 markings.



    Otherwise, there were no questions at all with the basis, the mechanics are going to be very simple. The complete process of assembling one guide is well shown in the video.


    Perhaps you will have the same question as me, why was it not to take a threaded stud as a guide? Why these rails, belts, gears? There is an opinion that caught one of the forums that the shaft under its own weight will have a slight curvature in the center, which will create an error. And to make an exact shaft will be much more expensive.

    The next question will immediately arise: how exactly does this whole design go? Honestly, I do not know how to evaluate. Subjectively - very accurately, exceeded expectations. If you put an iron ruler and ride along it, controlling the camera, then millimeter to millimeter. I did not notice an obvious accumulation of error.

    The next part of the story is the controller. In the original OpenPnP, there is a Smoothieboard, focused on 3D printers, but this does not prevent them from fitting to the pnp machine. If you dig deep, then he has an LPC1769 microcontroller and a pair of stepper drivers on board. Let some readers condemn me, but the price of 150 euros excluding delivery, for a fee of this level seemed to me inadequate. The most interesting thing is that the board is positioned as opensource, but I could not find the sane version of pcb or gerberas.

    As a result, the problem was solved by itself, it turned out that the Chinese have a similar fee.



    We must immediately make a reservation that the boards are very similar, but not identical. The stones are the same and the GPIO layout is similar, so the software is suitable. And yet there are minor differences. All settings are stored in a text file on a memory card. There are a lot of settings and this is a topic for a separate article. There is Ethernet on board, and if you enable it, you can navigate along the axes through a web browser.

    Otherwise, the board is controlled via USB-UART, on the PC it is defined as an ordinary virtual COM port, i.e. the program throws U codes G codes, and the controller only executes them. In total, the machine has 3 main axes: X is the upper beam, when the head goes left to the right, it pulls only one motor. Y - the lower 2 rails, up and down pull two motors simultaneously. Z - lowering the nozzle up, down. In this case, the machine uses the right-sided coordinate system, i.e. the lower right corner - the house is 0, 0. The house is defined by limit switches, in fact, ordinary GPIO. An additional C axis is also used, which is responsible for the component rotation.

    There is nothing special to say about the controller's problems, but globally all the sores inherent in the COM port are obvious - sometimes the port itself hangs until the board is rebooted. There was a bug that the controller sometimes went the wrong way, but it was treated with a fresh firmware.

    Now the most important thing is the head. Here with her the most was incomprehensible. Here it is worth explaining how the component is generally captured - by vacuum. A 12V pump is used for this, the tube goes from it to the valve. In the original, the pump only works when it approaches a component, I didn’t have a big field driver on the board, like on the original board, so I temporarily left the pump to rumble constantly.

    The valve is normally closed, i.e. the air is not sucked in. When the head approaches the component, a signal is given, the valve opens and the pump sucks air through the tube. The tube clings to the motor with a hollow shaft, on the other side of the motor a nozzle is connected through an adapter.

    What had to face. The tube should be polyurethane, because it is tough enough not to overwhelm. Nema8 motors are absolutely identical in the picture, but the seller sent the motor not with a smooth shaft, because of which it was impossible to fix the adapter with the nozzle. I had to order new ones.

    The nozzle itself in the original boma was



    Experiments have shown that it is impossible to use it, as seen in the photo it is a piece of a tube. Because of this, there are a lot of problems with calibration, as the nozzle still firmly rests on the component. Meanwhile, on the vidos I prayed for, there was another nozzle with a spring, which eventually had to be ordered.



    The nozzle is lowered by the Z-motor, i.e. he turns and presses the rocker on the part holding the C-motor (the one with the hollow shaft).



    That, in turn, moves along a linear guide and is connected by a spring, i.e. when the engine does not press on the Z axis, the head returns to its original state due to the spring. The C axis, the motor with a hollow shaft :) is designed to deploy the component.

    Now the most important thing is how does this whole structure work in assembly? Runs the program on the PC. It loads pick and place from your tracer. You select the necessary components and specify the fiducial point, i.e. anchor points on the board. They look like copper rounders on the board.



    Coming to the “house”, i.e. in the lower right corner to the limit switches so that the machine understands its coordinates. Next you need to specify where the board is located. For this, you need to drive your hands to the bottom left corner of the board, very approximately. We start the search for fiducial point, this procedure is needed to understand the exact origin of coordinates and the angle of inclination of the board. The search is made by a camera, which is located on the head - upper vision. Point recognition is done using opencv.


    In total, the position of the board is known, due to the upper view and components, due to the relative coordinates unloaded from pick and place. It remains only to start the process of placement.

    Here comes the moment at which while I stopped. As it turned out, starting movement along the axes and lowering the nozzle is not the most important thing in this business.



    The problem was the supply of components. The simplest option assumes that the tape with components will be pasted somewhere near the board. As with the board coordinates, for each component you need to specify where the tape is located. To tell the truth, the process turns out to be quite tedious, so you need to immediately do the automatic feeding of components, but this is a completely different story.

    So, to draw a line to all of the above. The experience was interesting. And yes, it was worth it, even though it is still not a complete solution. The mechanics are not as scary as they are painted. The world opensource, though still not so friendly, but still need to say thank you to everyone who is selflessly working for the benefit of the people. I really hope that there will be more to tell on this topic in the future.

    The first tests with the old nozzle


    Tests with a new nozzle


    Also popular now: