Created
December 10, 2015 20:22
-
-
Save lerouxb/6ba200cafb787b3be5bd to your computer and use it in GitHub Desktop.
A 256:1 gearbox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include <MCAD/involute_gears.scad> | |
$fn = 100; | |
gear_module = 0.75; | |
pressure_angle = 20; | |
gear_thickness = 5/2; | |
shaft_radius = 1.5; | |
small_teeth = 11; | |
small_pitch_radius = gear_module*small_teeth/2; | |
large_teeth = 44; | |
large_pitch_radius = gear_module*large_teeth/2; | |
space_between = small_pitch_radius+large_pitch_radius; | |
clearance = 0.2; // space between gear planes (increase to 2 to easily see if things are sane) | |
frame_thickness = 2; | |
extra = 4; // how do you calculate the parts that protrude from the pitch? | |
frame_length = 3*large_pitch_radius + 2*small_pitch_radius + 2*extra; | |
frame_width = large_pitch_radius*2 + extra*2; | |
frame_height = 4*gear_thickness*2 + 5*clearance; | |
echo(frame_length + 2*frame_thickness, "x", frame_width, "x", frame_height + 2*frame_thickness); | |
spacer_radius = shaft_radius+1; | |
spacer_small = 4*gear_thickness*2 + 4*clearance; //temp hack to make it a bit tighter | |
spacer_medium = gear_thickness*2 + clearance; // temp hack to make it a bit tighter | |
module smallGear(with_clearance) { | |
gear( | |
circular_pitch = 360 * small_pitch_radius / small_teeth, | |
pressure_angle = pressure_angle, | |
number_of_teeth = small_teeth, | |
clearance = 0, | |
gear_thickness = with_clearance ? (gear_thickness + clearance*2) : gear_thickness, | |
rim_thickness = with_clearance ? (gear_thickness*2 + clearance*2) : gear_thickness*2, | |
//rim_thickness = gear_thickness*2+clearance*2, | |
//rim_width = gear_thickness, | |
hub_thickness = 0, | |
//hub_diameter = shaft_radius*2*2, | |
bore_diameter = shaft_radius*2, | |
circles = 0, | |
backlash = 0.1, // eh? | |
//twist=360/small_teeth/2, | |
flat = false | |
); | |
} | |
module largeGear(thick_hub) { | |
gear( | |
circular_pitch = 360 * large_pitch_radius / large_teeth, | |
pressure_angle = pressure_angle, | |
number_of_teeth = large_teeth, | |
clearance = 0, | |
gear_thickness = gear_thickness, | |
//gear_thickness = gear_thickness*2, | |
rim_thickness = gear_thickness*2, | |
rim_width = gear_thickness, | |
hub_thickness = thick_hub ? gear_thickness*2 : gear_thickness*2, | |
//hub_diameter = shaft_radius*2*3, | |
hub_diameter = shaft_radius*2*4, | |
//hub_diameter = 0, | |
bore_diameter = shaft_radius*2, | |
//circles = 8, | |
circles = 0, | |
backlash = 0.1, // eh? | |
//twist=360/large_teeth/2, | |
flat = false | |
); | |
if (!thick_hub) { | |
translate([0, 0, gear_thickness*2-clearance]) | |
smallGear(true); | |
} | |
} | |
module frame() { | |
difference() { | |
translate([-small_pitch_radius-extra, -frame_width/2, -frame_thickness-clearance]) | |
cube([frame_length + 2*frame_thickness, frame_width, frame_height + 2*frame_thickness]); | |
translate([-small_pitch_radius-extra+frame_thickness, -frame_width/2-0.1, -clearance]) | |
cube([frame_length, frame_width+0.2, frame_height]); | |
// shafts | |
translate([0, 0, -frame_thickness*2]) | |
cylinder(r=shaft_radius, h=frame_height + frame_thickness*4); | |
translate([space_between, 0, -frame_thickness*2]) | |
cylinder(r=shaft_radius, h=frame_height + frame_thickness*4); | |
translate([space_between*2, 0, -frame_thickness*2]) | |
cylinder(r=shaft_radius, h=frame_height + frame_thickness*4); | |
} | |
} | |
module largeGears() { | |
translate([space_between, 0, 0]) | |
largeGear(); | |
translate([space_between*2, 0, gear_thickness*2+clearance]) | |
largeGear(); | |
translate([space_between, 0, gear_thickness*4+clearance*2]) | |
largeGear(); | |
color("coral") | |
translate([space_between*2, 0, gear_thickness*6+clearance*3]) | |
largeGear(true); | |
} | |
module smallSpacer() { | |
difference() { | |
cylinder(r=3, h=spacer_small); | |
translate([0, 0, -0.1]) | |
cylinder(r=shaft_radius, h=spacer_small+0.2); | |
} | |
} | |
module mediumSpacer() { | |
difference() { | |
cylinder(r=3, h=spacer_medium); | |
translate([0, 0, -0.1]) | |
cylinder(r=shaft_radius, h=spacer_small+0.2); | |
} | |
} | |
module spacers() { | |
translate([0, 0, gear_thickness*2+clearance]) | |
smallSpacer(); | |
translate([space_between, 0, gear_thickness*8+clearance*4]) | |
mediumSpacer(); | |
translate([2*space_between, 0, 0]) | |
mediumSpacer(); | |
} | |
color("Fuchsia") | |
smallGear(); | |
largeGears(); | |
//spacers(); | |
//rotate([90, 0, 0]) | |
color("PowderBlue", 0.4) | |
frame(); | |
//largeGear(true); | |
//smallSpacer(); | |
//mediumSpacer(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment