//Quick design of a NEMA 17 (SM-42BYG011-25) motor res=60; N=5; motor_height = 34.0; r1=5; r2=47; w3=51; w1=58; w2=57; l1=80; l2=80; l3=150; //linear_extrude(5)import("frame1.dxf"); //translate([0,0,17.5])wheel(); translate([-0,0,-22])linear_extrude(5)import("bridge.dxf"); mirror([0,1,0])side(); side(); //body(); //middle(); module bridge(){ translate([0,0,-22]){ difference(){ cube([2*l1+40,2*l2+10,5],true); translate([-140,0,0])cube([2*l1,2*l2-60,15],true); translate([60,0,0])cube([2*l1,2*l2-60,15],true); } } } module body(){ translate([0,0,2*l1+100])rotate([0,90,0]){ difference(){ cube([20,230,150],true); translate([-10,0,0])cube([4,195,115],true); } } translate([0,0,2*l1+60])rotate([0,0,90])linear_extrude(5)import("body1.dxf"); translate([0,0,2*l1+80])rotate([0,0,90])linear_extrude(5)import("body1.dxf"); translate([0,28,2*l1])rotate([90,0,0])linear_extrude(5)import("body_hinge1.dxf"); translate([0,0,2*l1])rotate([90,0,0])linear_extrude(5)import("body_hinge1.dxf"); translate([0,10,2*l1])rotate([90,0,0])cylinder(30,4,4,true,$fn=res); //main axle translate([0,0,0])rotate([90,0,0])cylinder(2*l2,4,4,true,$fn=res); } module middle(){ translate([0,15,0]){ translate([0,10,0])rotate([90,0,0])import("pulley1-3_91T_GT2_2mm_bore_8mm.stl"); //cylinder(5,27,27,true,$fn=res); translate([0,10,2*l1])rotate([90,0,0])import("pulley1-3_91T_GT2_2mm_bore_8mm.stl"); //cylinder(5,27,27,true,$fn=res); translate([0,-40,(l1+40)/2-5])rotate([-90,0,0])nema17(); translate([0,-40,(l1+40)/2+45])rotate([-90,0,0])nema17(); translate([0,0,l1])rotate([90,0,0])rotate([0,0,90])linear_extrude(5)import("frame1.dxf"); } } module side(){ rotate([0,0,0])translate([-25,0,0]){ translate([0,l2,0])rotate([180,0,0]){ translate([-l1,0,0]){ translate([15,-32.5,0])rotate([90,0,0])wheel(); translate([15,-5,0])rotate([90,0,0]){ import("pulley1-3_91T_GT2_2mm_bore_8mm.stl"); //import("pulley_63T_GT2_5mmthick.stl"); //cylinder(5,20,20,true,$fn=res); } translate([15,0,0])rotate([90,0,0])cylinder(35,4,4,true,$fn=res); translate([l1-27,40,-37])rotate([90,0,0])nema17(); } translate([l1,0,0]){ translate([-15,-32.5,0])rotate([90,0,0])wheel(); translate([-15,-5,0])rotate([90,0,0]){ import("pulley1-3_91T_GT2_2mm_bore_8mm.stl"); //import("pulley_63T_GT2_5mmthick.stl"); //cylinder(5,20,20,true,$fn=res); } translate([-15,0,0])rotate([90,0,0])cylinder(35,4,4,true,$fn=res); translate([-l1+27,40,-37])rotate([90,0,0])nema17(); } translate([0,-5,0])rotate([-90,0,0])linear_extrude(5)import("frame2.dxf"); //cube([2*(l1+20),10,40],true); } } } //translate([0,0,55]) //wheel(); //nema17(); module wheel(){ translate([0,0,-17.5]) linear_extrude(5)import("wheel-hub-1.dxf"); //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(40,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,-10]){ difference(){union(){ cylinder(10,r1,r1,true,$fn=res); translate([3.5,0,0])cube([7,10,10],true); } cylinder(11,2.6,2.6,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); } } }