takeup/examples/JK_projector_takeup_case.scad

119 lines
4.0 KiB
OpenSCAD
Raw Normal View History

2023-01-14 23:38:07 +00:00
include <../common/common.scad>;
X = 115;
2023-01-25 01:09:23 +00:00
Y = 60;
Z = 40;
2023-01-25 01:09:23 +00:00
USB = -30;
L289N = 10;
2023-02-13 05:09:26 +00:00
ButtonD = 7.2;
2023-01-25 01:09:23 +00:00
2023-01-14 23:38:07 +00:00
module l289N_holes (r = 3/2 - .2, MOD_MOUNT = 0) {
$fn = 60;
DISTANCE = 36.5 + MOD_MOUNT;
H = 50;
translate([0, 0, 0]) cylinder(r = r, h = H * 5, center = true);
translate([DISTANCE, 0, 0]) cylinder(r = r, h = H * 5, center = true);
translate([DISTANCE, DISTANCE, 0]) cylinder(r = r, h = H * 5, center = true);
translate([0, DISTANCE, 0]) cylinder(r = r, h = H * 5, center = true);
}
module l289N_mount () {
$fn = 60;
DISTANCE = 36.5;
H = 4;
THICKNESS = 3;
module stand () {
cylinder(r1 = 4, r2 = 3, h = H, center = true);
2023-01-25 01:09:23 +00:00
cylinder(r = R(2.9), h = H + 5, center = true);
2023-01-14 23:38:07 +00:00
}
translate([0, 0, 0]) stand();
translate([DISTANCE, 0, 0]) stand();
translate([DISTANCE, DISTANCE, 0]) stand();
translate([0, DISTANCE, 0]) stand();
difference () {
translate([DISTANCE/2, DISTANCE/2, -3]) rounded_cube([DISTANCE + 8, DISTANCE + 8, THICKNESS], 8, center = true); //base
translate([DISTANCE/2, DISTANCE/2, -3]) rounded_cube([DISTANCE - 5, DISTANCE - 5, THICKNESS+1], 10, center = true); //base
}
}
2023-01-25 01:09:23 +00:00
module Arduino_Nano_mount () {
X = 18.2;
Y = 43.9;
2023-01-25 01:09:23 +00:00
Z = 10.5;
BOARD_Z = 1.5;
difference () {
//outer
cube([X + 4, Y + 4, Z], center = true);
//inner void minus corners
difference () {
cube([X - 1, Y - 1, Z + 1], center = true);
translate([(X / 2) - 1, (Y / 2) - 1, -BOARD_Z]) cylinder(r = (2 / 2), h = Z + 1, center = true, $fn = 20);
translate([(-X / 2) + 1, (Y / 2) - 1, -BOARD_Z]) cylinder(r = (2 / 2), h = Z + 1, center = true, $fn = 20);
translate([(X / 2) - 1, (-Y / 2) + 1, -BOARD_Z]) cylinder(r = (2 / 2), h = Z + 1, center = true, $fn = 20);
translate([(-X / 2) + 1, (-Y / 2) + 1, -BOARD_Z]) cylinder(r = (2 / 2), h = Z + 1, center = true, $fn = 20);
}
//board void
translate([0, 0, (Z / 2) - (BOARD_Z / 2)]) cube([X, Y, BOARD_Z], center = true);
//usb void
translate([0, Y / 2, (Z / 2) - (6 / 2) + 0.01]) cube([8, 10, 6], center = true);
}
}
module case_bottom () {
difference () {
rounded_cube([X, Y, Z], d = 10, center = true, $fn = 40);
translate([0, 0, 3]) rounded_cube([X - 5, Y - 5, Z], d = 7, center = true, $fn = 40);
2023-03-26 20:16:47 +00:00
//MiniUSB
2023-03-20 16:49:51 +00:00
translate([USB, Y / 2, 7]) cube([8, 10, Z], center = true);
2023-01-25 01:09:23 +00:00
2023-03-20 16:49:51 +00:00
//DC power connector
translate([(X / 2) - (13 / 2), -12, 4]) rotate([0, 90, 0]) cylinder(r = R(12.3), h = 13.5, center = true, $fn = 30);
2023-01-25 01:09:23 +00:00
2023-03-20 16:49:51 +00:00
//L289N wires
2023-01-25 01:09:23 +00:00
translate([L289N + 6, 0, 3]) {
rotate([90, 0, 0]) cylinder(r = R(4), h = Y + 1, center = true, $fn = 30);
translate([0, 0, Z / 2]) cube([4, Y + 1, Z], center = true);
}
2023-03-20 16:49:51 +00:00
//void for wire
2023-01-25 01:09:23 +00:00
translate([(X / 2), 12, 4]) rotate([0, 90, 0]) cylinder(r = R(5), h = 10, center = true, $fn = 30);
}
translate ([-20, 0, 0]) {
translate([L289N, -20 + 2, -(Z/2) + 7.2]) l289N_mount();
translate([-10, 6, -(Z/2) + 7.9]) Arduino_Nano_mount();
2023-01-25 01:09:23 +00:00
}
}
module case_top () {
difference () {
rounded_cube([X, Y, 3], d = 10, center = true, $fn = 40);
translate([-2, 0, 0]) cube([24, 27, 20], center = true);
2023-02-13 05:09:26 +00:00
translate([35, 18, 0]) cylinder(r = R(ButtonD), h = 10, center = true, $fn = 40);
translate([35, -18, 0]) cylinder(r = R(ButtonD), h = 10, center = true, $fn = 40);
2023-02-14 01:08:09 +00:00
//text
translate([25, 15, -0.5]) rotate([0, 0, 90]) emboss("FWD >");
translate([25, -15, -0.5]) rotate([0, 0, 90]) emboss("< BWD");
2023-01-25 01:09:23 +00:00
}
translate([0, 0, -2.9]) difference () {
rounded_cube([X - 5, Y - 5, 3], d = 7, center = true, $fn = 40);
rounded_cube([X - 11, Y - 11, 3 + 1], d = 7, center = true, $fn = 40);
}
}
2023-02-14 01:08:09 +00:00
module emboss (string) {
letter = 6;
2023-02-14 01:08:09 +00:00
color("red") linear_extrude(10) {
text(string, size = letter, halign = "center", valign = "center", $fn = 64);
}
}
2023-01-25 01:09:23 +00:00
//case_top();
case_bottom();