-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathenclosure.scad
More file actions
238 lines (204 loc) · 6.47 KB
/
enclosure.scad
File metadata and controls
238 lines (204 loc) · 6.47 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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
$fn=60;
// Catalex 7 segement display
QUAD7_W=42;
QUAD7_H=24;
QUAD7_T=1;
QUAD7_DW=30;
QUAD7_DH=14;
QUAD7_DT=8;
QUAD7_HD=2;
QUAD7_HW=37.5;
QUAD7_HH=19.5;
QUAD7_HO=QUAD7_HD/2+1;
QUAD7_H_ASSYM=1;
showdev=0;
studs=0;
version="v1.05";
// Two sizes possible -- outside dimensions
//
box_h= 98; box_w = 68; // 98 x 68 x 48mm
// box_h=115; box_w = 90; // 115 x 90 x 55mm
box_t=2; // thickness walls
box_space=1.5; // space between the walls; as they are not that straight.
/*
v1.01 white print 15/10/2021 for box with transparant cover.
v1.02 scanner 1mm lower, whole plate 2mm lower, rfid pillars narrower
pins display 0.5 mm to the inside in all directions. display
display mm shifted to right for connector assymetry. text deeper
and bolder.
v1.03 Standoffs 2mm shorter.
v1.04 Lowered main board by 2mm to prevent shorting 7x4 display
pins (Issue #2). Removed unused mid studs. Wider tiewrap
holes for stud (Issue #3).
v1.05 flag for the 'larger' boxes; not yet correct.
*/
module quad_holes(r=QUAD7_HD/2,h=10,top=1) {
r2=r; r1=r*top;
translate([QUAD7_HO,QUAD7_HO,-0.01]) cylinder(r2=r2,r1=r1,h=h);
translate([QUAD7_W-QUAD7_HO,QUAD7_HO,-0.01]) cylinder(r2=r2,r1=r1,h=h);
translate([QUAD7_W-QUAD7_HO,QUAD7_H-QUAD7_HO,-0.01]) cylinder(r2=r2,r1=r1,h=h);
translate([QUAD7_HO,QUAD7_H-QUAD7_HO,-0.01]) cylinder(r2=r2,r1=r1,h=h);
};
module quad() {
union() {
difference() {
color([0,0,0.6]) cube([QUAD7_W,QUAD7_H,QUAD7_T]);
quad_holes();
}
translate([(QUAD7_W-QUAD7_DW)/2, (QUAD7_H-QUAD7_DH)/2,QUAD7_T])
color([1,1,1]) cube([QUAD7_DW,QUAD7_DH,QUAD7_DT]);
translate([(QUAD7_W-QUAD7_DW)/2, (QUAD7_H-QUAD7_DH)/2,QUAD7_T+QUAD7_DT])
color([0,0,0]) cube([QUAD7_DW,QUAD7_DH,0.01]);
};
};
module display(h=10) {
translate([-QUAD7_W/2+QUAD7_H_ASSYM,-QUAD7_H/2,-(QUAD7_T+QUAD7_DT)]) {
if (showdev>0) quad();
translate([0,0,-h+4]) quad_holes(QUAD7_HD/2,h);
translate([0,0,-h]) quad_holes(QUAD7_HD/2+0.5,h,1.6);
};
};
RC_H=59.5;
RC_W=39.5;
RC_T=1;
RC_HD=3.2;
RC_HW1=24.5; // top
RC_HW2=34.0; // near connector
RC_HH12=37.0; // between conectors.
RC_HT=5.0; // center to the top..
module rc_holes(r=RC_HD/2,h=10,top=1) {
r2=r; r1=r*top;
translate([(RC_W-RC_HW1)/2,RC_H-RC_HT,-0.01])
cylinder(r2=r2,r1=r1,h=h);
translate([(RC_W+RC_HW1)/2,RC_H-RC_HT,-0.01])
cylinder(r2=r2,r1=r1,h=h);
translate([(RC_W-RC_HW2)/2,RC_H-RC_HT-RC_HH12,-0.01])
cylinder(r2=r2,r1=r1,h=h);
translate([(RC_W+RC_HW2)/2,RC_H-RC_HT-RC_HH12,-0.01])
cylinder(r2=r2,r1=r1,h=h);
};
module rc() {
union() {
difference() {
color([0,0,0.6]) cube([RC_W,RC_H,RC_T]);
rc_holes();
}
};
};
module rfidall(h=10) {
translate([-RC_W/2,-RC_H/2,-RC_T]) {
if (showdev>0) rc();
translate([0,0,-h+4]) rc_holes(RC_HD/2,h);
translate([0,0,-h]) rc_holes(RC_HD/2+0.5,h,1.25);
};
};
WR_H=52; // WROOM_DEVKIT 1.1
WR_H2=56; // ++ version
WR_W=28.5;
WR_HD=2.75;
WR_T=3;
WR_HO=(WR_W-23)/2;
module wroom_holes(r=WR_HD/2,h=10) {
translate([WR_HO,WR_HO,-0.01]) cylinder(r=r,h=h);
translate([WR_W-WR_HO,WR_HO,-0.01]) cylinder(r=r,h=h);
translate([WR_W-WR_HO,WR_H-WR_HO,-0.01]) cylinder(r=r,h=h);
translate([WR_HO,WR_H-WR_HO,-0.01]) cylinder(r=r,h=h);
// for the large version
translate([WR_W-WR_HO,WR_H2-WR_HO,-0.01]) cylinder(r=r,h=h);
translate([WR_HO,WR_H2-WR_HO,-0.01]) cylinder(r=r,h=h);
};
module wroom() {
union() {
difference() {
color([0,0,0.6]) cube([WR_W,WR_H,WR_T]);
wroom_holes();
}
};
};
module wroom_all(h=10) {
translate([-WR_W/2,-WR_H/2,-WR_T]) {
if (showdev>0) wroom();
translate([0,0,-h+4]) wroom_holes(WR_HD/2,h);
translate([0,0,-h]) wroom_holes(WR_HD/2+0.5,h);
};
};
MB_W=box_w-box_t*2-box_space*2;
MB_H=box_h-box_t*2-box_space*2;
MB_T=2;
MB_P=45;
MB_V=80;
MB_HH=2;
MB_I=10;
MB_STUD=6.5;
module mb_pins(r=MB_HH/2,h=MB_T+0.01) {
translate([(MB_W-MB_P)/2,(MB_H-MB_P)/2,0]) {
translate([0,0,-0.01]) cylinder(r=r,h=h);
translate([MB_P,0,-0.01]) cylinder(r=r,h=h);
translate([MB_P,MB_P,-0.01]) cylinder(r=r,h=h);
translate([0,MB_P,-0.01]) cylinder(r=r,h=h);
};
if (0) translate([(MB_W)/2,(MB_H-MB_V)/2,0]) {
translate([0,0,-0.01]) cylinder(r=r,h=h);
translate([0,MB_V,-0.01]) cylinder(r=r,h=h);
};
};
// Mounting board
module mb(h=10) {
difference() {
union() {
cube([MB_W,MB_H,MB_T]);
if (studs) translate([0,0,-h]) mb_pins(MB_STUD/2, h=h);
}
translate([0,0,-0.1]) cylinder(r=MB_I,h=MB_T+1);
translate([MB_W,0,-0.1]) cylinder(r=MB_I,h=MB_T+1);
translate([MB_W,MB_H,-0.1]) cylinder(r=MB_I,h=MB_T+1);
translate([0,MB_H,-0.01]) cylinder(r=MB_I,h=MB_T+1);
// drill holes
translate([0,0,-h-2]) mb_pins(MB_HH/2, h=h+5);
// wire hole
translate([MB_W/2,MB_H-15,-0.01]) cylinder(r=5,h=3);
// tiewrap holes
translate([MB_W/2-10,MB_H-48,-0.01]) cylinder(r=2,h=3);
translate([MB_W/2+10,MB_H-48,-0.01]) cylinder(r=2,h=3);
translate([MB_W/2-5,MB_H-73,-0.01]) cylinder(r=2,h=3);
translate([MB_W/2+5,MB_H-73,-0.01]) cylinder(r=2,h=3);
translate([MB_W/2,MB_H-30,-0.4+MB_T])
linear_extrude(height = 1)
text(version,halign="center", valign="center",size=8,font="Gill Sans:style=Bold");
};
translate([MB_W/2,MB_H-53,-0.1+MB_T])
linear_extrude(height = 0.5)
text("makerspaceleiden.nl",halign="center", valign="center",
size=3,font="Gill Sans:style=Bold");
translate([MB_W/2,MB_H-58,-0.1+MB_T])
linear_extrude(height = 0.5)
text("2021-10-15 / paymentnode",halign="center", valign="center",
size=2.5, font="Gill Sans:style=Bold");
if (studs == 0) {
translate([-70,0,0]) {
difference() {
mb_pins(MB_STUD/2, h=h);
translate([0,0,-5]) mb_pins(MB_HH/2, h=h+10);
};
};
};
};
module mountingboard(h=10) {
translate([-MB_W/2,-MB_H/2,0]) {
mb(h);
// translate([0,0,-h+4]) mb_pins(WR_HD/2,h);
// translate([0,0,-h]) mb_pins(WR_HD/2+0.5,h);
};
};
PH=16; // package height/highest board.
IH=40; // insighed height
translate([0,0,IH])
display(PH-3);
translate([0,40,IH-QUAD7_DT+3])
rfidall(PH+QUAD7_DT-8);
translate([0,9,IH-12])
wroom_all(PH-9);
translate([0,28,IH-PH-8])
mountingboard(IH-PH-8);
if (showdev==2)
translate([-2,-22,0]) cube([5,5,IH]);