- Added datasheets of several components / connectors

- Advanced with housing design, but no finished yet
This commit is contained in:
2025-09-07 09:04:11 +02:00
parent 714b5be13c
commit 20322c58fc
9 changed files with 1370 additions and 202 deletions

View File

@@ -1,17 +1,16 @@
use <MCAD/boxes.scad>
use <MCAD/regular_shapes.scad>
use <MIDI_Lighter_Mic_Adapter.scad>
include <RP2350_MIDI_Lighter_PCB.scad>
include <RP2350_MIDI_Lighter_Definition.scad>
Show_FAD_Logo = true;
Show_FAD_Logo = false;
Show_PCB = false;
Debug_Present = true;
$preview = false;
Alternative = true;
// Info //
// This version has the walls of the top part mostly associated to the to cover
@@ -22,27 +21,37 @@ if(Show_PCB)
translate([0,0,-PCB_T/2]) Spacer_Bot();
}
Top();
// Only for display purposes
// translate([0, 0, eps])
// Top();
Top_Wall(1);
// Bottom();
// rotate([0, 180, 0])
// Display_GC9A01A_Cover();
// color([1.0, 0.4, 0.4]) Bottom(Alternative);
// color([0.4, 0.4, 1.0]) Bottom_Wall(Alternative);
module Display_GC9A01A_Cover()
{
color([0.4, 1.0, 0.4], 1.5)
translate([0, 0, +Spacer_Top_Height + PCB_T/2 + 5])
translate(GC9A01A)
difference() {
GC9A01A_Cover_Plate(1, 1);
GC9A01A_Cover_Cutout(10);
color([0.4, 1.0, 0.4], 1.0)
translate([0, 0, +Spacer_Top_Height + PCB_T/2 + Cover_T_T + 0.0])
difference()
{
translate(GC9A01A)
difference() {
GC9A01A_Cover_Plate(1.0, 1);
GC9A01A_Cover_Cutout(10);
}
Screw_Pits_M3(10);
}
}
module Top()
{
color([0.2, 0.8, 0.2])
difference()
{
translate([0, 0, +Spacer_Top_Height + PCB_T/2])
@@ -53,27 +62,28 @@ module Top()
union()
{
Top_Plate();
// Top_Wall();
translate([0, 0, +Cover_T_T]) Screw_Rings_M3();
// translate([0, 0, +Cover_T_T]) Relief_Rings_M3();
}
Screw_Holes_M3();
for (i = [0:1]) {
translate([0, 0, Cover_T_T/2])
translate(MIDI_Plugs[i])
scale([1, 1, 10]) MIDI_Plug_Cutout();
Top_Wall_Screw_Plates(0.6, -eps, true);
translate([0, 0, +Cover_T_T]) Screw_Pits_M3(1);
translate(Rotary_Encoder) Screw_Drill(7.5);
translate(GC9A01A) GC9A01A_Cutout(5*Cover_T_T);
translate([0, 0, +Cover_T_T])
{
translate([0, 0, -1.0]) // Penetration Depth
translate(Rotary_Encoder) cylinder(d=15, h=100, center=false, $fn = $preview ? 32 : 100);
translate([0, 0, -0.5]) // Penetration Depth
translate(GC9A01A) GC9A01A_Cover_Plate(10, 1.02);
}
translate(Rotary_Encoder) Screw_Drill(7.5);
translate(GC9A01A) GC9A01A_Cutout(5*Cover_T_T);
translate([0, 0, +Cover_T_T-0.5])
translate(GC9A01A) GC9A01A_Cover_Plate(10, 1.01);
translate([0, 0, -Spacer_Top_Height - PCB_T/2]) PCB_Cutouts_Top_Plate();
}
for (i = [0:1]) {
translate([0, 0, Cover_T_T]) translate(MIDI_Plugs[i]) MIDI_Plug_Arc();
for (i = MIDI_Plugs) {
translate([0, 0, Cover_T_T]) translate(i) MIDI_Plug_Arc();
}
if(Show_FAD_Logo == true) {
@@ -85,147 +95,207 @@ module Top()
}
}
}
PCB_Cutouts_Top();
}
}
module Top_Wall()
{
translate([PCB_W/2, PCB_H/2, -Wall_T_H/2])
union()
{
difference()
{
roundedBox([PCB_W + 2*Cover_O, PCB_H + 2*Cover_O, 1*Wall_T_H], 2, true, $fn = $preview ? 32 : 100);
roundedBox([PCB_W + 1*Cover_O, PCB_H + 1*Cover_O, 2*Wall_T_H], 2, true, $fn = $preview ? 32 : 100);
}
// Internak Support Structures
translate([+PCB_W/2+Cover_O/2, -13, 0]) translate([-5/2, 0, PCB_T/2]) cube([5, 2, Wall_T_H-PCB_T], center=true);
translate([Cover_O/4, -PCB_H/2-Cover_O/2, 0]) translate([-1/2, 5/2, PCB_T/2]) cube([2, 5, Wall_T_H-PCB_T], center=true);
}
}
module Top_Plate()
{
Cover_O_Factor = 0.9;
translate([PCB_W/2, PCB_H/2, Cover_T_T/2])
roundedBox([PCB_W + 2*Cover_O, PCB_H + 2*Cover_O, Cover_T_T], 2, true, $fn = $preview ? 32 : 100);
// roundedBox([PCB_W + 2*Cover_O, PCB_H + 2*Cover_O, Cover_T_T], 2, true, $fn = $preview ? 32 : 100);
roundedBox([PCB_W + Cover_O_Factor*Cover_O, PCB_H + Cover_O_Factor*Cover_O, Cover_T_T], 1.0, true, $fn = $preview ? 32 : 100);
}
module Bottom(Alternative)
module Top_Wall(gallery_width = 1)
{
translate([0, 0, -Spacer_Bot_Height - PCB_T/2])
union()
{
difference()
{
translate([0, 0, -Cover_B_T])
union()
{
Bottom_Plate(Alternative);
translate([0, 0, -1])
for (i = [0:3]) {
translate(Mounting_Holes[i]) cylinder(h=1, d=Screw_Ring_M3_Outer_Diameter, center=false, $fn = $preview ? 32 : 100);
translate([PCB_W/2, PCB_H/2, +Wall_T_H/2])
difference() {
roundedBox([PCB_W + 2*Cover_O, PCB_H + 2*Cover_O, 1*Wall_T_H], 2, true, $fn = $preview ? 32 : 100);
cube([PCB_W + 1*Cover_O, PCB_H + 1*Cover_O, 2*Wall_T_H], center=true);
}
translate([0, 0, -1-Ring_M3_H]) Screw_Rings_M3();
Top_Wall_Gallery(gallery_width);
}
for (i = [0:3]) {
// translate([0, 0, -Cover_B_T/2]) translate(Mounting_Holes[i])
// scale(1.1) Screw_Area_Cutout(Screw_Area_Cutout_Widths[i], Screw_Area_Cutout_Offsets[i], Cover_B_T/2);
translate([0, 0, -Cover_B_T/2]) Screw_Area_Stripe(Mounting_Holes[i][1], Cover_B_T/2, 1.1, 1.5);
translate([PCB_W/2, PCB_H/2, +Wall_T_H/2])
{
Top_Wall_Remove_Part("top", Wall_T_H-Cover_T_T/2, 10.5, MOLEX[0]);
Top_Wall_Remove_Part("bottom", 3.5, 10, Audio_Jack[0]);
Top_Wall_Remove_Part("right", 6.5, 3.5, Button[1]);
Top_Wall_Remove_Part("right", PCB_T/2+2.5, 16, USB_C[1]);
// Cutout for Debug Connector
if(Debug_Present) {
Top_Wall_Remove_Part("left", PCB_T/2+6, 7, 28.575);
}
}
PCB_Cutouts_Top_Wall();
}
Screw_Holes_M3();
translate([0, PCB_H/2 + 4, 0]) Bottom_Zip_Cutout(PCB_W/3);
Top_Wall_Screw_Plates(0.5, Spacer_Top_Height + PCB_T/2);
}
}
module Top_Wall_Remove_Part(wall_section, height, length, position)
{
Wall_T = Cover_O/2;
// Wall_XY = 0;
Wall_XY = wall_section == "right" ? +PCB_W/2+Cover_O/2+Wall_T/2 :
wall_section == "left" ? -PCB_W/2-Cover_O/2-Wall_T/2 :
wall_section == "top" ? +PCB_H/2+Cover_O/2+Wall_T/2 :
wall_section == "bottom"? -PCB_H/2-Cover_O/2-Wall_T/2 : 0;
if(wall_section == "right" || wall_section == "left")
{
translate([Wall_XY, position-PCB_H/2, -Wall_T_H/2+height/2 - eps])
cube([10*Wall_T, length, height], center=true);
}
else if(wall_section == "top" || wall_section == "bottom")
{
translate([position-PCB_W/2, Wall_XY, -Wall_T_H/2+height/2 - eps])
cube([length, 10*Wall_T, height], center=true);
}
}
module Top_Wall_Screw_Plates(height, height_offset, cutout=false)
{
Screw_Plate_Size = [
[10, 10, height],
[10, 8, height],
[ 0, 0, 0],
[10, 7, height],
[16, 7, height]
];
Screw_Plate_Offset = [
[-1, +1, height/2 + height_offset],
[+1, +2, height/2 + height_offset],
[ 0, 0, height/2 + height_offset],
[-1, 0, height/2 + height_offset],
[+4, 0, height/2 + height_offset]
];
for (i = [0:4]) {
translate(Mounting_Holes[i])
if(cutout) {
translate(Screw_Plate_Offset[i]) scale([1.1, 1.1, 1]) cube(Screw_Plate_Size[i], center=true);
}
else {
difference() {
translate(Screw_Plate_Offset[i]) roundedBox(Screw_Plate_Size[i], 1, true);
Screw_Drill(Drill_M3);
}
}
}
}
module Bottom_Wall(Alternative)
module Top_Wall_Gallery(gallery_width=1)
{
Wall_H = Alternative == false ? Wall_B_H : Wall_B_H + Cover_B_T;
translate([PCB_W/2, PCB_H/2, -Wall_H/2])
translate([PCB_W/2, PCB_H/2, PCB_T/2 + Spacer_Top_Height -1/2])
difference()
{
roundedBox([PCB_W + 2*Cover_O, PCB_H + 2*Cover_O, 1*Wall_H], 2, true, $fn = $preview ? 32 : 100);
translate([0, 0, Wall_B_H/2-0.001])
cube([PCB_W + 1*Cover_O, PCB_H + 1*Cover_O, 1*Wall_B_H], center=true);
translate([0, 0, -Wall_B_H/2])
cube([PCB_W - 0.0*Cover_O, PCB_H - 0.0*Cover_O, 1*Wall_B_H], center=true);
cube([PCB_W + 1*Cover_O, PCB_H + 1*Cover_O, 1], center=true);
cube([PCB_W + 1*Cover_O - 2*gallery_width, PCB_H + 1*Cover_O - 2*gallery_width, 2], center=true);
}
}
translate([0, PCB_H/2 + 4, -Spacer_Bot_Height - PCB_T/2])
Bottom_Zip_Guide(3);
module Bottom()
{
color([0.8, 0.8, 0.0])
difference()
{
translate([0, 0, -Spacer_Bot_Height - PCB_T/2])
{
difference()
{
translate([0, 0, -Cover_B_T])
union()
{
difference()
{
Bottom_Plate();
translate([PCB_W/2, PCB_H/2, 0]) KandM_14510_Mount(1, true);
}
translate([0, 0, Cover_B_T-eps]) Bottom_Wall(1.0);
translate([PCB_W/2, PCB_H/2, 5.5]) KandM_14510_Mount();
}
translate([0, 0, -Wall_B_H])
Screw_Holes_M3();
translate([0, 0, -Cover_B_T]) mirror([0, 0, 1]) Screw_Pits_M3(1);
}
}
PCB_Cutouts_From_Bottom();
}
}
module Bottom_Wall(plate_transition = 1)
{
translate([PCB_W/2, PCB_H/2, +Wall_B_H/2])
difference()
{
union()
{
for (i = [0:3]) {
// translate([0, 0, -Cover_B_T/2]) translate(Mounting_Holes[i])
// Screw_Area_Cutout(Screw_Area_Cutout_Widths[i], Screw_Area_Cutout_Offsets[i], Cover_B_T/2);
translate([0, 0, -Cover_B_T/2]) Screw_Area_Stripe(Mounting_Holes[i][1], Cover_B_T/2, 1, 1);
}
roundedBox([PCB_W + 2*Cover_O, PCB_H + 2*Cover_O, 1*Wall_B_H], 2, true, $fn = $preview ? 32 : 100);
Bottom_Wall_Add_Part("right" , PCB_T/2 , 9 , Power_Plug[1]-2.4);
Bottom_Wall_Add_Part("right" , PCB_T/2+2.5 , 3 , Button[1]);
Bottom_Wall_Add_Part("right" , PCB_T/2+2.0 , 16 , USB_C[1]);
Bottom_Wall_Add_Part("top" , PCB_T/2 , 10 , MOLEX[0]);
Bottom_Wall_Add_Part("bottom" , 3.2 , 9.5 , Audio_Jack[0]);
// Bottom_Wall_Add_Part("bottom" , PCB_T/2+2.5 , PCB_W-1 , PCB_W/2);
// for (i = MIDI_Plugs) {
// Bottom_Wall_Add_Part("bottom", PCB_T/2+Spacer_Top_Height, 22, i[0]);
// }
}
union()
{
hull()
{
translate([0, 0, +Wall_B_H/2 + plate_transition]) cube([PCB_W + 1*Cover_O, PCB_H + 1*Cover_O, 2*Wall_B_H], center=true);
translate([0, 0, -Wall_B_H/2-eps]) cube([PCB_W + 1*Cover_O - 2*plate_transition , PCB_H + 1*Cover_O - 2*plate_transition, eps], center=true);
}
translate([0, 0, eps-Wall_B_H]) cube([PCB_W + 1*Cover_O - 2*plate_transition , PCB_H + 1*Cover_O - 2*plate_transition, Wall_B_H], center=true);
}
Screw_Holes_M3();
}
// USB Cover
translate([-3*Cover_O/4, 33, PCB_T/2]) cube([Cover_O/2, 9, PCB_T], center=true);
// Strip Cover at the front
Relief_Wall_X = Cable_Relief_Holder[1][0] - Cable_Relief_Holder[0][0] + Screw_Ring_M3_Outer_Diameter-1;
Relief_Wall_Z = 8.5;
translate([Cable_Relief_Holder[0][0], PCB_H, 0])
translate([Relief_Wall_X/2 - Screw_Ring_M3_Outer_Diameter/2 + 0.5, 3*Cover_O/4, Relief_Wall_Z/2]) cube([Relief_Wall_X, Cover_O/2, Relief_Wall_Z], center=true);
// Button Cover
translate([PCB_W + 3*Cover_O/4, Button[1], PCB_T/2]) cube([Cover_O/2, 7, PCB_T], center=true);
// Power Plug Cover
translate([PCB_W + 3*Cover_O/4, Power_Plug[1], PCB_T/2]) cube([Cover_O/2, 9, PCB_T], center=true);
}
module Bottom_Plate(Alternative)
module Bottom_Wall_Add_Part(wall_section, height, length, position)
{
Wall_T = Cover_O/2;
// Wall_XY = 0;
Wall_XY = wall_section == "right" ? +PCB_W/2+Cover_O/2+Wall_T/2 :
wall_section == "left" ? -PCB_W/2-Cover_O/2-Wall_T/2 :
wall_section == "top" ? +PCB_H/2+Cover_O/2+Wall_T/2 :
wall_section == "bottom"? -PCB_H/2-Cover_O/2-Wall_T/2 : 0;
if(wall_section == "right" || wall_section == "left")
{
translate([Wall_XY, position-PCB_H/2, Wall_B_H/2 + height/2 - eps])
cube([Wall_T, length, height], center=true);
}
else if(wall_section == "top" || wall_section == "bottom")
{
translate([position-PCB_W/2, Wall_XY, Wall_B_H/2 + height/2 - eps])
cube([length, Wall_T, height], center=true);
}
}
module Bottom_Plate()
{
translate([PCB_W/2, PCB_H/2, Cover_B_T/2])
if(Alternative == false)
{
roundedBox([PCB_W + 2*Cover_O, PCB_H + 2*Cover_O, Cover_B_T], 2, true, $fn = $preview ? 32 : 100);
}
else
{
roundedBox([PCB_W - 0.25*Cover_O, PCB_H - 0.25*Cover_O, Cover_B_T], 1, true, $fn = $preview ? 32 : 100);
}
}
roundedBox([PCB_W + 2*Cover_O, PCB_H + 2*Cover_O, Cover_B_T], 2, true, $fn = $preview ? 32 : 100);
module Bottom_Zip_Guide(Cube_Height)
{
translate([PCB_W/2, 5, 0])
{
difference()
{
translate([0, -5, Cube_Height/2]) cube([PCB_W + 2*Cover_O, 10, Cube_Height], center=true);
translate([0, -5, -1]) rotate([0, 90, 90]) oval_prism(12, 17.4, 3.5, center=true, $fn = $preview ? 32 : 100);
}
}
}
module Bottom_Zip_Cutout(Center_Offset)
{
Width = 3;
Height = 10;
translate([PCB_W/2 - Center_Offset, 0, 0]) rotate([0,+45, 0]) cube([Width, Height, 100], center=true);
translate([PCB_W/2 + Center_Offset, 0, 0]) rotate([0,-45, 0]) cube([Width, Height, 100], center=true);
}
module MIDI_Plug_Cutout()
@@ -246,8 +316,8 @@ module MIDI_Plug_Arc()
difference() {
translate([0, -eps, 0])
intersection() {
translate([0, 4.5, 0]) MIDI_Plug_Arc_Base(4.5, true);
rotate([0, 90, 0]) oval_prism(20.5, 5, 8, center=true, $fn = $preview ? 32 : 100);
translate([0, 4.3, 0]) MIDI_Plug_Arc_Base(4.3, true);
rotate([0, 90, 0]) oval_prism(20.5, 4, 8, center=true, $fn = $preview ? 32 : 100);
// hull() {
// rotate([ 0, 0, 0]) MIDI_Plug_Arc_Base(0.1);
@@ -274,4 +344,4 @@ module MIDI_Plug_Arc_Base(height, filled)
}
translate([0, -height/2+0.01, -5]) cube([40, 2*height, 10], center=true);
}
}
}