Machine Design
jake: ctrl+f TODO
- stock, hardware orders
- 4x4'
- T15 PLSTF
- FHCS for Motor Mounting
Intro
Machines in a week
It's easy, so to speak
In minutia is mayhem
OK, welcome to Machine Week.
If you're reading this, chances are you're about to design a machine, and then build it, and then 'bring it online', and then do something with it. Exciting! There's a great deal of complexity here! I have done this a few times now1, and every time it's a new adventure.
The type of machine you build is your discretion. Besides making a straightforward 3-axis CNC Machine (a-la Shopbot, as documented in the following guide) - there are a few cool variations you can explore:
A Delta Machine (3-axis and neat kinematics)
etc!
This document will serve as a guide for how to make a 3-axis machine. In linear time, I'm going to run through my design and fabrication processes, including links, resources and asides when relevant. You should read through it as a launching point for your machine. As a default, you are free to use all of the resource here to replicate the machine, and develop an end effector of your own.
!ALERT! ~ This is a design process ~ !ALERT! so please bear with any ambiguities and nonlinearities. When possible, I will take asides to explain my reasoning2, but overall, I hope to demystify CNC D&B3 in fairly broad terms. Think of it as a style guide (?) more than direct instructions. Good luck, have fun!
In this order, we will do:
Design:
- Draw a Layout (Rhino Suggested)
- Detail the Axis
- Detail Interconnects
Manufacturing:
- Do Material Layout in Rhino
- Program CAM in Fusion
- Do the Milling
Assembly:
- Put it together!
Electronics Assembly:
- Plugs, Switches, Power, oh my!
Motion Control
- TinyG with a Big Heart (and second-order acceleration curves!)
Machine Communication
- Chilipeppr
- GCode
End Effectors
- Open Season: Design your own!
Layout
First thing, you'll want to get a hang of what rough sizes / shapes / orientations your machine is going to have. In this case, I'm interested in designing something of an 'everything machine'. I.E it should be useful for a few different processes: 3D Printing, CNC Milling, Flat-Sheet Cutting (a-la the ZUND), and (maybe) eventually Laser Cutting. Normally I would not advise this4, but here we are.
I'm going to aim at a roundabout bed-size5 of 12x24"6 - largely this just feels like a happy medium between large format and small format work. It's a fairly common size for sheet stock, or at least bigger sheet stock can be broken down into these sizes with minimum work. In Europe, sheets also commonly come in 1250x2500mm stock - a factor of 1.025 over the NA 4'x8' standard. I'm going to add 1" to each of these dimensions to account for that, and for general design-fudge-space, and for fixturing. I feel like 5'7is a great Z-travel value - this will handle lots of stock, and lots of tools (in milling) - also, this is relative movement, and I plan on making the overall bed height / end-effector mount locations somewhat adjustable.
SO: 13x25x5" moving area.
W/R/T Layout, there are a number of permutations of how to go about adding axis together in order to get 3D motion. I'd like to cover a few of these in examples, and I'll leave a TODO here: - bridgeport x-on-y with beefy-z style, shopbot and laser 'H' machine w/ dual y-drive (note laser BED moves, not head), omax and fablight 'drafting-square' hella-stiffness gantries, ultimaker t-config, corexy, flexural stages. I really like this machine developed by one of Jens' students. I should explain why8. OK, enough talk - let's see an example of a machine layout -
I tend to 'work out' from the Z-axis, towards the edges - this way I can keep track of where I need extra offsets (length of travel != length of gantry). Here's the layout with the Z-and-X axis group moved around to the extents.
And the layout as representative of a real machine...
NONLINEARITY ALERT You can tell I already have some sense of what the details in my axis system are like, which has informed (in a big way) how I laid the rest of the machine out. HOWEVER - as this stage, I took no time to carefully align things, set thicknesses, etc. I was simply trying to get a general sense of what-goes-where. This will inform my next spiral, where I detail axis.
Good design is kind of like this - you are starting far away from your desired goal, and in limited time, you approach the destination. Deviations you make early on have big effect on your final location - even though this is when you have the most limited amount of information. It's important, during the early stages, to properly explore as much 'design space' as possible - this way you are better off later on - sometimes in categorically better or worse positions. SO: don't jump too early, be curious, be cautious, think as carefully as you can as you make these initial decisions.
Also of note: Slocumlts has a lot of great resources for machine design that are totally approachable, pretty weird, and occasionally funny. He advocates (rightfully so) very strongly for doing lots of back-of-the-envelope guestimation at the early stage: how much torque can I expect motors to require? What are the Free Body Diagrams like? What kind of bits & parts are available? How much moving mass is too much moving mass? etc. Spreadsheets are mundane, but they will serve you well - making later stages into oodles of fun.
Parametric Axis
Jens Dyvik is on some wonderful machine building sprials (link!) and we're going to put them to work this week. In particular, the chamferrail system. Linear Axis are like the bread & butter of Mechanical Engineering - and making a good one is more subtle than you would imagine. Jens has developed some great axis (rotary too!) and so we are borroging from his toolkit this week. Take a look at his documentation to get an overview of the machines!
I'm using his Chamferrail Generator in Rhino and Grasshopper - included in this repo under /cad/axis-generator/ and in Jen's Repo here.
Links to these files are under /cad/axis-generator/ - you can open the Rhino and Grasshopper file there TODO: Link Grasshopper Tutorials and get to work inputting your parameters.
You can make a linear axis:
Or a rotary axis:
Use Grasshopper to adjust the parameters - you'll find them all on the left. There's a huge swath to get through, try experimenting so that you understand the different parameters. Critically, adjust Axis Length, Axis Width, and Axis Type (Rotary or Linear). The Motor Size & Material Thicknesses are set already for the materials we have on hand for machine week, and the Tooth Size variables are set up for the milling capabilities we have in our shops.
Once I have my parameters set up, I use the 'bake' command to pull the geometry out of grasshopper and into Rhino.
I'm going to do this for each of my axis: X, Y and Z - and then bring those into another Rhino File so that I can start composing them into a machine.
Detail: Layout
OK, I have my axis, and now I'm going to fine-tune my layout.
Critically, I coordinated mounting holes (there's an option for 'custom hole pattern' in the Glideblock Geometry Section) so that my X and Z axis would comfortably overlap:
Now I'm going to bring these into my layout:
What I'll do now is compose axis 'from the action-out' ... i.e. I'm going to set up my Z->X relationship up, and then my X->Y relationship up. So, if you have a Delta Machine, Scara Arm, etc - I recommend starting detail design from the 'last point' in your motion system - probably the point whose coordinates (movement) matters the most. This is my Z->X Axis Relationship:
Now is when we start deviating from the parametric axis. I'm going to make on major concession: my Y axis (the long ones) I have split, and I'm going to put one side of the rail on either, and link them with a rigid member along the x axis... I'm also going to bring one of the adjustable-sides of the chamferrail acrossnote on why.
I'm feeling ready to start 'boxing it out' - i.e. adding some structure to these so-far so-flappy axis. Here we go:
And the X-Axis... Stiffness is king! But weight is not your friend...
Starting by linking the two Y-Axis Gantries with a block - this way, I can comfortably constrain these gantries relative eachother - since they are operating on a split rail. TODO: Kinematic Jams
I was having a pretty hard time ironing this out. 'Annealing' the ~ design-space ~ . I printed a screenshot from RhinoTODO: note on printing from rhino, to scale and tried doodling. Design Education gets a +1 pt for this moment... I figured it out pretty quickly! Actually on paper it seemed really obvious. Brains, weird!
This is satisfying: I have a squared-out structure that I feel good about, it's not too heavy...
And putting the X on the Y axis is semi-deconstructable / easy-ish to assemble:
OK. I feel good about this, I'll throw in a few bonus features (like, a bed could be nice?) and call the blocking-out section done.
Here's the bed. I make no claims to elegance, but this will make it easy to load in a sheet of spoilboard. I am largely trying to avoid cutting so much plastic, so these links are thin and sparse.
Detail: Joinery
Now I need to rip it all together. In the fullness of time, all of these links become snap-fit, but for now I am going to tab-and-screw it together. Before getting deeper into it, I wanted to check the hole-and-pocket sizes from my time in Jens' tool agains the plastic-specific hardware I'm planning on using.
This is a No.8 Plastic Threadforming Screw @ 3/4" long. In machine design, hardware is no joke! For plastics I always choose a big beefy thread - these are excellent, with only 16 threads / inch. This means that I'm much less likely to shear the threads out of my material (which is insanely soft relative the metals that Mx size Socket Head Capscrews are designed for). Additionally, washers often seem secondary, but are REALLY important. Here's a 'shear cone' drawing w/ and w/o a washer.
TODO: Shear Cones, w/r/t Slocum
Basically, you really want to distribute your load across a larger swath of material. Here is the washer, just a regular No.8. We'll ask all section heads to get these hardwares on hand as well, for all of your plastic assembly joy. * They also use Torx Heads - another one of my favourite things.
Strategy for adding Holes in Rhino (use Boolean Difference):
Adding a trough in the frame so that the XY Gantry can slide on / off (subassemblies!)
OK: I'm all lego-d out on the bottom section:
Detailing the top section is similar. Basically, I build little 'blocks' that I'll want to add / subtract from other objects (tabs, holes) and I array those about, adding and subtracting... It's a painful process, to be honest, but I actually think (on one-shot) it's a bit faster than adding a similar amount of information to a parametric model - short of scripting. Of course, it's not parametric, which can be a huge drag, esp. in these cases where, say, material may arrive and measure 9.7mm in thickness as opposed to 9.5mm (which, by the way, is what I used here).
Here's the back of the X Gantry:
And the whole X / Y / Z Carriage:
And a color coded machine! These primaries are aggressive :|
Talk about a CAD Marathon! Some notes:
- Not even sure this would have gone faster in Parametric CAD. HOWEVER - if I had to change anything, I would make time back in maybe one shot.
- That's a lot of fasteners! I don't even want to count. I'm going to estimate 100 ? A real count gives me 140. A bit of a bummer, these screws are $10 / 50.
Prepping Your Machine
CRITICAL NOTE These linear axis absolutely require you to face off the spoilboard on your milling machine. If the XY Plane that your material rests on is not truly parallel to the XY Plane that your gantry moves alongTODO: imperfections note you will have axis whose chamfered-edges vary in width. This will cause some areas on the gantry to jam up, and others to be loose! END CRITICAL NOTE
First thing, I surfaced the bed. We have this big gnarly cutter at the CBA:
I made a tool for this in Fusion (TODO: include in table), it's included in the table below.
And I ripped out a 'face milling' toolpath:
Then I got on the shopbot, and ran the job! I set the Z (in the program, it just faces along Z0.0) such that the machine thought 0.0 was about 0.1" below the surface. I had to run the job twice, bringing it down by 0.1" each time, to get all of the low spots. Nice circular turnaround courtesy of Fusion 360 CAM:
I ended up doing this a second time, with a better toolpath and a bigger bite.
CAM:
Once I'm ready to do some manufacturing, I start by laying the pieces out - grouping them by material. Most things are in HDPE (or ABS - TBD!). The 'rails' are made with Delrin9 of a similar thickness, and the pinon is made of thicker Delrin, about 3/4". Here's a chance to optimize your layout for the size of sheet stock you have. Keep in mind you'll want clearance between items for cutout tools, etc.
Now I brought this into Fusion to do some CAM. From Rhino, select the geometry for one material and Export as a .step file. Then you can upload this into Fusion.
I go to the CAM section right away, and setup some stock. First thing, our Shopbots are setup in Inches, so check that in the 'units' in the top of the tree. I'll use a 0" offset on top of the model, 0.05" on the bottom (then we can be sure to cut through later on) and a 0.75" offset on the sides - I want to be sure to clear the screws I'll be using to fixture my HDPE sheet.
For tools, I set up with a 1/8" 'O-Cutter' - as in, one flute. This is going to be my detail workhorse - it'll cut teeth and holes. I also have 1/4" O-Cutter to do profiles and cutouts. My two other tools are a Chamfer Endmill, used for, well, the chamfers, and a 1/16" 2-flute endmill for some detailing on the pinion. Here's a quick table of the tools, and their feeds and speeds. I used the CBA Feeds and Speeds Calculator to ballpark these, and I'll dial them in as I test the first axis.
A note on plastics - TODO heat, why single flute, sharp bits, what chips should look like
HDPE:
Type | Flutes | Diameter | What For | Feed, XY (IPM) | Feed, Plunge (IPM) | Spindle Speed (RPM) |
---|---|---|---|---|---|---|
Endmill | 1 | 1/8" | Most Details, Holes | 55 | 25 | 13500 |
Endmill | 1 | 1/4" | Cutouts, Grunt | 55 | 25 | 7000 |
Endmill | 2 | 1/16" | Pinion Detail | 75 | 25 | 20000 |
Chamfer Mill | 2 | 1/2" | Rail Edges | 100 | 50 | 5000 |
Acetal:
Type | Flutes | Diameter | What For | Feed, XY (IPM) | Feed, Plunge (IPM) | Spindle Speed (RPM) |
---|---|---|---|---|---|---|
Endmill | 1 | 1/8" | Most Details, Holes | 55 | 25 | 13500 |
Endmill | 1 | 1/4" | Cutouts, Grunt | 55 | 25 | 7000 |
Endmill | 2 | 1/16" | Pinion Detail | 75 | 25 | 20000 |
Chamfer Mill | 2 | 1/2" | Rail Edges | 100 | 50 | 5000 |
Fly Cutting MDF:
Type | Flutes | Diameter | What For | Feed, XY (IPM) | Feed, Plunge (IPM) | Spindle Speed (RPM) |
---|---|---|---|---|---|---|
Fly Cutter* | 2 | 2 & 3/8" | Facing the Bed | 130 | 50 | 6500 |
- I used a 1.5" stepover, and ~ 0.03" stepdown. I set the facing pattern up to only cut on the 'climb side' of the bit - that was pretty critical. I think it's possible to be more aggressive - the bit we have at the CBA is quite dull. The job ran about ~50 minutes.
Assembly
- Careful on Blocks! Trim and Align
Plugging in Motors
- Coils are connected
- One and two
- Link Datasheet from StepperOnline
Configuring TinyG
- https://github.com/synthetos/TinyG/wiki
- Do Power to the board
- Should enumerate on a serial port
- Use https://github.com/synthetos/TinyG/wiki/TinyG-TG-Updater-App to flash new firmware
- Make sure you don't have the serial port open anywhere else
- Now complete setup
- Open in a serial terminal (Arduino has one built in, or see Neil for links) TODO
Chilipepper
- It's Rad
- Like Mods, Chilipeppr uses a local serial server to pass messages from the browser to your serial port.
- Download the Serial Port Json Server after configuring TinyG
- http://chilipeppr.com/tinyg
- Steps / mm
- Acceleration
- Travel, etc
Talking to, loading firmware on, TinyG
- Arduino, I hope?
- Chilipeppr (rad alert!)
Gcode Basics
- may it RIP
Bill of Materials
Controller
Power Supply
Motors
Tooling
- 1/8" O-Cutter Upcut - https://www.bhid.com/itemdetail/HARVEY%2051908 or Onsrud PN 65-013
- 1/4" O-Cutter Upcut - https://www.bhid.com/itemdetail/HARVEY%2044916 or Onsrud PN 65-023
- 1/2" 90deg Chamfer Endmill - https://www.bhid.com/itemdetail/NIACUT%20N76595
- 1/16" O-Cutter Upcut - https://www.bhid.com/itemdetail/HARVEY%2051162
- M5 Tap (McMaster)
Hardware
- 140x Plastic Screws, No.8 x 3/4" 96001A326
- 140x Washers for Plastic Screws 92141A009
- FHCS M5x22 (Motor Mounting) 92125A215
- SHCS M5x18 91292A127
- SHCS M5x35 (Rails Mounting) 91292A193
- Washers M5 - 93475A240
- 12x Set Screws M4x8 92015A113
Material
- Rails / Structure etc: 3/8" x 24x36" of HDPE or ABS (TBD)
- Glide Blocks: 3/8" x 12x24" Acetal (Delrin) Sheet
- Pinions: 1" x 2x6" Acetal (Delrin) Bar
End Effector Showdown
- A Router
- A Laser Diode (haute)
- A 3D Print Head (also haute)
- Heated Bed ?
- Ceramic Printer
- Pick-and-place-ish
- Drawing
- Camera / Scanning
- Cutting
Footnotes
- Five Axis, Metal Laser Cutter, and here, Dual Head 3D Printer, and Ongoing Robot Arm Adventure
- Asides will be relegated to the footnotes when not strictly necessary.
- Design and Build
- Things work very well when they are designed to do only one-thing. For example, vise grips will turn just about anything, but no one would say they are good at turning anything. A building designed for Helsinki may not make so much sense in Dubai. In another example, a laser cutter has a motion system that is optimized for speed, and takes advantage of the fact that it has very little mass to move around (a few mirrors) in order to carry through on this optimization. A milling machine is engineered for stiffness, and trades speed for the mass required to carry through on that optimization. In trying to have one motion system do all of these things, we'll go a little 'soft' in the middle, but we'll also be able to offer a lot of variety in a single system.
- Relative Scaling: 10^4 of length scale is a common machine, 10^6 is good - lookup slocum ?
- ~ 305x610mm
- ~ 127mm
- So I want an H-style layout, because I want to keep the machine small relative it's total work area. One of the biggest drawbacks with an H-machine is that the two sides of the Y-axis are not always set up parallel. The result is what's called 'racking' - i.e. imagine opening a screen door, and the top or bottom exhibits more friction - the 'jam' that this causes happens in CNC Machines as well. A drawing. By cutting both Y-axis rails out of the same 'frame', Jakob gets around this issue - the parallelness of the two rails is a mirror of the parallelness of the machine which cut them. It makes it a bit bulletproof to novice assemblers. He has also done a really good job of keeping the X-axis loads really close to the Y-axis rails (so, a small structural loop).
- AKA Acetal, AKA POM
to be linked - dan gelbart talk about resolution vs. accuracy - repeatability vs absolute accuracty - global vs. local resolutions
w/r/t True Level - Everything is crooked... lambs to the cosmic slaughter