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.

  • Custom Lighting Module

    Lance05/04/2022 at 15:02 0 comments

    Old Light

    Previously, I had used a ring light bought off of Aliexpress.  It worked well from a functional standpoint.  However, there were some issues with it.

    • Mounting it required a custom designed bracket
    • It was wide enough to limit head travel distance.
    • It has a power converter that was attached to the wires which was an awkward place.
    Old Ring Light
    The ring light used on the original design.

    Custom Light

    My friend designed a custom light to solve these issues and add functionality.

    • Mounting compatible with ELP cameras.
    • Same width as ELP cameras.
    • Onboard power adaption.
    • Adjustable light output (dimming).
    Ikosy Pick and Place Lighting Module
    Custom designed light for pick and place machines.

  • Design Updates

    Lance03/22/2022 at 21:56 0 comments

    Introduction

    After building and testing the machine, I started to notice some limitations, small design issues, and areas where improvements could be made.  Several iterations later, I have an updated design that smooths out these rough edges.

    Many of these are significant and will get their own log entries like a completely new head design, PCB holder, custom light, and nozzle tip holders.  Stay tuned in for those.

    Below are a few additional updates.

    Here are some updated images of the machine.

    Machine Top
    The top of the machine.
    Machine Bottom
    The bottom of the machine. The electronics are mounted to the bottom of the build plate.

    Removed the LCD Screen

    After testing with the LCD screen, it was determined it added little value to a pick-and-place machine.  Unlike a 3D printer, a pick-and-place is always connected to a computer.  All of the information that the LCD screen would be used for is available on the computer and easier to access.  The emergency stop button was integrated into the original LCD screen mount, therefore, a new stop button holder was designed.

    Camera Changes

    The bottom camera was horribly mounted in the middle of nowhere.  The consequences of this became apparent almost immediately.  A shorter focal length was chosen to both allow the camera to be closer to the build table while maintaining the field of view,   This also allowed the same cameras to be used for both the top and bottom.

  • Assembly Run

    Lance11/06/2021 at 15:17 0 comments

    Running a PCB on the Machine

    After a lot of work, testing, debugging, and fixing, the machine is up and running and capable of assembling a PCB.  There's still work to be done to make things easier to use.  A new strip feeder design is likely.  Rearranging the build table is coming in the near future.  Overall, though, the machine works well and is really accurate.

  • Flip Your Lid

    Lance03/08/2021 at 17:06 0 comments

    Introduction

    As with all first builds of a design, there was one thing that was certain: Changes were going to be required.  And likely, they were going to be frequent.  That's part of the process.  Debugging and testing were going to create an even greater need to access the electronics and mechanics in the base of the machine.  And that was going to be a problem.  Unscrewing the build plate or disassembling part of the machine wasn't going to an option.  This would require too much work and risk messing up machine alignment or setup.  The solution was to put the machine on hinges so it could be flipped up.

    Setup

    On one side of the machine, a set of hinges connects the machine to a base plate.  A set of 3D printed kickstands attached to the side provide a place for the machine to rest on.

    Hinges and Kickstands
    Hinges and kickstands are mounted to one side.

    On the opposite side, there are some 3D printed brackets screwed to the mounting plate.  These are not attached to the machine.  They act to ensure the machine is repositioned in the same place each time it is tipped up and set back down.

    Centering Stand for Foot
    A centering stand opposite the hinges ensures the machine returns to the same position after being tilted up and set down.
    Machine Flipped on the Side
    The machine can be flipped up to access the electronics and mechanics on the underside.

  • Low Cost Rails

    Lance02/23/2021 at 01:59 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 1 comment

    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:

    Smoothieware troubleshooting page

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

    Diode installation reference

    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.

    Documentation diode link

    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.

    Digikey equivalent

    Mouser

    Mouser equivalent

  • 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.

View all 12 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