Thursday, November 28, 2013

Printing the crank wheel

I'm never sure what to call this part.  It's the crank arm for the crank-slider assembly, but owes most of its shape to the need to trigger the roller switch during half the crank's rotation.  'Crank wheel' will work for now.  
 
There are several options for fabricating the crank wheel.  The simplest might be to cut the shape from 1/4" plywood using a jigsaw.  In this case, I thought I'd take the opportunity to explore some of the different free toolchains that are available for solid modeling of 3D printed parts.  I designed the part first in Autodesk's 123D, then in Trimble's Sketchup, and finally in OpenSCAD.
First (upper) and second (lower) version of crank wheel


In this case, OpenSCAD was the best tool for the job.  It excels at quickly creating simple and precise geometric forms, and exporting to the STL format that's imported by the MakerBot software that runs my Replicator 2.

Autodesk123D and Sketchup got the job done, but I found it difficult to produce precise results.  In Autodesk 123D's case I couldn't find a way to manually enter sizing and transform parameters, which forced me to rely heavily on the simple smart-snap UI - it took much too long to create the simple wheel geometry I wanted using that UI.

Sketchup allows manual entry of parameters and has an easier to use smart snap system, but I had difficulty getting accurate solid model STL exports from Sketchup to print correctly.  STL export requires a free plugin available from Trimble, but I ended up with geometries that printed apparently continuous parts as multiple touching-but-not-connected volumes.  Sketchup's eager parts unions forces a component driven workflow that felt unfamiliar coming from my experience with SolidWork's design flow.

OpenSCAD uses a simple language to describe objects by combining geometric primitives using a set of simple set operations.  Constructive Solid Geometry, or CSG, uses intersection, subtraction, and union as the basic tools for building complex forms.  OpenSCAD also supports some interesting additional features like Minkowski sums and simple iteration, but these tended to lead to painfully slow render times.  Describing 3D geometry in OpenSCAD brought back memories of learning the venerable POV-Ray raytracing tool on my father's 80486 in the mid-90's.

The final design for the drive crank looks like this:

The corresponding OpenSCAD code for this shape is:
$fn=90;
a=1;
difference() {
    union() {
        cylinder(h=1, r=.5);
        translate([0,3-a,0]) cylinder(h=.5, r=a);
        translate([0,-3+a,0]) cylinder(h=.5, r=a);
        translate([0,0,.25]) cube([2*a,2*(3-a),.5], center=true);
        difference() {
            cylinder(h=.5, r=3);
            translate([5,0,0]) cube(10, center=true);
        }
    }
    for (r=[0:20:180]) {
        rotate(r, [0,0,1])
        translate([0,2.5,-1])
        cylinder(h=3, r=.15);
    }
    for (r=[0:90:180]) {
        rotate(r, [0,0,1])
        translate([0,(2.5-.65)/2+.5,-1])
        cylinder(h=3, r=.7);
    }
   
    intersection() {
        #translate([0,0,-1]) cylinder(h=3, r=.2);
    }
}
The major functional difference between this design and the sketches in my previous post is the addition of rounded edges, rather than sharp corners at the center line of the disk.  I printed a version that matched my original design more closely, but the micro-switches caught on the sharp edges and jammed the wheel.  I also added several small holes for the linkage arm to pass through around the circumference of the wheel, and three large cut-outs.

First version of the crank wheel with sharp corners


In my first version I left the linkage mounting hole out of the design and added it with a hand drill once I'd determined the best location.  This worked, but because the internal structure of the 3D printed part is mostly empty space filled with a honeycomb lattice, I worried that depending on where the hole was located I might weaken and eventually crack the faces where the linkage's load was applied.  Printing a number of pre-made holes gives a stronger hole that distributes load over the length of the hole.

The larger cut-outs are an aesthetic addition meant to resemble cast metal parts.  Since cast metal is expensive and very dense, it usually makes sense to remove as much as possible from a solid form.  This is not true with 3D printed parts.  The double thickness walls of these cut-outs use a lot of plastic, and slow the printing process.  I suspect I could have printed the part faster and more cheaply if I'd left these out.

To finish up, I printed a simple motor mounting bracket that I also designed in OpenSCAD:

  Next time, electronic design.

No comments:

Post a Comment