From 9cb870b460239bf5131d7c619e1fb04728e77ca7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stelmach?= Date: Thu, 11 Sep 2014 21:07:06 +0200 Subject: [PATCH 1/3] Add thick aluminum plates to front and back of NEMA stepper motors --- stepper.scad | 67 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 42 insertions(+), 25 deletions(-) diff --git a/stepper.scad b/stepper.scad index c19d4afc..8d0cd1b5 100644 --- a/stepper.scad +++ b/stepper.scad @@ -44,6 +44,7 @@ NemaBackAxleLength = 15; NemaAxleFlatDepth = 16; NemaAxleFlatLengthFront = 17; NemaAxleFlatLengthBack = 18; +NemaAluPlateHeight = 19; NemaA = 1; NemaB = 2; @@ -73,7 +74,8 @@ Nema08 = [ [NemaBackAxleLength, 9.9*mm], [NemaAxleFlatDepth, -1*mm], [NemaAxleFlatLengthFront, 0*mm], - [NemaAxleFlatLengthBack, 0*mm] + [NemaAxleFlatLengthBack, 0*mm], + [NemaAluPlateHeight, 0*mm] ]; Nema11 = [ @@ -95,7 +97,8 @@ Nema11 = [ [NemaBackAxleLength, 10*mm], [NemaAxleFlatDepth, 0.5*mm], [NemaAxleFlatLengthFront, 10*mm], - [NemaAxleFlatLengthBack, 9*mm] + [NemaAxleFlatLengthBack, 9*mm], + [NemaAluPlateHeight, 0*mm] ]; Nema14 = [ @@ -117,7 +120,8 @@ Nema14 = [ [NemaBackAxleLength, 10*mm], [NemaAxleFlatDepth, 0.5*mm], [NemaAxleFlatLengthFront, 15*mm], - [NemaAxleFlatLengthBack, 9*mm] + [NemaAxleFlatLengthBack, 9*mm], + [NemaAluPlateHeight, 0*mm] ]; Nema17 = [ @@ -139,7 +143,8 @@ Nema17 = [ [NemaBackAxleLength, 15*mm], [NemaAxleFlatDepth, 0.5*mm], [NemaAxleFlatLengthFront, 15*mm], - [NemaAxleFlatLengthBack, 14*mm] + [NemaAxleFlatLengthBack, 14*mm], + [NemaAluPlateHeight, 9*mm] ]; Nema23 = [ @@ -161,7 +166,8 @@ Nema23 = [ [NemaBackAxleLength, 15.60*mm], [NemaAxleFlatDepth, 0.5*mm], [NemaAxleFlatLengthFront, 16*mm], - [NemaAxleFlatLengthBack, 14*mm] + [NemaAxleFlatLengthBack, 14*mm], + [NemaAluPlateHeight, 0*mm] ]; Nema34 = [ @@ -183,7 +189,8 @@ Nema34 = [ [NemaBackAxleLength, 34*mm], [NemaAxleFlatDepth, 1.20*mm], [NemaAxleFlatLengthFront, 25*mm], - [NemaAxleFlatLengthBack, 25*mm] + [NemaAxleFlatLengthBack, 25*mm], + [NemaAluPlateHeight, 0*mm] ]; @@ -224,13 +231,21 @@ module motor(model=Nema23, size=NemaMedium, dualAxis=false, pos=[0,0,0], orienta axleFlatDepth = lookup(NemaAxleFlatDepth, model); axleFlatLengthFront = lookup(NemaAxleFlatLengthFront, model); axleFlatLengthBack = lookup(NemaAxleFlatLengthBack, model); + aluHeight = lookup(NemaAluPlateHeight, model); - color(stepperBlack){ translate(pos) rotate(orientation) { translate([-mid, -mid, 0]) - difference() { - cube(size=[side, side, length + extrSize]); - + difference() { + union() { + color(stepperAluminum) + cube(size=[side, side, extrSize + aluHeight]); + color(stepperBlack) + translate([0,0, extrSize + aluHeight]) + cube(size=[side, side, length - 2 * aluHeight]); + color(stepperAluminum) + translate([0,0,extrSize + length - aluHeight]) + cube(size=[side, side, aluHeight]); + } // Corner cutouts if (lip > 0) { translate([0, 0, lip]) cylinder(h=length, r=cutR); @@ -240,21 +255,24 @@ module motor(model=Nema23, size=NemaMedium, dualAxis=false, pos=[0,0,0], orienta } - // Rounded edges + // Bevelled edges if (roundR > 0) { - translate([mid+mid, mid+mid, length/2]) - rotate([0,0,45]) - cube(size=[roundR, roundR*2, 4+length + extrSize+2], center=true); - translate([mid-(mid), mid+(mid), length/2]) - rotate([0,0,45]) - cube(size=[roundR*2, roundR, 4+length + extrSize+2], center=true); - translate([mid+mid, mid-mid, length/2]) - rotate([0,0,45]) - cube(size=[roundR*2, roundR, 4+length + extrSize+2], center=true); - translate([mid-mid, mid-mid, length/2]) - rotate([0,0,45]) - cube(size=[roundR, roundR*2, 4+length + extrSize+2], center=true); - + for(r = [0:90:405]) + translate([mid,mid, 0]) + rotate([0,0,r]) + translate([mid,mid, length/2]) + rotate([0,0,45]) + union() { + color(stepperAluminum) + translate([0,0,-(length - aluHeight - extrSize)/2]) + cube(size=[roundR, roundR*2, extrSize + aluHeight+0.1], center=true); + color(stepperBlack) + translate([0,0,extrSize]) + cube(size=[roundR, roundR*2, length - 2 * aluHeight], center=true); + color(stepperAluminum) + translate([0,0,extrSize+(length - aluHeight)/2]) + cube(size=[roundR, roundR*2, aluHeight + 0.1], center=true); + } } // Bolt holes @@ -303,7 +321,6 @@ module motor(model=Nema23, size=NemaMedium, dualAxis=false, pos=[0,0,0], orienta } } - } } module roundedBox(size, edgeRadius) { From 9f4423579c0f1fa55734edc47df092812ec64b1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stelmach?= Date: Thu, 11 Sep 2014 21:22:03 +0200 Subject: [PATCH 2/3] Fix indentation --- stepper.scad | 146 +++++++++++++++++++++++++-------------------------- 1 file changed, 72 insertions(+), 74 deletions(-) diff --git a/stepper.scad b/stepper.scad index 8d0cd1b5..4c53a39c 100644 --- a/stepper.scad +++ b/stepper.scad @@ -233,94 +233,92 @@ module motor(model=Nema23, size=NemaMedium, dualAxis=false, pos=[0,0,0], orienta axleFlatLengthBack = lookup(NemaAxleFlatLengthBack, model); aluHeight = lookup(NemaAluPlateHeight, model); - translate(pos) rotate(orientation) { - translate([-mid, -mid, 0]) - difference() { - union() { + translate(pos) rotate(orientation) { + translate([-mid, -mid, 0]) + difference() { + union() { + color(stepperAluminum) + cube(size=[side, side, extrSize + aluHeight]); + color(stepperBlack) + translate([0,0, extrSize + aluHeight]) + cube(size=[side, side, length - 2 * aluHeight]); + color(stepperAluminum) + translate([0,0,extrSize + length - aluHeight]) + cube(size=[side, side, aluHeight]); + } + // Corner cutouts + if (lip > 0) { + translate([0, 0, lip]) cylinder(h=length, r=cutR); + translate([side, 0, lip]) cylinder(h=length, r=cutR); + translate([0, side, lip]) cylinder(h=length, r=cutR); + translate([side, side, lip]) cylinder(h=length, r=cutR); + + } + + // Bevelled edges + if (roundR > 0) { + for (r = [0:90:405]) + translate([mid,mid, 0]) + rotate([0,0,r]) + translate([mid,mid, length/2]) + rotate([0,0,45]) + union() + { color(stepperAluminum) - cube(size=[side, side, extrSize + aluHeight]); + translate([0,0,-(length - aluHeight - extrSize)/2]) + cube(size=[roundR, roundR*2, extrSize + aluHeight+0.1], center=true); color(stepperBlack) - translate([0,0, extrSize + aluHeight]) - cube(size=[side, side, length - 2 * aluHeight]); - color(stepperAluminum) - translate([0,0,extrSize + length - aluHeight]) - cube(size=[side, side, aluHeight]); - } - // Corner cutouts - if (lip > 0) { - translate([0, 0, lip]) cylinder(h=length, r=cutR); - translate([side, 0, lip]) cylinder(h=length, r=cutR); - translate([0, side, lip]) cylinder(h=length, r=cutR); - translate([side, side, lip]) cylinder(h=length, r=cutR); - + translate([0,0,extrSize]) + cube(size=[roundR, roundR*2, length - 2 * aluHeight], center=true); + color(stepperAluminum) + translate([0,0,extrSize+(length - aluHeight)/2]) + cube(size=[roundR, roundR*2, aluHeight + 0.1], center=true); } + } - // Bevelled edges - if (roundR > 0) { - for(r = [0:90:405]) - translate([mid,mid, 0]) - rotate([0,0,r]) - translate([mid,mid, length/2]) - rotate([0,0,45]) - union() { - color(stepperAluminum) - translate([0,0,-(length - aluHeight - extrSize)/2]) - cube(size=[roundR, roundR*2, extrSize + aluHeight+0.1], center=true); - color(stepperBlack) - translate([0,0,extrSize]) - cube(size=[roundR, roundR*2, length - 2 * aluHeight], center=true); - color(stepperAluminum) - translate([0,0,extrSize+(length - aluHeight)/2]) - cube(size=[roundR, roundR*2, aluHeight + 0.1], center=true); - } - } + // Bolt holes + color(stepperAluminum, $fs=holeRadius/8) { + translate([mid+holeDist,mid+holeDist,-1*mm]) cylinder(h=holeDepth+1*mm, r=holeRadius); + translate([mid-holeDist,mid+holeDist,-1*mm]) cylinder(h=holeDepth+1*mm, r=holeRadius); + translate([mid+holeDist,mid-holeDist,-1*mm]) cylinder(h=holeDepth+1*mm, r=holeRadius); + translate([mid-holeDist,mid-holeDist,-1*mm]) cylinder(h=holeDepth+1*mm, r=holeRadius); - // Bolt holes - color(stepperAluminum, $fs=holeRadius/8) { - translate([mid+holeDist,mid+holeDist,-1*mm]) cylinder(h=holeDepth+1*mm, r=holeRadius); - translate([mid-holeDist,mid+holeDist,-1*mm]) cylinder(h=holeDepth+1*mm, r=holeRadius); - translate([mid+holeDist,mid-holeDist,-1*mm]) cylinder(h=holeDepth+1*mm, r=holeRadius); - translate([mid-holeDist,mid-holeDist,-1*mm]) cylinder(h=holeDepth+1*mm, r=holeRadius); - - } - - // Grinded flat - color(stepperAluminum) { - difference() { - translate([-1*mm, -1*mm, -extrSize]) - cube(size=[side+2*mm, side+2*mm, extrSize + 1*mm]); - translate([side/2, side/2, -extrSize - 1*mm]) - cylinder(h=4*mm, r=extrRad); - } - } + } + // Grinded flat + color(stepperAluminum) { + difference() { + translate([-1*mm, -1*mm, -extrSize]) + cube(size=[side+2*mm, side+2*mm, extrSize + 1*mm]); + translate([side/2, side/2, -extrSize - 1*mm]) + cylinder(h=4*mm, r=extrRad); } + } + } - // Axle - translate([0, 0, extrSize-axleLengthFront]) color(stepperAluminum) - difference() { - - cylinder(h=axleLengthFront + 1*mm , r=axleRadius, $fs=axleRadius/10); + // Axle + translate([0, 0, extrSize-axleLengthFront]) color(stepperAluminum) + difference() { - // Flat - if (axleFlatDepth > 0) - translate([axleRadius - axleFlatDepth,-5*mm,-extrSize*mm -(axleLengthFront-axleFlatLengthFront)] ) cube(size=[5*mm, 10*mm, axleLengthFront]); - } + cylinder(h=axleLengthFront + 1*mm , r=axleRadius, $fs=axleRadius/10); - if (dualAxis) { - translate([0, 0, length+extrSize]) color(stepperAluminum) - difference() { - - cylinder(h=axleLengthBack + 0*mm, r=axleRadius, $fs=axleRadius/10); + // Flat + if (axleFlatDepth > 0) + translate([axleRadius - axleFlatDepth,-5*mm,-extrSize*mm -(axleLengthFront-axleFlatLengthFront)] ) cube(size=[5*mm, 10*mm, axleLengthFront]); + } - // Flat - if (axleFlatDepth > 0) - translate([axleRadius - axleFlatDepth,-5*mm,(axleLengthBack-axleFlatLengthBack)]) cube(size=[5*mm, 10*mm, axleLengthBack]); - } + if (dualAxis) { + translate([0, 0, length+extrSize]) color(stepperAluminum) + difference() { - } + cylinder(h=axleLengthBack + 0*mm, r=axleRadius, $fs=axleRadius/10); + // Flat + if (axleFlatDepth > 0) + translate([axleRadius - axleFlatDepth,-5*mm,(axleLengthBack-axleFlatLengthBack)]) cube(size=[5*mm, 10*mm, axleLengthBack]); + } } + } } module roundedBox(size, edgeRadius) { From d6257347aff1e798b562006fa32633bf3053b5ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stelmach?= Date: Thu, 11 Sep 2014 22:21:01 +0200 Subject: [PATCH 3/3] Fix mounting hole diameter for Nema17 According to http://reprap.org/wiki/NEMA_17_Stepper_motor the holes are M3. --- stepper.scad | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stepper.scad b/stepper.scad index 4c53a39c..33db88db 100644 --- a/stepper.scad +++ b/stepper.scad @@ -131,7 +131,7 @@ Nema17 = [ [NemaLengthLong, 47*mm], [NemaSideSize, 42.20*mm], [NemaDistanceBetweenMountingHoles, 31.04*mm], - [NemaMountingHoleDiameter, 4*mm], + [NemaMountingHoleDiameter, 3*mm], [NemaMountingHoleDepth, 4.5*mm], [NemaMountingHoleLip, -1*mm], [NemaMountingHoleCutoutRadius, 0*mm],