How To Make (almost) Anything


the CBA section @ MIT makes

A CHOCOLATE EXTRUDING MACHINE

Getting Started

Machine Design

Fabrication

Electronics

Software

Assembly

Camera

Extruder

GOAL

The assigment for the machine design week is to actuate and automate a machine as a group based on Jake Read's machine write-up. As a group, we decided to build a machine that can 3D print chocolate sculptures.



DIVIDE AND CONQUER

We divided into 5 groups, (1) machine design (2) hardware (3) electronics and software (4) extruder (5) camera, and we worked on this in parallel until Tuesday when we started putting everything together.





MACHINE DESIGN

Machine body material: HDPE

CAD software: Fusion 360



STARTING DESIGN

We started with RCTN23-0375HDPE Fusion CAD File from the machine-week rct gantries repo: https://gitlab.cba.mit.edu/jakeread/rctgantries#rctn23-0375hdpe-fusion-cad-file



MODIFICATIONS TO STARTING DESIGN


...design considerations include...

Our machine bears weight at its extruder

Protecting our motors from chocolate

We started by using the provided RCT gantry as the X, Y, and Z axes, and worked on how to compose the axes.


Original plan:

We thought this would establish the best stability for chocolate extrusion.







ISSUES WITH ORIGINAL PLAN

We encountered parametric issues when attempting to shorten the x-axis from the original design -- we were unable to simply shorten the part, or lessen the number of tabs.

The issues with the parametric settings caused us to reconsider our design.





NEW PLAN

to work with the parametric issues & constraints imposed by the original design:

TASKS


STEPS


We mirrored our y-axis component to create its mate



Challenge:

Connect y-axes with a base plate. The problem was that two separate components cannot be connected by one body (a base plate).

Solution:

We deleted the base plates of the y-axis components and put them into a new “base plate” component, which we then joined into one base plate. We reconnected this base plate to our y-axes.





Connecting the y-axes and x-axis with brackets:

We started with the design for the provided 90 Degree Block for 1/4" Aluminum: RCTBLK-90-025ALU Fusion CAD File

We went into the part’s creation history timeline in fusion to modify it in the following ways:

To save ourselves time, made the decision to not include all of the fillet’s from Jake’s original design. We did this knowing we ran the risk of imprecision at the time of cutting the parts.

Throughout this process, much of time went to measuring parts and determining how large parts should be, how many holes they should have, etc.



This is the final design:

Liz took the final model and attempted to flat pack the design using the script and did the following:

FABRICATION

The fabrication team took turns to design tool paths, watch over the shop bot and troubleshoot errors throughout the assembly process. We encountered the following issues and solutions while cutting:


Tool Path Design and File Prep


ELECTRONICS

Our goal is to connect 4 stepper motors to 4 drivers connected to both a power source and a router, which is connected to a computer.

Take a look at our step-by-step process

Here's what the initial set-up looks like (without the safety resistor). And, here the first recorded instance of the stepper motor spinning. Now that it's spinning, it's time to rinse and repeat on the other motors and start programming the software.

Software

Installation

First, download the drivers at Silicon Labs. Then, clone the repo and install the node dependencies. This assumes you already have node installed.


git clone ssh://git@gitlab.cba.mit.edu:846/jakeread/rndmc.git
cd rndmc
npm install serialport
npm install ws
npm install mathjs

Running the RNDMC Server

node main

This code should load a browser that looks like screen.

Now, the fun part!

Writing the code

ASSEMBLY

Throughout the assembly process we had to disassemble several times after realizing certain pieces had to be taken apart in order to fit other pieces in. This could have been avoided if we had a step by step guide. Therefore, we decided to put together a step by step documentation of how the parts go together for future reference.

Design

Check design documentation. We have two Y-axis, one X-axis, and one Z-axis and the end effectors attachment on the Z-axis. We need a total of 4 motors.

Step-by-Step Axis Assembly

The axis assembly consists of 4 parts. The bottom plate, the top plate, and the two side plates(webbings). They should easily fit together and then be secured with screws.

Step 1: Find the 4 plates for your axis and fit them together.

  • 1x top plate
  • 1x bottom plate
  • 1x R plate
  • 1x L plate


  • Step 2: Use a countersink drill bit to create counter for the screw to sit on. They are not needed for most of the parts, but we wanted to make them flush on the surface.


    Step 3: Secure the parts with screws.

    Y-axis base Assembly

    The Y-axis is a little bit different. It has two guide rail systems (top and side (webbings) plates) attached to the bottom plate of the gantry machine. Press fit the pieces and screw them together. Countersink if needed.


    Step-by-Step RCT Gantry Guide System Assembly

    Each axis comes with its own rail-slider guide system. Since we did not have a step-by-step assembly guide, we found ourselves putting them together and realizing that there were missing components that needed to be assembled first, so we wasted a lot of time taking them apart over and over again.

    Step 4: Gather the material for one rail-slider guide system.

  • 1x Bottom plate
  • 1x Top plate
  • 1x Motor-mount plate
  • 1x Long side plate
  • 1x short side plate
  • x12 ball bearings
  • x 12 8x8mm x M6 shoulder bolts
  • x 24 1mm shims

  • Resulting parts of the RCT Gantry Guide System should look like this:

    Step 5: Take the bottom plate and find the four corner holes. Those holes are not threaded, so you will have to drill and tap them to the diameter of the shoulder bolt.


    Step 6: Find x4 8x8mm x M6 bolts, x4 1mm shims, and a ball bearings. Place one shim in the bolt, then the ball bearing, then 3 more shims for spacing. Screw them on the bottom plate.



    Step 7: Take the long and short side plates, x8 8x8mm shoulder bolts, x8 ball bearings and x8 1mm shims. Put a ball bearing in the shoulder bolt and then a shim. Then screw them in the side plates.

    (note: the 8 bearing for the side plates only require one shim on the side touching the HDPE)

    Step 8: Press fit the long and short side plates with the bottom plate and screw them together. You might want to drill a pilot hole through the material first.



    Step 9: find the motor mount plate, drill and tap the two holes for threaded shoulder bolt.

    Step 10: Find the 3D printed bearing cup parts that you 3D printed. Snap the ball bearing inside the 3D printed bearing cup.

    Step 11: Find 1x 8x16mm x M6 shoulder bolt, x4 1mm shims, x2 3D printed bearing cups, 2x ball bearings. Put them together as indicated below. * The 3D-printed bearing cups were slightly too small out of the printer, so they needed to be carved out with a knife.




    Step 12: Screw the belt guide stack into the motor mount plate as follow:

    Step 13: Summary of how to press fit the complete gantry guide system together and secure them with screws.





    Step 14: press fit the motor mount plate with the already screwed in ball bearing to the gantry system. Now you should have a sliding guide.

    By the time you get here, you should have the following:

    Belt Installation for Guide (Rail) System

    Installing the belt is a very tedious process. You need to make sure you do them one step after the other, otherwise you will find yourself taking things apart once again like we did endlessly.
    Step 15: for your belt length: measure the length of your axis and add an extra foot length for the pulley on the motor. You will need two belts per axis (one of them will just be the length of the axis plus a few inches more for extra adjustment.
    Step 16: The two belts teeth are facing inward against each other. Attach one side first using the 3D printed part as seen in the picture below.

    Step 17: Hold the belt tight to make sure the teeth are aligned. Slide the guide system into the rail. See picture below.

    Step 18: Put in the pulley component on the shaft of the motor. Place the motor on the motor mount plate and place attach the belt into the pulley as the picture below.


    Step 19: Pass the belts through the other 3D printed part as seen in the picture below. Screw and tighten it.

    Step 20: After it is tighten, place the 3D printed to create a 90 degree angle, this will secure the belt in place. See picture below.

    Once you are done installing the belt on each axis, you will have something like this:

    Z-axis and End-effector Attachment

    The Z-axis assembly is the same as the other axes. We have to make an extra component to attach the Z on top of the X-axis. Step 21: Put together the attachment as seen below. (You should pretty much figure out how to based on the plates).


    Step 22: Screw the above component on the X-axis guide (Rail) system. See picture below:

    Step 23: Screw the Z-axis guide (rail) system on the component above. See picture below.

    Wala, now you can attach your own end-effectors. Here is a picture of our machine while assembling the electronic on it. Notice that our end-effector is actually another Z-axis look-alike. We might not be able to use it because of the weight.

    It was past midnight. T-13hr before class demo day. Everybody still smiling!

    People at work...

    CAMERA

    The idea was to have a mini-tripod/photobooth to capture faces and spaces before they were happily extruded into chocolate replicas. This was accomplished with the help of Nancy on the design/encasing side and Océane on the programming/installment side. The photobooth will snap a photo and upload it to a Dropbox folder, where we can convert it into .svg -> gcode formats.

    CASE DESIGN/PRINT

    inspired by AdaFruit's vintage camera on a tripod look, we printed out the .stl files on the 3D printers in the CBA shop

    We printed out the tripod legs, grippy feet and base connector. For assembly, we used 4x #2-56 machine screw, 1x M3 machine screw, 3x #4-40 3/8 machine screw + nuts.

    PROGRAMMING

    There are SO many ways to do this online, so I was inspired by many sources, namely this, which allowed me to take what was needed to integrate (proper libraries) and figure out the Dropbox app configuration. Let's walk through what that looked like step-by-step. Quick note, I will be programming this RPi3 headlessly, so in case the reader isn't sure what that looks like, I invite you to take a peek at this tutorial to see how one can SSH into an RPi and program it remotely.

    RPI CAMERA

    Picamera has excellent documentation on how to use the library! Upon inserting the camera string (the camera we're using is the V2-8 1080p).

    In order to get the RPi3 up and running with the latest and greatest, there were quite a few package downloads that needed to be completed frrom the RPi terminal, so I'll try to consolidate them here:

                
                #note:  python 2 or 3 should work here. if using python2,  just replace "python3" with python
                sudo apt-get update
                sudo apt-get install python3-imaging
                sudo apt-get install python3-gdata
                sudo apt-get install python3-imaging-tk
                sudo apt-get install python3-picamera
                sudo apt-get dropbox
    
               #and last but not least,  don't  forget to enable  your camera!
                raspi-config
                
                

    I wrote up a quick script to verify that the camera was working

                
                #testing camera function
                #!/usr/bin/env python
    
    
                from picamera import PiCamera
                from time import sleep
    
                camera = PiCamera()
                camera.start_preview()
                sleep(5)
                camera.capture('/tmp/picture.jpg')
                camera.stop_preview()
                
                

    Success!

    UPLOADING TO DROPBOX

    Ready for uploading. I used the python for dropbox library. Everyone can access the pictures taken by the camera in the Dropbox folder here!. If you fork the repo, don't forget to go to Dropbox developers and create an app in order to get an Access Token for Oath flow. Happy snapping!

    PNG -> SVG -> GCODE

    Since our plotter only takes gcode, we perform a seperate conversion using ImageMagik and Inkscape to convert between file types. Some resources found to help with this was a online gcode simulator, svg2gcode library

    EXTRUDER

    To design the chocolate extruder we begun by doing research on the best types of chocolate we could use as well as the ideal temperature for it to melt. After looking at some previous projects that have also done a chocolate extruder, we realized there was quite a lot of divergent information. Most of the webpages were recommending to use dark chocolate, with a high percentage of cacao and with out palm oil. The temperature in the syringe, recommended to melt the chocolate, was between 31-33 degrees celcius. These are some of the websites we have looked at:


    https://www.3dmaker.systems/en/home/145-choco-extruder-set-3drag-in-kit.html
    https://www.instructables.com/id/Chocolate-Extruder-for-Ultimaker/
    http://imprimalia3d.com/noticias/2016/01/02/005616/impresora-3d-chocolate-rusa


    Initially choosen chocolate:





    After this initial research, we started the design of the chocolate extruder. Since Filippos Tourlomousis had already worked on the development of the concept of the extruder itself, we already had a good idea of how the design would be. We needed a syringe, with a heating system around it to keep the chocolate melted, as well as a holding body to embrace the syringe and a pressing body to press the plunger. This system would be attached to a vertical axis, the syringe would be permanently fixed, inside the holding body, and the pressing part is the one which would move up and down to press the plunger.





    After that, we have measured the actual syringe using a pachometer and modelled it in fusion 360. We did that in order to be able to model the parts around the syringe with the precise measure.











    This parts have been later on modified by Filippos Tourlomousis in order to better suit the strengh and pressure needs of the extruder. Filippos has also designed the axis where this parts would be attached to.





    The syringe holder and the syringe presser have been 3d printed and the remaining parts of the axis have been milled in HDPE.