//Quick design of a NEMA 17 (SM-42BYG011-25) motor res=60; N=6; motor_height = 34.0; r1=13; r2=32; w3=51; w1=55; w2=54; l1=60; l2=80; l3=150; translate([0,0,l3+30])cube([120,120,35],true); //main axle translate([0,0,0])rotate([90,0,0])cylinder(2*l2,6,6,true,$fn=res); translate([0,15,0]){ translate([0,10,0])rotate([90,0,0])cylinder(5,27,27,true,$fn=res); translate([0,10,l3])rotate([90,0,0])cylinder(5,27,27,true,$fn=res); translate([0,-40,l3/2-20])rotate([-90,0,0])nema17(); translate([0,-40,l3/2+20])rotate([-90,0,0])nema17(); translate([0,0,0]){ rotate([90,0,0])cylinder(10,17,17,true,$fn=res); translate([0,0,l3/2])cube([34,10,l3],true); translate([0,0,l3])rotate([90,0,0])cylinder(10,17,17,true,$fn=res); } } mirror([0,1,0])side(); side(); module side(){ rotate([0,0,0])translate([-45,0,0]){ translate([0,l2,0])rotate([180,0,0]){ translate([-l1,0,0]){ translate([0,-30,0])rotate([90,0,0])wheel(); translate([0,-10,0])rotate([90,0,0]){ cylinder(5,20,20,true,$fn=res); } rotate([90,0,0])cylinder(35,4,4,true,$fn=res); translate([l1-17,40,0])rotate([90,0,0])nema17(); } translate([l1,0,0]){ translate([0,-30,0])rotate([90,0,0])wheel(); translate([0,-10,0])rotate([90,0,0]){ cylinder(5,20,20,true,$fn=res); } rotate([90,0,0])cylinder(35,4,4,true,$fn=res); translate([-l1+17,40,0])rotate([90,0,0])nema17(); } cube([2*(l1+20),10,40],true); } } } //translate([0,0,55]) //wheel(); //nema17(); module wheel(){ difference(){ translate([0,0,-7])cylinder(10,10,8,true,$fn=res); cylinder(40,4,4,true,$fn=res); } difference(){ union(){ cylinder(20,w1,w1,true,$fn=res); translate([0,0,-12.5])cylinder(5,w2,w1,true,$fn=res); translate([0,0,12.5])cylinder(5,w1,w2,true,$fn=res); } translate([0,0,3])cylinder(30,w3,w3,true,$fn=res); cylinder(40,4,4,true,$fn=res); for(angle=[0:360/N:360]){ rotate([0,0,angle]){ translate([r2,0,0])cylinder(40,r1,r1,true,$fn=res); } } } } module nema17(){ difference(){ //motor union(){ translate([0,0,motor_height/2]){ intersection(){ cube([42.3,42.3,motor_height], center = true); rotate([0,0,45]) translate([0,0,-1]) cube([74.3*sin(45), 73.3*sin(45) ,motor_height+2], center = true); } } translate([0, 0, motor_height]) cylinder(h=2, r=11, $fn=24); translate([0, 0, motor_height+2]) cylinder(h=15, r=2.5, $fn=24); } //screw holes for(i=[0:3]){ rotate([0, 0, 90*i])translate([15.5, 15.5, motor_height-4.5]) cylinder(h=5, r=1.5, $fn=24); } } }