GNG up-sprocket 0.1 by kow, based on:
// Parametric Pulley with multiple belt profiles
// by droftarts January 2012
// Based on pulleys by:
// http://www.thingiverse.com/thing:11256 by me!
// https://github.com/prusajr/PrusaMendel by Josef Prusa
// http://www.thingiverse.com/thing:3104 by GilesBathgate
// http://www.thingiverse.com/thing:2079 by nophead
// dxf tooth data from http://oem.cadregister.com/asp/PPOW_Entry.asp?company=915217&elementID=07807803/METRIC/URETH/WV0025/F
// pulley diameter checked and modelled from data at http://www.sdp-si.com/D265/HTML/D265T016.html
//GNG consts
inner_teeth = 14;
outer_teeth = 20;
// tuneable constants
retainer_ht = 1.5; // height of retainer flange over pulley, standard = 1.5
idler_ht = 5.5; // height of idler flange over pulley, standard = 1.5
pulley_t_ht = 21.0; // length of toothed part of pulley, standard = 12
pulley_b_ht = 8; // pulley base height, standard = 8. Set to same as idler_ht if you want an idler but no pulley.
pulley_b_dia = 20; // pulley base diameter, standard = 20
// ********************************
// ** Scaling tooth for good fit **
// ********************************
/* To improve fit of belt to pulley, set the following constant. Decrease or increase by 0.1mm at a time. We are modelling the *BELT* tooth here, not the tooth on the pulley. Increasing the number will *decrease* the pulley tooth size. Increasing the tooth width will also scale proportionately the tooth depth, to maintain the shape of the tooth, and increase how far into the pulley the tooth is indented. Can be negative */
additional_tooth_width_inner = -0.2; //mm
additional_tooth_width_outer = 0.2; //mm
// If you need more tooth depth than this provides, adjust the following constant. However, this will cause the shape of the tooth to change.
additional_tooth_depth = 0; //mm
// The following set the pulley diameter for a given number of teeth
HTD_5mm_pulley_dia1 = tooth_spacing (5,0.5715,inner_teeth);
HTD_5mm_pulley_dia2 = tooth_spacing (5,0.5715,outer_teeth);
// The following calls the pulley creation part, and passes the pulley diameter and tooth width to that module
//belt
//translate ([0,15, 13])
// cube([40,1,15]);
difference()
{
pulley ( "HTD 5mm" , HTD_5mm_pulley_dia2 , 2.199 , 3.781,outer_teeth,0,1,additional_tooth_width_outer);
translate ([0,0, -1])
pulley ( "HTD 5mm" , HTD_5mm_pulley_dia1 , 2.199 , 3.781,inner_teeth,0,0,additional_tooth_width_inner);
translate ([0,0, pulley_b_ht + pulley_t_ht + retainer_ht -10])
cylinder(h = 25, r1 = inner_teeth - 6, r2 = inner_teeth +4);
difference()
{
cylinder(h = 15, r1 = 30, r2 = 30);
cylinder(h = 15, r1 = 17, r2 = 17);
}
}
// Functions
function tooth_spacing(tooth_pitch,pitch_line_offset,teeth)
= (2*((teeth*tooth_pitch)/(3.14159265*2)-pitch_line_offset)) ;
// Main Module
module pulley( belt_type , pulley_OD , tooth_depth , tooth_width,teeth,retainer,idler,additional_tooth_width)
{
echo (str("Belt type = ",belt_type,"; Number of teeth = ",teeth,"; Pulley Outside Diameter = ",pulley_OD,"mm "));
tooth_distance_from_centre = sqrt( pow(pulley_OD/2,2) - pow((tooth_width+additional_tooth_width)/2,2));
tooth_width_scale = (tooth_width + additional_tooth_width ) / tooth_width;
tooth_depth_scale = ((tooth_depth + additional_tooth_depth ) / tooth_depth) ;
// ************************************************************************
// *** uncomment the following line if pulley is wider than puller base ***
// ************************************************************************
// translate ([0,0, pulley_b_ht + pulley_t_ht + retainer_ht ]) rotate ([0,180,0])
difference()
{
union()
{
//base
difference()
{
//shaft - diameter is outside diameter of pulley
translate([0,0,pulley_b_ht])
rotate ([0,0,360/(teeth*4)])
cylinder(r=pulley_OD/2,h=pulley_t_ht, $fn=teeth*4);
//teeth - cut out of shaft
for(i=[1:teeth])
rotate([0,0,i*(360/teeth)])
translate([0,-tooth_distance_from_centre,pulley_b_ht -1])
scale ([ tooth_width_scale , tooth_depth_scale , 1 ])
{
HTD_5mm();
}
}
//belt retainer / idler
if ( retainer > 0 ) {translate ([0,0, pulley_b_ht + pulley_t_ht ])
rotate_extrude($fn=teeth*4)
polygon([[0,0],[pulley_OD/2,0],[pulley_OD/2 + retainer_ht , retainer_ht],[0 , retainer_ht],[0,0]]);}
if ( idler > 0 ) {translate ([0,0, pulley_b_ht - idler_ht +5])
rotate_extrude($fn=teeth*4)
polygon([[0,0],[pulley_OD/2 + idler_ht,0],[pulley_OD/2 , idler_ht],[0 , idler_ht],[0,0]]);}
}
}
}
// Tooth profile modules
module HTD_5mm()
{
linear_extrude(height=pulley_t_ht+2) polygon([[-1.89036,-0.75],[-1.89036,0],[-1.741168,0.02669],[-1.61387,0.100806],[-1.518984,0.21342],[-1.467026,0.3556],[-1.427162,0.960967],[-1.398568,1.089602],[-1.359437,1.213531],[-1.310296,1.332296],[-1.251672,1.445441],[-1.184092,1.552509],[-1.108081,1.653042],[-1.024167,1.746585],[-0.932877,1.832681],[-0.834736,1.910872],[-0.730271,1.980701],[-0.62001,2.041713],[-0.504478,2.09345],[-0.384202,2.135455],[-0.259708,2.167271],[-0.131524,2.188443],[-0.000176,2.198511],[0.131296,2.188504],[0.259588,2.167387],[0.384174,2.135616],[0.504527,2.093648],[0.620123,2.04194],[0.730433,1.980949],[0.834934,1.911132],[0.933097,1.832945],[1.024398,1.746846],[1.108311,1.653291],[1.184308,1.552736],[1.251865,1.445639],[1.310455,1.332457],[1.359552,1.213647],[1.39863,1.089664],[1.427162,0.960967],[1.467026,0.3556],[1.518984,0.21342],[1.61387,0.100806],[1.741168,0.02669],[1.89036,0],[1.89036,-0.75]]);
}
This is the code "bee" wrote to 3D print the shell adapter: