Close
0%
0%

Pick and Place Machine

A custom-built pick-and-place machine running OpenPnP.

Public Chat
Similar projects worth following
I'm building a custom pick-and-place machine that runs on OpenPnP. The starting point for this project was the work of Erich Styger (https://mcuoneclipse.com/2018/06/26/building-a-diy-smt-pickplace-machine-with-openpnp/). A second build of his design by Fox.Build (https://hackaday.io/project/165743-foxbuild-pnp) is also used for reference. This design is not a direct copy of their work, however. It also draws influences from other sources and adds some custom design as well. I am attempting to simplify some components to use more off-the-shelf parts and fewer custom parts. This should make the design more accessible for others.

Background

Historically, home electronics projects were done on prototyping breadboards and then hand soldered together for a permanent solution.  In the last few years, events coalesced to allow makers to enter a domain of surface mount technology.  Free or affordable design software like KiCad or Eagle lets anyone design PCBs using a home computer.  Low-cost PCB manufacturers like JLCPCB, PCBWay, and Oshpark have made it possible for hobbyists to order small quantities of PCBs extremely cheaply.  Assembling anything more than a board or two is still a hurdle, however.  Doing it by hand is extremely time consuming and sending them to a manufacturer is very expensive.

A few manufacturers create small, pick-and-place desktop machines.  However, these manufacturers also manufacturer commercial-grade machines that generate much higher profits.  It's not hard to imagine that the low-end machines do not receive the attention needed to make them consumer-friendly.  As a result, these machines are almost universally loathed by the community.  The mechanical body (frame, rails, et cetera) of these machines is usually sufficient or even excellent, but the controllers and software tend to be terrible.

Fortunately for the community, open-source projects have stepped in to fill the void.  Projects like Smoothieboard/Smoothieware provide the controllers and the OpenPnP project handles the software side.  OpenPnP has grown into the unrivaled maker's choice of pick-and-place software.

The maker community is now retrofitting existing hardware with open-source controllers and software as well as building custom machines from the ground up.

Objective

This project wouldn't have been possible without all of the fantastic work of the open-source community.  I'm documenting what I've learned in order to contribute to the community.  I'm hoping that something here will save the next person some time and frustration in dealing with the issues I've discovered along the way.

  • Low Cost Rails

    Lance6 days ago 0 comments

    Introduction

    After extensive reading about low-cost rails, there seemed to be a mix of experiences.  Some of them worked without issue, some had minor issues that they were able to resolve, and some had major issues with them that rendered them useless.

    I purchased two sets of low-cost rails.  For purposes of discussion, I will refer to them by the colors of their end caps (green and black).

    Green Set

    https://www.aliexpress.com/item/4000706013922.html?spm=a2g0s.9042311.0.0.27424c4dYpvk0n

    Green Rails
    The set of rails referred to as the "green rails."

    Black Set

    https://www.aliexpress.com/item/32899285305.html?spm=a2g0s.9042311.0.0.27424c4dpy21Gc

    Black Rails
    The set of rails referred to as the "black rails."

    Discussion

    An initial examination of both sets of rails left me to conclude they were pretty well made.  Both sets of rails were well oiled. There were not any visible defects.  There was a little bit of roughness around the counter-bore holes in the rails, but it was pretty minor and should not interfere with the operation since the carriage is not in direct contact with the top of the rail.

    After working the rails for a while, both sets seem to exhibit intermittent sticking.  It was repeatable but not completely consistent in location.  I searched for the source for some time.  Eventually, I concluded the issue was in the plastic end caps where the ball bearings did a 180-degree turn.  It seems that because they are made of plastic, they have both a larger manufacturing tolerance and a higher coefficient of friction.  One, or both, of these was causing occasion sticking.

    End Cap
    The ball bearings reverse direction in the plastic end caps.
    Path of Ball Bearings
    Approximate path (red loop) of the ball bearings in the carriage.

    Solution

    I applied a generous amount of Unilube and worked it into the carriages.  After lubrication and working the carriage back and forth, the sticking seemed to be largely resolved.  I think these rails need a little "breaking in" and to be kept well lubricated.

  • Diodes for Stepper Motors

    Lance02/11/2021 at 17:15 0 comments

    Introduction

    To add protection against high voltage spikes damaging the stepper motor drivers, it is recommended to add diodes to the motor output.  There is documentation on this at the Smoothieware site, however, I found there were some inconsistencies that led to some confusion.

    The Documentation

    You can find the information about adding diodes to the stepper motor drivers at the bottom of this page:

    http://smoothieware.org/troubleshooting

    That page also links to a write up on the diode installation which I provide here for convenience:

    https://drive.google.com/file/d/1rS3cFeG5eBuuCkOQj2L9rjkRBaJr8npB/view

    The Confusion

    Introduction

    The documentation recommends using a TVS diode for protection.  The first thing to note is that there are unidirectional and bidirectional TVS diodes.

    First Point of Confusion

    The documentation contains a link to the bidirectional diode.  The pictures show a unidirectional diode (there is a cathode mark on one end).

    Second Point of Confusion

    The link in the documentation is for a diode on Digikey.  The pictures on Digikey show a unidirectional diode on the pages for both the bidirectional and unidirectional diode.  The products are correct, but the images are wrong for the bidirectional diode.  To further complicate things, the description does not spell out which is the unidirectional diode and which is the bidirectional one.  You have to read the datasheet and compare it to the part numbers.

    Sorting it Out

    After some research and testing, I concluded you need the bidirectional version.  This is the version that has the "C" in the suffix.  The links for Digikey and Mouser are provided below.

    Digikey Original Diode

    This is the link from the documentation.

    https://www.digikey.com/en/products/detail/micro-commercial-co/P6KE30CA-TP/1200847

    Digikey Equivalent Replacement Diode

    This has the same ratings as the diode in the documentation link.  Its picture is correct so it is less confusing.

    https://www.digikey.com/en/products/detail/littelfuse-inc/P6KE30CA/285941

    Mouser

    https://www.mouser.com/ProductDetail/Micro-Commercial-Components-MCC/P6KE30CA-TP/?qs=SdqRYZZ9IxBX2Bw7WMmY%252BA%3D%3D

  • Adding a LCD Screen

    Lance02/02/2021 at 04:10 0 comments

    Warning

    It appears that the connectors for the controllers are installed in different orientations depending on the manufacturer.  Your adaptor board must match your controller (see Connectors below).  It is HIGHLY recommended you either:

    • Do extensive research ahead of time to ensure they are paired correctly.
    • Get an adaptor board that is a kit and solder it together yourself so you can orientate the connectors according to your controller configuration.

    Introduction

    The Smoothieboard is capable of using a RepRapDiscount Full Graphic Smart Controller (https://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller).  To connect a smart controller an adaptor card for the Smoothieboard is required (http://smoothieware.org/rrdglcdadapter).

    The controller displays information and allows commands to be sent to the board.  For a 3D printer or laser cutter, the smart controller also lets a job run without having a computer connected to the machine.  A pick-and-place machine requires a connected computer to run, so there is less of a benefit.

    Connectors

    Background

    My controller did not match my adaptor card so when I plugged it in, nothing happened.  Fortunately for me, the team at Fox.Build (https://hackaday.io/project/165743-foxbuild-pnp) had the same problem and noted the issue for them was reversed connectors.  I had the potential cause a few minutes after the problem arose.  However, their solution (and way of confirming the reversed connectors) was to force the connectors in backwards and see if it worked.  I didn't care for this solution for a few reasons:

    • My connectors were pretty stiff and I wasn't sure if I could force them in without breaking something.
    • I wanted to be able to remove and reinsert the cables in the future.  Repeating this brute force method magnified the opportunities for something to go wrong.
    • I wanted to find a way for others to tell ahead of time that their controllers and adaptor cards match.

    While there is a standard orientation of the connectors, it appears many manufacturers of both the Smart Controller and the adaptor card have ignored it.  The page for the Smoothieboard adaptor makes note of this and states that you have to orientate your connectors according to how your controller is configured.  They show pictures of connectors in both orientations but don't tell you how to determine which way to place your connectors.  The RepRapDiscount Smart Controller page defines the pin out, but then shows a picture of the connectors on backwards.  On the disorganization scale, I classify this as a C Level Cluster Bleep.

    Determining the Orientation

    On the wiki page for the Smart Controller, you can find both the schematics for the controller and a diagram of the connector pin out.  Since these were from a reliable source and both agreed I declared this as the "correct" orientation.  Rather, this is the intended orientation.  Everything will work so long as the connectors are self-consistent between the adaptor card and the Smart Controller.  In other words, correct is somewhat relative here.  What's important is that things function correctly not that the connectors are in the designed orientation.  Therefore, I will refer to the intended orientation as the standard orientation and the other as the reversed orientation.

    Connectors Schematic
    The schematic for the connectors. This is taken from the Reprap Smart Controller wiki page.
    Smart Controller Connection Pin Out
    The pin out for the Smart Controller connectors. This is taken from the Reprap Smart Controller page.

    We can now see that pin 1 is on the lower left when looking at the side of the connector with the orientation key.  The key is just below the pins marked D23 and D33 in the above image.

    On the Smart Controller I had, I could just make out markings on the silk screen which seemed to locate the position of the orientation key. ...

    Read more »

  • End Caps and Belt Tensioning System

    Lance01/24/2021 at 17:34 0 comments

    Research

    When it came to the end caps, the design is affected by a few criteria.  They have to be able to accommodate your motor and pulley design.  There also needs to be a belt-tightening system and this is typically either in the end caps or the carriage adaptor plates.  I looked at commercial options and designs used by other makers/builders.

    Belt Tensioning Integrated Into The Sled

    Some have added tensioning systems into the carriage adaptor plates:

    This removes the requirement for the end caps to have a tensioning system but requires a more complicated carriage adaptor.

    Source: https://hackaday.io/project/9319-diy-pick-and-place

    OpenBuilds End Caps

    There are premade end caps that can be tensioned by pulling on them before tightening the screws.  Below is an example from OpenBuilds:

    3D Printer End Caps

    There are some sophisticated end caps with built-in tensioners made for 3D printers:

    Conclusions

    All of these systems are viable options and I considered them at great lengths.  In the end, I elected to design my own end caps and tension them by pulling them tight before tightening the screws (similar to how the OpenBuilds ones work).

    Integrated Into The Sled

    The system with the tensioning system build into the sled is a slick design.  However, it requires screws to be drilled and tapped into a solid piece of material.  If you have this capability, then this is a great option.  I wanted to design something that was accessible to more people and cheaper and easier to build.

    OpenBuilds and 3D Printer End Caps

    The OpenBuilds and 3D printer end caps are both an attractive option as they are a nice metal construction and they are commercially available.  

    The OpenBuilds, however, lock you into a very specific timing pulley size.  The pulley is larger than I wanted.  I wanted to design a machine that had as much positional accuracy as possible and that meant a smaller pulley.

    Both of these end caps had a major issue, however.  Neither of them allowed for mounting the bearing for the passive rail.

    The 3D printer end caps are usually built for printers that have a single Y-axis, so no coupling is required.

    The OpenBuilds hardware uses two Y-axis motors.  There are reports that these are hard to keep synchronized.  Obviously, it is possible to do since many machines use this design.  But the added coordination effort and cost of another motor is not desirable.  For a pick-and-place machine, this design is probably likely to fall out of favor for another reason.  Already, hobbyists are building machines with 4 pickup heads.  This requires a minimum of 6 stepper motor drivers so you cannot afford to have 2 Y-axis motors.

    Design

    I designed a series of plates that, when combined with the appropriate screws and spacers, create custom end caps that eliminate all the problems with the designs above.

    Similar to the OpenBuilds they are tensioned by sliding them out before tightening the screws.  This is done on the idler pulley assemblies (front of the machine for the Y-axes and left side for the X-axis).  

    The belts need to be tight enough they don't slip and there isn't excessive slack in them.  You don't want to over-tighten them or you could bend parts.  Likely, you will be able to pull the belts tight enough with just your hands.  If, however, you are not able to pull them tight by hand or if it is difficult to both hold the idler pulley assembly and tighten the screws, I have designed in a simple assistance device.  There is an M3 screw that can be used for leverage.  A flat head screwdriver works well to position and hold the assembly while the screws are tightened.

    If you do need to use this technique, be careful not to over tighten the belts.

  • Smoothiewear for Pick-and-Place Machines

    Lance01/22/2021 at 13:01 0 comments

    One of the main developers for OpenPnP created a version of the Smoothieware firmware to account for some of the issues that arose in Smoothieware when using it for pick-and-place machines.  You must download it from his website.  Be sure to select the version that is appropriate for you (5-axis or 6-axis).

    https://makr.zone/smoothieware-new-firmware-for-pnp/500/

    Be aware that this version of the firmware uses a slightly different version of the configuration file.  My configuration files are on a Github site.  You can find the link on the main page of the project.

  • Limit Switch Sensors

    Lance01/18/2021 at 14:53 0 comments

    Sensors

    I tested 4 different limit switches to see how they would perform with a Smoothieboard.  The results varied.

    1 – Red cheap optical sensor (less than $1)

    2 – Black cheap optical sensor (less than $1)

    3 – Omron EE-SX672A optical sensor (~30$)

    4 – Mechanical switch (less than $0.50)

    Smoothieboard Setup

    Numbers 1, 2, and 3 read high when not activated and low when activated.  Because of this, you need to use the “!” to invert the pin logic in the Smoothieboard configuration file.  By default, Smoothieware expects low to be not activated and high to be activated.

    For the mechanical sensor (4), it was connected between the signal pin and the ground pin.  The normally closed terminal of the switch was used.  That way when not activated, the pin was pulled low (as Smoothieware expects).  When the switch is activated, the connection is open and the signal pin goes to high (as it is set to pull up).

    Results

    The optical sensors (1, 2, and 3) were first tested using a benchtop power supply and found they would work if set up correctly.

    When using the Smoothieboard, number 1 worked, but just barely.  It read about 1.2 volts when activated which was just below the threshold Smoothieboard needed to detect a low signal.

    Number 2 did not work.  It reads about 2 volts when activated and this was not low enough for the Smoothieboard to recognize it was activated.

    Number 3 worked perfectly.  This sensor came with the pre-assembled pickup head I bought.  It is used as the Z-axis homing sensor.

    In the configuration file, you can tell Smoothieboard to pull the sensing pin low, high, or leave it floating.  Sensors 1 and 2 seem to want the pin floating.  However, regardless if I set the pin to pull low, pull high, or float in the configuration file, the value at the pin was still high.  (I’m not sure if this is a general Smoothieboard issue or an issue with my particular one.)  This may be been the reason numbers 1 and 2 did not perform well.  Sensor 3 wants the pin pulled high.  This may be the reason it worked.

    The mechanical switch, Number 4, worked perfectly.  Because it was both cheap and reliable, this was the sensor I used for the end stops on the X and Y-axis.

    Discussion

    Mechanical Advantages

    The mechanical switch had some additional advantages.  The optical sensors require an additional component to act as a beam interrupter to trigger the sensor.  These beam interrupters also require additional mounting hardware and they require three wires to connect instead of two.  While these are minor things, fewer parts and wires are always preferred.

    Accuracy of Mechanical versus Optical

    The Smoothieboard page advises the use of mechanical sensors because they are more accurate in terms of repeatability.  There are those who disagree.  For pick-and-place machines, this is an academic discussion and isn't practically relevant.

    For the X and Y-axis, OpenPnP uses the limits switches to home to a known position on the machine and then uses the more accurate optical homing.  Thus, close is good enough for the limit switches.

    For the Z-axis, both Juki and Samsung type nozzles have built-in travel which allows for small amounts of forgiveness to positioning errors.

    Conclusions

    In terms of accuracy, I think your time is far better spent worrying about other sources.  Good optical sensors or even some low-cost ones should work.  Mechanical switches are tried and true and perform well.  In the end, you have to select what works for you.  

    For me, the simplicity and reliability of the mechanical switches led me to select them for my X and Y-axis limit switches.  I purchased a pre-assembled head that had a functioning optical switch already attached (switch 3).  I used that as my Z-axis sensor.

  • Smoothieboard Issues

    Lance01/11/2021 at 13:15 0 comments

    Introduction

    Please be careful if you decide to buy a Smoothieboard for your project. There are a lot of clones out there and some of them are poorly manufactured. A lesson I learned the hard way.

    When I got my Smoothieboard, one of the first thing I noticed was the fit and finish was rather poor.  The female end of the main power connector (for Vbb) did not fit into the male end.  The end stop connection points were so close together the connectors did not all fit.  One of the connection points was populated with header pins instead of a connector.  The list goes on. 

    Hopefully, the information here will help you select a better one or resolve issues if you have a poorly manufactured clone.

    Wrong Potentiometers

    Some of the Smoothieboard clones have alternate potentiometers that give the stepper motor drivers bad reference voltages and the motors won't operate correctly.  The bottom image should help you identify if this is your case.  A link to a page describing the issue and solution is below, but the short answer is to add the following to your configuration file:

    # Fix for incorrect Digipots used on Smoothieboard Clones.
    digipot_factor                                     36.6

    Page describing the issue:
    https://forum.makerforums.info/t/aliexpress-fysetc-smoothieboard-v1-1-mcp4441-issue/77926

    Selecting a Smoothieboard

    Unfortunately (in the U.S. anyway), it is hard to find officially sanctioned boards. The Smoothie website has a list of vendors, but the list is short and the U.S. vendor is out of stock (or no longer carries them).

    Price is something of a hint. A sanctioned Smoothieboard is just shy of 200 dollars U.S. However, that's not a guarantee, one way or the other, that the board is good. I'm sure there are high priced garbage boards and quality boards for about 100 dollars. 

    The images below provide some things to look for, but nothing is guaranteed. Research whatever board you are looking at, try to find reviews, and use your own judgment.

  • Mechanical Design Update

    Lance12/30/2020 at 17:18 0 comments

    Two options for the x-axis were explored.  The first option was with the 2040 aluminum extrusion upright (40 mm dimension vertical).  The second option was to lay the extrusion on its side (40 mm dimension horizontal).  In theory, either should work.  Practical matters usually are the difference-maker.

    In this case, the cable chains and the connections between the x-axis and y-axis starting driving the design.  Placing the x-axis extrusion horizontal simplified things.  The corner brackets used in the x-axis to y-axis connection were no longer required.  The x-axis cable chain could ride on top of the back of the x-axis extrusion, eliminating the need for extra support brackets.  And the same bracket used to mount the x-axis motor could also work to mount both x and y-axis cable chains.

View all 8 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates