motorbuldgedia=9.5; // mm , buldge on motor can motorbuldgeheight=2; // mm , height of buldge on motor can motorshaftdia=3.2; // mm , small protuding motor shaft motorshaftlen=0.5; // mm , length of motor shaft protrusion motoroutdia=18; // mm , widest point of hub, will include M2 screw holes motorfixdia=12; // mm , diameter of screw mounts motorscrdia=2; // mm , diameter of screw holes motorscrheaddia=3.8; // mm, diameter of screw head motorscrheadlen=17; // mm, length of screw head, which is also entry hole motorhubheight=12; // mm, hub height coneheight=2; // mm, cone height shaftdia=5; // mm , of drive shaft shaftholderdia=17; // mm , of plastic cylinder than grips shaft shaftholderheight=12; // mm , length of " shaftslitwidth=0.5; // mm, width of slit that shaft screws will (attempt) to pull shut shaftflatlen=7; // mm length of flat section filed onto shaft gripboltdia=3; // mm, diameter of gripping bolt (two of) gripboltlen=9; // mm, length of gripboltdia section, ie, just slightly wider than the drive shaft. gripboltheight=22; $fn=100; difference() // motor hub { union() { cylinder(motorhubheight,motoroutdia/2,motoroutdia/2); // main hub that mounts to motor translate([0,0,motorhubheight]) cylinder(coneheight,motoroutdia/2,shaftholderdia/2); // cone that joins hub with shaft gripper translate([0,0,motorhubheight+coneheight]) // shaft gripper cylinder(shaftholderheight,shaftholderdia/2,shaftholderdia/2); // shaft grip translate([0,0,0]) translate([-shaftholderdia/2,-shaftholderdia/2,0]) cube([shaftholderdia,shaftholderdia,gripboltheight+gripboltdia*2/2]); } union() { cylinder(motorbuldgeheight,motorbuldgedia/2,motorbuldgedia/2); // bulge in motor can translate([0,0,motorbuldgeheight])cylinder(motorshaftlen,motorshaftdia/2,motorshaftdia/2); // motor shaft protrussion above bulge in can difference() { cylinder(shaftflatlen+1,shaftdia/2,shaftdia/2); translate([-shaftholderdia/2,-shaftdia-1.1,0]) // to outer edge, in 1mm cube([shaftholderdia,shaftdia,shaftflatlen+1]); translate([-shaftholderdia/2,shaftdia/2-1,0]) // to outer edge, in 1mm cube([shaftholderdia,shaftdia,shaftflatlen+1]); } for(i=[45:90:360]) rotate([0,0,i]) translate([motorfixdia/2,0,-1]) union() { cylinder(motorhubheight+2,motorscrdia/2,motorscrdia/2); // screw holes in hub, +1,+2 to ensure the holes break through the surface translate([0,0,motorhubheight]) { cylinder(motorscrheadlen,motorscrheaddia/2,motorscrheaddia/2); translate([0,0,motorscrheadlen]) cylinder(motorscrheaddia,motorscrheaddia/2,0); } } translate([0,0,motorbuldgeheight+shaftflatlen-1]) // shaft gripper cylinder(shaftholderheight+10,shaftdia/2,shaftdia/2); // hole for shaft //screwhole(); translate([0,0,motorhubheight+1]) // shaft gripper translate([-shaftslitwidth/2,-(shaftholderdia+2)/2,0]) cube([shaftslitwidth,shaftholderdia+2,shaftholderheight+2]); // slit for(i=[90:180:360]) rotate([0,0,i]) translate([shaftdia/2+gripboltdia/2,0,gripboltheight]) rotate([90,0,0]) translate([0,0,-gripboltlen]) cylinder(gripboltlen*2,gripboltdia/2,gripboltdia/2); } }