Commit 65031bab authored by Jake Read's avatar Jake Read

ready

parent d5db1948
......@@ -4,9 +4,7 @@
*It's easy, so to speak*
*In minutia is mayhem*
OK, welcome to Machine Week.
So, you're about 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.
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.
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:
......@@ -22,16 +20,16 @@ The type of machine you build (with your section) is your discretion. Besides ma
[Lathes](https://www.youtube.com/watch?v=eipyve8xv24)
etc!
etc! weirdness encouraged
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.
*!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<sup>2</sup>, but overall, I hope to demystify CNC D&B<sup>3</sup> in fairly broad terms. Think of it as a style guide (?) more than direct instructions. Good luck, have fun!
*!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!
### In this order, we will do:
#### Design:
- Draw a Layout (Rhino Suggested)
- Draw a Layout
- Detail the Axis
- Detail Interconnects
......@@ -43,14 +41,12 @@ This document will serve as a guide for how to make a 3-axis machine. In linear
#### Assembly:
- Put it together!
#### Electronics Assembly:
#### Wiring
- Plugs, Switches, Power, oh my!
#### Motion Control
#### Robot Talk
- TinyG with a Big Heart (and second-order acceleration curves!)
#### Machine Communication
- Chilipeppr
- Chilipeppr (haute browser interface)
- GCode
#### End Effectors
......@@ -60,13 +56,13 @@ This document will serve as a guide for how to make a 3-axis machine. In linear
## 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 this<sup>4</sup>, but here we are.
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.
I'm going to aim at a roundabout bed-size<sup>5</sup> of 12x24"<sup>6</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>7</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.
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.
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](http://archive.fabacademy.org/2017/fablabverket/students/100/web/projects/diy_cnc/index.html) developed by one of Jens' students. I should explain why<sup>8</sup>. OK, enough talk - let's see an example of a machine layout -
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](http://archive.fabacademy.org/2017/fablabverket/students/100/web/projects/diy_cnc/index.html) 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 -
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.
......@@ -82,7 +78,7 @@ And the layout as representative of a real machine...
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: Slocum<sup>lts</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.
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.
## Parametric Axis
......@@ -126,7 +122,7 @@ What I'll do now is compose axis 'from the action-out' ... i.e. I'm going to set
![layout-z](https://gitlab.cba.mit.edu/jakeread/machineweek/raw/master/images/layout-z.jpg)
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>note on why</sup>.
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>.
![layout-x-y](https://gitlab.cba.mit.edu/jakeread/machineweek/raw/master/images/layout-x-y.jpg)
......@@ -140,7 +136,7 @@ Starting by linking the two Y-Axis Gantries with a block - this way, I can comfo
![pre-box-y](https://gitlab.cba.mit.edu/jakeread/machineweek/raw/master/images/layout-pre-box-y.jpg)
I was having a pretty hard time ironing this out. 'Annealing' the ~ design-space ~ . I printed a screenshot from Rhino<sup>TODO: note on printing from rhino, to scale</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!
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!
![pre-box-y-sketch](https://gitlab.cba.mit.edu/jakeread/machineweek/raw/master/images/layout-box-y-sketch.jpg)
......@@ -285,7 +281,7 @@ Fly Cutter* | 2 | 2 & 3/8" | Facing the Bed | 130 | 50 | 6500
### Prepping Your (already-existing) 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 along<sup>TODO: imperfections note</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!
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!
*END CRITICAL NOTE*
First thing, I surfaced the bed. We have this big gnarly cutter at the CBA:
......@@ -328,7 +324,7 @@ In time (est. 1 full day, at least!), I finished all the milling.
![good-job](https://gitlab.cba.mit.edu/jakeread/machineweek/raw/master/images/good-job.gif)
## Assembly
# Assembly
So I get all of the bits together, and clean the edges up where I need to with a Deburring Tool & regular old knife.
......@@ -338,7 +334,7 @@ I started with the X/Z Block, tapping the guideblock's back-side. With tapping p
![assembly-tap](https://gitlab.cba.mit.edu/jakeread/machineweek/raw/master/images/assembly-tap.jpg)
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>TODO aside, motor concentricity</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!
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!
![assembly-guideblock-hardware-stack](https://gitlab.cba.mit.edu/jakeread/machineweek/raw/master/images/assembly-hardware-stack.jpg)
......@@ -354,17 +350,17 @@ OK, there's the block, ish
![assembly-xz-no-motors](https://gitlab.cba.mit.edu/jakeread/machineweek/raw/master/images/assembly-xz-no-motors.jpg)
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>TODO: Link Chart</sup>, so a #30, so a 0.1289", etc
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
![assembly-tapdrill-select](https://gitlab.cba.mit.edu/jakeread/machineweek/raw/master/images/assembly-drill-select.gif)
Same drill here for the hole-tapping<sup>pun</sup>. This time, M4. I put the pinions in a vise, using the index markers to drill perpendicular to the shaft.
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.
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>note on bearing->load distance, slocum</sup>
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>
![assembly-pinion-d](https://gitlab.cba.mit.edu/jakeread/machineweek/raw/master/images/assembly-pinion-d.jpg)
Now I get the motor on the motor-plate - countersinking the M5 FHCS<sup>flat head</sup> into the plate. This way, the plate can ride flush against the rest of the gantry.
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.
![assembly-motor-plate](https://gitlab.cba.mit.edu/jakeread/machineweek/raw/master/images/assembly-motor-plate.jpg)
......@@ -396,7 +392,7 @@ Now draw the rest of the owl
![assembly-owl](https://gitlab.cba.mit.edu/jakeread/machineweek/raw/master/images/assembly-owl.jpg)
## Plugging in Motors
# Wiring
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.
......@@ -408,40 +404,91 @@ The TinyG gets power here - polarity should be obvious. You should be being safe
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.
![assembly-ee](https://gitlab.cba.mit.edu/jakeread/machineweek/raw/master/images/assembly-ee.jpg)
![assembly-ee](https://gitlab.cba.mit.edu/jakeread/machineweek/raw/master/images/wiring-ee.jpg)
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:
![stepper-wiring](https://gitlab.cba.mit.edu/jakeread/machineweek/raw/master/images/doc-stepper-wires.jpg)
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.
*~ BEGIN INCOMPLETE DOC ~*
Also, [here's a link to your stepper motor](https://www.omc-stepperonline.com/hybrid-stepper-motor/nema-23-bipolar-09deg-126nm-1784ozin-28a-25v-57x57x56mm-4-wires-23hm22-2804s.html) where you can find a datasheet.
- Coils are connected
- One and two
- Link Datasheet from StepperOnline
![wiring-stepper-leads](https://gitlab.cba.mit.edu/jakeread/machineweek/raw/master/images/wiring-stepper-leads.jpg)
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
## 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
TinyG Doc is [here](https://github.com/synthetos/TinyG/wiki). 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](https://github.com/synthetos/TinyG/wiki/TinyG-TG-Updater-App).
## 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
Chilipeppr is a browser tool for machine tools. It is familiar with TinyG it lives [here](http://chilipeppr.com/tinyg). Documentation is [here](https://github.com/synthetos/TinyG/wiki/Chilipeppr).
To talk to your serial port, Chilipeppr uses a Serial Port Json Server - you can find a download link in the bottom-right.
![chilipeppr-splash](https://gitlab.cba.mit.edu/jakeread/machineweek/raw/master/images/chilipepper-splash.jpg)
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.
![chilipeppr-config](https://gitlab.cba.mit.edu/jakeread/machineweek/raw/master/images/chilipepper-config.jpg)
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:
- 45.045 mm/rev
- eighth microstepping
- make sure y axis are flipped relative
- Acceleration
- Travel, etc
- make sure y axis are flipped relative eachother
# Moving Along
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.
Now, you should be ready to move some motors about.
## Gcode Basics
![assembly-flap](https://gitlab.cba.mit.edu/jakeread/machineweek/raw/master/images/config-move.gif)
[G-Code](https://en.wikipedia.org/wiki/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!
```
## Gcode Basics
- may it RIP
# Moving Along
*ooh ahh*
![config-move](https://gitlab.cba.mit.edu/jakeread/machineweek/raw/master/images/config-move.gif)
# Bill of Materials
......@@ -492,14 +539,21 @@ Now, you should be ready to move some motors about.
# Footnotes
1. [Five Axis](http://ekswhyzee.com/index.php/project/tinyfive/), [Metal Laser Cutter](http://ekswhyzee.com/index.php/project/mako/), [and here](http://3dfablight.com/), [Dual Head 3D Printer](http://openassemblies.com/index.php/fdm4md/), and [Ongoing Robot Arm Adventure](http://openassemblies.com/index.php/rsea/)
2. Asides will be relegated to the footnotes when not strictly necessary.
3. Design and Build
4. 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.
5. Relative Scaling: 10^4 of length scale is a common machine, 10^6 is good - lookup slocum ?
6. ~ 305x610mm
7. ~ 127mm
8. 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).
9. AKA Acetal, AKA POM
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
# To Do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment