ソースを参照

octathingy: first version with two 12 pin connectors at the bottom and other ported changes from the tetrahedral version, needs a lot of work and refactoring

Fernando Pablo Lopez-Lezcano 9 年 前
親
コミット
222c727d3c
1 ファイル変更、244 行追加、6 行削除
  1. 244 6
      Octathingy_mount_pcb.scad

+ 244 - 6
Octathingy_mount_pcb.scad

@@ -90,7 +90,7 @@ pcb_slot_depth = 1.0;
 cable_diam = 9.5;
 
 // lip that mounts flares into main body box
-mount_lip = 6.0;
+mount_lip = 10.0;
 
 // capsule array mount, height of flare and stalk
 flare_height = 50;
@@ -109,6 +109,38 @@ box_radius = pcb_front + (pcb_thickness + pcb_tfit) + pcb_back + 2 * wall;
 // calculated main body corner radius
 mount_corner = box_radius - pcb_width / 2 + pcb_slot_depth + 4.0;
 
+// body to flares snap joint arm slot width
+snap_joint_slot_w = 0.75;
+
+// width and radius of snap joint hook that locks upper and lower flanges to body
+snap_joint_hook_w = 5.0;
+snap_joint_hook_r = 1.4;
+
+// dimensions of 12 pin male bottom connector
+//
+// Amphenol T 3635 002
+// 12 pin DIN male to cable, gold plated contacts
+//
+// inner diameter of connector core
+conn_core_diam = 13.00 + 0.2;
+// outer diameter of connector core sleeve
+conn_core_o_diam = 17.00;
+// inner diameter of connector core sleeve
+conn_core_s_diam = 15.00;
+
+// from top of connector to sleeve
+conn_core_sleeve = 13.00;
+// from top of connector to holes
+conn_core_holes_h = 6.00;
+// between holes
+conn_core_holes_w = 9.20;
+// hole diameter
+conn_core_holes_d = 1.95 + 0.2;
+// screw head diameter
+conn_core_screw_d = 2.75 + 0.5;
+// sleeve overlap
+conn_core_overlap = 3.00;
+
 // shock mount parameters
 //
 
@@ -160,6 +192,19 @@ module octa_mount_body(height, width, depth, radius, lower_lip, upper_lip, clear
         translate([0, 0, 0]) {
             rounded_box(lower_lip + 0.5, width, depth, radius, wall + lip_fit);
         }
+        // slots for snap joint hooks
+        // upper
+        for (m=[-1, 1]) rotate([0, 90, 0]) {
+            translate([- height + upper_lip * 3/4, (width + radius + snap_joint_hook_r * 3/2)*m, -(snap_joint_hook_w/2 + 0.25)]) {
+                cylinder(r = snap_joint_hook_r, h = snap_joint_hook_w + 0.5, $fn = facets);
+            }
+        }
+        // lower
+        for (m=[-1, 1]) rotate([0, 90, 0]) {
+            translate([-lower_lip * 3/4, (width + radius + snap_joint_hook_r * 3/2)*m, -(snap_joint_hook_w/2 + 0.25)]) {
+                cylinder(r = snap_joint_hook_r, h = snap_joint_hook_w + 0.5, $fn = facets);
+            }
+        }
     }
     // transition to avoid overhang
     translate([0, 0, lower_lip]) {
@@ -176,7 +221,8 @@ module octa_mount_body(height, width, depth, radius, lower_lip, upper_lip, clear
     // mounting slots for pcb's
     slot_len = 30;
     difference() {
-        rounded_block(slot_len, width - wall - lip_fit, depth - wall - lip_fit, radius);
+        // FIXME: wrong dimension, just add * 1.5 as a hack
+        rounded_block(slot_len, width - 2 * wall, depth - 2 * wall, radius - 1.5 * wall );
         union() {
             // hollow out the inside with slots for pcbs
             octa_pcb_clear(slot_len, pcb_width, pcb_thickness, pcb_slot_depth, pcb_front, pcb_back);
@@ -188,6 +234,17 @@ module octa_mount_body(height, width, depth, radius, lower_lip, upper_lip, clear
             }
         }
     }
+    // upper lip is too thin, reinforce the back of the snap joint hook holes
+    for (r = [0, 180]) rotate([0, 90, r]) {
+        translate([- height + upper_lip * 3/4, (width + radius + snap_joint_hook_r + lip_fit), -(snap_joint_hook_w/2 + 0.25)]) {
+            difference() {
+                cylinder(r = snap_joint_hook_r * 1.25, h = snap_joint_hook_w + 0.5, $fn = facets);
+                translate([- snap_joint_hook_r * 1.25, - wall, 0]) {
+                    cube([snap_joint_hook_r * 3, snap_joint_hook_r * 3, snap_joint_hook_w * 1.5]);
+                }
+            }
+        }
+    }
     // add parts for clearance check
     if (clear == 1) {
         // electrolytic capacitors
@@ -225,10 +282,26 @@ module octa_mount_body(height, width, depth, radius, lower_lip, upper_lip, clear
 module octa_mount_flare(height, lip, transition, bot_xradius, bot_yradius, corner, top_radius, stalk_height, dot) {
     // bottom rounded box
     difference() {
-        rounded_block(height, bot_xradius, bot_yradius, corner);
+        union() {
+            rounded_block(height, bot_xradius, bot_yradius, corner);
+            // make snap joint arm thicker
+            for (r = [0, 180]) rotate([0, 0, r]) {
+                translate([- snap_joint_hook_w - snap_joint_slot_w / 2, bot_yradius, 0]) {
+                    cube([snap_joint_hook_w * 2 + snap_joint_slot_w, wall / 2, lip * 1.25]);
+                }
+            }
+        }
         rounded_block_relative(height, bot_xradius, bot_yradius, corner, -(2 * wall));
         // flange to mount on body
         rounded_block_relative(lip + 1.00, bot_xradius, bot_yradius, corner, - (wall));
+        // cut slots for snap joint hooks
+        for (r = [0, 180]) rotate([0, 0, r]) {
+            for (m = [-1, 1]) {
+                translate([m * (snap_joint_hook_w + snap_joint_slot_w) - snap_joint_slot_w / 2, bot_yradius - 1.5 * wall, 0]) {
+                    cube([snap_joint_slot_w, 2 * wall, lip - 1.0]);
+                }
+            }
+        }
         // and make a smooth transition to avoid overhangs
         translate([0, 0, lip + 1.00]) {
             hull() {
@@ -239,6 +312,19 @@ module octa_mount_flare(height, lip, transition, bot_xradius, bot_yradius, corne
             }
         }
     }
+    // add snap joint hook to arm
+    for (r = [0, 180]) rotate([0, 0, r]) {
+        translate([- snap_joint_hook_w / 2, bot_yradius - wall/2 + lip_fit, 1/4 * lip]) {
+            rotate([90, 0, 90]) {
+                difference() {
+                    cylinder(r = snap_joint_hook_r - 0.2, h = snap_joint_hook_w, $fn = facets);
+                    translate([0, -snap_joint_hook_r, 0]) {
+                        cube([snap_joint_hook_r, snap_joint_hook_w, snap_joint_hook_w]);
+                    }
+                }
+            }
+        }
+    }
     // flare to round section
     translate([0, 0, height]) {
         difference() {
@@ -275,6 +361,24 @@ module octa_mount_flare(height, lip, transition, bot_xradius, bot_yradius, corne
                 }
             }
         }
+        // close stalk and add holes for cables
+        translate([0, 0, stalk_height - top_radius - wall]) {
+            difference() {
+                cylinder(r = top_radius - wall, h = top_radius + wall, $fn = facets);
+                translate([0, 0, 0]) {
+                    sphere(r = top_radius - wall, $fn = facets);
+                }
+                wire_diam = mic_wire_diam + mic_wire_fit;
+                for (r = [0, 90, 180, 270]) rotate([0, 0, r]) {
+                    for (t = [0, 1]) {
+                        rotate([0, 0, 45 * t]) translate([top_radius - wire_diam - t * wire_diam * 2/3, 0, wall]) {
+                            cylinder(r = wire_diam / 2, h = top_radius * 2, $fn = facets);
+                        }
+                    }
+                }
+                translate([0, 0, wall]) cylinder(r = wire_diam, h = top_radius * 2, $fn = facets);
+            }
+        }
     }
 }
 
@@ -332,6 +436,111 @@ module octa_mount_flare_dual(height, lip, transition, xradius, yradius, corner,
     }
 }
 
+// flare from the body to a dual conector housing
+
+// bottom connector holder
+
+module tetra_mount_connector_holder(height, radius, inside_radius, sleeve_height, sleeve_radius) {
+    difference() {
+        union() {
+            cylinder(r = radius, h = height, $fn = facets);
+            // add seats for screw heads
+            for (m = [-1, 1]) translate([m * conn_core_holes_w / 2, radius / 2, conn_core_holes_h]) {
+                rotate([90, 0, 0]) {
+                    scale([1, 1, 1]) cylinder(r = conn_core_screw_d / 2, h = radius * 1.43, $fn = facets);
+                }
+            }
+        }
+        cylinder(r = inside_radius, h = height, $fn = facets);
+        // transition from thin wall to thick wall at the bottom of connector
+        *cylinder(r1 = radius - wall, r2 = inside_radius, h = 2.0, $fn = facets);
+        // holes for connector core screws
+        for (m = [-1, 1]) translate([m * conn_core_holes_w / 2, - radius / 3, conn_core_holes_h]) {
+            rotate([90, 0, 0]) {
+                cylinder(r = conn_core_holes_d / 2, h = radius, $fn = facets);
+            }
+        }
+        // substract cutout for screw heads
+        for (m = [-1, 1]) translate([m * conn_core_holes_w / 2, - radius + 1.5, conn_core_holes_h]) {
+            rotate([90, 0, 0]) {
+                cylinder(r = conn_core_screw_d / 2, h = 2.0, $fn = facets);
+            }
+        }
+    }
+    // thinner cylinder sits inside connector sleeve
+    translate([0, 0, height]) {
+        difference() {
+            cylinder(r = sleeve_radius, h = sleeve_height, $fn = facets);
+            cylinder(r = inside_radius, h = sleeve_height, $fn = facets);
+        }
+    }
+}
+
+module octa_mount_flare_connector(height, lip, transition, xradius, yradius, corner, top_xradius, top_yradius) {
+    // hack to get it to render, fix problem in rounded_block when radius is equal to corner...
+    delta = 0.001;
+    // bottom rounded box
+    difference() {
+        rounded_block(height, xradius, yradius, corner);
+        rounded_block_relative(height, xradius, yradius, corner, -(2 * wall));
+        // flange to mount on body
+        rounded_block_relative(lip + 1.00, xradius, yradius, corner, - (wall));
+        // cut slots for snap joint hooks
+        for (r = [0, 180]) rotate([0, 0, r]) {
+            for (m = [-1, 1]) {
+                translate([m * (snap_joint_hook_w + snap_joint_slot_w) - snap_joint_slot_w / 2, yradius - 1.5 * wall, 0]) {
+                    cube([snap_joint_slot_w, 2 * wall, lip - 1.0]);
+                }
+            }
+        }
+        // and make a smooth transition to avoid overhangs
+        translate([0, 0, lip + 1.00]) {
+            hull() {
+                rounded_block_relative(thin_mint, xradius, yradius, corner, - wall);
+                translate([0, 0, 1.0]) {
+                    rounded_block_relative(thin_mint, xradius, yradius, corner, - 2 * wall);
+                }
+            }
+        }
+    }
+    // make snap joint arm thicker
+    for (r = [0, 180]) rotate([0, 0, r]) {
+        translate([- snap_joint_hook_w - snap_joint_slot_w / 2, yradius, 0]) {
+            cube([snap_joint_hook_w * 2 + snap_joint_slot_w, wall / 2, lip * 1.25]);
+        }
+    }
+    // add snap joint hook to arm
+    for (r = [0, 180]) rotate([0, 0, r]) {
+        translate([- snap_joint_hook_w / 2, yradius - wall/2 + lip_fit, 1/4 * lip]) {
+            rotate([90, 0, 90]) {
+                difference() {
+                    cylinder(r = snap_joint_hook_r - 0.2, h = snap_joint_hook_w, $fn = facets);
+                    translate([0, -snap_joint_hook_r, 0]) {
+                        cube([snap_joint_hook_r, snap_joint_hook_w, snap_joint_hook_w]);
+                    }
+                }
+            }
+        }
+    }
+    // flare to rounded section
+    translate([0, 0, height]) {
+        difference() {
+            hull() {
+                rounded_block(thin_mint, xradius, yradius, corner);
+                translate([0, 0, transition]) {
+                    rounded_block(thin_mint, top_xradius, top_yradius, top_xradius - delta);
+                }
+            }
+            hull() {
+                rounded_block_relative(thin_mint, xradius, yradius, corner, - 2 * wall);
+                translate([0, -top_xradius, transition]) {
+                    cube([thin_mint, (top_xradius) * 2, thin_mint]);
+                }
+            }
+        }
+    }
+}
+
 // top conical section that plugs into capsule array
 
 module octa_capsule_array_mount(angles) {
@@ -339,7 +548,7 @@ module octa_capsule_array_mount(angles) {
         union() {
             difference() {
                 cylinder(h = mount_top_height, r1 = mount_radius + wall, r2 = mount_radius_capsule, $fn = facets);
-                cylinder(h = mount_top_height, r1 = mount_radius, r2 = mount_radius_capsule - 1.2 * wall, $fn = facets);
+                cylinder(h = mount_top_height, r1 = mount_radius, r2 = mount_radius_capsule - 2 * wall * wall, $fn = facets);
             }
             // second set of optional "leaves" to get a better mount
             *difference() {
@@ -423,11 +632,40 @@ module render_octa_cable_flare(z_offset, flip) {
     }
 }
 
+module render_octa_connector_flare(z_offset, flip) {
+    conn_offset = 2.0;
+    conn_wall = conn_core_o_diam / 2 - conn_core_diam / 2;
+    translate([0, 0, z_offset]) {
+        difference() {
+            union() {
+                octa_mount_flare_connector(pcb_low_clear + pcb_low_exp, mount_lip, 20,
+                            box_radius + wall, box_radius * 2 - wall, mount_corner,
+                            conn_core_o_diam / 2, conn_core_o_diam + conn_offset);
+                for (m = [0, 1]) mirror([0, m, 0]) translate([0, conn_core_o_diam / 2 + conn_offset, pcb_low_clear + pcb_low_exp + 20]) {
+                    // add two connectors
+                    rotate([0, 0, -90]) {
+                        tetra_mount_connector_holder(conn_core_sleeve, conn_core_o_diam / 2, conn_core_diam / 2,
+                            conn_core_overlap, conn_core_s_diam / 2);
+                    }
+                    // add wall in between the two connectors
+                    translate([- 2 * wall, - (conn_core_o_diam / 2 + conn_offset), 0]) {
+                        cube([4 * wall, conn_offset + wall, 10]);
+                    }
+                }
+            }
+            // redo the hole in the connector holder so that it drills into the top of the flare
+            for (m = [0, 1]) mirror([0, m, 0]) translate([0, conn_core_o_diam / 2 + conn_offset, 0]) {
+                cylinder(r = conn_core_diam / 2, h = 100, $fn = facets);
+            }
+        }
+    }
+}
+
 // microphone body: render all parts with a vertical separation
 //
 module render_octa_body(z_offset, spread, showint) {
     rotate([0, 180, 0]) {
-        render_octa_cable_flare(0);
+        render_octa_connector_flare(0);
     }
     lippy = spread - mount_lip;
     render_octa_pcb_mount(lippy, showint);
@@ -451,7 +689,7 @@ module render_octa_microphone_cutout(z_offset, spread) {
     difference() {
         render_octa_microphone(z_offset, spread);
         // a cube that blots out 1/4 of the microphone
-        rotate([0, 0, 45]) {
+        rotate([0, 0, 90]) {
             translate([0, 0, -50]) {
                 cube([50, 100, 650]);
             }