36 KB
Newer Older
Jake Read committed
# Machine Week
Jake Read committed

Jake Read committed
3 4 5
*Machines in a week*  
*It's easy, so to speak*   
*In minutia is mayhem*  
Jake Read committed

Jake Read committed
This week, you get to design a machine, and then build it, '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 now<sup>1</sup>, and every time it's a new adventure.  
Jake Read committed

Jake Read committed
The type of machine you build (with your section) 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:
Jake Read committed
10 11 12 13 14 15 16 17 18 19 20 21 22

[5-axis CNC Machine](

[A Delta Machine (3-axis and neat kinematics)](

[Scara Arms](

[Hot-Wire Cutters](

[Pick and Place](


Jake Read committed
etc! weirdness encouraged
Jake Read committed

Jake Read committed
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 design. 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.
Jake Read committed

Jake Read committed
*!ALERT! ~ This is a design process ~ !ALERT!* so please bear with any ambiguities and nonlinearities. When possible, I will take asides to explain my reasoning, but overall, I hope to demystify CNC D&B<sup>2</sup> in fairly broad terms. Think of it as a style guide (?) more than direct instructions. Good luck, have fun!
Jake Read committed
28 29 30 31

### In this order, we will do:

#### Design:
Jake Read committed
 - Draw a Layout
Jake Read committed
33 34 35 36 37 38 39 40 41 42 43
 - Detail the Axis
 - Detail Interconnects

#### Manufacturing:
 - Do Material Layout in Rhino
 - Program CAM in Fusion
 - Do the Milling

#### Assembly:
 - Put it together!

Jake Read committed
#### Wiring
Jake Read committed
45 46
 - Plugs, Switches, Power, oh my!

Jake Read committed
#### Robot Talk
Jake Read committed
 - TinyG with a Big Heart (and second-order acceleration curves!)
Jake Read committed
 - Chilipeppr (haute browser interface)
Jake Read committed
 - GCode
Jake Read committed
51 52 53

#### End Effectors
 - Open Season: Design your own!
Jake Read committed

Jake Read committed
55 56
# Design

Jake Read committed
57 58 59 60 61 62 63 64 65 66 67 68
## In Short

We're going to take these axis from [Jens](

![linear axis](

![linear axis](

And compose them somehow a-la [Nadya](


Jake Read committed
## Layout 
Jake Read committed

Jake Read committed
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 this<sup>3</sup>, but here we are.  
Jake Read committed

Jake Read committed
I'm going to aim at a roundabout bed-size<sup>4</sup> of 12x24"<sup>5</sup> - 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"<sup>6</sup>is 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.   
Jake Read committed
74 75 76

SO: 13x25x5" moving area.  

Jake Read committed
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 why<sup>7</sup>. OK, enough talk - let's see an example of a machine layout - 
Jake Read committed
78 79 80

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.

Jake Read committed
![machine layout extents](
Jake Read committed
82 83

And the layout as representative of a real machine...
Jake Read committed

Jake Read committed
![machine layout](
Jake Read committed

Jake Read committed
87 88 89 90
*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. 

![machine layout extents](

Jake Read committed
91 92
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. 

Jake Read committed
Also of note: Slocum<sup>8</sup> has a lot of great <a href="fundesign">resources for machine design</a> 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.
Jake Read committed
94 95

## Parametric Axis
Jake Read committed

Jake Read committed
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! 
Jake Read committed

Jake Read committed
99 100 101 102 103 104 105
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:

![linear axis](
Jake Read committed

Jake Read committed
Or a rotary axis:
Jake Read committed

Jake Read committed
![linear axis](
Jake Read committed

Jake Read committed
111 112 113
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.
Jake Read committed

Jake Read committed
![generating the x axis](
Jake Read committed

Jake Read committed
117 118
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.

Jake Read committed
## Detail: Layout
Jake Read committed

Jake Read committed
OK, I have my axis, and now I'm going to fine-tune my layout.
Jake Read committed
122 123 124 125 126 127 128 129 130 131 132

![generating all axis](

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:

![coordination x-z axis](

Now I'm going to bring these into my layout:


Jake Read committed
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:
Jake Read committed
134 135 136


Jake Read committed
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 across<sup>9</sup>.
Jake Read committed
138 139 140 141 142


I'm feeling ready to start 'boxing it out' - i.e. adding some structure to these so-far so-flappy axis. Here we go:

Jake Read committed
Jake Read committed
144 145

And the X-Axis... Stiffness is king! But weight is not your friend...
Jake Read committed

Jake Read committed
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  
Jake Read committed

Jake Read committed
149 150

Jake Read committed
I was having a pretty hard time ironing this out. 'Annealing' the ~ design-space ~ . I printed a screenshot from Rhino<sup>10</sup> 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!
Jake Read committed
152 153 154 155 156 157 158 159 160 161 162 163 164


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.

Jake Read committed
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.
Jake Read committed
166 167 168


Jake Read committed
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210
## 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. 

Jake Read committed
# Manufacturing
Jake Read committed
212 213

## CAM: 
Jake Read committed

Jake Read committed
215 216 217 218 219 220 221
Once I'm ready to do some manufacturing, I start by grouping solids by material:


And then laying them out in their respective sheets. Here, I'm using a 4x4' x 3/8" thick sheet of HDPE for 'most' of the machine, and I'm using a 12x24" sheet of Delrin for the guideblocks (slippery things). Additionally, I've got a 3/4" 

Jake Read committed

Jake Read committed
223 224 225 226
Then 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.


Jake Read committed
* careful with excessive import-cycles - i.e. the STEPs I brought in were slightly degraded in sections, I had to be careful when selecting contours to CAM.
Jake Read committed
* you can find my Fusion files under [machineweek/fab/fusion](
Jake Read committed

Jake Read committed
Now, I'm not going to try to relay exactly what I did. CAM is an art-ish. Here's a basic breakdown of the steps I took:
Jake Read committed

Jake Read committed
232 233 234 235 236
- Mill all of the Holes First
 - Use those holes to fixture parts to the bed
 - This is critical, because it's important the material is consistently flat w/r/t the bed
 - This means you can avoid using tabs
 - Use a Bore Toolpath to generate Holes
Jake Read committed

Jake Read committed
238 239 240 241
- Clear Pockets and Faces
 - I.E. Countersunk Screws, Holes for Indexing Tabs
 - Use a 2D Pocket or Adaptive Clearing Toolpath
 - Use 'multiple depths' to generate step-downs when the pockets are deep.
Jake Read committed

Jake Read committed
243 244 245 246
- Contour to Cutout
 - Cut sheets now that you're fixtured
 - Parts w/o holes for fixturing should be 'tabbed' to prevent them moving about as they are cut
 - Use 'multiple depths'
Jake Read committed

Jake Read committed
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264
- Remove Excess Stock
 - Now you can peel the 'rest' of the material away. 

- Contour Details 
 - Use a Contour to detail the Teeth, using a gentle stepover.
 - Pocket beforehand to remove the majority of the material prior to detailing

- Chamfering
 - Start a sketch *on* the chamfered surface
 - Use this plane / sketch to draw a line parallel to the chamfer, offset by 1.25mm
 - Use this line and a Trace toolpath to drag the chamfering bit along
 - Tangential Offset will allow you to 'clear' the edges well
 - Multiple Depths (z-offset) means you won't be taking a huge cut
 - Use a gentle stepdown so that the machine makes a very clean cut - this will improve your machine slipperyness!

- Feeds and Speeds
 - [CBA Feeds and Speeds Calculator](
Jake Read committed

Jake Read committed
#### HDPE: 
Jake Read committed
267 268 269 270 271 272

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
Jake Read committed
273 274 275 276 277 278 279 280 281 282 283
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 

Jake Read committed
284 285 286 287 288
#### 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
Jake Read committed

Jake Read committed
* 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. 
Jake Read committed

Jake Read committed
292 293 294 295 296
## Machining

### Prepping Your (already-existing) Machine

Jake Read committed
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 along<sup>11</sup> 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!
Jake Read committed
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322

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: 


*NOTE* objects in GIF appear faster than real life *NOTE*  

I ended up doing this a second time, with a better toolpath and a bigger bite.  


### Doing the Milling
Jake Read committed

Jake Read committed
![milling teeth](
Jake Read committed

Jake Read committed
![milling chamfers](
Jake Read committed

Jake Read committed
328 329 330 331 332 333
These are the chips you want. Machining plastic should be impressively smooth, silent and buttery.


This is the chip-fountain you want:

Jake Read committed
334 335 336 337 338

In time (est. 1 full day, at least!), I finished all the milling.

Jake Read committed

Jake Read committed
# Assembly
Jake Read committed

Jake Read committed
So I get all of the bits together, and clean the edges up where I need to with a Deburring Tool & regular old knife.
Jake Read committed
Jake Read committed
344 345 346 347

I started with the X/Z Block, tapping the guideblock's back-side. With tapping plastics, I normally just chuck the tap in a drill. Careful to go in straight, though!

Jake Read committed
348 349

Jake Read committed
There's a subtlety to putting the glideblocks together. The M5 SHCS goes through three layers - this is not common / encouraged in 'precision' machine design, because there is some uncertainty about how exactly the layers line up.<sup>12</sup> Critically, the middle block (the one with the chamfer) is a *very slight* slip-fit (5.1mm), the outer block is a large slip (5.4mm) and the final block is threaded. ALSO: Don't forget a washer!
Jake Read committed

Jake Read committed
Jake Read committed

Jake Read committed
I got two sides together to test it out:
Jake Read committed

Jake Read committed
Jake Read committed
357 358 359 360 361 362 363 364 365

There's a reason one side of the glideblocks is mounted on a slot - this way you can adjust the spacing between the blocks - which is important! This way we can slide the gantry over the rail and then *tune* the stiffness.


OK, there's the block, ish


Jake Read committed
Now I'm going to get some Set Screws tapped into the Pinions, and try mounting motors to this block. M4 Tap Drill Size is 3.3mm<sup>13</sup>, so a #30, so a 0.1289", etc
Jake Read committed

Jake Read committed
Jake Read committed

Jake Read committed
Same drill here for the hole-tapping<sup>14</sup>. This time, M4. I put the pinions in a vise, using the index markers to drill perpendicular to the shaft.
Jake Read committed

Jake Read committed
To get the pinion teeth in the right spot w/r/t the rack, there should be about 24mm between the motor flange and the top of the pinion. Check this against the actual machine. Also, make sure one of the set screws is aligned with the 'D' cutout on the motor shaft.<sup>15</sup>
Jake Read committed
373 374 375


Jake Read committed
Now I get the motor on the motor-plate - countersinking the M5 FHCS<sup>16</sup> into the plate. This way, the plate can ride flush against the rest of the gantry. 
Jake Read committed

Jake Read committed
Jake Read committed
379 380 381

And mount that on your gantry. I used those plastic self-tapping screws here. AND I left them a bit loose. You'll notice that the motor slides, also, relative the gantry:

Jake Read committed
Jake Read committed
383 384 385

Adjustment: it's a theme.

Jake Read committed
Now, I got a good look at my pinion -> rack engagement. 
Jake Read committed

Jake Read committed
388 389 390 391 392

Feeling good about this, so I celebrated with a [knoll]( Nothing like it.

Jake Read committed
393 394 395 396 397

To get the rest together, I'm using a 1/8" drill diameter to pre-drill for these plastic screws, and then driving them in with a T20 bit. In addition to this, I don't screw them all down 'in sequence' - I add screws kind of sporadically to the structure - this way I don't pre-stress it in any particular direction. And make sure to use washers!

* a note on rigidity / 'deep' structures - here's the frame w/o any boxiness:

Jake Read committed
Jake Read committed

Jake Read committed
The rest of it is pre-drilling holes and fastening with Plastic Thread Screws
Jake Read committed

Jake Read committed
Jake Read committed

Jake Read committed
Now draw the rest of the owl
Jake Read committed

Jake Read committed
Jake Read committed

Jake Read committed
# Wiring
Jake Read committed

Jake Read committed
I made no concessions for wiring while I was designing - if you're going to 'rev' the machine I made, please do this! If not, it pays to do a tiny bit of planning for your wiring. Keep in ind wires have to move. This part tends to be best detailed in-situ... My strategy is to drill holes where I want to mount wires, and loop zip-ties around them, in bundles, there.
Jake Read committed
411 412 413

I got lucky and had accidentally spaced my bed-rails at the pitch of some mount holes on the Power Supply. Rad.

Jake Read committed
I mounted those, and the TinyG. To bring power to the PSU, I cut up a DIN connector and plugged the GND, Line and Neutral lines in.
Jake Read committed

Jake Read committed
The TinyG gets power here - polarity should be obvious. You should be being safe and not turning anything <strike>off</strike> on yet! Careful with the TinyG polarity - it will die if you reverse these.
Jake Read committed
417 418 419

Next, I drilled some holes in the chassis for my motor wires. I also found this rad 4-conductor cable in the basement at the CBA, I'll use that to route out to my motors.

Jake Read committed
420 421 422 423 424 425 426 427 428

Next up is wiring the stepper motors. There's not really a standard for colors, as far as I can tell - or at least it's always worth checking. Stepper Motors are two coils: 


And you'll see on the TinyG 'A1, A2, B1, B2' - it's not important which direction these are, just that you put the pairs together. In order to figure out which wires belong to which coils, there are two ways to test: (1) get a multimeter, and do a beep-test. (2) when you touch a coil pair together, the motor will be much harder to turn. Pretty neat. 

So, plug those wires in, run some leads out to your motors.
Jake Read committed

Jake Read committed
Also, [here's a link to your stepper motor]( where you can find a datasheet.
Jake Read committed

Jake Read committed
432 433 434 435 436

I also took some time to make the cables 'happy' - i.e strain releived. Next up, I'm ready to sort through the firmware / communications.

# Robot Talk
Jake Read committed
437 438

## Configuring TinyG
Jake Read committed
439 440

TinyG Doc is [here]( You can power the TinyG and plug in your USB - you should see it appear on your serialport list. First thing, you'll want to make sure TinyG has the latest firmware flashed - do that with the [TinyG Updater App]( 
Jake Read committed
441 442

## Chilipepper
Jake Read committed
443 444 445 446 447

Chilipeppr is a browser tool for machine tools. It is familiar with TinyG it lives [here]( Documentation is [here]( 

To talk to your serial port, Chilipeppr uses a Serial Port Json Server - you can find a download link in the bottom-right. 

Jake Read committed
Jake Read committed
449 450 451

I'll let you get into that doc on your own, as it's much better than what I can write in the next few minutes. If you're jumping ahead, the configuration you need is in the tiny gear-icon on the right side.

Jake Read committed
Jake Read committed
453 454 455

Here you can set motors up - and in the 'axis' tab, you can set things like max. speed, acceleration (max jerk) etc. First thing, you'll want to get Motor setup in order, and make sure your steps / rev is correct - so that when you tell the machine to move 1mm, it makes as many steps as are in 1mm. Here it is for the 'default' axis we are using:

Jake Read committed
456 457
- 45.045 mm/rev
- eighth microstepping
Jake Read committed
- make sure y axis are flipped relative eachother
Jake Read committed

Jake Read committed
So, you should be just about ready to write gcode, or send gcode to the machine. As for end effectors, you're on your own for config. Apologies.
Jake Read committed

Jake Read committed
## Gcode Basics
Jake Read committed

Jake Read committed
464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498
[G-Code]( is an ancient (1950s?) method for talking to CNC Machines. Most everything in the CBA shop, at it's heart, is a G-Code interpreter - meaning, it reads lines of G-Code and moves around accordingly. This is great for most manufacturing, but horrible if you want to do any kind of interaction, programmatic moves, etc. However, G-Code persists, so it's OK to get to know it. 

If you open a Serial Terminal connected to TinyG, you can type these in directly to jog / test etc. It's also straightforward to write small files for testing.

Here's a sample:

; 1001 ; comments are behind semicolons
; T4 D=6.35 CR=0 - ZMIN=-10.5 - flat end mill
G90 ; mode: set absolute positioning
G17 ; set xy plane
G21 ; use mm

; Face1
T4 ; use tool  #4
S9500 M3 ; M3: turn Spindle On, S9500: RPM
M106 ; Fan on
G0 X-2.821 Y-7.571 F1000 ; G0: Rapid Move (i.e. jogging)
G0 Z15
G1 Z5
G1 Z0.635 F250 ; G1: Linear Move (i.e. machining)
G19 G3 Y-6.936 Z0 J0.635 ; G19: set plane xy for G3: counter-clockwise arc
G1 Y-4
G1 Y39
G17 G2 X1.485 I2.153 ; clockwise arc

Critically, G-Code is 'Modal' - so if I set a feedrate during one move, it will make the next move at the same rate. You only need to know a few of these to start out:

G0 X<pos> Y<pos> Z<pos> F<feedrate> ; rapid - use for jogging the machine around
G92 X<pos> Y<pos> Z<pos> ; coordinate offset - tells the machine that this input is it's current position
G28 ; home axis - only works if you have homing switches!
Jake Read committed

Jake Read committed
500 501 502 503 504
# Moving Along

*ooh ahh*

Jake Read committed

506 507

508 509
# Bill of Materials

Jake Read committed
510 511 512 513
The total cost for one machine is ~ **$523 USD**, although the cost of hardware has not been broken up per-unit of hardware (instead, the minimum number of 'packages' is used). The largest expense is in the TinyG controller, which we hope to replace with modular control, in the Motors, and the HDPE and Delrin. This cost scales considerably with aluminum.

The total cost for tooling is ~ **$194 USD**. This does not include the cost of a shopbot...

514 515
## Controller

Jake Read committed
516 517
 - [TinyG]( 
 - [buy on Adafruit]( ($165)
518 519

## Power Supply
Jake Read committed
 - [24v 14.6A switching PSU]( ($23.96)
521 522

## Motors
Jake Read committed
 - [4x NEMA 23 57x57x56 w/ 6.32mm Shaft w/ D w/ 400 Steps / Rev]( (4x $18.85)
524 525

## Tooling
Jake Read committed
526 527 528 529 530 531
 - 1/8" O-Cutter Upcut - Onsrud PN 65-013 ($36.46)
 - 1/4" O-Cutter Upcut - Onsrud PN 65-023 ($48.70)
 - 1/2" 90deg Chamfer Endmill - ($66.44)
 - 1/16" O-Cutter Upcut - ($30.66)
 - M5 Tap - 8305A56 ($6.67)
 - M4 Tap - 26565A52 ($5.85)
532 533

## Hardware
Jake Read committed

Jake Read committed
535 536 537 538 539 540 541
 - 140x Plastic Screws, No.8 x 3/4" 96001A326 (3x $13.00)
 - 140x Washers for Plastic Screws 92141A009 (2x $2.00)
 - FHCS M5x22 (Motor Mounting) 92125A215 ($9.50)
 - SHCS M5x18 91292A127 ($8.01)
 - SHCS M5x35 (Rails Mounting) 91292A193 ($5.53)
 - Washers M5 - 93475A240 ($2.57)
 - 12x Set Screws M4x8 - 92015A113 ($8.39)
542 543

## Material
Jake Read committed
544 545 546
 - Rails / Structure etc: 3/8" x 48x48" HDPE - 8619K437 ($90.98)
 - Glide Blocks: 3/8" x 12x24" Acetal (Delrin) Sheet - 8573K37 ($74.71)
 - Pinions: 0.75" x 2x6" Acetal (Delrin) Bar - 8739K44 ($16.55)
547 548 549 550 551 552 553 554 555 556 557 558

## 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

Jake Read committed
559 560
# Footnotes

Jake Read committed
1. [Five Axis](, [Metal Laser Cutter](, [and here](, [Dual Head 3D Printer](, and [Ongoing Robot Arm Adventure](   
Jake Read committed
562 563 564 565 566 567 568 569 570 571 572 573 574 575 576
2. Design and Build
3. 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.
4. Relative Scaling: 10^4 of length scale is a common machine, 10^6 is good - lookup slocum ?
5. ~ 305x610mm 
6. ~ 127mm
7. 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). 
8. Slocum Link
9. Adjusting one side, fixturing the other.
10. TODO: note on printing from rhino, to scale
11. TODO: imperfections note
12. TODO aside, motor concentricity
13. TODO: Link Tap Drill Chart
14. Pun Alert
15. note on bearing->load distance, slocum, w/r/t pinion hanging way out
16. For Flat Head
Jake Read committed

Jake Read committed
578 579 580
# To Do

- Link to Fusion 360 w/ cleaned Cam files
Jake Read committed
581 582 583
- Finish / Fix Loose Footnotes
- Link extra resources: Dan Gelbart, Slocum etc
- Chat aboot resolution vs. accuracy, global / local etc
Jake Read committed
584 585
- w/r/t *True Level* - Everything is crooked... lambs to the cosmic slaughter
- s/o to Hector & Jakob