canon_ble #82

Merged
mattmcw merged 149 commits from canon_ble into main 2023-08-01 03:38:52 +00:00
2 changed files with 131 additions and 7 deletions
Showing only changes of commit 2047ce4f76 - Show all commits

73
scad/cpc_connectors.scad Normal file
View File

@ -0,0 +1,73 @@
/*
Amphenol CPC 9pin Connectors
*/
include <./common/common.scad>;
PART="";
PlugD = 11;
SocketD = PlugD + 0.2;
module cpc_9pin_plug () {
$fn = 200;
D = 17;
OD = 28;
H = 25;
difference () {
union () {
cylinder(r = OD / 2, h = H, center = true);
//cube([12, 48, 3], center = true);
}
//main void
translate([0, 0, -3]) cylinder(r = (OD / 2) - 3, h = H, center = true);
//connector void
cylinder(r = D / 2, h = H * 2, center = true);
}
}
module cpc_9pin_plug_sleeve () {
$fn = 200;
D = 17;
OD = 28;
H = 25;
difference () {
union () {
cylinder(r = OD / 2, h = H, center = true);
//cube([12, 48, 3], center = true);
}
//main void
translate([0, 0, -3]) cylinder(r = (OD / 2) - 3, h = H, center = true);
//connector void
cylinder(r = D / 2, h = H * 2, center = true);
}
}
module cpc_9pin_socket () {
$fn = 200;
D = 17;
OD = 28;
H = 25;
difference () {
union () {
cylinder(r = OD / 2, h = H, center = true);
//cube([12, 48, 3], center = true);
}
//main void
translate([0, 0, -3]) cylinder(r = (OD / 2) - 3, h = H, center = true);
//connector void
cylinder(r = D / 2, h = H * 2, center = true);
}
}
if (PART == "cpc_9pin_plug") {
cpc_9pin_plug();
} else if (PART == "cpc_9pin_plug_sleeve") {
cpc_9pin_plug_sleeve();
} else if (PART == "cpc_9pin_socket") {
cpc_9pin_socket();
}

View File

@ -1,22 +1,73 @@
include <arduino.scad>;
include <common/common.scad>;
PART="electronics_mount";
PART="electronics_mountx";
CaseX = 100;
CaseY = 200;
CaseZ = 40;
CaseX = 121;
CaseY = 172;
CaseZ = 56;
CaseInnerX = 112;
CaseInnerY = 162;
CaseInnerZ = 52;
CaseMountsX = 90;
CaseMountsY = 190;
CaseMountsY = 130;
CaseMountsH = 5;
CaseSplitZ = 41;
module case_mount_debug () {
$fn = 30;
translate([0, 0, -0.1]) difference () {
cylinder(r = R(7), h = CaseMountsH, center = true);
cylinder(r = R(3.25), h = CaseMountsH + 1, center = true);
}
}
module case_mounts_debug () {
Z = -CaseInnerZ/2+(CaseMountsH/2);
translate([CaseMountsX/2, CaseMountsY/2, Z]) case_mount_debug();
translate([CaseMountsX/2, -CaseMountsY/2, Z]) case_mount_debug();
translate([-CaseMountsX/2, CaseMountsY/2, Z]) case_mount_debug();
translate([-CaseMountsX/2, -CaseMountsY/2, Z]) case_mount_debug();
}
module case_debug () {
cube([CaseX, CaseY, CaseZ], center = true);
difference () {
cube([CaseX, CaseY, CaseZ], center = true);
cube([CaseInnerX, CaseInnerY, CaseInnerZ], center = true);
translate([0, 0, CaseSplitZ]) cube([CaseX + 1, CaseY + 1, CaseZ], center = true);
translate([0, 150, 0]) cube([CaseX + 1, CaseY, CaseZ + 1], center = true);
}
case_mounts_debug();
}
module relay_module_debug () {
}
module capacitor_debug () {
}
module resistor_debug () {
}
module electronics_mount () {
bumper();
translate([40, 78, 0]) rotate([0, 0, 180]) bumper();
}
module debug () {
case_debug();
translate([0, 0, -CaseInnerZ/2+(CaseMountsH)]) electronics_mount();
}
if (PART == "electronics_mount") {
electronics_mount();
} else {
debug();
}