- Added datasheets of several components / connectors
- Advanced with housing design, but no finished yet
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
use <MCAD/boxes.scad>
|
||||
include <NopSCADlib/core.scad>
|
||||
include <RP2350_MIDI_Lighter_Definition.scad>
|
||||
|
||||
use <MCAD/boxes.scad>
|
||||
include <NopSCADlib/vitamins/pcb.scad>
|
||||
|
||||
|
||||
module PCB()
|
||||
{
|
||||
@@ -16,23 +19,53 @@ module PCB()
|
||||
Screw_Holes_M3();
|
||||
}
|
||||
|
||||
translate([0, 0, PCB_T/2]) translate(Power_Plug) Power_Plug();
|
||||
translate([0, 0, PCB_T/2]) translate(Button) Button();
|
||||
translate([0, 0, PCB_T/2]) translate(Power_Plug) Power_Plug();
|
||||
translate([0, 0, PCB_T/2]) translate(Button) Button();
|
||||
translate([0, 0, PCB_T/2]) translate(USB_C) usb_C(false);
|
||||
translate([0, 0, PCB_T/2]) translate(MOLEX) MOLEX_2x2P(false);
|
||||
translate([0, 0, PCB_T/2]) translate(Audio_Jack) Audio_Jack(false);
|
||||
for (i = MIDI_Plugs) {
|
||||
translate(i) MIDI_Plug_MABPM_5S(false);
|
||||
}
|
||||
// translate([0, 0, PCB_T/2]) translate(Rotary_Encoder) mirror([0, 0, 1]) potentiometer(KY_040_encoder, 1, 10);
|
||||
}
|
||||
|
||||
module PCB_Cutouts_Top()
|
||||
module PCB_Cutouts_Top_Plate()
|
||||
{
|
||||
translate([0, 0, PCB_T/2-0.3]) translate(Power_Plug) Power_Plug_Cutout();
|
||||
translate([0, 0, PCB_T/2-0.5]) translate(Button) Button_Cutout();
|
||||
translate([0, 0, PCB_T/2-0.0]) translate([0, 33, 0]) USB_Cutout();
|
||||
translate([0, 0, PCB_T/2]) translate(USB_C) usb_C(true);
|
||||
translate([0, 0, PCB_T/2-0.3]) translate(Power_Plug) Power_Plug_Cutout();
|
||||
translate([0, 0, PCB_T/2]) translate(Audio_Jack) Audio_Jack(true);
|
||||
translate(MOLEX)
|
||||
translate([0, 10, PCB_T/2+Spacer_Top_Height+Cover_T_T/4-eps]) cube([5, 18, Cover_T_T/2], center=true);
|
||||
|
||||
for (i = MIDI_Plugs) {
|
||||
translate([0, 0, Cover_T_T/2])
|
||||
translate(i)
|
||||
scale([1, 1, 10]) MIDI_Plug_Cutout();
|
||||
}
|
||||
}
|
||||
|
||||
module PCB_Cutouts_Top_Wall()
|
||||
{
|
||||
translate([0, 0, PCB_T/2]) translate(USB_C) usb_C(true);
|
||||
translate([0, 0, PCB_T/2-0.3]) translate(Power_Plug) Power_Plug_Cutout();
|
||||
translate([0, 0, PCB_T/2]) translate(Audio_Jack) Audio_Jack(true);
|
||||
translate(MOLEX)
|
||||
translate([0, 10, PCB_T/2+Spacer_Top_Height+Cover_T_T/4-eps]) cube([5, 18, Cover_T_T/2], center=true);
|
||||
|
||||
for (i = MIDI_Plugs) {
|
||||
translate(i) MIDI_Plug_MABPM_5S(true);
|
||||
}
|
||||
}
|
||||
|
||||
module PCB_Cutouts_From_Bottom()
|
||||
{
|
||||
translate([0, 0, PCB_T/2-0.3 + 09.7]) translate(Power_Plug) Power_Plug_Cutout_For_Bottom();
|
||||
translate([0, 0, PCB_T/2-0.5]) translate(Button) Button_Cutout_For_Bottom();
|
||||
translate([0, 0, 0]) translate([0, 33, 0]) USB_Cutout_Small();
|
||||
translate([0, 0, 0]) translate([0, 33, 0]) Adafruit_QT_Py_Cutout();
|
||||
translate([0, 0, PCB_T/2]) translate(USB_C) usb_C(true);
|
||||
translate([0, 0, PCB_T/2]) translate(Power_Plug) Power_Plug(true);
|
||||
translate([0, 0, PCB_T/2]) translate(Audio_Jack) Audio_Jack(true);
|
||||
for (i = MIDI_Plugs) {
|
||||
translate(i) MIDI_Plug_MABPM_5S(true);
|
||||
}
|
||||
}
|
||||
|
||||
module Screw_Holes_M3()
|
||||
@@ -42,6 +75,14 @@ module Screw_Holes_M3()
|
||||
}
|
||||
}
|
||||
|
||||
module Screw_Pits_M3(depth)
|
||||
{
|
||||
translate([0, 0, -depth])
|
||||
for (i = Mounting_Holes) {
|
||||
translate(i) cylinder(d=Screw_Pit_M3, h=100, center=false, $fn=100);
|
||||
}
|
||||
}
|
||||
|
||||
module Screw_Rings_M3()
|
||||
{
|
||||
for (i = Mounting_Holes) {
|
||||
@@ -113,8 +154,10 @@ module Button_Cutout_For_Bottom()
|
||||
cube([3*Button_X, 3.5, 3.5], center=true);
|
||||
}
|
||||
|
||||
module Power_Plug()
|
||||
module Power_Plug(cutout = false)
|
||||
{
|
||||
Scale_Cube = cutout == true ? [2, 1.1, 1] : [1, 1, 1];
|
||||
|
||||
color([0.1, 0.1, 0.1])
|
||||
translate([10.625, -2.4, 0])
|
||||
difference()
|
||||
@@ -122,14 +165,18 @@ module Power_Plug()
|
||||
translate([-3.5, 0, 0])
|
||||
union()
|
||||
{
|
||||
scale(Scale_Cube)
|
||||
translate([3.5/2, 0, 11/2]) cube([ 3.5, 9, 11.0], center=true);
|
||||
translate([-10.9/2, 0, 6.4/2]) cube([10.9, 9, 6.4], center=true);
|
||||
translate([-10.9/2, 0, 6.4]) rotate([0, 90, 0]) cylinder(h=10.9, d=9, center=true, $fn=60);
|
||||
}
|
||||
|
||||
translate([-9.2/2, 0, 6.4])
|
||||
rotate([0, 90, 0])
|
||||
cylinder(h=9.2+1, d=6.3, center=true, $fn=60);
|
||||
if(cutout == false)
|
||||
{
|
||||
translate([-9.2/2, 0, 6.4])
|
||||
rotate([0, 90, 0])
|
||||
cylinder(h=9.2+1, d=6.3, center=true, $fn=60);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,8 +189,16 @@ module Power_Plug_Cutout()
|
||||
Plug_X = 30;
|
||||
Plug_Z = 20;
|
||||
|
||||
translate([+Plug_X/2-Plug_D+5.08, -2.4, -Plug_Z/2 + Plug_H])
|
||||
cube([Plug_X, Plug_W, Plug_Z], center=true);
|
||||
// #translate([0, -2.4, -Plug_Z/2 + Plug_H])
|
||||
// cube([Plug_X, Plug_W, Plug_Z], center=true);
|
||||
|
||||
translate([0, 0, 0.5])
|
||||
translate([10.625, -2.4, 0])
|
||||
translate([-3.5, 0, 0])
|
||||
{
|
||||
translate([3.5/2, 0, 11/2-4/2]) scale([1.2, 1.2, 1.0]) cube([ 3.5, 9, 11.0+4], center=true);
|
||||
translate([-10.9/2, 0, 6.4]) scale([1.0, 1.5, 1.023]) rotate([0, 90, 0]) cylinder(h=10.9, d=9, center=true, $fn=60);
|
||||
}
|
||||
}
|
||||
|
||||
module Power_Plug_Cutout_For_Bottom()
|
||||
@@ -163,46 +218,136 @@ module Power_Plug_Cutout_For_Bottom()
|
||||
cylinder(d=11, h=Plug_X, center=true, $fn=60);
|
||||
}
|
||||
|
||||
module USB_Cutout()
|
||||
module MOLEX_2x2P(cutout = false)
|
||||
{
|
||||
USB_H = 3.2;
|
||||
USB_W = 9;
|
||||
USB_D = 22;
|
||||
|
||||
USB_Y = 9.5;
|
||||
USB_Z = 20;
|
||||
|
||||
|
||||
PCB_H = 1.6;
|
||||
PCB_W = 18;
|
||||
PCB_D = 22;
|
||||
if(cutout == false)
|
||||
{
|
||||
color([0.76, 0.76, 0.76])
|
||||
{
|
||||
translate([-1.5, -1.5, -3.18]) rotate([0, 0, 45]) cylinder(d=1.02, h=8.7, center=false, $fn=4);
|
||||
translate([+1.5, -1.5, -3.18]) rotate([0, 0, 45]) cylinder(d=1.02, h=8.7, center=false, $fn=4);
|
||||
|
||||
PCB_X = 40;
|
||||
PCB_Z = 5;
|
||||
|
||||
translate([0, 0, -USB_Z/2 + PCB_H + USB_H - 0.5]) cube([USB_D, USB_Y, USB_Z], center=true);
|
||||
// translate([-PCB_X/2+PCB_D, 0, -PCB_Z/2 + PCB_H]) cube([PCB_X, PCB_W, PCB_Z], center=true);
|
||||
translate([-1.5, -1.5, 8.7-3.18-0.7*1.02/2]) rotate([-90, 45, 0]) cylinder(d=1.02, h=10, center=false, $fn=4);
|
||||
translate([+1.5, -1.5, 8.7-3.18-0.7*1.02/2]) rotate([-90, 45, 0]) cylinder(d=1.02, h=10, center=false, $fn=4);
|
||||
|
||||
translate([-1.5, +1.5, -3.18]) rotate([0, 0, 45]) cylinder(d=1.02, h=3.18, center=false, $fn=4);
|
||||
translate([+1.5, +1.5, -3.18]) rotate([0, 0, 45]) cylinder(d=1.02, h=3.18, center=false, $fn=4);
|
||||
|
||||
translate([-1.5, +1.5, 7.4/2 - 1.25-0.3]) rotate([-90, 45, 0]) cylinder(d=1.02, h=10-3, center=false, $fn=4);
|
||||
translate([+1.5, +1.5, 7.4/2 - 1.25-0.3]) rotate([-90, 45, 0]) cylinder(d=1.02, h=10-3, center=false, $fn=4);
|
||||
}
|
||||
}
|
||||
|
||||
color([0.2, 0.2, 0.2])
|
||||
difference()
|
||||
{
|
||||
union()
|
||||
{
|
||||
if(cutout == false)
|
||||
{
|
||||
translate([0, +5.82, -3.18]) rotate([0, 0, 45]) cylinder(d=3.2, h=3.18, center=false, $fn = $preview ? 32 : 100);
|
||||
}
|
||||
translate([0, +7.57/2+0.828, 7.4/2]) cube([10.1 , 7.57, 7.4], center=true);
|
||||
translate([0, +7.57+0.828 + 1.28/2, 7.4/2]) cube([ 9.75, 1.28, 7.4], center=true);
|
||||
|
||||
translate([0, +7.57+0.828 + 1.28, 7.4/2]) hull()
|
||||
{
|
||||
translate([0, 0, 0]) cube([ 9.75, 0.01, 7.4], center=true);
|
||||
translate([0, 1.3, 0]) cube([ 7.15, 0.01, 7.4], center=true);
|
||||
}
|
||||
|
||||
}
|
||||
if(cutout == false)
|
||||
{
|
||||
translate([0, 10, 7.4/2])
|
||||
for (i = [-1:2:1])
|
||||
{
|
||||
for (j = [-1:2:1])
|
||||
{
|
||||
translate([i*(2.5/2 + 0.3), 0, j*(2.5/2 + 0.3)]) cube([2.5, 7, 2.5], center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module USB_Cutout_Small()
|
||||
module Audio_Jack(cutout = false)
|
||||
{
|
||||
USB_H = 3.2;
|
||||
USB_W = 9;
|
||||
USB_D = 22;
|
||||
|
||||
USB_Y = 9.5;
|
||||
USB_Z = 3.5;
|
||||
|
||||
|
||||
PCB_H = 1.6;
|
||||
PCB_W = 18;
|
||||
PCB_D = 22;
|
||||
color([0.2, 0.2, 0.2])
|
||||
difference()
|
||||
{
|
||||
union()
|
||||
{
|
||||
translate([0, -11.5/2+4.25, 5.2/2]) cube([6.5, 11.5, 5.2], center=true);
|
||||
translate([0, -4.25-2.5, 5/2])
|
||||
rotate([90, 0, 0]) cylinder(d=5, h=2.5, center=false);
|
||||
}
|
||||
|
||||
PCB_X = 40;
|
||||
PCB_Z = 5;
|
||||
|
||||
translate([0, 0.5, USB_Z/2 + PCB_H + 1.0])
|
||||
rotate([0, 90, 0])
|
||||
roundedBox([USB_Z, USB_Y, USB_D], 1, true, $fn = $preview ? 32 : 100);
|
||||
// cube([USB_D, USB_Y, USB_Z], center=true);
|
||||
translate([0, -4.25+8, 5/2])
|
||||
rotate([90, 0, 0]) cylinder(d=3.6, h=20, center=false);
|
||||
}
|
||||
|
||||
if(cutout == true)
|
||||
{
|
||||
translate([0, -4.25+8, 5/2])
|
||||
rotate([90, 0, 0]) cylinder(d=5, h=20, center=false);
|
||||
}
|
||||
}
|
||||
|
||||
module MIDI_Plug_MABPM_5S(cutout = false)
|
||||
{
|
||||
color([0.76, 0.76, 0.76])
|
||||
{
|
||||
translate([+0.0, +0.0, -4.2]) rotate([0, 0, 45]) cylinder(d=1.4, h=8.2, center=false, $fn=4);
|
||||
translate([+5.0, +2.5, -4.2]) rotate([0, 0, 45]) cylinder(d=1.4, h=8.2, center=false, $fn=4);
|
||||
translate([-5.0, +2.5, -4.2]) rotate([0, 0, 45]) cylinder(d=1.4, h=8.2, center=false, $fn=4);
|
||||
translate([+7.5, +0.0, -4.2]) rotate([0, 0, 45]) cylinder(d=1.4, h=8.2, center=false, $fn=4);
|
||||
translate([-7.5, +0.0, -4.2]) rotate([0, 0, 45]) cylinder(d=1.4, h=8.2, center=false, $fn=4);
|
||||
|
||||
translate([+5.0, -10.0, -4.2]) rotate([0, 0, 45]) cylinder(d=1.4, h=4.2, center=false, $fn=4);
|
||||
translate([-5.0, -10.0, -4.2]) rotate([0, 0, 45]) cylinder(d=1.4, h=4.2, center=false, $fn=4);
|
||||
}
|
||||
|
||||
difference()
|
||||
{
|
||||
union()
|
||||
{
|
||||
color([0.2, 0.2, 0.2])
|
||||
{
|
||||
translate([0, -5, 10.2/2]) cube([18, 10, 10.2], center=true);
|
||||
translate([0, -5, 10.2]) rotate([90, 0, 0]) cylinder(h=10, d=15.7, center=true, $fn = $preview ? 32 : 100);
|
||||
translate([+0.5, -0.5-10-0, 20.35/2]) cube([19.5, 1.0, 20.35], center=true);
|
||||
translate([-0.5, -0.5-10-1, 20.35/2]) cube([19.5, 1.0, 20.35], center=true);
|
||||
}
|
||||
color([0.76, 0.76, 0.76])
|
||||
difference()
|
||||
{
|
||||
translate([0, -0.1/2-10-2-eps, 20.35/2]) cube([18, 0.1, 20.35], center=true);
|
||||
translate([0, -10-2, 20.35/2]) rotate([90, 0, 0]) cylinder(h=5, d=14, center=true, $fn = $preview ? 32 : 100);
|
||||
}
|
||||
}
|
||||
|
||||
union()
|
||||
{
|
||||
translate([0, -10-2, 20.35/2])
|
||||
rotate([90, 0, 0])
|
||||
difference()
|
||||
{
|
||||
cylinder(h= 5, d=13.60, center=true, $fn = $preview ? 32 : 100);
|
||||
cylinder(h=10, d=11.44, center=true, $fn = $preview ? 32 : 100);
|
||||
}
|
||||
|
||||
translate([0, 0, 15.0]) cube([2.5, 100, 2], center=true);
|
||||
translate([0, 100/2-10+eps, 17.0]) cube([2.5, 100, 4], center=true);
|
||||
}
|
||||
}
|
||||
|
||||
if(cutout == true)
|
||||
{
|
||||
union()
|
||||
{
|
||||
translate([0, -10-2, 20.35/2]) rotate([90, 0, 0]) cylinder(h=50, d=18, center=true, $fn = $preview ? 32 : 100);
|
||||
translate([0, -10-2, 20.35/2+9]) cube([18, 50, 18], center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user