Skip to content

Commit 5ef3b4c

Browse files
author
Felix "xq" Queißner
committed
Adds slider design for PCB holders
1 parent 1703a1f commit 5ef3b4c

5 files changed

Lines changed: 109 additions & 11 deletions

File tree

Hardware/Case/case.scad

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ include <parts/backplane.scad>
1010
include <parts/frontpanel.scad>
1111
include <parts/slot_plate.scad>
1212
include <parts/slot_pcb.scad>
13+
include <parts/pcb_slider.scad>
1314

1415
include <expansions.scad>
1516

1617
HIDE_TOP = true;
1718

18-
baseplate_spread = 41.4;
1919

2020
translate([0,0,-baseplate_spread]) mat_glass() baseplate_mount_plate();
2121

@@ -25,13 +25,13 @@ if(!HIDE_TOP)
2525
}
2626

2727
translate([0,backplane_offset,0]) {
28-
// mat_pcb() xrotate(90) backplane();
28+
mat_pcb() xrotate(90) backplane();
2929

30-
// foreach_slot()
31-
// {
32-
// zadjust = 5;
33-
// translate([slot_pcb_offset,0,-slot_pcb_conn_offset+zadjust]) xrotate(-90) conn_pcie_x4();
34-
// }
30+
foreach_slot()
31+
{
32+
zadjust = 5;
33+
translate([slot_pcb_offset,0,-slot_pcb_conn_offset+zadjust]) xrotate(-90) conn_pcie_x4();
34+
}
3535
translate([0,-0.8,0]) yrotate(180) xrotate(-90) import("../Mechanical Prototype/Backplane/Backplane.stl");
3636
}
3737

@@ -43,8 +43,11 @@ translate([0,169/2,0])
4343
{
4444
// translate([0,-0.8,0]) yrotate(180) xrotate(-90)
4545
translate([slot_pcb_offset-slot_pcb_thickness/2,-slot_plate_thickness/2,0])
46-
zrotate(-90) xrotate(-90) import("../Mechanical Prototype/Expansion Board/Expansion Board.stl");
46+
color("green") zrotate(-90) xrotate(-90) import("../Mechanical Prototype/Expansion Board/Expansion Board.stl");
47+
4748
xcon_slot_plate() xcon_expansion_dummy($i);
49+
50+
color("gray") zmirror() translate([slot_pcb_offset,-slot_pcb_length/2-slot_plate_thickness/2,-baseplate_spread + baseplate_thickness/2]) pcb_slider();
4851

4952
// translate([slot_pcb_offset,-slot_pcb_length/2-slot_plate_thickness/2,0]) mat_pcb() slot_pcb();
5053

Hardware/Case/justfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ render-all: \
66
(render "frontpanel") \
77
(render "slot_plate") \
88
(render "slot_plate_dummy") \
9+
(render "pcb_slider") \
910
(render "slot_pcb") \
1011
(exp-slot "0") \
1112
(exp-slot "1") \

Hardware/Case/parts/baseplate.scad

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use <../lib/common.scad>
22
include <parameters.scad>
3+
include <pcb_slider.scad>
34

45
module baseplate_mount_plate_2d()
56
{
@@ -20,12 +21,31 @@ module baseplate_mount_plate_2d()
2021

2122
translate([0,backplane_offset]) square([backplane_inset_width + backplane_padding, backplane_thickness + backplane_padding], true);
2223

24+
// Cutouts for the pcb_slider mounting points:
25+
26+
translate([0,169/2])
27+
{
28+
foreach_slot()
29+
{
30+
translate([slot_pcb_offset,-slot_pcb_length/2+1]) // TODO: Figure out this "1" here!
31+
{
32+
tdist = pcb_slider_length - 2 * pcb_slider_hole_margin;
33+
hdist = tdist / (pcb_slider_holes-1);
34+
for($i = [0: pcb_slider_holes-1]) {
35+
off = hdist * $i -(pcb_slider_length/2 - pcb_slider_hole_margin);
36+
37+
translate([0,off]) screw_hole_2d(pcb_slider_hole_screw);
38+
}
39+
}
40+
}
41+
}
42+
2343
// Cutouts to fit the case, symmetric on x and y axis:
2444
xymirror2d()
2545
{
2646
// mounting holes:
27-
translate(hole1_dist) circle(d = hole_size);
28-
translate(hole2_dist) circle(d = hole_size);
47+
translate(hole1_dist) circle(d = hole_size, $fn=20);
48+
translate(hole2_dist) circle(d = hole_size, $fn=20);
2949

3050
// corner cutouts:
3151
translate([ x_inset + r_inset, y_inset + r_inset ]) circle(r = r_inset);
@@ -49,3 +69,5 @@ if (RENDER_PART_3D)
4969
{
5070
baseplate_mount_plate();
5171
}
72+
73+
// baseplate_mount_plate_2d();

Hardware/Case/parts/parameters.scad

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ slot_mount_screw_pcb_dist = 6.4; // mm distance from the PCB top
4949
slow_mount_screw_type = UNC_4_40;
5050

5151
// Baseplate
52-
baseplate_thickness = 2.0;
52+
baseplate_thickness = 2.0; // Thickness of the baseplate
53+
baseplate_spread = 41.4; // Distance between "center" and baseplate surface
5354

5455
// Backplane
5556

@@ -64,6 +65,17 @@ backplane_inset_height = 80.5;
6465
// Frontpanel
6566
frontpanel_thickness = 2.0;
6667

68+
// PCB Sliders
69+
70+
pcb_slider_pcb_margin = 0.15;
71+
pcb_slider_height = 6.6; // mm
72+
pcb_slider_width_top = 4; // mm
73+
pcb_slider_width_bot = 5; // mm
74+
pcb_slider_holes = 3;
75+
pcb_slider_hole_margin = 10; // mm
76+
pcb_slider_case_margin = 5; // mm
77+
pcb_slider_hole_screw = M2_5;
78+
6779
// Automation Variables:
6880
RENDER_PART_2D = false;
6981
RENDER_PART_3D = false;
@@ -72,6 +84,14 @@ RENDER_PART_3D = false;
7284

7385
slot_screw_offset = slot_plate_height/2-slot_screw_inset;
7486

87+
pcb_slider_depth = baseplate_spread - baseplate_thickness/2 - slot_pcb_height / 2 - pcb_slider_pcb_margin; // mm
88+
pcb_slider_notch_width_top = slot_pcb_thickness + 4 * pcb_slider_pcb_margin; // mm
89+
pcb_slider_notch_width_bot = slot_pcb_thickness + 2 * pcb_slider_pcb_margin; // mm
90+
pcb_slider_length = slot_pcb_length - 2 * pcb_slider_case_margin; // mm
91+
92+
echo(pcb_slider_depth, pcb_slider_height);
93+
assert(pcb_slider_depth < pcb_slider_height);
94+
7595
// Utility modules
7696

7797
/* Invokes children() once for each slot, offsetted on the X axis, slot center. */
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
include <parameters.scad>
2+
use <../lib/common.scad>
3+
4+
module pcb_slider_2d()
5+
{
6+
size = [ slot_pcb_height, slot_pcb_length ];
7+
8+
h = pcb_slider_height;
9+
hi = pcb_slider_depth; // TODO
10+
wot = pcb_slider_width_top / 2;
11+
wob = pcb_slider_width_bot / 2;
12+
wit = pcb_slider_notch_width_top / 2;
13+
wib = pcb_slider_notch_width_bot / 2;
14+
15+
polygon(points=[
16+
[-wob,0],
17+
[-wot,h],
18+
[-wit,h],
19+
[-wib,hi],
20+
[wib,hi],
21+
[wit,h],
22+
[wot,h],
23+
[wob,0],
24+
]);
25+
}
26+
27+
module pcb_slider()
28+
{
29+
tdist = pcb_slider_length - 2 * pcb_slider_hole_margin;
30+
hdist = tdist / (pcb_slider_holes-1);
31+
32+
render() difference()
33+
{
34+
xrotate(90) linear_extrude(height = pcb_slider_length, center=true) pcb_slider_2d();
35+
union() for($i = [0: pcb_slider_holes-1]) {
36+
off = hdist * $i -(pcb_slider_length/2 - pcb_slider_hole_margin);
37+
38+
translate([0,off,-1]) linear_extrude(height=pcb_slider_depth) screw_shaft_2d(pcb_slider_hole_screw);
39+
}
40+
41+
}
42+
}
43+
44+
if (RENDER_PART_2D)
45+
{
46+
pcb_slider_2d();
47+
}
48+
49+
if (RENDER_PART_3D)
50+
{
51+
pcb_slider();
52+
}

0 commit comments

Comments
 (0)