|
@@ -0,0 +1,544 @@
|
|
1
|
+// sparkfun 20x4 serial lcd
|
|
2
|
+lcd_pcb_width = 105;
|
|
3
|
+lcd_pcb_depth = 60;
|
|
4
|
+lcd_pcb_height = 1.6;
|
|
5
|
+lcd_bezel_width = 87.5;
|
|
6
|
+lcd_bezel_depth = 41.85;
|
|
7
|
+lcd_bezel_height = 9.4;
|
|
8
|
+lcd_bezel_off_x = 5.4;
|
|
9
|
+lcd_bezel_off_y = 9.05;
|
|
10
|
+lcd_hole_dia = 2.9;
|
|
11
|
+lcd_hole_off = 2.5;
|
|
12
|
+lcd_hole_dist_x = 95.75 - lcd_hole_dia;
|
|
13
|
+lcd_hole_dist_y = 58 - lcd_hole_dia;
|
|
14
|
+lcd_negative_dist = 2.0;
|
|
15
|
+lcd_spacer_height = 3;
|
|
16
|
+lcd_spacer_dia = lcd_hole_dia + 5.0;
|
|
17
|
+lcd_spacer_hole_dia = lcd_hole_dia + 0.3;
|
|
18
|
+
|
|
19
|
+lcd_negative_width = lcd_bezel_width + lcd_negative_dist;
|
|
20
|
+lcd_negative_depth = lcd_bezel_depth + lcd_negative_dist;
|
|
21
|
+lcd_negative_off_x = lcd_bezel_off_x - (lcd_negative_width - lcd_bezel_width) / 2;
|
|
22
|
+lcd_negative_off_y = lcd_bezel_off_y - (lcd_negative_depth - lcd_bezel_depth) / 2;
|
|
23
|
+
|
|
24
|
+keypad_base_width = 51.2;
|
|
25
|
+keypad_base_depth = 64.1;
|
|
26
|
+keypad_base_height = 3.1;
|
|
27
|
+keypad_top_width = 46.0;
|
|
28
|
+keypad_top_depth = 57.3;
|
|
29
|
+keypad_top_height = 5.2;
|
|
30
|
+keypad_top_off_x = 2.5;
|
|
31
|
+keypad_top_off_y = 3.4;
|
|
32
|
+keypad_hole_dia = 2.7;
|
|
33
|
+keypad_hole_off_x = 1.45 + keypad_hole_dia / 2;
|
|
34
|
+keypad_hole_off_y = 1.35 + keypad_hole_dia / 2;
|
|
35
|
+keypad_hole_dist_x = 48.9 - keypad_hole_dia;
|
|
36
|
+keypad_hole_dist_y = 61.4 - keypad_hole_dia;
|
|
37
|
+keypad_negative_dist = 1.0;
|
|
38
|
+keypad_spacer_dia = keypad_hole_dia + 2.0;
|
|
39
|
+keypad_spacer_hole_dia = keypad_hole_dia;
|
|
40
|
+keypad_spacer_height = 0; // TODO too big and not needed
|
|
41
|
+
|
|
42
|
+voltmeter_width = 22.85;
|
|
43
|
+voltmeter_depth = 11.1;
|
|
44
|
+voltmeter_height = 1.0;
|
|
45
|
+voltmeter_display_height = 6.4;
|
|
46
|
+voltmeter_tab_width = 3.65;
|
|
47
|
+voltmeter_tab_depth = 4.4;
|
|
48
|
+voltmeter_hole_dia = 2.25;
|
|
49
|
+voltmeter_spacer_hole_dia = voltmeter_hole_dia;
|
|
50
|
+voltmeter_negative_add = 0.5;
|
|
51
|
+
|
|
52
|
+voltmeter_off_x = 15;
|
|
53
|
+voltmeter_off_y = 6;
|
|
54
|
+voltmeter_dist = voltmeter_depth + 2;
|
|
55
|
+
|
|
56
|
+switch_width = 18.2;
|
|
57
|
+switch_depth = 11.5;
|
|
58
|
+switch_height = 11.0;
|
|
59
|
+switch_top_width = 20.8;
|
|
60
|
+switch_top_depth = 14.8;
|
|
61
|
+switch_top_height = 2.1;
|
|
62
|
+switch_off_x = 18;
|
|
63
|
+switch_off_y = 3;
|
|
64
|
+switch_add_negative = 1.0;
|
|
65
|
+
|
|
66
|
+mount_dist = 5;
|
|
67
|
+mount_support_prism = 10;
|
|
68
|
+mount_width = lcd_pcb_width + mount_dist;
|
|
69
|
+mount_depth = lcd_pcb_depth + keypad_base_depth + mount_dist * 2 + mount_support_prism;
|
|
70
|
+mount_height = 5;
|
|
71
|
+mount_support_usable_depth = 15;
|
|
72
|
+mount_support_depth = mount_height + mount_support_prism + mount_support_usable_depth;
|
|
73
|
+mount_hole_dia = 4.3;
|
|
74
|
+mount_hole_off = 30;
|
|
75
|
+
|
|
76
|
+wall = 5;
|
|
77
|
+wall_hole = 4.3;
|
|
78
|
+wall_prism = 5;
|
|
79
|
+wall_height = 30;
|
|
80
|
+wall_mount_off_x = 1;
|
|
81
|
+wall_mount_off_y = 1;
|
|
82
|
+wall_width = mount_width + wall + wall_prism + wall_mount_off_x;
|
|
83
|
+wall_depth = mount_support_depth + wall + wall_mount_off_y;
|
|
84
|
+
|
|
85
|
+text_bottom = "Gieß-o-mat";
|
|
86
|
+text_bottom_font = "Liberation Sans:style=Bold";
|
|
87
|
+text_bottom_h = 10;
|
|
88
|
+text_bottom_d = 0.5;
|
|
89
|
+text_bottom_off = 3.5;
|
|
90
|
+text_bottom_spacing = 1.3;
|
|
91
|
+
|
|
92
|
+text_side = "xythobuz";
|
|
93
|
+text_side_font = "Liberation Sans:style=Bold";
|
|
94
|
+text_side_h = 7;
|
|
95
|
+text_side_d = 0.5;
|
|
96
|
+text_side_off = 4.2;
|
|
97
|
+text_side_spacing = 1.0;
|
|
98
|
+
|
|
99
|
+voltmeter_text_left_1 = "Co";
|
|
100
|
+voltmeter_text_left_2 = "Va";
|
|
101
|
+voltmeter_text_left_3 = "Re";
|
|
102
|
+voltmeter_text_left_4 = "Pu";
|
|
103
|
+voltmeter_text_left_font = "Liberation Sans:style=Bold";
|
|
104
|
+voltmeter_text_left_h = 8;
|
|
105
|
+voltmeter_text_left_d = 0.5;
|
|
106
|
+voltmeter_text_left_off_x = 11.5;
|
|
107
|
+voltmeter_text_left_off_y = 1.5;
|
|
108
|
+voltmeter_text_left_spacing = 1.0;
|
|
109
|
+
|
|
110
|
+voltmeter_text_right = "V";
|
|
111
|
+voltmeter_text_right_font = "Liberation Sans:style=Bold";
|
|
112
|
+voltmeter_text_right_h = 8;
|
|
113
|
+voltmeter_text_right_d = 0.5;
|
|
114
|
+voltmeter_text_right_off_x = 4.4;
|
|
115
|
+voltmeter_text_right_off_y = 1.5;
|
|
116
|
+voltmeter_text_right_spacing = 1.0;
|
|
117
|
+
|
|
118
|
+switch_text_left = "Off";
|
|
119
|
+switch_text_right = "On";
|
|
120
|
+switch_text_font = "Liberation Sans:style=Bold";
|
|
121
|
+switch_text_h = 6.5;
|
|
122
|
+switch_text_d = 0.5;
|
|
123
|
+switch_text_off_x = 10.5;
|
|
124
|
+switch_text_off_y = 2.5;
|
|
125
|
+switch_text_dist_x = switch_top_width + 16.0;
|
|
126
|
+switch_text_spacing = 1.0;
|
|
127
|
+
|
|
128
|
+$fn = 42;
|
|
129
|
+
|
|
130
|
+module prism(l, w, h) {
|
|
131
|
+ polyhedron(
|
|
132
|
+ points = [[0,0,0], [l,0,0], [l,w,0], [0,w,0], [0,w,h], [l,w,h]],
|
|
133
|
+ faces = [[0,1,2,3],[5,4,3,2],[0,4,5,1],[0,3,4],[5,2,1]]
|
|
134
|
+ );
|
|
135
|
+}
|
|
136
|
+
|
|
137
|
+module spacer(do, di, h) {
|
|
138
|
+ difference() {
|
|
139
|
+ cylinder(d = do, h = h);
|
|
140
|
+
|
|
141
|
+ translate([0, 0, -1])
|
|
142
|
+ cylinder(d = di, h = h + 2);
|
|
143
|
+ }
|
|
144
|
+}
|
|
145
|
+
|
|
146
|
+module lcd() {
|
|
147
|
+ difference() {
|
|
148
|
+ cube([lcd_pcb_width, lcd_pcb_depth, lcd_pcb_height]);
|
|
149
|
+
|
|
150
|
+ translate([lcd_hole_off, lcd_hole_off, -1])
|
|
151
|
+ cylinder(d = lcd_hole_dia, h = lcd_pcb_height + 2);
|
|
152
|
+
|
|
153
|
+ translate([lcd_hole_off + lcd_hole_dist_x, lcd_hole_off, -1])
|
|
154
|
+ cylinder(d = lcd_hole_dia, h = lcd_pcb_height + 2);
|
|
155
|
+
|
|
156
|
+ translate([lcd_hole_off, lcd_hole_off + lcd_hole_dist_y, -1])
|
|
157
|
+ cylinder(d = lcd_hole_dia, h = lcd_pcb_height + 2);
|
|
158
|
+
|
|
159
|
+ translate([lcd_hole_off + lcd_hole_dist_x, lcd_hole_off + lcd_hole_dist_y, -1])
|
|
160
|
+ cylinder(d = lcd_hole_dia, h = lcd_pcb_height + 2);
|
|
161
|
+ }
|
|
162
|
+
|
|
163
|
+ translate([lcd_bezel_off_x, lcd_bezel_off_y, lcd_pcb_height])
|
|
164
|
+ cube([lcd_bezel_width, lcd_bezel_depth, lcd_bezel_height]);
|
|
165
|
+}
|
|
166
|
+
|
|
167
|
+module keypad(l = 0, a = 0) {
|
|
168
|
+ difference() {
|
|
169
|
+ // TODO rounded corners
|
|
170
|
+ cube([keypad_base_width, keypad_base_depth, keypad_base_height]);
|
|
171
|
+
|
|
172
|
+ translate([keypad_hole_off_x, keypad_hole_off_y, -1])
|
|
173
|
+ cylinder(d = keypad_hole_dia, keypad_base_height + 2);
|
|
174
|
+
|
|
175
|
+ translate([keypad_hole_off_x + keypad_hole_dist_x, keypad_hole_off_y, -1])
|
|
176
|
+ cylinder(d = keypad_hole_dia, keypad_base_height + 2);
|
|
177
|
+
|
|
178
|
+ translate([keypad_hole_off_x, keypad_hole_off_y + keypad_hole_dist_y, -1])
|
|
179
|
+ cylinder(d = keypad_hole_dia, keypad_base_height + 2);
|
|
180
|
+
|
|
181
|
+ translate([keypad_hole_off_x + keypad_hole_dist_x, keypad_hole_off_y + keypad_hole_dist_y, -1])
|
|
182
|
+ cylinder(d = keypad_hole_dia, keypad_base_height + 2);
|
|
183
|
+ }
|
|
184
|
+
|
|
185
|
+ // TODO rounded corners!
|
|
186
|
+ translate([keypad_top_off_x - a / 2, keypad_top_off_y - a / 2, keypad_base_height])
|
|
187
|
+ cube([keypad_top_width + a, keypad_top_depth + a, keypad_top_height + l]);
|
|
188
|
+}
|
|
189
|
+
|
|
190
|
+module voltmeter_tab() {
|
|
191
|
+ difference() {
|
|
192
|
+ translate([0, -voltmeter_tab_depth / 2, 0])
|
|
193
|
+ cube([voltmeter_tab_width, voltmeter_tab_depth, voltmeter_height]);
|
|
194
|
+
|
|
195
|
+ translate([voltmeter_tab_width / 2, 0, -1])
|
|
196
|
+ cylinder(d = voltmeter_hole_dia, h = voltmeter_height + 2);
|
|
197
|
+ }
|
|
198
|
+}
|
|
199
|
+
|
|
200
|
+module voltmeter() {
|
|
201
|
+ cube([voltmeter_width, voltmeter_depth, voltmeter_height + voltmeter_display_height]);
|
|
202
|
+
|
|
203
|
+ translate([-voltmeter_tab_width, voltmeter_depth / 2, 0])
|
|
204
|
+ voltmeter_tab();
|
|
205
|
+
|
|
206
|
+ translate([voltmeter_width, voltmeter_depth / 2, 0])
|
|
207
|
+ voltmeter_tab();
|
|
208
|
+}
|
|
209
|
+
|
|
210
|
+module mount_voltmeters() {
|
|
211
|
+ for (i = [0 : 3]) {
|
|
212
|
+ translate([0, -voltmeter_dist * i, -1]) {
|
|
213
|
+ translate([-voltmeter_negative_add / 2, -voltmeter_negative_add / 2, 0])
|
|
214
|
+ cube([voltmeter_width + voltmeter_negative_add, voltmeter_depth + voltmeter_negative_add, mount_height + 2]);
|
|
215
|
+
|
|
216
|
+ translate([-voltmeter_tab_width / 2, voltmeter_depth / 2, 0])
|
|
217
|
+ cylinder(d = voltmeter_spacer_hole_dia, h = mount_height + 2);
|
|
218
|
+
|
|
219
|
+ translate([voltmeter_width + voltmeter_tab_width / 2, voltmeter_depth / 2, 0])
|
|
220
|
+ cylinder(d = voltmeter_spacer_hole_dia, h = mount_height + 2);
|
|
221
|
+ }
|
|
222
|
+ }
|
|
223
|
+}
|
|
224
|
+
|
|
225
|
+module switch(s = 0) {
|
|
226
|
+ translate([-s / 2, -s / 2, s - switch_height])
|
|
227
|
+ cube([switch_width + s, switch_depth + s, switch_height]);
|
|
228
|
+
|
|
229
|
+ translate([-(switch_top_width - switch_width) / 2, -(switch_top_depth - switch_depth) / 2, s])
|
|
230
|
+ cube([switch_top_width, switch_top_depth, switch_top_height]);
|
|
231
|
+}
|
|
232
|
+
|
|
233
|
+switch_mount_base = 11;
|
|
234
|
+switch_mount_hole = 3.2;
|
|
235
|
+switch_mount_base_height = 2;
|
|
236
|
+switch_mount_wall = 3;
|
|
237
|
+switch_mount_add = 3;
|
|
238
|
+switch_mount_width = switch_top_width + 2 * switch_mount_add;
|
|
239
|
+switch_mount_depth = switch_top_depth + 2 * switch_mount_add;
|
|
240
|
+switch_mount_height = 20;
|
|
241
|
+
|
|
242
|
+module switch_mount() {
|
|
243
|
+ translate([switch_mount_wall, 0, 0])
|
|
244
|
+ difference() {
|
|
245
|
+ union() {
|
|
246
|
+ cube([switch_mount_base + switch_mount_base_height, switch_mount_base, switch_mount_base_height]);
|
|
247
|
+
|
|
248
|
+ translate([switch_mount_base_height, 0, switch_mount_base_height])
|
|
249
|
+ rotate([0, 0, 90])
|
|
250
|
+ prism(switch_mount_base, switch_mount_base_height, switch_mount_base_height);
|
|
251
|
+ }
|
|
252
|
+
|
|
253
|
+ translate([switch_mount_base / 2 + switch_mount_base_height, switch_mount_base / 2, -1])
|
|
254
|
+ cylinder(d = switch_mount_hole, h = switch_mount_base_height + 2);
|
|
255
|
+ }
|
|
256
|
+
|
|
257
|
+ cube([switch_mount_wall, switch_mount_base, switch_mount_height]);
|
|
258
|
+
|
|
259
|
+ translate([0, switch_mount_wall, switch_mount_height])
|
|
260
|
+ //scale([-1, 1, 1])
|
|
261
|
+ rotate([90, 0, 0])
|
|
262
|
+ difference() {
|
|
263
|
+ translate([0, 0, -switch_mount_base + switch_mount_wall])
|
|
264
|
+ union() {
|
|
265
|
+ cube([switch_mount_width, switch_mount_depth, switch_mount_base]);
|
|
266
|
+
|
|
267
|
+ translate([switch_mount_wall, -switch_mount_base_height, switch_mount_base])
|
|
268
|
+ rotate([0, 90, 0])
|
|
269
|
+ prism(switch_mount_base, switch_mount_base_height, switch_mount_base_height);
|
|
270
|
+ }
|
|
271
|
+
|
|
272
|
+ translate([(switch_mount_width - switch_width) / 2, (switch_mount_depth - switch_depth) / 2, switch_mount_wall]) {
|
|
273
|
+ scale([1, 1, 10])
|
|
274
|
+ switch(switch_add_negative);
|
|
275
|
+
|
|
276
|
+ %switch();
|
|
277
|
+ }
|
|
278
|
+ }
|
|
279
|
+}
|
|
280
|
+
|
|
281
|
+module mount_part() {
|
|
282
|
+ translate([0, mount_height, 0])
|
|
283
|
+ difference() {
|
|
284
|
+ // baseplate
|
|
285
|
+ cube([mount_width, mount_depth, mount_height]);
|
|
286
|
+
|
|
287
|
+ translate([mount_dist / 2, keypad_base_depth + mount_support_prism + mount_dist * 3 / 2, 0]) {
|
|
288
|
+ // hole for lcd bezel
|
|
289
|
+ translate([lcd_negative_off_x, lcd_negative_off_y, -1])
|
|
290
|
+ cube([lcd_negative_width, lcd_negative_depth, mount_height + 2]);
|
|
291
|
+
|
|
292
|
+ // holes for lcd screws
|
|
293
|
+ translate([lcd_hole_off, lcd_hole_off, -1])
|
|
294
|
+ cylinder(d = lcd_spacer_hole_dia, h = mount_height + 2);
|
|
295
|
+
|
|
296
|
+ translate([lcd_hole_off + lcd_hole_dist_x, lcd_hole_off, -1])
|
|
297
|
+ cylinder(d = lcd_spacer_hole_dia, h = mount_height + 2);
|
|
298
|
+
|
|
299
|
+ translate([lcd_hole_off, lcd_hole_off + lcd_hole_dist_y, -1])
|
|
300
|
+ cylinder(d = lcd_spacer_hole_dia, h = mount_height + 2);
|
|
301
|
+
|
|
302
|
+ translate([lcd_hole_off + lcd_hole_dist_x, lcd_hole_off + lcd_hole_dist_y, -1])
|
|
303
|
+ cylinder(d = lcd_spacer_hole_dia, h = mount_height + 2);
|
|
304
|
+ }
|
|
305
|
+
|
|
306
|
+ translate([lcd_pcb_width - keypad_base_width + mount_dist / 2, mount_support_prism + mount_dist / 2, 0]) {
|
|
307
|
+ // hole for keypad upper part
|
|
308
|
+ translate([0, 0, -keypad_base_height - 1])
|
|
309
|
+ keypad(mount_height, keypad_negative_dist);
|
|
310
|
+
|
|
311
|
+ // holes for keypad screws
|
|
312
|
+ translate([keypad_hole_off_x, keypad_hole_off_y, -1])
|
|
313
|
+ cylinder(d = keypad_spacer_hole_dia, h = mount_height + 2);
|
|
314
|
+
|
|
315
|
+ translate([keypad_hole_off_x + keypad_hole_dist_x, keypad_hole_off_y, -1])
|
|
316
|
+ cylinder(d = keypad_spacer_hole_dia, h = mount_height + 2);
|
|
317
|
+
|
|
318
|
+ translate([keypad_hole_off_x, keypad_hole_off_y + keypad_hole_dist_y, -1])
|
|
319
|
+ cylinder(d = keypad_spacer_hole_dia, h = mount_height + 2);
|
|
320
|
+
|
|
321
|
+ translate([keypad_hole_off_x + keypad_hole_dist_x, keypad_hole_off_y + keypad_hole_dist_y, -1])
|
|
322
|
+ cylinder(d = keypad_spacer_hole_dia, h = mount_height + 2);
|
|
323
|
+ }
|
|
324
|
+
|
|
325
|
+ // holes for voltmeters
|
|
326
|
+ translate([mount_dist / 2 + voltmeter_tab_width + voltmeter_off_x, mount_support_prism + keypad_base_depth + voltmeter_off_y - voltmeter_depth, 0])
|
|
327
|
+ mount_voltmeters();
|
|
328
|
+
|
|
329
|
+ // hole for switch
|
|
330
|
+ translate([mount_dist / 2 + switch_off_x, mount_support_prism + switch_off_y, mount_height])
|
|
331
|
+ switch(switch_add_negative);
|
|
332
|
+ }
|
|
333
|
+
|
|
334
|
+ // lcd spacers
|
|
335
|
+ translate([0, mount_height, -lcd_spacer_height])
|
|
336
|
+ translate([mount_dist / 2, keypad_base_depth + mount_support_prism + mount_dist * 3 / 2, 0]) {
|
|
337
|
+ translate([lcd_hole_off, lcd_hole_off, 0])
|
|
338
|
+ spacer(lcd_spacer_dia, lcd_spacer_hole_dia, lcd_spacer_height);
|
|
339
|
+
|
|
340
|
+ translate([lcd_hole_off + lcd_hole_dist_x, lcd_hole_off, 0])
|
|
341
|
+ spacer(lcd_spacer_dia, lcd_spacer_hole_dia, lcd_spacer_height);
|
|
342
|
+
|
|
343
|
+ translate([lcd_hole_off, lcd_hole_off + lcd_hole_dist_y, 0])
|
|
344
|
+ spacer(lcd_spacer_dia, lcd_spacer_hole_dia, lcd_spacer_height);
|
|
345
|
+
|
|
346
|
+ translate([lcd_hole_off + lcd_hole_dist_x, lcd_hole_off + lcd_hole_dist_y, 0])
|
|
347
|
+ spacer(lcd_spacer_dia, lcd_spacer_hole_dia, lcd_spacer_height);
|
|
348
|
+ }
|
|
349
|
+
|
|
350
|
+ // keypad spacers
|
|
351
|
+ translate([0, mount_height, -keypad_spacer_height])
|
|
352
|
+ translate([lcd_pcb_width - keypad_base_width + mount_dist / 2, mount_support_prism + mount_dist / 2, 0]) {
|
|
353
|
+ translate([keypad_hole_off_x, keypad_hole_off_y, 0])
|
|
354
|
+ spacer(keypad_spacer_dia, keypad_spacer_hole_dia, keypad_spacer_height);
|
|
355
|
+
|
|
356
|
+ translate([keypad_hole_off_x + keypad_hole_dist_x, keypad_hole_off_y, 0])
|
|
357
|
+ spacer(keypad_spacer_dia, keypad_spacer_hole_dia, keypad_spacer_height);
|
|
358
|
+
|
|
359
|
+ translate([keypad_hole_off_x, keypad_hole_off_y + keypad_hole_dist_y, 0])
|
|
360
|
+ spacer(keypad_spacer_dia, keypad_spacer_hole_dia, keypad_spacer_height);
|
|
361
|
+
|
|
362
|
+ translate([keypad_hole_off_x + keypad_hole_dist_x, keypad_hole_off_y + keypad_hole_dist_y, 0])
|
|
363
|
+ spacer(keypad_spacer_dia, keypad_spacer_hole_dia, keypad_spacer_height);
|
|
364
|
+ }
|
|
365
|
+
|
|
366
|
+ // bottom mounting plate
|
|
367
|
+ translate([0, 0, mount_height - mount_support_depth])
|
|
368
|
+ difference() {
|
|
369
|
+ cube([mount_width, mount_height, mount_support_depth]);
|
|
370
|
+
|
|
371
|
+ translate([mount_hole_off, -1, mount_support_usable_depth / 2])
|
|
372
|
+ rotate([-90, 0, 0])
|
|
373
|
+ cylinder(d = mount_hole_dia, h = mount_height + 2);
|
|
374
|
+
|
|
375
|
+ translate([mount_width - mount_hole_off, -1, mount_support_usable_depth / 2])
|
|
376
|
+ rotate([-90, 0, 0])
|
|
377
|
+ cylinder(d = mount_hole_dia, h = mount_height + 2);
|
|
378
|
+ }
|
|
379
|
+
|
|
380
|
+ // prism support
|
|
381
|
+ translate([0, mount_support_prism + mount_height, 0])
|
|
382
|
+ rotate([180, 0, 0])
|
|
383
|
+ prism(mount_width, mount_support_prism, mount_support_prism);
|
|
384
|
+}
|
|
385
|
+
|
|
386
|
+module texts_voltmeters() {
|
|
387
|
+ for (i = [0 : 3])
|
|
388
|
+ translate([voltmeter_width + voltmeter_text_right_off_x, voltmeter_text_right_off_y - voltmeter_dist * i, -voltmeter_text_right_d]) {
|
|
389
|
+ linear_extrude(height = voltmeter_text_right_d + 0.1)
|
|
390
|
+ text(voltmeter_text_right, font = voltmeter_text_right_font, size = voltmeter_text_right_h, spacing = voltmeter_text_right_spacing, halign = "center");
|
|
391
|
+ }
|
|
392
|
+
|
|
393
|
+ translate([-voltmeter_tab_width - voltmeter_text_left_off_x, voltmeter_text_left_off_y - voltmeter_dist * 0, -voltmeter_text_left_d])
|
|
394
|
+ linear_extrude(height = voltmeter_text_left_d + 0.1)
|
|
395
|
+ text(voltmeter_text_left_1, font = voltmeter_text_left_font, size = voltmeter_text_left_h, spacing = voltmeter_text_left_spacing, halign = "center");
|
|
396
|
+
|
|
397
|
+ translate([-voltmeter_tab_width - voltmeter_text_left_off_x, voltmeter_text_left_off_y - voltmeter_dist * 1, -voltmeter_text_left_d])
|
|
398
|
+ linear_extrude(height = voltmeter_text_left_d + 0.1)
|
|
399
|
+ text(voltmeter_text_left_2, font = voltmeter_text_left_font, size = voltmeter_text_left_h, spacing = voltmeter_text_left_spacing, halign = "center");
|
|
400
|
+
|
|
401
|
+ translate([-voltmeter_tab_width - voltmeter_text_left_off_x, voltmeter_text_left_off_y - voltmeter_dist * 2, -voltmeter_text_left_d])
|
|
402
|
+ linear_extrude(height = voltmeter_text_left_d + 0.1)
|
|
403
|
+ text(voltmeter_text_left_3, font = voltmeter_text_left_font, size = voltmeter_text_left_h, spacing = voltmeter_text_left_spacing, halign = "center");
|
|
404
|
+
|
|
405
|
+ translate([-voltmeter_tab_width - voltmeter_text_left_off_x, voltmeter_text_left_off_y - voltmeter_dist * 3, -voltmeter_text_left_d])
|
|
406
|
+ linear_extrude(height = voltmeter_text_left_d + 0.1)
|
|
407
|
+ text(voltmeter_text_left_4, font = voltmeter_text_left_font, size = voltmeter_text_left_h, spacing = voltmeter_text_left_spacing, halign = "center");
|
|
408
|
+}
|
|
409
|
+
|
|
410
|
+module mount() {
|
|
411
|
+ difference() {
|
|
412
|
+ mount_part();
|
|
413
|
+
|
|
414
|
+ translate([mount_width / 2, text_bottom_off, mount_height - text_bottom_d])
|
|
415
|
+ linear_extrude(height = text_bottom_d + 0.1)
|
|
416
|
+ text(text_bottom, font = text_bottom_font, size = text_bottom_h, spacing = text_bottom_spacing, halign = "center");
|
|
417
|
+
|
|
418
|
+ translate([mount_width - text_side_off, mount_height + keypad_base_depth + mount_support_prism + mount_dist * 3 / 2 + lcd_hole_off + lcd_hole_dist_y / 2, mount_height - text_side_d])
|
|
419
|
+ rotate([0, 0, 90])
|
|
420
|
+ linear_extrude(height = text_side_d + 0.1)
|
|
421
|
+ text(text_side, font = text_side_font, size = text_side_h, spacing = text_side_spacing, halign = "center");
|
|
422
|
+
|
|
423
|
+ translate([mount_dist / 2 + 2 * voltmeter_tab_width + voltmeter_off_x, mount_height + mount_support_prism + keypad_base_depth + voltmeter_off_y - voltmeter_depth, mount_height])
|
|
424
|
+ texts_voltmeters();
|
|
425
|
+
|
|
426
|
+ translate([switch_text_off_x, mount_height + mount_support_prism + switch_off_y + switch_text_off_y, mount_height - switch_text_d]) {
|
|
427
|
+ linear_extrude(height = switch_text_d + 0.1)
|
|
428
|
+ text(switch_text_left, font = switch_text_font, size = switch_text_h, spacing = switch_text_spacing, halign = "center");
|
|
429
|
+
|
|
430
|
+ translate([switch_text_dist_x, 0, 0])
|
|
431
|
+ linear_extrude(height = switch_text_d + 0.1)
|
|
432
|
+ text(switch_text_right, font = switch_text_font, size = switch_text_h, spacing = switch_text_spacing, halign = "center");
|
|
433
|
+ }
|
|
434
|
+ }
|
|
435
|
+}
|
|
436
|
+
|
|
437
|
+module assembly_voltmeters() {
|
|
438
|
+ for (i = [0 : 3]) {
|
|
439
|
+ translate([0, -voltmeter_dist * i, 0])
|
|
440
|
+ voltmeter();
|
|
441
|
+ }
|
|
442
|
+}
|
|
443
|
+
|
|
444
|
+module wall_tab() {
|
|
445
|
+ difference() {
|
|
446
|
+ cube([wall, wall_depth, wall_height]);
|
|
447
|
+
|
|
448
|
+ translate([-1, wall_depth / 2, wall_height / 2])
|
|
449
|
+ rotate([0, 90, 0])
|
|
450
|
+ cylinder(d = wall_hole, h = wall + 2);
|
|
451
|
+ }
|
|
452
|
+}
|
|
453
|
+
|
|
454
|
+module wall_support() {
|
|
455
|
+ difference() {
|
|
456
|
+ prism(wall, wall_height, wall_width - wall);
|
|
457
|
+
|
|
458
|
+ translate([-1, wall, 0])
|
|
459
|
+ prism(wall + 2, wall_height - wall, wall_width - wall * 4);
|
|
460
|
+ }
|
|
461
|
+}
|
|
462
|
+
|
|
463
|
+module wall() {
|
|
464
|
+ difference() {
|
|
465
|
+ cube([wall_width, wall_depth, wall]);
|
|
466
|
+
|
|
467
|
+ translate([wall + wall_prism + wall_mount_off_x + mount_hole_off, mount_support_depth - mount_support_usable_depth / 2, -1])
|
|
468
|
+ cylinder(d = mount_hole_dia, h = wall + 2);
|
|
469
|
+
|
|
470
|
+ translate([wall + wall_prism + wall_mount_off_x + mount_width - mount_hole_off, mount_support_depth - mount_support_usable_depth / 2, -1])
|
|
471
|
+ cylinder(d = mount_hole_dia, h = wall + 2);
|
|
472
|
+ }
|
|
473
|
+
|
|
474
|
+ translate([0, 0, wall])
|
|
475
|
+ wall_tab();
|
|
476
|
+
|
|
477
|
+ translate([0, 0, -wall_height])
|
|
478
|
+ wall_tab();
|
|
479
|
+
|
|
480
|
+ translate([wall, 0, -wall])
|
|
481
|
+ rotate([90, 0, 90])
|
|
482
|
+ prism(wall_depth, wall_prism, wall_prism);
|
|
483
|
+
|
|
484
|
+ translate([wall + wall_prism, 0, wall])
|
|
485
|
+ rotate([0, 0, 90])
|
|
486
|
+ prism(wall_depth, wall_prism, wall_prism);
|
|
487
|
+
|
|
488
|
+ translate([wall, wall_depth - wall, -wall_height])
|
|
489
|
+ rotate([90, 0, 90])
|
|
490
|
+ wall_support();
|
|
491
|
+
|
|
492
|
+ translate([wall, wall_depth, wall_height + wall])
|
|
493
|
+ rotate([-90, 0, -90])
|
|
494
|
+ wall_support();
|
|
495
|
+}
|
|
496
|
+
|
|
497
|
+module assembly() {
|
|
498
|
+ color("purple")
|
|
499
|
+ wall();
|
|
500
|
+
|
|
501
|
+ translate([wall + wall_prism + wall_mount_off_x, mount_height, wall])
|
|
502
|
+ rotate([90, 0, 0]) {
|
|
503
|
+ mount();
|
|
504
|
+
|
|
505
|
+ color("yellow")
|
|
506
|
+ translate([mount_dist / 2, keypad_base_depth + mount_support_prism + mount_height + mount_dist * 3 / 2, -lcd_pcb_height - lcd_spacer_height])
|
|
507
|
+ lcd();
|
|
508
|
+
|
|
509
|
+ color("red")
|
|
510
|
+ translate([lcd_pcb_width - keypad_base_width + mount_dist / 2, mount_height + mount_support_prism + mount_dist / 2, -keypad_base_height - keypad_spacer_height])
|
|
511
|
+ keypad();
|
|
512
|
+
|
|
513
|
+ color("green")
|
|
514
|
+ translate([mount_dist / 2 + voltmeter_tab_width + voltmeter_off_x, mount_height + mount_support_prism + keypad_base_depth + voltmeter_off_y - voltmeter_depth, -voltmeter_height - 0])
|
|
515
|
+ assembly_voltmeters();
|
|
516
|
+
|
|
517
|
+ color("blue")
|
|
518
|
+ translate([mount_dist / 2 + switch_off_x, mount_height + mount_support_prism + switch_off_y, mount_height])
|
|
519
|
+ switch();
|
|
520
|
+ }
|
|
521
|
+}
|
|
522
|
+
|
|
523
|
+module print() {
|
|
524
|
+ translate([0, mount_height, mount_width])
|
|
525
|
+ rotate([0, 90, -90])
|
|
526
|
+ mount();
|
|
527
|
+
|
|
528
|
+ translate([20, wall_height + mount_support_depth, wall_depth])
|
|
529
|
+ rotate([-90, 0, 0])
|
|
530
|
+ wall();
|
|
531
|
+
|
|
532
|
+ translate([0, -10, 0])
|
|
533
|
+ rotate([90, 0, 0])
|
|
534
|
+ switch_mount();
|
|
535
|
+}
|
|
536
|
+
|
|
537
|
+//lcd();
|
|
538
|
+//keypad();
|
|
539
|
+//voltmeter();
|
|
540
|
+//switch();
|
|
541
|
+//switch_mount();
|
|
542
|
+
|
|
543
|
+assembly();
|
|
544
|
+//print();
|