# Machine Building at the CBA

Hello! If you've landed here, it's likely that you're getting ready to design and build some equipment. This guide is part of the [MIT Center for Bits and Atoms'](http://cba.mit.edu/) ongoing machines-making-machines effort, wherein we seek to turn the universe into a deeply recursive heirarchy of robots building one another.

Most machines are monolithic and static: they live their lives for one process, and are hard to modify for anything else. They tend to miss a lot of learning opportunities (i.e. they feed forward what might be fed back). They each communicate to the outside world in different ways, they hide their secrets, etc, etc. 

Machines described here are *parametric configurations of object-oriented hardware* that can be assembled into *instances* of equipment, whose constitutent parts are free for future addition and modification. Machine controllers are *networked collections of input and output devices* that contain bare minimum state - high level planning and interface takes place within *virtual machine controllers* that are similarly easy to assemble, configure, and tune.

### How To Play

Any kind of design is nonlinear and contradictory. To that end, this guide takes the form of an ordered list. 

## 1) Design

I leave 'design' up to you, to save myself following the rabbit hole where I end up writing about it for too long. Look at [examples](openassemblies.com), do back of envelope maths (stiffnesses, forces, speeds, weights) etc, draw things with your hands, with your friends, have ideas, etc. 

## 2) CAD Wrangling 

### Configure Parametric Axis in Fusion 360 

![](video/SEQ-fusion-parametric-enc.mp4)

To start, head to [the RCT Gantries Repository](https://gitlab.cba.mit.edu/jakeread/rctgantries) and download from the CAD folder the parametric axis you'd like to configure. 

In Fusion[^2], you can open this file up and use (from the top menu)

``` Modify >> Change Paremeters ```

Each of these models should have some parameters *starred*, these are what you'll want to configure. Go ahead and set axis lengths, material thicknesses according to what you're doing. When you're satisfied, you can export the model as a .step file, using the file menu, to prep it for fabrication.

``` File >> Export ``` 

Make sure to change 'type' to .step, and check the 'save to my computer' box. 

### Set Relations Between Axis in Rhino

.step files open up beautifully in Rhino[^3], where you can go about setting up relationships between parametric elements. I.E. here is where you 'assemble' the components you've configured.

![](video/SEQ-rhino-relationships-enc.mp4)

I've also made a set of static blocks that can be configured to connect degrees of freedom to one another, most usefully at 90 degrees. Those models are also available in [the RCT Gantries Repository](https://gitlab.cba.mit.edu/jakeread/rctgantries). 

![](video/SEQ-rct-add-blk-enc.mp4)

I'll also leave the chassis up to you. You can design it in Fusion, or Rhino, whatever you'd like.

Of course, it's also fair game to do everything in Fusion and build a big parametric model (i.e. instances of parametric gantries could be imported to an assembly as components), if you'd like. Rhino is personal preference. 

### Modifications / Connections in Rhino

![](video/SEQ-rhino-modifications-enc.mp4)

Rhino is pretty free-form, and presents a good opportunity to add-in whatever details you'd like - i.e. here I'm modifying the X-Gantry of [this machine](https://gitlab.cba.mit.edu/jakeread/mothermother) to lighten it up, and to mate with the Y-connectors on the same machine. I also add a cable-routing tray. 

Of course, you can get away without doing very much of this at all - just make sure you have the right holes / mounts set up to secure each axis to eachother. 

## 3) Fabrication

### Lay Out Cut Files in Rhino

Once you're feeling O-K about your machine design, you should get ready to cut it out. 

![](video/SEQ-rhino-layout-fab-enc.mp4)

First, pick out the 3D Printed Parts and slice them up. 

This is a lot of manual model-moving-about and 'nesting'. I recommend drawing out some rectangles of the size you'll be cutting from to make sure you can fit everything into the stock you have available. Your favourite commands will be ``` Orient3Pt ``` , ``` Rotate3D ``` , and ``` Move ```.  

Then, the command that you'll want to use is ``` DupFaceBorder ``` - this will take the faces of your parts (with the RCT Gantries, etc, everything should render well into 2D Cuts only [i.e. no pockets anywhere]), and render them as linework. Then you can export this linework (probably as a .dxf) to whatever machine tool you'd like.

![](video/SEQ-cutting-out-enc.mp4)

While I cheat by using the CBA's Waterjet and Zund, there are a lot of ways you could go about cutting out the pieces of your machine. HDPE cuts beautifully on a shopbot using a 1/8" single-flute o-cutter, for instance. 

### Assembly 

 - fasteners, bearings, belts, oh my 

## 4) Electronics

 - circuit assembly
 - wiring 

## 5) Controllers

 - atkapi hello worlding 

# End Effectors

I'm working on a few end effectors. You can grab some of these design files and fabricate them, or try designing your own. Here's the [simple spindle](https://gitlab.cba.mit.edu/jakeread/simplespindle):

![spindle](images/ee-spindle.jpg)

Hopefully to come:
 - rotary tool w/ inserts a-la Zund
 - Piezo Touch Probe 

# Reference

- [openassemblies](http://openassemblies.com)
- [rct gantries](https://gitlab.cba.mit.edu/jakeread/rctgantries)

# BOM 

This is a general BOM. For How to Make Almost Anything coordinators, CBA will coordinate ordering material. Section Heads should order HDPE sheets (below, in Material section) to be delivered to their labs, and if shopbots are not 4x8' size, change for 4x4' sheets. You should also make sure you have the right tools in your shops; I've included a list of useful or rare items here as well. 

## For Section Heads

### Material

What | QTY | Link
--- | --- | ---
HDPE 3/8" / 0.375" | 1-2 Sheets | [McMaster](https://www.mcmaster.com/8619k438)
PLA for 3D Printing | < 1kg | [My Favorite](https://www.matterhackers.com/store/l/pro-series-natural-pla-filament-1.75mm/sk/MACKAE6L)

### Tools

What | Where Used | Link or McMaster
--- | --- | ---
Onsrud 1/8" Upcut Spiral Super-O | Milling HDPE Like a Dream | [Blackhawk Industrial](https://www.bhid.com/itemdetail/ONSCUT%2065-013)
M3 Tap | Extensively for Aluminum Parts | 2673A71
M5 Tap | Extensively for Aluminum Parts | 2673A74
M6 Tap | Shoulder Bolts | 2673A75
Countersink Bit | Flush Mounting | 27535A48
Hex Driver Set Metric | Cannonical | 5709A18
Torx Driver Set | Nice, Not Necessary | 6370A1
Torx Drill Driver T15 | Wonderful to have for Chassis; No. 6 Button Head Screws | 7396A42 
Torx Drill Driver T10 | For Flat-Head No. 6 Screws | 7396A41 

## The Rest of It

## Hardware for One NEMA23 Axis with 0.375" HDPE

Type | Size | QTY | Where Used | McMaster PN
--- | --- | --- | --- | --- 
Button Head Thread-Forming | No. 6, 3/4" | 10 + (4 * rail tab) (lots) | Connecting Lap and Tab HDPE, Belt Blocks, Chassis | 99512A265
Button Head Thread-Forming | No. 6, 1/2" | 2 | Belt Blocks | 99512A259
Flat Head Thread-Forming | No. 6, 3/4" | 8 | Flush Mounting HDPE | 95893A258
SHCS | M3x20 | 1 | Belt Tensioning at Motor | 91292A123
SHCS | M3x30 | 2 | Used *only* when pre-loading bearing rollers | 91292A022
SHCS | M3x40 | 2 | Used *only* when pre-loading bearing rollers | 91292A024
Belleville Washer | 3.1mm ID | 24 | Used *only* when pre-loading bearing rollers | 96445K157
Locknut | M3, Nylon | 6 | Used *only* when pre-loading bearing rollers | 90576A102
SHCS | M5x10 | 1 | Connecting Nema 23 Motor | 91292A124
SHCS | M5x16 | 3 | Nema 23 Motor through tensioning arcs | 91292A126
Shoulder Screw | 8mm Shoulder x 8mm x M6 | 10 | Guide Roller Shaft | 92981A198
Shoulder Screw | 8mm Shoulder x 16mm x M6 | 2 | Belt Guide Roller Shaft | 92981A202
Bearing Shim | 8mm ID x 10mm OD x 1mm Thick | 38 | Roller Separation | 98089A381 

## Purchase Parts 

What | Spec | QTY | Where Used | Link
--- | --- | --- | --- | --- 
608ZZ Bearings | 8x22x7 | 100 | Rollers | [VXB 10](https://www.vxb.com/608ZZ-Shielded-8x22x7-Miniature-Bearing-Pack-of-10-p/608zz10.htm), [VXB 1000](https://www.vxb.com/Wholesale-Lot-of-1000-608ZZ-Ball-Bearing-p/608zz-wholesale.htm)
GT2 Belt | 10mm Wide, Length Dependent | 2 | Belt! | [Amazon](https://www.amazon.com/Timing-Pulley-Teeth-6-35mm-Printer/dp/B07BS4DVR5/)
GT2 Pulley | 10mm Wide, Motor Bore Diameter | 1 | Transmission! | [Above, Combo](https://www.amazon.com/Timing-Pulley-Teeth-6-35mm-Printer/dp/B07BS4DVR5/)
Power Supply | 24v 350W Mean Well | 1 | Power ! | [Amazon](https://www.amazon.com/Enclosed-LRS-350-24-Meanwell-Switching-LRS-350Series/dp/B07BK27V4W/)
Stepper Motor | NEMA23 x52mm | 2 | Torque ! | [StepperOnline](https://www.omc-stepperonline.com/hybrid-stepper-motor/nema-23-bipolar-18deg-09-nm-1275ozin-2a-36v-57x57x52mm-4-wires-23hs20-2004s.html)
Stepper Motor | NEMA23 x76mm | 2 | Torque ! | [StepperOnline](https://www.omc-stepperonline.com/hybrid-stepper-motor/nema-23-bipolar-18deg-19nm-269ozin-28a-32v-57x57x76mm-4-wires-23hs30-2804s.html)

## Wiring

Assuming you're controlling this thing with [automatakit](https://gitlab.cba.mit.edu/jakeread/automatakit), these are the parts you'll want when you're wiring it up.

What | Spec | QTY | Digikey PN
--- | --- | --- | --- 
Power Entry | IEC 320-C14 10A | 1 | 486-3979-ND  
Power Entry Fuse | 10A | 1 | 486-1226-ND
RJ45 Plugs | RJ45 Modular 8p8c, For Flat Cable, IDC | 20 | AE10316-ND 
RJ45 Cable | 8 Conductor 26AWG Ribbon with Jacket | 100ft | A0082R-100-ND 
RJ45 Tool | Crimping | 1 | K582-ND
DC Power Terminal | M3 Stud Terminal 18-20AWG | 20 | 277-11144-ND 
18AWG Hook-Up GND | 18AWG Stranded with Silicone Jacket, Black | 100ft | CN101B-100-ND  
18AWG Hook-Up V++ | 18AWG Stranded with Silicone Jacket, Red | 100ft | CN101R-100-ND
Zip Ties | ~ 6" | 250 | Q731-ND

# FNs

[^1]: Typically, CNC Machines - but ambitiously I would like to include most of robotics and automation here as well. 
[^2]: Parametric CAD Software [from Autodesk](https://www.autodesk.com/products/fusion-360/overview), available [free for students and educators](https://www.autodesk.com/products/fusion-360/students-teachers-educators). 
[^3]: Non-Parametric CAD software [available from McNeel](https://www.rhino3d.com/), loved by generalists and computational geometry-ists. Educational licenses available.