-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRaspberryPi.scad
More file actions
147 lines (123 loc) · 3.23 KB
/
RaspberryPi.scad
File metadata and controls
147 lines (123 loc) · 3.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
include <BOSL2/std.scad>
SMIDGEN = 0.01;
$fn = 50;
pi_corner_radius = 3;
pi_board_x = 85;
pi_board_y = 56;
pi_board_z = 1.5;
pi_hole_diameter = 2.75;
pi_hole_from_left = 3.5;
pi_hole_distance_x = 58;
pi_hole_distance_y = 49;
pi_standoff_diameter = 6.5;
module pi_board() {
color("green")
cuboid([pi_board_x, pi_board_y, pi_board_z], rounding=pi_corner_radius, edges=[FRONT + LEFT, FRONT + RIGHT, BACK + LEFT, BACK + RIGHT], anchor=BOTTOM);
}
module pi_holes() {
left((pi_board_x - pi_hole_distance_x) / 2 - pi_hole_from_left) {
ycopies(spacing=pi_hole_distance_y, n=2) {
xcopies(spacing=pi_hole_distance_x, n=2) {
down(SMIDGEN) {
cyl(d=pi_hole_diameter, h=pi_board_z + 2 * SMIDGEN, anchor=BOTTOM);
up(pi_board_z + 2 * SMIDGEN) cyl(d=pi_standoff_diameter, h=pi_board_z / 5, anchor=TOP);
}
}
}
}
}
ethernet_cube_x = 21;
ethernet_cube_y = 16;
ethernet_cube_z = 13.5;
usb_cube_x = 17;
usb_cube_y = 13;
usb_cube_z = 16;
hdmi_socket_x = 15;
hdmi_socket_y = 10.5;
hdmi_socket_z = 6.5;
power_socket_x = 7.6;
power_socket_y = 5.5;
power_socket_z = 3;
sd_holder_x = 15.5;
sd_holder_y = 12;
sd_holder_z = 1.5;
sd_card_overhang = 3.5;
headers_x = pi_hole_distance_x - 2 * 3.5 - 1;
headers_y = 6;
headers_z = 8.5;
headers_pin_length = 5;
headers_from_left = 2 * 3.5 + 1;
module pins() {
color("gold")
up(headers_z - headers_pin_length)
ycopies(spacing=2.54, n=2)
xcopies(spacing=2.54, n=20)
cuboid([0.6, 0.6, headers_pin_length], anchor=BOTTOM);
}
module headers() {
color("darkgray")
up(pi_board_z)
cuboid([headers_x, headers_y, headers_z - headers_pin_length], anchor=BOTTOM);
pins();
}
module ethernet_cube() {
color("silver")
up(pi_board_z)
cuboid([ethernet_cube_x, ethernet_cube_y, ethernet_cube_z], anchor=BOTTOM);
}
module usb_cube() {
color("silver")
up(pi_board_z)
cuboid([usb_cube_x, usb_cube_y, usb_cube_z], anchor=BOTTOM);
}
module hdmi_socket() {
color("silver")
up(pi_board_z)
cuboid([hdmi_socket_x, hdmi_socket_y, hdmi_socket_z], anchor=BOTTOM);
}
module power_socket() {
color("silver")
up(pi_board_z)
cuboid([power_socket_x, power_socket_y, power_socket_z], anchor=BOTTOM);
}
module sd_holder() {
color("silver")
cuboid([sd_holder_x, sd_holder_y, sd_holder_z], anchor=TOP);
}
module pi_3bplus_components() {
cube_overhang = 3;
hdmi_overhang = 3;
power_overhang = 1.5;
right(pi_board_x / 2 - ethernet_cube_x / 2 + cube_overhang) {
fwd(pi_board_y / 2 - 10.25)
ethernet_cube();
}
right(pi_board_x / 2 - usb_cube_x / 2 + cube_overhang) {
fwd(pi_board_y / 2 - 29) usb_cube();
fwd(pi_board_y / 2 - 47) usb_cube();
}
left(pi_board_x / 2 - 32) {
fwd(pi_board_y / 2 - hdmi_socket_y / 2 + hdmi_overhang)
hdmi_socket();
}
left(pi_board_x / 2 - 10.6) {
fwd(pi_board_y / 2 - power_socket_y / 2 + power_overhang)
power_socket();
}
left(pi_board_x / 2 - sd_holder_x / 2 + sd_card_overhang) {
sd_holder();
}
back(pi_board_y / 2 - headers_y / 2 - 1)
left(pi_board_x / 2 - headers_x / 2 - headers_from_left) {
headers();
}
}
module pi_3bplus() {
difference() {
union() {
pi_board();
pi_3bplus_components();
}
pi_holes();
}
}