From 17820e8a646772e5c86f2bda58fdddf130402af0 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Mon, 16 Nov 2015 23:02:06 +0000 Subject: [PATCH] add torsen diff mount --- torsen.scad | 176 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 torsen.scad diff --git a/torsen.scad b/torsen.scad new file mode 100644 index 0000000..00e5874 --- /dev/null +++ b/torsen.scad @@ -0,0 +1,176 @@ +$fn = 100; +union() { + difference() { +/* union() { + import("/var/home/vitali/LEGO Creations/cad/gear_36_bevel.stl"); + rotate([90, 0, 0]) cylinder(r=16, h=9, center=true, $fn=100); + }*/ + //import("/var/home/vitali/LEGO Creations/cad/gear_36_solid_pre.stl"); + rotate([90, 0, 0]) double_bevel_36t(); + translate([0, 5, 0]) rotate([90, 0, 0]) cylinder(r=30, h=2, center=true, $fn=100); + translate([0, -5, 0]) rotate([90, 0, 0]) cylinder(r=30, h=2, center=true, $fn=100); + rotate([90, 0, 0]) cylinder(r=2.5, h=10, center=true); + } + translate([0, 0, 8]) difference() { + union() { + hull() { + translate([0, 8, 0]) rotate([90, 0, 90]) cylinder(r=3.2, h=8, center=true); + translate([0, 0, 0]) rotate([90, 0, 90]) cylinder(r=3.2, h=8, center=true); + } + hull() { + translate([-3.6, 8, 0]) rotate([90, 0, 90]) cylinder(r=4, h=0.8, center=true); + translate([-3.6, 0, 0]) rotate([90, 0, 90]) cylinder(r=4, h=0.8, center=true); + } + hull() { + translate([3.6, 8, 0]) rotate([90, 0, 90]) cylinder(r=4, h=0.8, center=true); + translate([3.6, 0, 0]) rotate([90, 0, 90]) cylinder(r=4, h=0.8, center=true); + } + translate([0, 8, 0]) rotate([90, 0, 90]) axle(h=16, axlemesh=1.75); + /*intersection() { + union() { + hull() { + translate([-10, 8, 0]) rotate([90, 0, 90]) cylinder(r=4, h=4, center=true); + translate([-10, 0, 0]) rotate([90, 0, 90]) cylinder(r=4, h=4, center=true); + } + hull() { + translate([10, 8, 0]) rotate([90, 0, 90]) cylinder(r=4, h=4, center=true); + translate([10, 0, 0]) rotate([90, 0, 90]) cylinder(r=4, h=4, center=true); + } + hull() { + translate([-10, 8, -16]) rotate([90, 0, 90]) cylinder(r=4, h=4, center=true); + translate([-10, 0, -16]) rotate([90, 0, 90]) cylinder(r=4, h=4, center=true); + } + hull() { + translate([10, 8, -16]) rotate([90, 0, 90]) cylinder(r=4, h=4, center=true); + translate([10, 0, -16]) rotate([90, 0, 90]) cylinder(r=4, h=4, center=true); + } + } + translate([0, 0, -8]) rotate([90, 0, 0]) cylinder(r=16, h=30, center=true); + }*/ + } + //translate([0, 8, 0]) rotate([90, 0, 90]) axle(h=40); + //translate([0, 8, 0]) rotate([90, 0, 90]) cylinder(r=2.5, h=40, center=true); + } + translate([0, 0, -8]) difference() { + union() { + hull() { + translate([0, 8, 0]) rotate([90, 0, 90]) cylinder(r=3.2, h=8, center=true); + translate([0, 0, 0]) rotate([90, 0, 90]) cylinder(r=3.2, h=8, center=true); + } + hull() { + translate([-3.6, 8, 0]) rotate([90, 0, 90]) cylinder(r=4, h=0.8, center=true); + translate([-3.6, 0, 0]) rotate([90, 0, 90]) cylinder(r=4, h=0.8, center=true); + } + hull() { + translate([3.6, 8, 0]) rotate([90, 0, 90]) cylinder(r=4, h=0.8, center=true); + translate([3.6, 0, 0]) rotate([90, 0, 90]) cylinder(r=4, h=0.8, center=true); + } + translate([0, 8, 0]) rotate([90, 0, 90]) axle(h=16, axlemesh=1.75); + } + //translate([0, 8, 0]) rotate([90, 0, 90]) axle(); + } +} + +module axle(h = 24, axleradius = 2.4, axlemesh = 1.85, axleround = 0) +{ + if (axleround > 0) + { + minkowski() { + union() { + cube([axleradius*2-axleround*2, axlemesh-axleround*2, h-axleround*2], center=true); + cube([axlemesh-axleround*2, axleradius*2-axleround*2, h-axleround*2], center=true); + } + cylinder(r=axleround, h=axleround, $fn=4); + } + } + else + { + union() { + cube([axleradius*2-axleround*2, axlemesh-axleround*2, h], center=true); + cube([axlemesh-axleround*2, axleradius*2-axleround*2, h], center=true); + } + } +} + +// An attempt to make something like standard 36t double bevel gear... +module double_bevel_36t() { + intersection() { + union() { + translate([0, 0, 1.5]) + linear_extrude(slices=5, height=2.5, scale=(36/2+1-2.5*tan(45))/(36/2+1)) + gear_concat_flat(mm_per_tooth=3.53, number_of_teeth=36, backlash=2, clearance=0.8, trim_factor=0.7); + translate([0, 0, -1.5]) + rotate([180, 0, 0]) + linear_extrude(slices=5, height=2.5, scale=(36/2+1-2.5*tan(45))/(36/2+1)) + gear_concat_flat(mm_per_tooth=3.53, number_of_teeth=36, backlash=2, clearance=0.8, trim_factor=0.7); + translate([0, 0, -4]) + cylinder($fn=48, h=8, r=3.14*(36/2-1)/3.1415926); + translate([0, 0, -1.5]) + cylinder($fn=48, h=3, r=3.14*(36/2+1)/3.1415926); + } + translate([0, 0, -8]) linear_extrude(slices=5, height=16) + gear_concat_flat(mm_per_tooth=3.14, number_of_teeth=36); + } +} + +// Same in 2D (non-extruded) +module gear_concat_flat( + mm_per_tooth = 3, //this is the "circular pitch", the circumference of the pitch circle divided by the number of teeth + number_of_teeth = 11, //total number of teeth around the entire perimeter + pressure_angle = 28, //Controls how straight or bulged the tooth sides are. In degrees. + clearance = 0.0, //gap between top of a tooth on one gear and bottom of valley on a meshing gear (in millimeters) + backlash = 0.0, //gap between two meshing teeth, in the direction along the circumference of the pitch circle + trim_factor = 1 +) { + pi = 3.1415926; + p = mm_per_tooth * number_of_teeth / pi / 2; //radius of pitch circle + c = p + mm_per_tooth / pi - clearance; //radius of outer circle + b = p*cos(pressure_angle); //radius of base circle + r = p-(c-p)-clearance; //radius of root circle + t = mm_per_tooth/2-backlash/2; //tooth thickness at pitch circle + k = -iang(b, p) - t/2/p/pi*180; //angle to where involute meets base circle on each side of tooth + polygon( + points = gear_points_trimmed(r, b, c, k, number_of_teeth, number_of_teeth, trim_factor), + paths = [ range(15*(number_of_teeth)) ] + ); +}; +function gear_points_trimmed(r, b, c, k, number_of_teeth, i, f) = + (i <= 0 ? [] : concat( + gear_points_trimmed(r, b, c, k, number_of_teeth, i-1, f), + tooth_base_points_trimmed(r, b, c, k, number_of_teeth, i, f) + )); +function tooth_base_points_trimmed(r, b, c, k, number_of_teeth, i, f) = + (r < b ? concat( + [ polar(r*f, i*360/number_of_teeth + k) ], + tooth_points(r, b, c, k, number_of_teeth, i), + [ polar(r*f, i*360/number_of_teeth - k), + polar(r*f, i*360/number_of_teeth + 180/number_of_teeth) ] + ) : concat( + tooth_points(r, b, c, k, number_of_teeth, i), + [ polar(r*f, i*360/number_of_teeth + 180/number_of_teeth) ] + )); +function tooth_points(r, b, c, k, number_of_teeth, i) = [ + q7r(0/5,r,b,c,k,1,i*360/number_of_teeth), + q7r(1/5,r,b,c,k,1,i*360/number_of_teeth), + q7r(2/5,r,b,c,k,1,i*360/number_of_teeth), + q7r(3/5,r,b,c,k,1,i*360/number_of_teeth), + q7r(4/5,r,b,c,k,1,i*360/number_of_teeth), + q7r(5/5,r,b,c,k,1,i*360/number_of_teeth), + q7r(5/5,r,b,c,k,-1,i*360/number_of_teeth), + q7r(4/5,r,b,c,k,-1,i*360/number_of_teeth), + q7r(3/5,r,b,c,k,-1,i*360/number_of_teeth), + q7r(2/5,r,b,c,k,-1,i*360/number_of_teeth), + q7r(1/5,r,b,c,k,-1,i*360/number_of_teeth), + q7r(0/5,r,b,c,k,-1,i*360/number_of_teeth), +]; + +function range(n) = (n >= 0 ? concat(range(n-1), [n]) : []); + +// radius a fraction f up the curved side of the tooth, rotated at 'rot' angle +function q7r(f,r,b,r2,t,s,rot) = q6r(b,s,t,(1-f)*max(b,r)+f*r2,rot); +// point at radius d on the involute curve, rotated at 'rot' angle +function q6r(b,s,t,d,rot) = polar(d,rot+s*(iang(b,d)+t)); +// convert polar to cartesian coordinates +function polar(r,theta) = r*[sin(theta), cos(theta)]; +//unwind a string this many degrees to go from radius r1 to radius r2 +function iang(r1,r2) = sqrt((r2/r1)*(r2/r1) - 1)/3.1415926*180 - acos(r1/r2);