Wednesday, August 20, 2014

Project CNC and Project 3D Printer - challenge using CNC to make parts for 3D Printwer

I am trying to produce some 3D (or at least 2.5D) cuts on my home-built desktop CNC router with the goal of producing better (tighter tolerances) machined parts for my 3D printer.

So far I have primarily used Inkscape (for drawing out parts), Makercam (for generating tool-paths), OpenSCAM  (for previewing cuts) and MS Notepad (to edit the Gcode).

Currently my main issue is that I cannot produce contoured cuts into material using Makercam. I am comfortable designing this type of object in Sketchup but have not been successful in generating gcode and toolpaths from my resulting diagrams.

I've worked through a good number of tutorials for Autodesk's 123D-Design and TinkerCAD, as well as FreeCAD and FreeMill but have not quite found what I want.

My main issues:
  • difficulty or inability to position parts/shapes with precision
  • learning curve too steep and/or online instruction to sparse
  • unclear how to generate gcode for router tool-paths from files generated (can do this with Autodesks 123D CNC Utility but not for other CAD programs)

My current approach:
  1. design parts in OpenSCAD export rendered files as “.stl” and save on computer (be sure to save the openSCAD file for future editing).
  2. In browser open Autodesk 123D CNCUtility
  3. Click on “Start New Project”
  4. Sign in (free to create account)
  5. Select Browse Computer
  6. Open STL file
  7. (opening an STL from your own computer seems to be more reliable and faster than opening file in 123D-Design, saving to “My Projects” in Autodesk's native format and then opening in the CNC Utility or importing directly to the CNC Utility from 123D-Design).
  8. set units to mm (bottom right corner of screen)
  9. In Bottom Menu set:
    1. Under the crossed wrench/screwdriver symbol
      1. Machine to “Shopbot Desktop”
      2. Stock (change this to what you are actually using – may need to use the “add” portion of pull down menu) – change Operation to “Cutout” (instead of “Carve”), add Margin (I change units to mm and make a 5mm margin) -  correction use "Carve" since "Cutout" will not do pockets (only outlines them).
      3. Add “Tabs” to secure part
    2. Under the Drill symbol
      1. choose tool size/type you are using and then choose “add” under “Feeds”
      2. in feeds you need to adjust feed and plunge rates – the utility states the rates in in/sec but is actually in in/min
  10. position part – snap to bottom of stock material (“underlined down arrow” in icons in upper left of screen)
  11. In the last tab on the bottom you can preview cuts
  12. Once you are satisfied with how it all looks click the far upper left file tool and select export tool paths and select folder to save them in (file will be saved with a “.g” extension). - using the "Carve" operation use the rough.g file that is generated.
  13. Preview in OpenSCAM, you will have to open folder and set to view all files (not just gcode files) and select the “.g” file. Examine result carefully – all of my files seem to begin with a 3D diagonal to the deepest point and then back up. To eliminate this open the “.g” file in a text editor and delete the “Z” portion of the first X Y Z move.
 Below is a the start of a ".g" file created from Autodesk 123D CNC Utility Online.  The highlighted area is what you need to delete to correct the file.

;Toolpaths generated with Autodesk 123D CNC Utility Online(Version 1.3.0)
;Rough Pass Settings:
; Tool parameters :
; Type : End Mill
; Name : 1/8 in Straight (13728)
; Diameter : 0.125 in
; Pass Parameters :
; StepOVer : 70
; Pass Depth : 0.05 in
; Jog Height : 0.25 in
; Feed Rate : 14 in/sec
; Plunge Rate : 14 in/sec
; Jog Rate : 14 in/sec
; Spindle Speed : 20000 rpm
G04 P1
G00X30.34Y31.6929Z-6.35 (DELETE THIS PORTION)

Un-Corrected G-Code

Corrected G-Code
Over the weekend I was able to calibrate my Desktop CNC Mill and tighten up parts of the frame and gantry to make everything stiffer and more accurate/consistent.