25
25
// Type: "DIP", "PCB", "maxpcb"
26
26
variant = "PCB" ;
27
27
28
+ // Easier Printing Option - remove the little finger posts
29
+ //
30
+ // The "PCB" variant has little finger posts supporting the PCB
31
+ // between each DIP contact, which are difficult to print even with SLS.
32
+ // You can set PCB_fingers to false to remove them.
33
+ // The pcb will be unsupported in the middle,
34
+ // but the entire pcb is short enough that it should be ok.
35
+ // Including the posts is the safest for the user, as it garantees the that pcb
36
+ // can not be depressed too far into the socket no matter how hard one presses.
37
+ PCB_fingers = true ;
38
+
28
39
// Molex 78802 datasheet shows 24, 28, and 32-pin versions
29
40
// Number of pins: 24, 28, 32
30
41
pins = 28 ;
31
42
32
43
// Temporarily comment out $fn $fs $fa and save for importing into freecad.
33
44
// Otherwise freecad only imports the mesh facets, not the source geometry.
34
45
// arc smoothness
35
- $ fn= 18 ;
46
+ $ fn = 18 ;
36
47
37
48
// The DIP and PCB versions work a little differently.
38
49
//
@@ -140,6 +151,7 @@ c_positions = pins/2;
140
151
c_x_full = c_positions * pitch;
141
152
c_diff = pitch - c_width;
142
153
c_x_min = c_x_full - c_diff;
154
+ c_fingers = (variant== "maxpcb" ) ? false : PCB_fingers;
143
155
144
156
// Stuff for "DIP" variant
145
157
pin_pocket_width = pitch- min_wall;
@@ -281,33 +293,42 @@ difference(){
281
293
[0 ,lswcs]
282
294
]);
283
295
} else {
284
- // /////////////////////////////////////////////////////////////////
285
- // /////////////////////////////////////////////////////////////////
286
- // pocket for backside components
287
- translate ([0 ,0 ,pcb_elev- pocket_z]) {
288
- // replace this cube with one with rounded corners
289
- // to make fillets at the base of the fingers
290
- // so they are slightly less likely to break off
291
- // cube([pocket_x,pocket_y,main_z],center=true);
292
- hull () {
293
- mirror_copy([0 ,0 ,1 ])
294
- translate ([0 ,0 ,main_z/2 - pocket_fillet_radius])
295
- mirror_copy([1 ,0 ,0 ])
296
- translate ([pocket_x/2 - pocket_fillet_radius,0 ,0 ])
297
- mirror_copy([0 ,1 ,0 ])
298
- translate ([0 ,pocket_y/2 - pocket_fillet_radius,0 ])
299
- sphere (pocket_fillet_radius);
296
+ // /////////////////////////////////////////////////////////////////
297
+ // /////////////////////////////////////////////////////////////////
298
+ // pocket for backside components
299
+ translate ([0 ,0 ,pcb_elev- pocket_z]) {
300
+ hull () {
301
+ mirror_copy([0 ,0 ,1 ])
302
+ translate ([0 ,0 ,main_z/2 - pocket_fillet_radius])
303
+ mirror_copy([1 ,0 ,0 ])
304
+ translate ([pocket_x/2 - pocket_fillet_radius,0 ,0 ])
305
+ mirror_copy([0 ,1 ,0 ])
306
+ translate ([0 ,pocket_y/2 - pocket_fillet_radius,0 ])
307
+ sphere (pocket_fillet_radius);
308
+ }
300
309
}
301
- }
302
310
303
- // clearance for socket contacts
304
- mirror_copy([0 ,1 ,0 ])
305
- for (i= [0 :c_positions- 1 ])
306
- translate ([- (c_x_full/2 )+ (pitch/2 )+ (i* pitch),c_y/2 + c_width/2 - _fc,- main_z/2 - o])
307
- hull (){
308
- cylinder (h= o+ main_z+ o,d= c_width);
309
- translate ([0 ,main_y/2 - c_y/2 + _fc,0 ]) cylinder (h= o+ main_z+ o,d= c_width);
310
- }
311
+ // clearance for socket contacts
312
+ mirror_copy([0 ,1 ,0 ]) {
313
+ if (c_fingers) {
314
+ for (i= [0 :c_positions- 1 ])
315
+ translate ([- (c_x_full/2 )+ (pitch/2 )+ (i* pitch),c_y/2 + c_width/2 - _fc,- main_z/2 - o])
316
+ hull (){
317
+ cylinder (h= o+ main_z+ o,d= c_width);
318
+ translate ([0 ,main_y/2 - c_y/2 + _fc,0 ]) cylinder (h= o+ main_z+ o,d= c_width);
319
+ }
320
+ } else {
321
+ translate ([- c_x_min/2 ,- main_y/2 - o,- main_z/2 - o])
322
+ // Cut to the depth of the pocket fillet radius to prevent a pointless lip.
323
+ cube ([c_x_min,main_y/2 - pocket_y/2 + pocket_fillet_radius+ o,o+ main_z+ o]);
324
+ // Cut to the depth of the finger slots.
325
+ // Leaves a tiny lip along the edge that may complicate printing
326
+ // for no benefit. Print service may warn that it's a "thin wall"
327
+ // when really you don't care if it's blunted to nothing, so the deeper
328
+ // cut above just avoids the question from coming up in the first place.
329
+ // cube([c_x_min,main_y/2-c_y/2+o,o+main_z+o]);
330
+ }
331
+ }
311
332
}
312
333
313
334
// Cut the fingers down to either pcb_elev or pocket_floor.
@@ -325,8 +346,8 @@ difference(){
325
346
translate ([- main_x/2 - wing_x- o,- blade_thickness/2 ,main_z/2 - wing_thickness- o])
326
347
cube ([wing_x- blade_xwide+ o,blade_thickness,o+ wing_thickness+ o]);
327
348
328
- // holes in end-walls
329
349
if (variant== "maxpcb" ){
350
+ // holes in end-walls
330
351
translate ([- main_x/2 - o, - pcb_y/2 , - main_z/2 + pcb_elev]) cube ([o+ _pbh+ o, _pbw, pcb_z]);
331
352
translate ([- main_x/2 - o, pcb_y/2 - prong_w, - main_z/2 + pcb_elev]) cube ([o+ _pbh+ o, prong_w, pcb_z]);
332
353
translate ([pcb_x/2 - o, - pcb_y/2 , - main_z/2 + pcb_elev]) cube ([o+ _pbh+ o, prong_w, pcb_z]);
0 commit comments