Introduction: Ramps 1.4 DIY SMD Pick and Place

Foreword

Last Update: January 11, 2016

Status: Indefinitely suspended.

All files have been uploaded that I have on hand. I accidentally overwritten the laptops linux OS with a new version and wiped all the working files I had for the machine. I will leave this up to provide motivation for others, but my build was over complicated in many ways (coding wise). Please refer to the section below about software if you want to grab my files.

Note: there is no vision control, the "software" runs in NetBeans environment and requires working knowledge of Java as the entire program was not polished to finish. The code is old, and when I didn't understand commenting etiquette.

Motivation

I am currently in the process of building my electronics project funded through the crowd funding website Kick-starter (check out Lumin8 on Kickstarter!), for which as you have already guessed will require assembly of electronics of some sort. Having a tool like a pick and place machine would be an awesome addition to the collection of tech tools to help me at any electronics assembly task.

So, motivation becomes a very important part of any project. There are some questions that I asked myself prior to this build and they ultimately led to the conclusion that having a pick and place machine would be an "okay" idea. There are alternative options to building one for yourself which include:

  • buying a chinese pick and place machine from ebay ($3500 with no frills) check out the Adafruit Review of the TM220A
  • buying a cnc kit from diycnc websites ($4000 and you have to put it together! troubleshoot! etc! not guaranteed to work) Buildyourcnc.com has a kit
  • outsourcing to an assembler (expensive at low volume)
  • or hand assembling yourself (ever solder something smaller than an 0805? pain in the arse)

Design Criteria

I justified the need and I set about the design criteria. The most important one of course was price. I didn't want to spend 4000 dollars, but I also didn't want to waste money on cheap parts. Additionally, I didn't want to get so wrapped up in a project that I just couldn't complete without extensive programming and implementation of frills (like vision control, quick change nozzles, etc.) Although, when I have the time I will probably incorporate all of those elements into this project.

The build is focused around these main parts:

  • Stable solid structure to move 0805 sized components accurately (linear bearings, MDF, and 3d printed parts)
  • Use spare electronics and electrical components I have laying around (Ramps 1.4 and Nema17 steppers)
  • Manual programming, because I have a cnc dripper program I had tinkered with a couple of years ago that I never got around to using (Netbeans IDE to build java program that will drip feed gcode to Ramps 1.4)

Step 1: Tools and Materials

Tools

You will need pretty much everything you would necessary to build a cabinet from pine board. But for those who want or need an actual list:

  • Hand Saw or Jigsaw for long cuts
  • Dremel or Rotozip to cut out large hole for the smd tapes to drop down, a drill and jig saw works too
  • Powered Drill
  • Drill bit set
  • Assorted Flat and Phillips head bits and hand drivers
  • Wire Cutters
  • Wire strippers
  • Angle Grinder to cut the hardened steel rod (Rotozip with right angle attachment)
  • Soldering iron
  • Multimeter for checking electrical connecitons prior to energizing!
  • Butane Pen Torch for plastic welding
  • Assorted files for deburring
  • There are other tools that you would probably need, I just cant think of them right now.

Materials and cost

I was fortunate enough to have so many extra parts I only had to purchase the pump, solenoid valve, and hardened 8mm rod. But here is the entire list:

  • MDF 3/4 inch or thicker (lowes) $40
  • PLA (for printing parts, Zen Toolworks makes the best spools in my opinion) $35
  • (3) Nema 17 bipolar stepper motors (ebay) $30 total
  • Ramps 1.4 (shield, arduino, and stepper controllers) (ebay) $40
  • Solenoid valve (amazon) $12
  • Aquarium pump (amazon) $20
  • Vinyl Tubing (amazon) $4
  • 12 Volt 8 amp Power supply $15
  • (8) Linear 8mm sleeve bearings (amazon) $10
  • (2) 8mm hardened steel rods 30 inch length (amazon) $25 a piece, $50 total
  • 8mm hardened steel rod 15 inch length (amazon) $15
  • Angled aluminum (lowes) $10
  • 5/16" threaded rod (lowes) $2
  • steel strapping (lowes) ~$2
  • Drywall screws 2.5inch length (lowes) $5
  • GT2 Belt and Pulley Set (amazon) $15
  • Brass rod 3/16" (lowes) $5
  • Dispenser needles sampler pack $15
  • Misc wood for base frame (lowes) ~$10
  • Misc other nuts and bolts (lowes) ~$20
  • Assorted zip ties (lowes) ~$5
  • Masking tape (lowes) ~$5
  • 2 pair stranded wire or 4 wire 22 awg rgb wire works (lowes or amazon) ~$10
  • Electrical Tape (lowes) ~$2
  • Sandpapers (240 grid and a finer one) (lowes) ~$10
  • Servo Motor $8

Notes on Materials

Ramps 1.4 and Nema17 steppers - You may notice I either shop at lowes or Amazon a lot. Any alternative will work. The only suggestion I have is to say is stay with reputable stepper motor and other electronics makers. ABSOLUTELY STAY AWAY FROM SAINSMART electronics kits. I have tried them, and they are absolute crap. I've tried their knockoff uno's, their knockoff pla plastic spools, their knockoff pololu shields and they are all junk. Everything about them is junk. JUNK. The old adage of "buy cheap, buy twice" holds absolutely true with that dreadful company.

Hardened Steel Rod - Do not make the mistake of replacing the hardened 8mm steel rod with a
cheaper alternative. The stuff at lowes doesn't have the strength and hardness necessary to make your build work! I tried building a cnc machine from shit I bought from Lowes and that turned out to be a fail.

As you can see, even going dirt cheap with headstrong DIY mentality, you still have to spend several hundred dollars just to get the basic machine parts, just imagine the hours... In total as I've listed here that is about $387 with some parts that are not yet listed, so expect to spend in total around $400.

Step 2: Mechanical Setup

Picture of Mechanical Setup

Purpose

Other than the obvious task of supporting everything, there are some key things to keep in mind about the operation of a pick and place machine. Like most all electromechanical tasks, its all about repeatability with the highest precision achievable so that operation over time results in the lowest possible error. In this case, we want to minimize mechanical slop and make up for it, if necessary, in the software end. So it is important to know that all these parts need to be made and handled with extreme care for the purpose of reducing the mechanical tolerances to as low as you need them to be!

Notable Points of Interest

This setup does the following:

  • Provides x and y movement via linear bearings, actuator is controlled via GT2 belts. The slides have slop on one side because the linear bearing mounts are made of plastic and do not clamp onto the 8mm rod. Future change to model is coming.
  • Provides z movement via linear bearings, actuator is controlled through a sloppy threaded rod rotated by stepper.
  • Feeding of tape is via friction "fittings". There are no tensioners, spoolers, or auto feeders.
  • The nozzle head does not rotate! yet. I will add a servo to the top of the z-axis rod and document that addition.
  • No vision. There is a camera mount for inspection of setup and during operation but no actual feedback from it to the program.
  • More...

Sketch-Up

As you might have guessed from the file name of the CAD file I've attached, I used Sketch-up. Most people I know would argue that Sketch-up is not a very friendly cad program as it doesn't create very nice solid objects for 3d printing but I get by with a process of fixing the files appropriately.

I have not finalized the 3d files, so I have not put .stl's up. But if you are so inclined to peak around or tweak, load up Sketch-up and take a gander. The complex parts are purposefully subdivided into separable pieces that must be glued or plastic welded together. It just eases up the 3d printing process and reduces the need for supports in the structure. You can just export the components within Sketch-up as groups, but that is up to you.

If you want to get the 3d models I have here (which I dont recommend right yet) you probably already know a little about 3d printing. In case you dont know enough about the available 3d programs to go from .skp to .stl this is the process I use:

  • Export .dae files from Sketch-up or export via .stl using Sketch-up add on
  • Use Meshlab to convert from .dae to .stl (I know meshlab is a much more powerful program than that!)
  • Load part into NetFabb Basic to repair part and orientate as necessary (sketchup sometimes doesn't create perfect manifolds so you need to fix it)
  • Slice with Slic3r
  • Print with PronterFace on my Mendel Prusa i3!

Sketchup, Meshlab, and NetFabb basic are all free programs you can find on google. There are plenty of tutorials out there on how to utilize these great programs, so look for them! I will link notably helpful ones in the future.

Plastic Parts

Print the parts from the sketchup file or build them in whatever fashion suits you. I will upload final design stl's in the coming weeks when I have the opportunity.

The complex parts are purposefully broken into pieces so that the prints aren't super complex and reduce the need for bridges and supports which may mess up your print if everything isn't absolutely spot on.

In order to join the parts I plastic welded the parts using a little butane torch (example link) by tacking in place at corners, then running an extra piece of pla filament and dragging across a seam. It takes a little practice, but it gets better bond strength than any glue or cement you'll find.

MDF Base

There isn't a final version of the MDF board yet. But the only things you need to design would be mounting hole locations and a cut out for the tape dispenser to feed the tape through.

One might consider doubling up on the MDF base or using thicker than 3/4 inch MDF like I used.

Final layout of MDF Base coming soon.

Carriage

The design of the carriage was meant to reduce the weight of the entire project. MDF is pretty dense and should be used for any parts which require dimensional stability. Since the carriage just holds the tape and reels and raises the platform for feeding the tape down below the table, its not very important that it be made of MDF. I used scrap pieces of wood laying around the workshop which worked perfectly!

Major note: Do not bolt down the MDF base to the carriage unless its made of mdf and the dimensions are true. Warping of the carriage will cause the table to distort when you bolt them together. Instead I used braces on the sides to keep the MDF base from moving off of the carriage.

Final layout of Carriage coming soon.

Spool Holder

more info to come

Vacuum Pump

There are couple of tutorials on Instructables on how to turn an aquarium bubble-r pump (internet link) into a vacuum tool. Here is an example.

Vacuum Valve

You will need a 12 volt direct drive normally open solenoid valve to operate the needle nozzle. Preferably something that is small as you dont need that big of a valve to control such a small vacuum pump. Do not make the mistake like I did of getting an air operated solenoid valve... *shaking head*

I have not found a valve online that suits my needs. After making the mistake of buying the wrong valve I removed the solenoid and built a plastic and hot glue 3 port valve. It works and im happy, but you shouldn't need to do this.

If anyone finds an appropriate valve on the net and recommends it, I would greatly appreciate it!

Idler Bearings

Instead of buying aluminum bearings that were compatible with the GT2 set I bought, I cut up a piece of brass rod as the shaft, printed a GT2 adapter which I cut down just to the tooth portion and slipped it on the brass rod with some synthetic grease. Its cheaper than buying a milled piece which doesn't need high precision.

Step 3: Electronics Hookup

Picture of Electronics Hookup

Ramps 1.4

Ramps 1.4 's intended use is for 3d printers. I found this setup useful because its cheap, its arduino which makes it easy for tinkerers, and the source code is open. The drivers, board, and steppers all cost under $100. You could probably get away with smaller steppers as this system doesn't quite need the amount of torque a Nema17 can produce, but I had spare parts from another build.

You should have some basic electrical knowledge before putting this together in order to prevent damage to your electronics. There are plenty of tutorials on how to setup ramps 1.4 (pretty much the entire 3d printing community!) so I will link a helpful tutorial which will get you started.

Pulleys

More info to come

Mounting of Electronics

More info to come

Power Supply

More info to come

Solenoid Valve

More info to come

Stepper Motors Hookup

More info to come

Servo Mechanism

More info to come

Step 4: Calibration and Setup

Arduino and PronterFace

You will need two pieces of software in order to get the firmware uploaded and get talking to your machine. Download the Arduino IDE and the latest build of PrintRun for your machine. You dont need to use PrintRun, but its quick and easy to use interface allows you to send commands easily to your Pick and Place machine through a friendly user interface. Its almost intuitive and I dont have to go through the trouble of telling you what commands to feed your machine through the serial window in the Arduino IDE.

Firmware Upload

The main setup points I want to touch on for now require that you to disable certain functions in the firmware in order to get your 3d printer hardware to act like the pick and place machine we are forcing it to be. This is what I have needed to do so far (I will post up configuration.h file once I get the time):

  • There are no temperature sensing elements in a PnP, so disable the temperature control by zeroing out the low temperature thresholds. This will prevent Ramps from throwing you a thermocouple / rtd low or high temp and go into a lockdown state that won't accept GCode.
  • Disable all endstops because why do you need them? (have faith in your code that you won't crash your motors)
  • Disable auto bed leveling feature because of disabled endstops
  • Adjust the "step per unit dimension" attribute to fit the GT2 pulleys you got.Like I said earlier, I will post up more details later.

Zeroing process

More info to come

Grid Your Table!
More info to come

Z-axis alignment

More info to come

Setting up your Tape Dispensers

More info to come

XY Slop

More info to come

Table Leveling

More info to come

Stepper Motor Current Gain Adjustments

More info to come

Step 5: Software

Picture of Software

The Big Ticket

The unfortunate part of every electronics project is how to talk to your machine. I mean... you could talk to it and say sweet nothings but you will not get any results. Just like talking to that hot girl at the bar, she'll ignore you until you know how to push the right conversation buttons. Haha.

Anyway. Quick search on Google reveals a slew of proprietary software that works on proprietary hardware that are ridiculously expensive. There is the OpenPnP project, but they dont have any end user packages yet for your use! And as I can imagine, it will still require some tweaking and manual inputs to get it running.

So the solution...

Build a gcode dripper program that sends the appropriate position values. I know it sounds daunting at first but its not horribly difficult.

There are two avenues you can take which I am working on RIGHT NOW. So I dont have too much information for you as of yet.

Manual GCode

Record all the positions needed and build yourself a hand written algorithm. It would go something like this:

  1. zero the machine
  2. lift nozzle head
  3. go to component reel
  4. retract the tape to get component (drop nozzle, move tape, lift nozzle)
  5. reposition over component on reel
  6. drop nozzle
  7. turn on suction
  8. raise nozzle
  9. move to board
  10. lower nozzle
  11. turn off suction
  12. repeat from step 2 for all components

Build a Program

I have built a VERY VERY VERY rudimentary Java program (why Java? I built this program last year for another project and why redo something when you already have something that works?) that achieves a couple of things:

  • establish serial communication with ramps
  • drip commands over serial
  • calibration routine to check speed of travel
  • alignment routine of tape reels
  • manual input
  • run a programmed text file with all other functions automated

The programmed text file will require each line of code to contain 4 elements, the rest of the routine is taken care of in the java program. The basic format of the file contains a position number, x coordinate, y coordinate, and rotation. For example, "1 X100 Y100 S0" will tell the program to go pick up a component at position 1, place it at (100,100) and rotate 0 degrees. The rotation portion will be implemented at a later point, as I have plans to install a servo on the z-axis to rotate the suction nozzle.

There is a zip file which contains the NetBeans package. The program is far from polished, but the core mechanics are there and it is HEAVILY documented. Someone who has at least taken a simple course in computer programming will be able to step through the methods logically and fully. I will admit however that some portions of the code throw errors and the text navigation is a little buggy and doesn't flow correctly, but that's what you get from a student that has had only one semester of computer programming. Ha ha. I only care that the core mechanics work and I can get it to work on my project. If I have time this upcoming semester I will work on it and try to develop a better text based end product that is friendlier to the less computer inclined.

The main reason for posting it up is to see if any passerby is willing to take a look... and um... maybe help me out or provide some constructive feedback more than "hey dude... how do I get this thing to work?"

Step 6: Conclusions and Thank You's

Special Thanks...

... to JSSC (Java Simple Serial Communicator) for making the library I needed to establish communication with external components in a almost pointless Java environment... None-the-less you've made my day over a year ago when I was tinkering with this program.

... to Arduino for making an awesome platform. I wish you guys made T-shirts I would totally buy one.

... to RepRap Community for their open source equipment, firmware, and software which has made this project easier than it actually is!

... to every other free software site I have linked to.

Not Complete, but getting there

I am not finished with this tutorial yet, but I hope this provides motivation and a starting point for anyone interested. I will update as often as I can. Thanks for taking a look and happy building!

Comments

hemangjoshi37a (author)2017-02-18

if anyone has made, please upload a video of the instructable.... I really want to make this one..

tx

panmaneecnc (author)2016-04-10

very cool

coman_hm (author)2016-01-02

Hi! Very interesting project. But insufficiently information about firmware for Arduino and RAMPS. Is the 3D printer wares or something similar? Please, answer mr. author. ))

daviddein (author)coman_hm2016-01-05

Hey, I can post up my old files if you'd like (but I wont be able to help decipher everything). I realized along the way that its WAY too much effort to get running and it served as a one time project for the purpose I needed it for.

Other than that, I dont have the time to revitalize the project with the end of college and a new job awaiting me soon.

Thanks for showing interest.

coman_hm (author)daviddein2016-01-08

Hello! Thanks for the answer. Your project is very interesting . In the near future I will have a 3-D printer, which will give me the opportunity to print out all the details of your machine . I would be grateful for the files to e-mail : kostayakovlev@gmail.com

daviddein (author)coman_hm2016-01-11

Hey, i have uploaded what I could find in the software section. There are two files "pickandplace" and "old_files". Both require netbeans to open the Java program I programmed for it. You'll need a working knowledge of Java to get through my less than perfect commenting. Also, the Ramps1.4 firmware is in "old_files". I think the settings were up to date, but I am not sure.

coman_hm (author)daviddein2016-01-12

Hello, daviddein! I downloaded the archive file. Thanks for the source code to the RAMPS. I will try to do the machine. Will any progress in the assembly of the machine - reported in your comments here.

whyme111 (author)2016-01-09

Hi daviddein, great project.

I would like to replicate it and extend it, so that it would also dispense solder paste. It would be a great help if you would upload your old files.

daviddein (author)whyme1112016-01-11

Yup, I put them in the software section. "pickandplace" has a stable java program I believe, and "old_files" has the latest files I could find. I accidentally deleted the best working files a month ago when updating my latop OS.

You'll need a working knowledge of Java to get through my horrendous coding and commenting, haha. Best of luck. If you have any questions I can point you in the best direction I know, though I make no garuntees.

musthy (author)2015-11-20

Congratulations for Kickstarter project and motivation to build it by yourself.I am new to Pcb manufacturing but Have you plan soldering also or such a machine does all ?I believe it would be a matter of adding gcode and a multi head system for all process. I will be following you !

SporkS1 (author)2015-07-25

Would you ever consider selling a kit of the main parts? I mean, the heavier stuff I wouldn't mind buying myself (like the wood). But stuff like the modified solenoid valve, etc. Would you ever be interested in selling a Do-It-Your-Self kit? This is simply amazing. You're my hero! Please let me know if you'd ever consider selling me just a collection of all the parts I need to make this and how much you'd sell it for (again, minus stuff like the wood). Thanks!!!

daviddein (author)SporkS12015-07-30

It is an interesting prospect; However, I am in the middle of revamping the entire rig as I learn more about electronics and other "standard" pick and place machines (although there are so many machines there really isn't anything standard). I dont like selling anything until it is at least a teenager in its metaphorical development stage of maturity. I've just been swamped with other projects that I literally haven't had the time to work on it as much. Sorry dude! Thanks for the interest though.

SporkS1 (author)daviddein2015-07-30

I understand not having the time! It's okay. I appreciate you at least sharing what you did and providing a guide. If you ever change your mind, let me know. I'm just starting to mess with stepper motors. Maybe way down the road I'll be able to build something like this myself. Thanks!

johnip4 (author)2014-12-28

Interesting project. I am early on in the design similar to the Cirqoid. I'm more interested in the Pcb milling side but it also does pick and place. They claim the software is open source.

Good luck with your build.

daviddein (author)johnip42014-12-28

Thanks! I've seen quite a few of the multi purpose 3d machine builds that make it a printer, paster, mill, picknplace, and even a laser cutter with a quick change of the tool on the z axis. Some really cool stuff out there! I have all dedicated machines for pretty much every purpose, so I am just rounding off my workshop for the most part. With so many extra parts laying around, I had to figure out what to do with those too, haha. Again, thanks for the encouragement.

About This Instructable

32,485views

113favorites

License:

Bio: Electrical Engineering student at Clarkson University in Potsdam, NY
More by daviddein:Arduino Pitch Detection Algorithm (using AMDF)Ramps 1.4 DIY SMD Pick and Place
Add instructable to: