2023-04-03 16:19:15 +00:00
|
|
|
include <./common/common.scad>;
|
2018-07-14 14:29:43 +00:00
|
|
|
|
2023-04-03 16:19:15 +00:00
|
|
|
SprocketBaseD = 19.05; //8 frames
|
|
|
|
SprocketBaseH = 2.7;
|
|
|
|
FrameC = (SprocketBaseD * PI) / 8;
|
2018-07-14 14:29:43 +00:00
|
|
|
|
2023-04-03 16:19:15 +00:00
|
|
|
SprocketH = 10;
|
|
|
|
SprocketW = 1;
|
|
|
|
SprocketL = 1.5;
|
2018-07-14 14:29:43 +00:00
|
|
|
|
2023-04-03 16:19:15 +00:00
|
|
|
InnerH = 10.6;
|
2018-07-14 14:29:43 +00:00
|
|
|
|
|
|
|
|
2023-04-03 16:19:15 +00:00
|
|
|
TopBaseD = 18.47;
|
|
|
|
TopBaseC = (TopBaseD * PI) / 8;
|
|
|
|
TopBaseH = 2.96;
|
2018-07-14 14:29:43 +00:00
|
|
|
|
2023-04-03 16:19:15 +00:00
|
|
|
LipD = 18.84;
|
|
|
|
LipH = 0.33;
|
|
|
|
LipC = (LipD * PI) / 8;
|
2018-07-14 14:29:43 +00:00
|
|
|
|
2023-04-03 16:19:15 +00:00
|
|
|
TopD = 21.66;
|
|
|
|
TopC = (TopD * PI) / 8;
|
|
|
|
TopH = 1.4;
|
2018-07-14 14:29:43 +00:00
|
|
|
|
2023-04-03 21:05:05 +00:00
|
|
|
motorShaftD = 6;
|
|
|
|
motorShaftHobble = 0.8;
|
2023-04-03 16:19:15 +00:00
|
|
|
|
|
|
|
echo(FrameC);
|
|
|
|
|
|
|
|
$fn = 100;
|
|
|
|
|
|
|
|
module sprocket (pos = [0, 0, 0], rot = [0, 0, 0], bevel = false) {
|
|
|
|
|
|
|
|
translate (pos) rotate(rot) {
|
2018-07-14 14:29:43 +00:00
|
|
|
difference () {
|
2023-04-03 16:19:15 +00:00
|
|
|
translate([0, 0, 0]) scale([1, 1, 2.25]) rotate([90, 0, 90]) cylinder(r = SprocketW/2, h = SprocketL, center = true);
|
2018-07-14 14:29:43 +00:00
|
|
|
translate([0, 0, -1]) cube([2, 2, 2], center = true);
|
2023-04-03 16:19:15 +00:00
|
|
|
if (bevel) {
|
|
|
|
translate([1.5, 0, 0]) rotate([0, -5, 0]) cube([2, 2, 3], center = true);
|
|
|
|
translate([-1.5, 0, 0]) rotate([0, 5, 0]) cube([2, 2, 3], center = true);
|
|
|
|
}
|
2018-07-14 14:29:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-04 19:13:47 +00:00
|
|
|
module gearbox_motor_shaft (H = 16, pad = 0) {
|
|
|
|
difference () {
|
|
|
|
cylinder(r = R(motorShaftD) + pad, h = H, center = true, $fn = 60);
|
|
|
|
translate([motorShaftD - motorShaftHobble + pad, 0, 0]) cube([motorShaftD, motorShaftD, H + 1], center = true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module gearbox_motor_shaft_void (H = 16) {
|
|
|
|
pad = 0.2;
|
|
|
|
gearbox_motor_shaft(H, pad);
|
|
|
|
}
|
|
|
|
|
|
|
|
module bearing_laser_void (x, y, z, width= 8, hole = true) {
|
|
|
|
innerD = 8.05;
|
|
|
|
outerD = 22.1 - .4;
|
|
|
|
fuzz = 0.3;
|
|
|
|
translate ([x, y, z]) {
|
|
|
|
difference () {
|
|
|
|
cylinder(r = (outerD / 2) + fuzz, h = width, center = true);
|
|
|
|
if (hole) {
|
|
|
|
cylinder(r = innerD / 2 - fuzz, h = width, center = true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module m3_nut_void (pos = [0, 0, 0], rot = [0, 0, 0], H = 20) {
|
|
|
|
translate(pos) rotate(rot) {
|
|
|
|
translate([0, 6, -4.25 + (2.75/2)]) cube([6, 12, 2.75], center = true);
|
|
|
|
cylinder(r = R(3.25), h = H, center = true, $fn = 30);
|
2023-04-07 14:55:45 +00:00
|
|
|
translate([0, 0, -4.25]) hex(6, 2.75);
|
2023-04-04 19:13:47 +00:00
|
|
|
translate([0, 0, (H/2)-4.5]) cylinder(r = R(6), h = 5, center = true, $fn = 40);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module m3_bolt_void (pos = [0, 0, 0]) {
|
|
|
|
translate(pos) {
|
|
|
|
cylinder(r = R(3.25), h = 40, center = true, $fn = 30);
|
|
|
|
translate([0, 0, 14]) cylinder(r = R(6), h = 5, center = true, $fn = 40);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module sprocketed_wheel_m3_nut_void (pos = [0, 0, 0]) {
|
|
|
|
translate(pos) {
|
|
|
|
cylinder(r = R(3.25), h = 40, center = true, $fn = 30);
|
2023-04-07 14:55:45 +00:00
|
|
|
hex(6.3, 4);
|
2023-04-04 19:13:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module sprocketed_roller_sprocket_wheel (pos = [0, 0, 0], rot = [0, 0, 0], sprockets = 8, D, bevel = false, bolts = false) {
|
2023-04-03 21:05:05 +00:00
|
|
|
translate(pos) rotate(rot) {
|
|
|
|
cylinder(r = R(D), h = SprocketBaseH, center = true);
|
|
|
|
for (i = [0: sprockets]) {
|
|
|
|
rotate([0, 0, i * 360 / sprockets]) sprocket([(D / 2) - .01, 0, (SprocketBaseH / 2) - (SprocketL / 2)], [0, 90, 0], bevel);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-04 19:13:47 +00:00
|
|
|
module sprocketed_roller_body (pos = [0, 0, 0], rot = [0, 0, 0], sprockets = 8, bevel = false, reinforced = false, bolts = false) {
|
2023-04-03 16:19:15 +00:00
|
|
|
D = (FrameC * sprockets) / PI;
|
|
|
|
LipD = (LipC * sprockets) / PI;
|
|
|
|
TopD = (TopC * sprockets) / PI;
|
|
|
|
TopBaseD = (TopBaseC * sprockets) / PI;
|
|
|
|
InnerD = D - 5.07;
|
2023-04-04 19:13:47 +00:00
|
|
|
ReinforcedRegistration = (InnerD - 5) / 2;
|
2023-04-05 20:39:24 +00:00
|
|
|
ReinforcedRegistrationCorner = sqrt(pow(2.5, 2) + pow(2.5, 2));
|
|
|
|
BoltsY = ReinforcedRegistration + 12.5;
|
2023-04-03 16:19:15 +00:00
|
|
|
|
|
|
|
echo("D", D);
|
|
|
|
echo("LipD", LipD);
|
|
|
|
echo("InnerD", InnerD);
|
|
|
|
|
2023-04-04 19:13:47 +00:00
|
|
|
translate(pos) rotate(rot) difference() {
|
2023-04-03 16:19:15 +00:00
|
|
|
//top
|
2023-04-04 19:13:47 +00:00
|
|
|
union () {
|
|
|
|
if (!reinforced) {
|
2023-04-05 20:39:24 +00:00
|
|
|
sprocketed_roller_sprocket_wheel(sprockets = sprockets, D = D, bevel = bevel);
|
2023-04-04 19:13:47 +00:00
|
|
|
} else {
|
|
|
|
cube([ReinforcedRegistration + 5, ReinforcedRegistration, SprocketBaseH], center = true);
|
|
|
|
cube([ReinforcedRegistration, ReinforcedRegistration + 5, SprocketBaseH], center = true);
|
2023-04-05 20:39:24 +00:00
|
|
|
translate([(ReinforcedRegistration/2), (ReinforcedRegistration/2), 0]) rotate([0, 0, 45]) cube([ReinforcedRegistrationCorner, ReinforcedRegistrationCorner, SprocketBaseH], center = true);
|
2023-04-04 19:13:47 +00:00
|
|
|
}
|
2018-07-14 14:29:43 +00:00
|
|
|
|
2023-04-04 19:13:47 +00:00
|
|
|
//center
|
|
|
|
translate([0, 0, (InnerH / 2) + (SprocketBaseH / 2)]) {
|
|
|
|
cylinder(r = R(InnerD), h = InnerH, center = true);
|
|
|
|
}
|
2023-04-03 16:19:15 +00:00
|
|
|
|
2023-04-04 19:13:47 +00:00
|
|
|
//lip
|
|
|
|
translate([0, 0, (TopBaseH / 2) + InnerH + (SprocketBaseH / 2) - (TopBaseH / 2) + (LipH / 2)]) {
|
|
|
|
cylinder(r = R(LipD), h = LipH, center = true);
|
|
|
|
}
|
2018-07-14 14:29:43 +00:00
|
|
|
|
2023-04-04 19:13:47 +00:00
|
|
|
//bottom
|
|
|
|
translate([0, 0, (TopH / 2) + (TopBaseH / 2) + InnerH + (SprocketBaseH / 2) + (TopBaseH / 2) - (LipH / 2)]) {
|
|
|
|
cylinder(r = R(TopD), h = TopH, center = true);
|
|
|
|
}
|
2023-04-03 16:19:15 +00:00
|
|
|
|
2023-04-04 19:13:47 +00:00
|
|
|
//bottom base
|
|
|
|
translate([0, 0, (TopBaseH / 2) + InnerH + (SprocketBaseH / 2)]) {
|
|
|
|
cylinder(r = R(TopBaseD), h = TopBaseH, center = true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (reinforced && bolts) {
|
|
|
|
m3_bolt_void([0, BoltsY/2, 0]);
|
|
|
|
m3_bolt_void([0, -BoltsY/2, 0]);
|
2023-04-03 16:19:15 +00:00
|
|
|
}
|
|
|
|
}
|
2018-07-14 14:29:43 +00:00
|
|
|
}
|
|
|
|
|
2023-04-25 00:42:25 +00:00
|
|
|
module sprocketed_roller (pos = [0, 0, 0], rot = [0, 0, 0], sprockets = 8, bevel = false, reinforced = false, bolts = false, model = "", set_screw_top = false) {
|
2023-04-03 21:05:05 +00:00
|
|
|
D = (FrameC * sprockets) / PI;
|
2023-04-03 16:19:15 +00:00
|
|
|
difference () {
|
|
|
|
union () {
|
2023-04-04 19:13:47 +00:00
|
|
|
sprocketed_roller_body(pos = pos, rot = rot, sprockets = sprockets, bevel = bevel, reinforced = reinforced, bolts = bolts);
|
2023-04-03 16:19:15 +00:00
|
|
|
//translate(pos) rotate(rot) addition();
|
2018-07-14 14:29:43 +00:00
|
|
|
}
|
2023-04-03 21:05:05 +00:00
|
|
|
if (model == "gearbox_motor") {
|
|
|
|
translate(pos) rotate(rot) translate([0, 0, 10]) gearbox_motor_shaft_void();
|
2023-04-25 00:42:25 +00:00
|
|
|
if (set_screw_top) {
|
|
|
|
translate(pos) rotate(rot) rotate([180, 0, 0]) m3_bolt_void([0, 0, -11]);
|
|
|
|
} else {
|
|
|
|
translate(pos) rotate(rot) m3_nut_void(pos=[D/4, 0, 8.5], rot = [90, 0, 90], H = D/2);
|
|
|
|
}
|
2023-04-03 21:05:05 +00:00
|
|
|
}
|
2018-07-14 14:29:43 +00:00
|
|
|
}
|
2023-04-25 00:42:25 +00:00
|
|
|
|
2018-07-14 14:29:43 +00:00
|
|
|
}
|
2023-04-03 16:19:15 +00:00
|
|
|
|
2023-04-04 19:13:47 +00:00
|
|
|
module sprocketed_roller_reinforced (pos = [0, 0, 0], rot = [0, 0, 0], sprockets = 8, bevel = true, model = "", bolts = true) {
|
2023-04-03 21:05:05 +00:00
|
|
|
D = (FrameC * sprockets) / PI;
|
2023-04-04 19:13:47 +00:00
|
|
|
InnerD = D - 5.07;
|
|
|
|
ReinforcedRegistration = (InnerD - 5) / 2;
|
|
|
|
BoltsY = ReinforcedRegistration + 12;
|
2023-04-03 21:05:05 +00:00
|
|
|
difference () {
|
2023-04-04 19:13:47 +00:00
|
|
|
sprocketed_roller_sprocket_wheel (pos = pos, rot = rot, sprockets = sprockets, D = D, bevel = bevel);
|
2023-04-03 21:05:05 +00:00
|
|
|
scale([1.01, 1.01, 1]) sprocketed_roller (pos = pos, rot = rot, sprockets = sprockets, bevel = bevel, reinforced = true, model = model);
|
2023-04-04 19:13:47 +00:00
|
|
|
if (bolts) {
|
|
|
|
sprocketed_wheel_m3_nut_void([0, BoltsY/2, -4]);
|
|
|
|
sprocketed_wheel_m3_nut_void([0, -BoltsY/2, -4]);
|
2023-04-03 16:19:15 +00:00
|
|
|
}
|
|
|
|
}
|
2018-07-14 14:29:43 +00:00
|
|
|
}
|
2023-04-03 16:19:15 +00:00
|
|
|
|
2023-04-24 01:57:30 +00:00
|
|
|
LIBRARY = false;
|
2023-04-05 20:39:24 +00:00
|
|
|
PART = "sprocketed_roller_reinforced";
|
2023-04-24 01:57:30 +00:00
|
|
|
if (!LIBRARY && PART == "sprocketed_roller_reinforced") {
|
2023-04-25 00:42:25 +00:00
|
|
|
rotate([180, 0, 0]) sprocketed_roller(sprockets = 18, bevel = false, model = "gearbox_motor", reinforced = true, bolts = true, set_screw_top = true);
|
2023-04-24 01:57:30 +00:00
|
|
|
} else if (!LIBRARY && PART == "sprocketed_wheel") {
|
2023-04-04 19:13:47 +00:00
|
|
|
rotate([180, 0, 0]) color("red") sprocketed_roller_reinforced(sprockets = 18, bevel = false, model = "gearbox_motor", bolts = true);
|
2023-04-03 21:05:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|