DIY pick and place machine

Current status of my DIY pick and place machine

Current status of my DIY pick and place machine

When I started developing the RasPiComm Plus I soon realized that I need the ability to manufacture smaller batches of our boards since we will have at least 10 different extension boards. I also wanted to stick to my 100% made in the EU principle.

Usually I would use my manual pick and place system to assemble prototypes. The boards are manufactured in Germany and sent to us. For larger quantities I would send the parts and boards to another company in Germany and let them assemble them. That costs almost €4.000 per 1.000 boards just for the assembling in the case of the RasPiComm. And it will take time, up to 4 weeks depending on their schedule. I needed a better solution and faster turnaround.

no more manual pick and place

no more manual pick and place

Since I have a manual stencil printer and a really cool vapor phase soldering oven a pick and place machine is the missing piece of equipment to have a reasonable low volume production facility.

So those were my options:

Buy a new pick and place machine

I compared prices of various options. An US company sells a cheap pick and place, very simplistic design (no housing, aluminum profiles), for about $25.000. Shipping to Austria would have added another $2.500. The machine itself was not impressive at all. I had my doubts if it could handle 0402 relieably.

The TM220A, a $4.000 toy-grade pick and place as Dave L. Jones calls it (and I am completely with him on that) has no vision. And it does not even look like it is worth $4.000. Not an option at all.

Buy a used pick and place machine

Tempting. Ryan O’Hara bought a Quad PnP for about $16.500 (without the feeders). He talked about it on The AmpHour. It is not that easy if you are not living in the States. I cannot come over and have a look if this machine is what I want and shipping is of course awfully expensive to Austria. Another thing is the software. This price only applies to the DOS version. I like having control over the software and my processes.

Build one

Well this option has the bonus that I’d have to build something from scratch. Do you need more reasons apart from this one? I know, me neither.
Nevertheless it has to be clear that building such a machine is inevitably more expensive than buying one in the short-run. If you don’t consider your time worthless of course. But one gets better with each project, you will learn a lot and you will have a system which you understand down to the tiniest bit of wire and code, so you can tackle every problem that arises, you can adapt software and hardware to your needs. And as an entrepreneur I also keep in mind that it maybe will be a product someday, or parts of it, so I always consider these kind of projects as an investment for the future not only in terms of learning and training for me and my employees but also having working modules that can be reused later on.


I thought about my goals, what I needed and what I don’t need. First of all this should be a rapid prototyping project. I will make design decisions based on if they are practical and the effort/benefit ratio fits for me. It should not be a project which is never really usable. Since this is more a side project that  a full-time project I gave myself 3 months. As I am writing this the 3 months are not over yet, so it is still in time.

I also did not want to think about automatic feeders too much for now. I knew I’ll have to redesign small areas of the machine for automatic feeder support. Until then working with belts held down by a polycarbonate shield should be sufficient for prototype quantities. For the small volume production target feeders are a must of course. So this is a compromise I make when starting this project – in the beginning I won’t have automatic feeders.


After some hours of 3d-modelling we milled the first aluminum parts and ordered some off-the-shelf components and aluminum profiles. Milling was done with a very simple and cheap CNC, not even my good one (I got two of them). The CNC does not have a toolchanger, not even ball screw bearings. But it does its job. After that the parts went to anodization. Black of course.

Next step: Motors. I used quite beefy stepper motors in closed-loop mode for the X and Y axis and servos for the 2 heads I planned. Part rotation is again done by a stepper motor with a hollow shaft. Two simple turning parts made from stainless steel made the pickup base for the nozzle. I glued a magnet to the bottom. I used simple fuse clips as the nozzle holders. Nozzle-changer: done.

X and Y have ball-screw bearings with a pitch of 20mm to get the speed up. With a 500 step encoder with quadrature encoding this means a positioning precision of +/- 0.09° which would be  +/- 100µm. Enough for this machine. I plan to switch to BLDCs for a couple of other reasons with a 4000 step encoder which would lower that to 50µm in normal mode and 12.5µm with quadrature encoding. This is of course hypothetical, the mechanics are not that precise but still very good since I only used high quality ball bearings for X, Y and Z axis. The guides are also precision ones.

Assembing was easy, it took a couple of hours. Wiring was a bit of a pain, it took a whole day.

For the vision system I am using are 2560×1680 pixel USB3.0 cameras. One from the bottom for part alignment and a top camera for PCB/feeder alignment. I made a simple ringlight with 48 650nm wavelength LEDs. Funny detail: I was not able to do a circular pattern alignment of the LEDs in Altium, so I wrote a tiny Autohotkey script which allowed me to enter a number of parts and a diameter and it automatically aligned the parts correctly. Huge timesaver when you want to play around with the radius in which the parts are aligned on the PCB.

I also added a joystick to move around in the x-y plane, for testing and basic board adjustment. Fiducial recognition and board alignment should be done by camera of course, but to give the software a hint where the board is the joystick allows to move to the approximate position.

I wanted to have the top metal platform made since my CNC is too small to mill it so I asked a company what it would cost to do it for me. The price was about €1.500, too expensive for now. Thats why currently I only mounted a 10mm thick and 200mm wide aluminum sheet I had. Enough to hold my small PCBs and a couple of smd parts.


Pick and Place Software

Pick and Place Software

Since I already did write some code some years ago for a pick and place thing I had something to start from. Writing a gerber-file importer took me two days (I did it from scratch using the gerber file format specification from Ucamco). Martin adapted the old code and added the support for our motor drivers, our cameras as well as reading the pick and place csv files. So we had our complete software solution to load gerber and pick and place data and control our motors. Sweet!

For the vision I used OpenCV which I knew a bit. This was very straight forward, it took me under an hour to get a usable rectangle detection on an 0402 part with the rotation information. Still have to test how it will work in the real world. If I learnt anything from building machines than that in the production environment not a single thing will be as in your lab/test environment. I set the filters so that only the red light of my ringlight is captured. That way sunlight won’t screw up my detection. We have a glass roof in the office and no housing for the pick and place yet, so that was quite a good test for the relieability of the alignment algorithm.

Another cool thing when writing your own software is that it can be taylored to your specific process. Since I use GIT as my version control system (even for Altium) I want the pick and place machine to pull the project and load the PnP and gerber data. The PnP will of course have a wireless lan built in and a nice sweet touchscreen and nice GUI.

On what hardware should the software run? Raspberry Pi?

The PnP could be controlled with a Raspberry Pi with our RasPiComm+ and in the beginning I wanted to use this as a platform. But since our old software is built with WPF (windows presentation foundation, a very powerful GUI framework), porting the GUI would have been too cumbersome. The bussiness logic would be easy to port since Mono runs on the Raspberry Pi. But in terms of GUI there is simply no match for WPF out there. And I want to use a touchscreen to control the PnP. Easy to make custom UI controls with WPF, very time consuming with other technologies. And when it comes to the vision system a little ARM processor would definately slow things down. The USB 3.0 cameras are running at 15fps at full resolution, pumping 180MB/s into the OpenCV algorithms, easy for a modern CPU but not realistic for an ARM processor (there is of course no USB 3.0 support limining bandwith even further). I also considered the Xilinx Zynq since I have a ZC702 development board. I played around a little bit, attached a camera but after a day I realized thats not the way to go. In terms of development time nothing can beat C#. And CPUs are fast enough for what I needed, and power efficency is not a mayor concern here. To be up and running fast I also would have needed extremly expensive Xilinx IP which I would avoid at all costs (no pun intended). And then there is the problem with fast adoptions. I want to be able to tweak and parametrize the vision system algorithms for different part classes, easy and fast when done in pure software, hard and time-consuming when done in FPGA logic even with all the amazing IP Xilinx provides.

So in the end it is a boring mini-itx board with a 3.2GHz quad-core and 4GB of RAM. More than enough, and alltogether (including CPU, RAM, SSD and full-HD touchscreen) cheaper than the ZC702 development board alone.

Automatic Feeders

The automatic feeders are not done yet, I just have some basic design approaches. Some say they are the hardest part. I don’t know yet, my focus was to get the PnP up and running. But if its too hard I will simply buy some. Currently I only have a simple aluminum board holding down the components with a polycarbonate sheet just for initial test run purposes. Simple but it works for now. I’m still a bit struggling with the resonance of the motors, at certain speeds small parts can flip. But on one hand the resonance can be minimized by tweaking the CL-parameters of the motor controller which I have not done yet , on the other hand I still want to design proper feeders and replace the stepper motors with BLDCs. So thats not a mayor concern for now.

Next steps

My next step is tuning the pick and place process and do a video. And building feeders of course.

Here is a short speed/motor test with a joystick (no actual pick and place action yet, I’ll do that in a separate video):

UPDATE: First pick and place test with and without vision:

35 responses to “DIY pick and place machine

  1. Nathan July 18, 2013 at 3:58 pm

    Cant wait to see the final version. I have been debating/wanting to build a pick and place machine, even a manual pick and place would be nice.

    Good Luck!

  2. CodeParc July 19, 2013 at 1:09 pm

    What a nice construction, I’m fascinated about mini-factories! Let’s hope it will be soon ready to go.

  3. Pingback: From the Adafruit Forums: DIY pick and place project! « adafruit industries blog

  4. Pingback: DIY Pick and Place just getting under way

  5. Pingback: rndm(mod) » DIY Pick and Place just getting under way

  6. Pingback: DIY Pick and Place just getting under way - RaspberryPiBoards

  7. Pingback: DIY Pick and Place just getting under way | Blog of MPRosa

  8. Pingback: DIY Pick and Place just getting under way | Daily IT News on IT BlogIT Blog

  9. rasz_pl July 23, 2013 at 8:41 am

    Do you really need 2560×1680 at 15fps? this looks like overkill, did you change optics? or do the parts occupy 1/50 of the image? wouldnt pseye at 640×480@75 fps with modded optics (~tqfp144 taking 90 of captured image) accomplish the same thing better (faster response)?
    WPF is nice and all .. until M$ deprecates it like all the predecessors and you are left holding a bag of unportable code.

    • Daniel Amesberger July 23, 2013 at 10:01 am

      The high resolution currently has the advantage that I can use the same camera for 0402 parts as well as parts up to 40x40mm.
      Regarding WPF/NET framework: A huge amount of business software is running on .NET. It is very unlikely that it vanishes over night. I don’t know what you mean when you say they depricated predecessors. You can, if you want, still develop Windows Forms Applications and GDI (their older GUI framework), it is still supported in Visual Studio 2012. The code is perfectly portable, the only thing that you would have to reprogram is the GUI itself, a very small part of the program. The rest can be run on Mono. And the programming model we use allows complete separation between GUI and business logic. In my company we are doing a lot of software development, ranging from Linux Kernel drivers to Windows business software. I think my technology overview is quite good, and there is good reason to go for linux with many software projects, but in this case it simply wasn’t reasonable. I always decide on reason not on dogma. And if we had to port the software it is still doable.
      And by the way, in reality it is quite the other way around: Did you develop linux software depending on linux kernel API? Nothing gets depricated faster.

      • rasz_pl July 23, 2013 at 1:52 pm

        Its true and sad at the same time about Linux API 🙂
        I was thinking about something like Qt to abstract underlying OS.

        tqfp144 is ~2cm on a side, how much space does it take on captured image? basically how is the macro on those webcams? Im thinking 20 year old machines did it with pal/ntsc cameras just fine, so >fullhd has to be overkill?
        on the other hand its nice for inspection

        Do you have any commercial plans for this project? Selling whole shebang? or software?

        • Daniel Amesberger July 23, 2013 at 2:11 pm

          Sorry, not 10×10, its 40x40mm of course, and still have perfect resolution for 0402, should be also be sufficient for 0201.
          Yes, the idea was to implement pin checking on chips later. The thing is that resolution is not the main cost factor in the camera. And what we do is use the AOI feature (area of interest) of the camera with smaller parts so 100fps is no problem with small parts. The resolution just gives a lot of flexibility.
          I already talked to someone with a lot of experience in the field who found the project very interesting, So yes, probably we will make this a comercial project. It is still too early to say though.

  10. Pingback: DIY Pick and Place just getting under way | Orange Claymore Red Slime

  11. Carl Sundstrom July 23, 2013 at 4:31 pm

    What steppers are used to rotate the nozzels ? Where did you source them ?
    Great looking machine

  12. Pingback: DIY Pick and Place just getting under way | Make, Electronics projects, electronic Circuits, DIY projects, Microcontroller Projects -

  13. Mike July 27, 2013 at 9:26 am

    Nice machine.
    I seams like you are trying to find and use parts that is not to expensive. so i have to ask which USB3.0 camera that you are using. i have been looking for some time and all i can find is cameras that cost ~500$ ,
    really nice to see the progress of the machine, hope you post more videos 🙂

  14. Pingback: Community Corner: Projects Loaded with Adafruit Goodies, and Other Spectaculars from the Past Week in Adafruit’s Community « adafruit industries blog

  15. Jon Raine August 1, 2013 at 8:28 pm

    I have found a home made pick and place machine based around a cpld. They have a very simple method for feeding smd parts. May be worth a look, Hope this is of some help, Jon

  16. ekvil October 5, 2013 at 9:30 pm

    Please advise where you bought head assembly. How much did it cost?

    • Daniel Amesberger October 9, 2013 at 1:56 pm

      I did not buy an assembly, it is all self-built. The steppers are from nanotec, the linear bearings are from misumi.

      • mobice December 10, 2013 at 11:14 am

        Hi, Daniel please where you bought air coupler for head ?

      • Malte February 22, 2015 at 7:49 pm

        Hello. Nice machine 😉 I am in the process of building a (somewhat simpler) p&p myself. Regarding your head assembly: Could you share how you have attached the air tube coupler to the top of the hollow shaft stepper so that it can still rotate freely? It looks very good in your pictures but it is hard to tell how it is held together… Thanks in advance!

  17. Vincent October 28, 2013 at 8:38 am

    Any details on how you handled the Z-axis travel? The hollow-shaft stepper motors for the orientation are easy to see, but I’m struggling to figure out how the heads are raised and lowered. Cheers.

  18. MatKar December 19, 2013 at 5:48 pm

    Has any progress been done on this project since your last update?
    What is the interface between PC and stepper motors? Are you using parallel port to interface stepper drivers directly or do you have a USB based controller attached between PC and stepper drivers?
    Great project!

    • Daniel Amesberger May 19, 2014 at 2:30 pm

      Yes, we updated the machine quite a bit, I will do a follow up when I have time. Have to take care of some other projects first unfortunately. For interfacing with the motors we use motor controllers from nanotec. We communicate with RS-485 with the motors.

  19. Paul April 19, 2014 at 11:39 am


    Was your vision system difficult to build as your could do a good business selling them for those Chinese machines


    • Daniel Amesberger May 19, 2014 at 2:31 pm

      Well, we use kind of expensive cameras. I think one could use cheaper ones too. The vision system is a part where we still do some work. Releasing this as a standalone product would require a lot of work on the software (also documentation). Currently we are not considering this…

  20. Pingback: Pick and place – entry level options | LowPowerLab

  21. Søren Houen September 8, 2014 at 6:10 pm

    That looks insanely cool! Much congratulations on the cool project. I am currently looking for a good PCB and manufacturing company in Germany. Which German companies did / do you use? I would love to go straight to a trusted company.

    • Daniel Amesberger October 30, 2014 at 4:10 pm

      Sorry for the late reply. We use different suppliers. You can try, they make good pcbs in Germany and have an online calculator. For assembling does a good job.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: