269 lines
9.7 KiB
OpenSCAD
Executable File
269 lines
9.7 KiB
OpenSCAD
Executable File
include <common/common.scad>;
|
|
include <common/motors.scad>;
|
|
include <daylight_spool_mount.scad>;
|
|
|
|
COUPLING_D = 37;
|
|
|
|
WASHER_D = 35.7; //1 + 1/3 diameter?
|
|
WASHER_H = 2.4;
|
|
|
|
MOTOR_SHAFT_D = 6; //dep
|
|
MOTOR_SHAFT_H = 16; //dep
|
|
MOTOR_SHAFT_HOBBLE = 1; //dep
|
|
|
|
M4 = 4.1;
|
|
|
|
module motor_mount_pad (D, Z) {
|
|
difference () {
|
|
cylinder(r = R(D), h = Z, center = true, $fn = 40);
|
|
//bolt void
|
|
cylinder(r = R(2.5), h = Z + 1, center = true, $fn = 40);
|
|
}
|
|
}
|
|
|
|
module magnetic_coupling (MAGNETS = 4, MAGNET_D = 8.1, MAGNET_H = 2.5) {
|
|
H = 3;
|
|
OFFSET = 12;
|
|
difference () {
|
|
union () {
|
|
cylinder(r = R(COUPLING_D), h = MAGNET_H + H, center = true, $fn = 100);
|
|
translate([0, 0, -6]) cylinder(r = R(12.5), h = 10, center = true, $fn = 60);
|
|
translate([0, 0, -5]) cylinder(r = R(20), h = 5, center = true, $fn = 60);
|
|
}
|
|
//motor shaft void
|
|
scale([1.1, 1.1, 2]) geared_motor_shaft();
|
|
//magnet voids
|
|
for (i = [0 : MAGNETS - 1]) {
|
|
rotate([0, 0, i * (360 / MAGNETS)]) {
|
|
translate([0, OFFSET, H - MAGNET_H + 1.01]) {
|
|
cylinder(r = R(MAGNET_D), h = MAGNET_H, center = true, $fn = 50);
|
|
}
|
|
}
|
|
}
|
|
//m3 nut
|
|
translate([6, 0, -9]) {
|
|
cube([2.75, 5.75, 10], center = true);
|
|
translate([0, 0, 5]) rotate([0, 90, 0]) {
|
|
cylinder(r = R(6.75), h = 2.75, center = true, $fn = 6);
|
|
translate([0, 0, 4]) cylinder(r = R(3.25), h = 20, center = true, $fn = 30);
|
|
translate([0, 0, 13.5]) cylinder(r = R(6), h = 20, center = true, $fn = 30);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
module slip_coupling (MAGNET_H = 2.5) {
|
|
H = 16;
|
|
difference () {
|
|
translate([0, 0, 2]) cylinder(r = R(45), h = H, center = true, $fn = 100);
|
|
translate([0, 0, 2 -(H / 2) + (MAGNET_H + 3) / 2]) cylinder(r = R(COUPLING_D + 0.7), h = MAGNET_H + 3.01, center = true, $fn = 160);
|
|
translate([0, 0, 2 -(H / 2) + (MAGNET_H + 3) + (WASHER_H / 2)]) cylinder(r = R(WASHER_D), h = WASHER_H, center = true, $fn = 160);
|
|
translate([0, 0, 2 + (H / 2) - (5 / 2)]) cube([25, 10, 5.01], center = true);
|
|
translate([0, 0, 2 + (H / 2) - (5 / 2)]) cube([10, 25, 5.01], center = true);
|
|
//corners with voids for M3
|
|
translate([-8.75, -8.75, 2 + (H / 2) - (5 / 2)]) {
|
|
translate([0, 0, 1]) cube([(25 - 10) / 2, (25 - 10) / 2, 5.01], center = true);
|
|
cylinder(r = R(3.25), h = 20, center = true, $fn = 40);
|
|
translate([0, 0, -4.25]) hex(6, 2.75);
|
|
}
|
|
translate([8.75, 8.75, 2 + (H / 2) - (5 / 2)]) {
|
|
translate([0, 0, 1]) cube([(25 - 10) / 2, (25 - 10) / 2, 5.01], center = true);
|
|
cylinder(r = R(3.25), h = 20, center = true, $fn = 40);
|
|
translate([0, 0, -4.25]) hex(6, 2.75);
|
|
}
|
|
}
|
|
}
|
|
|
|
module daylight_spool_insert () {
|
|
translate([0, 0, 15.9]) daylight_spool_mount(false, false);
|
|
translate([0, 0, 3.25]) cylinder(r = R(18), h = 1.5, center = true, $fn = 240);
|
|
union () {
|
|
cube([25 - .4, 10 - .4, 5], center = true);
|
|
cube([10 - .4, 25 - .4, 5], center = true);
|
|
translate([-8.75, -8.75, 0]) difference () {
|
|
translate([.2, .2, 1/2]) cube([(25 - 10) / 2, (25 - 10) / 2, 4], center = true);
|
|
cylinder(r = R(3.25), h = 20, center = true, $fn = 40);
|
|
translate([0, 0, 2]) cylinder(r = R(5.75), h = 3.5, center = true, $fn = 40);
|
|
}
|
|
translate([8.75, 8.75, 0]) difference () {
|
|
translate([ -.2, -.2, 1/2]) cube([(25 - 10) / 2, (25 - 10) / 2, 4], center = true);
|
|
cylinder(r = R(3.25), h = 20, center = true, $fn = 40);
|
|
translate([0, 0, 2]) cylinder(r = R(5.75), h = 3.5, center = true, $fn = 40);
|
|
}
|
|
}
|
|
}
|
|
|
|
module motor_mount_void (pos = [0, 0, 0], D, Z) {
|
|
translate(pos) {
|
|
cylinder(r = R(D), h = Z, center = true, $fn = 40);
|
|
//bolt void
|
|
translate([0, 0, 5]) cylinder(r = R(3.25 + 0.2), h = Z + 10, center = true, $fn = 40);
|
|
translate([0, 0, 4.75]) cylinder(r = R(6), h = 3.5, center = true, $fn = 40);
|
|
}
|
|
}
|
|
|
|
module mount_plate_void (pos = [0, 0, 0]) {
|
|
translate(pos) {
|
|
cylinder(r = R(4.25), h = 20, center = true, $fn = 40);
|
|
translate([0, 0, 0.5]) cylinder(r = R(8), h = 3, center = true, $fn = 40);
|
|
}
|
|
}
|
|
|
|
module corner_void (pos = [0, 0, 0], Corner) {
|
|
translate(pos) cube([Corner, Corner, 8], center = true);
|
|
}
|
|
|
|
module corner_round (pos = [0, 0, 0], D) {
|
|
translate(pos) cylinder(r = D, h = 7, center = true, $fn = 40);
|
|
}
|
|
|
|
module mount_plate () {
|
|
Z = 1.5;
|
|
D = 7.5 + 1.5;
|
|
|
|
X = 60;
|
|
Y = 60;
|
|
|
|
PlateMountX = 42 / 2;
|
|
PlateMountY = 42 / 2;
|
|
|
|
Corner = 3;
|
|
CornerHalf = Corner / 2;
|
|
CornerX = (X / 2) - (Corner / 2);
|
|
CornerY = (Y / 2) - (Corner / 2);
|
|
CornerZ = 3.26 - .5;
|
|
|
|
MotorMountX = (GearedMotorMountX + 0.1) / 2;
|
|
MotorMountY = (GearedMotorMountY + 0.1) / 2;
|
|
|
|
//center
|
|
//color("red") cylinder(r = 15 / 2, h = 20, center = true, $fn = 60);
|
|
|
|
difference () {
|
|
translate([0, 0, 3.26 - .5]) cube([X, Y, 7], center = true);
|
|
|
|
//motor void (centered)
|
|
translate([7-0.5, 0, 0]) {
|
|
translate([-(46 / 2) + 15 + 1 + 0.5, 0, 0]) cylinder(r = R(15), h = 20, center = true, $fn = 60);
|
|
translate([1, 0, 0]) {
|
|
motor_mount_void([MotorMountX, MotorMountY, 0], D, Z);
|
|
motor_mount_void([-MotorMountX, MotorMountY, 0], D, Z);
|
|
motor_mount_void([MotorMountX, -MotorMountY, 0], D, Z);
|
|
motor_mount_void([-MotorMountX, -MotorMountY, 0], D, Z);
|
|
}
|
|
//pad void
|
|
translate([-8 + 12.5 + 1, 0, 0]) cube([8, 17, Z], center = true);
|
|
}
|
|
|
|
mount_plate_void([PlateMountX, PlateMountY, 0]);
|
|
mount_plate_void([-PlateMountX, PlateMountY, 0]);
|
|
mount_plate_void([PlateMountX, -PlateMountY, 0]);
|
|
mount_plate_void([-PlateMountX, -PlateMountY, 0]);
|
|
|
|
corner_void([CornerX, CornerY, CornerZ], Corner);
|
|
corner_void([-CornerX, CornerY, CornerZ], Corner);
|
|
corner_void([CornerX, -CornerY, CornerZ], Corner);
|
|
corner_void([-CornerX, -CornerY, CornerZ], Corner);
|
|
}
|
|
|
|
corner_round([CornerX - CornerHalf, CornerY - CornerHalf, CornerZ], Corner);
|
|
corner_round([-CornerX + CornerHalf, CornerY- CornerHalf, CornerZ], Corner);
|
|
corner_round([CornerX - CornerHalf, -CornerY + CornerHalf, CornerZ], Corner);
|
|
corner_round([-CornerX + CornerHalf, -CornerY + CornerHalf, CornerZ], Corner);
|
|
}
|
|
|
|
//centered, minimal geometry needed to add
|
|
//58x52
|
|
module minimal_mount () {
|
|
difference () {
|
|
mount_plate();
|
|
translate([50 + 29, 0, 0]) cube([100, 100, 100], center = true);
|
|
translate([-50 - 29, 0, 0]) cube([100, 100, 100], center = true);
|
|
translate([0, 50 + 26, 0]) cube([100, 100, 100], center = true);
|
|
translate([0, -50 - 26, 0]) cube([100, 100, 100], center = true);
|
|
}
|
|
}
|
|
|
|
module m4_nut (H = 3.1) {
|
|
cylinder(r = R(8.1), h = 3.1, center = true, $fn = 6);
|
|
}
|
|
|
|
module daylight_spool_insert_reinforced () {
|
|
//internally Hex M4 40mm
|
|
difference () {
|
|
daylight_spool_insert();
|
|
cylinder(r = R(M4), h = 100, center = true, $fn = 60);
|
|
translate([0, 0, -1]) m4_nut();
|
|
}
|
|
}
|
|
|
|
module daylight_spool_insert_reinforced_nut () {
|
|
D = 30;
|
|
H = 6;
|
|
BUMPS = 60;
|
|
BUMP_D = 1.2;
|
|
difference() {
|
|
union () {
|
|
cylinder(r = R(D), h = H, center = true, $fn = 120);
|
|
for (i = [0 : BUMPS - 1]) {
|
|
rotate([0, 0, i * (360 / BUMPS)]) {
|
|
translate([R(D) - .1, 0, 0]) cylinder(r = R(BUMP_D), h = H, center = true, $fn = 20);
|
|
}
|
|
}
|
|
}
|
|
//m4
|
|
translate([0 , 0, (H / 2) - (3.1 / 2) + 0.01]) m4_nut();
|
|
cylinder(r = R(M4), h = 100, center = true, $fn = 60);
|
|
//under void
|
|
translate([0, 0, -4]) cylinder(r = R(15), h = H, center = true, $fn = 120);
|
|
//top void
|
|
translate([0, 0, 4]) difference () {
|
|
cylinder(r = R(25), h = H, center = true, $fn = 120);
|
|
cylinder(r = R(12), h = H, center = true, $fn = 120);
|
|
}
|
|
//bevels
|
|
translate([0, 0, (H / 2) - (1 / 2)]) difference () {
|
|
cylinder(r = R(D) + 5, h = 1, center = true, $fn = 240);
|
|
cylinder(r2 = R(D), r1 = R(D) + 1, h = 1, center = true, $fn = 240);
|
|
}
|
|
|
|
translate([0, 0, (H / 2) - (1 / 2)]) difference () {
|
|
cylinder(r = R(D) + 5, h = 1, center = true, $fn = 240);
|
|
cylinder(r2 = R(D), r1 = R(D) + 1, h = 1, center = true, $fn = 240);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
module debug_assembled () {
|
|
translate([(46 / 2) - 14.5, 0, 0]) rotate([180, 0, 0]) geared_motor();
|
|
color("green") translate([0, 0, 11]) mount_plate();
|
|
color("blue") translate([0, 0, 0]) rotate([0, 0, -90]) //magnetic_coupling();
|
|
difference () {
|
|
translate([0, 0, 26.5]) slip_coupling();
|
|
translate([-50, 0, 0]) cube([100, 100, 150], center = true);
|
|
}
|
|
color("red") translate([0, 0, 34]) rotate([0, 0, 90]) daylight_spool_insert_reinforced();
|
|
}
|
|
|
|
PART = "debug";
|
|
|
|
if (PART == "slip_coupling") {
|
|
slip_coupling();
|
|
} else if (PART == "magnetic_coupling") {
|
|
magnetic_coupling();
|
|
} else if (PART == "mount_plate") {
|
|
//42x42 M4 mounting holes
|
|
mount_plate();
|
|
} else if (PART == "daylight_spool_insert") {
|
|
daylight_spool_insert();
|
|
} else if (PART == "minimal_mount") {
|
|
minimal_mount();
|
|
} else if (PART == "daylight_spool_insert_reinforced") {
|
|
daylight_spool_insert_reinforced();
|
|
} else if (PART == "daylight_spool_insert_reinforced_nut") {
|
|
daylight_spool_insert_reinforced_nut();
|
|
} else if (PART == "debug") {
|
|
debug_assembled();
|
|
}
|