Kaynağa Gözat

big merge of repeated variables spread over many files, move most to SpHEAR_common.scad, add some to the _common.scad versions of the TinySpHEAR and OctaSpHEAR as they are created differently in both, move most include statements to the top microphone rendering files (removes redundant includes); Octathingy_common, Octathingy_mount: add code to render parts for the version 2 microphone; TinySpHEAR_mount: remove remnants of snap joints which have been replaced with screws; SpHEAR_windscreen: add parts to create tapered windscreen for OctaSpHEAR version 2 printed circuit board design; db25.scad: remove redundant facets definition

Fernando Pablo Lopez-Lezcano 6 yıl önce
ebeveyn
işleme
5f7209db66
7 değiştirilmiş dosya ile 719 ekleme ve 510 silme
  1. 127 52
      Octathingy_common.scad
  2. 378 187
      Octathingy_mount_pcb.scad
  3. 123 21
      SpHEAR_common.scad
  4. 72 13
      SpHEAR_windscreen.scad
  5. 17 40
      TinySpHEAR_common.scad
  6. 2 194
      TinySpHEAR_mount_pcb.scad
  7. 0 3
      db25.scad

+ 127 - 52
Octathingy_common.scad

@@ -1,14 +1,14 @@
 //
 // Spherical Harmonics Ear Project (*SpHEAR)
 //
-// Octathingy, Second Order Ambisonics Microphone
+// OctaSpHEAR or Octathingy, Second Order Ambisonics Microphone
 //
 // based on:
 // "A second-order soundfield microphone with improved polar pattern shape"
 // by Eric Benjamin, Audio Engineering Society Convention Paper 8728, 
 // October 2012, San Francisco
 
-// Copyright 2015-2016, Fernando Lopez-Lezcano, All Rights Reserved
+// Copyright 2015-2019, Fernando Lopez-Lezcano, All Rights Reserved
 // nando@ccrma.stanford.edu
 //
 //
@@ -29,47 +29,16 @@
 //   Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)
 // http://creativecommons.org/licenses/by-nc-sa/4.0/
 
-include <SpHEAR_common.scad>
-
 ////
-//// model parameters
-
-// dimensions of the electret microphone capsule
-capsule_radius = 5;
-capsule_height = 4.5;
-
-// distance between face of capsule and center of array
-mic_radius = 14;
-
-// dimensions of capsule holder connection legs
-leg_width = 5;
-leg_thick = 1.75;
-
-// width of the ridge that connects to the mount
-ridge_width = 2;
-ridge_length = 2;
-// depth of the connector mount ridge
-ridge_depth = 3.0;
-// add to the thickness of ridges
-ridge_wfit = 0.1;
-ridge_hfit = 3;
+//// overrides
 
-// wall thickness of capsule holder
-wall = 1;
+// inner radius of stalk
+mount_radius = 4.0;
 
-// dimensions of microphone holder
-mount_radius = 4.5;
-mount_wall = 0.75;
+// this adds space for the protuding molex pins on which we solder
+pcb_low_clear = 15.0;
+pcb_hi_clear = 15.0;
 
-// height of mount
-mount_height = 4;
-
-// type of octathingy
-// 0 -> regular octathingy (equilateral triangles in the square antiprism)
-// 1 -> tetrahedral compatible octathingy (same elevation angle as the tetrahedral mic)
-tetra_compat = 1;
-
-//// end of model parameters
 ////
 //// rendering control
 
@@ -84,11 +53,9 @@ connect = 1;
 //   instead of 10, capsule diameter was 9.99)
 fudge = 0.15;
 
-// adjustment for fit of slots in connection legs and mount
-fit = 0.1;
-
-// number of facets for rendering cylinders
-facets = 64;
+// back and front clearance of pcb (components and leads)
+pcb_front = pcb_version == 2 ? 2.50 : 3.00;
+pcb_back = pcb_version == 2 ? 1.70 : 1.80;
 
 //// end of rendering control
 ////
@@ -189,7 +156,9 @@ module capsule_holder(ratio, transition, hollow = true) {
     transition_h = transition * capsule_radius;
     translate([0, 0, - transition_h]) {
         difference() {
-            cylinder(r2 = capsule_radius + fudge + wall, r1 = (capsule_radius) * ratio + wall, h = transition_h, $fn = facets);
+            // add ridge to get a perfect alignment when inserting into core
+            over = 0.5;
+            cylinder(r2 = capsule_radius + fudge + wall, r1 = (capsule_radius) * ratio + wall + over, h = transition_h, $fn = facets);
             // add overhang so that we have a stop when inserting the capsule
             overhang = 0.2;
             if (hollow) cylinder(r2 = capsule_radius + fudge - overhang, r1 = (capsule_radius) * ratio, h = transition_h, $fn = facets);
@@ -217,18 +186,56 @@ module capsule_holder(ratio, transition, hollow = true) {
     }
 }
 
+module capsule_holder_float(ratio, transition, hollow = true, depth = 0) {
+    capsule_h = capsule_height;
+    f = 0.05;
+    difference() {
+        // main capsule holder, use a conical bore to press fit the capsule
+        cylinder(r = capsule_radius + fudge + wall, h = capsule_h + depth, $fn = cfacets);
+        if (hollow) {
+            cylinder(r1 = capsule_radius + fudge, r2 = capsule_radius + fudge + f, h = capsule_h/2 + thin_mint + depth, $fn = cfacets);
+            translate([0, 0, capsule_h*1/2]) {
+                cylinder(r = capsule_radius + fudge + f, h = capsule_h + thin_mint + depth, $fn = cfacets);
+            }
+        }
+    }
+    // overhang to act as a back stop for the capsule
+    overhang = 0.3;
+    translate([0, 0, -overhang]) difference() {
+        cylinder(r = capsule_radius + fudge + wall, h = overhang, $fn = cfacets);
+        if (hollow) {
+            cylinder(r1 = capsule_radius + fudge, r2 = capsule_radius + fudge + f - overhang, h = overhang + thin_mint, $fn = cfacets);
+        }
+    }
+}
+
 // capsule holder array
 //
-module render_octa_capsule_holder_array(hollow = true) {
+module render_octa_capsule_holder_ring_array(rot = 0, rot2 = 0, hollow = true, depth = 0) {
     for (az = [45, 135, -45, -135]) {
         rotate([0, elev_angle, az]) {
             translate([0, 0, mic_radius - capsule_height]) {
-                capsule_holder(holder_ratio, transition_ratio, hollow);
+                rotate([rot, 0, -rot2]) capsule_holder_float(holder_ratio, transition_ratio, hollow, depth);
             }
         }
         rotate([0, 180 - elev_angle, az + 45]) {
             translate([0, 0, mic_radius - capsule_height]) {
-                capsule_holder(holder_ratio, transition_ratio, hollow);
+                rotate([rot, 0, rot2]) capsule_holder_float(holder_ratio, transition_ratio, hollow, depth);
+            }
+        }
+    }
+}
+
+module render_octa_capsule_holder_array(hollow = true, depth = 0) {
+    for (az = [45, 135, -45, -135]) {
+        rotate([0, elev_angle, az]) {
+            translate([0, 0, mic_radius - capsule_height]) {
+                capsule_holder(holder_ratio, transition_ratio, hollow, depth);
+            }
+        }
+        rotate([0, 180 - elev_angle, az + 45]) {
+            translate([0, 0, mic_radius - capsule_height]) {
+                capsule_holder(holder_ratio, transition_ratio, hollow, depth);
             }
         }
     }
@@ -287,7 +294,7 @@ module capsule_holder_ring(offset = 3.5, shift = 0) {
 }
 
 // spherical core
-module capsule_holder_core(top_radius, render = 0, offset = 3.5) {
+module capsule_holder_core(top_radius, height, render = 0, offset = 3.5) {
     s_radius = mic_radius - capsule_radius * (1 + transition_ratio) + offset;
     difference() {
         union() {
@@ -333,7 +340,7 @@ module capsule_holder_core(top_radius, render = 0, offset = 3.5) {
             if (render == -1) {
                 //stalk_len = 15.0;
                 // normal length plus 10 to insert into flare
-                stalk_len = stalk_height + 10.0 + 10.0;
+                stalk_len = height + 10.0 + 10.0;
                 inset = wall;
                 translate([0, 0, - (stalk_len - inset + s_radius)]) {
                     difference() {
@@ -342,13 +349,13 @@ module capsule_holder_core(top_radius, render = 0, offset = 3.5) {
                     }
                 }
                 // add flange for coupling into flare
-                translate([0, 0, - (stalk_height - inset - 0.5 + 10.0 + 10.0)]) {
+                translate([0, 0, - (height - inset - 0.5 + 10.0 + 10.0)]) {
                     difference() {
                         cylinder(r2 = top_radius, r1 = top_radius + wall, h = 10.0, $fn = facets);
                         cylinder(r2 = top_radius - wall, r1 = top_radius, h = 10.0, $fn = facets);
                     }
                 }
-                translate([top_radius, 0, - (stalk_height - inset - 0.5 + 10.0 + 10.0 + 10.0)]) {
+                translate([top_radius, 0, - (height - inset - 0.5 + 10.0 + 10.0 + 10.0)]) {
                     // add key to stalk so orientation is always correct
                     difference() {
                         cylinder(r = 0.4, h = 10.0, $fn = facets);
@@ -374,6 +381,74 @@ module capsule_holder_core(top_radius, render = 0, offset = 3.5) {
     }
 }
 
+// capsule array stalk
+module capsule_holder_stalk(top_radius, height, render = 0, offset = 3.5) {
+    s_radius = mic_radius - capsule_radius * (1 + transition_ratio) + offset;
+    union() {
+        // stalk that transitions into flare
+        if (render == -1) {
+            //stalk_len = 15.0;
+            // normal length plus 10 to insert into flare
+            stalk_len = height + 10.0 + 10.0;
+            inset = wall;
+            translate([0, 0, - (stalk_len - inset + s_radius)]) {
+                difference() {
+                    cylinder(r = top_radius, h = stalk_len + inset, $fn = facets);
+                    cylinder(r = top_radius - wall, h = stalk_len + inset + thin_mint, $fn = facets);
+                }
+            }
+            // add flange for coupling into flare
+            translate([0, 0, - (height - inset - 0.5 + 10.0 + 10.0)]) {
+                difference() {
+                    cylinder(r2 = top_radius, r1 = top_radius + wall, h = 10.0, $fn = facets);
+                    cylinder(r2 = top_radius - wall, r1 = top_radius, h = 10.0, $fn = facets);
+                }
+            }
+            translate([top_radius, 0, - (height - inset - 0.5 + 10.0 + 10.0 + 10.0)]) {
+                // add key to stalk so orientation is always correct
+                difference() {
+                    cylinder(r = 0.4, h = 10.0, $fn = facets);
+                }
+            }
+        }
+    }
+    // index for aligning the two halves of core sphere
+    rotate([0, 0, 22.5]) translate([s_radius, 0, 0]) {
+        difference() {
+            scale([1, 1, 2]) sphere(r = 0.5, $fn = facets);
+            translate([-2.2, -1, -4]) cube([2, 2, 8]);
+            if (render == 1) {
+                translate([-2, -1, -8]) cube([4, 2, 8]);
+            }
+            if (render == -1) {
+                translate([-2, -1, 0]) cube([4, 2, 8]);
+            }
+        }
+    }
+}
+
+// connect array to upper flare
+module flare_connector(top_radius, height, offset = 3.5) {
+    s_radius = mic_radius - capsule_radius * (1 + transition_ratio) + offset;
+    // stalk that transitions into flare
+    //stalk_len = 15.0;
+    // normal length plus 10 to insert into flare
+    stalk_len = height + 10.0;
+    inset = wall;
+    translate([0, 0, - (2*stalk_len - inset + s_radius)]) {
+        difference() {
+            cylinder(r = top_radius, h = stalk_len + inset, $fn = facets);
+            cylinder(r = top_radius - wall, h = stalk_len + inset + thin_mint, $fn = facets);
+        }
+    }
+    translate([top_radius, 0, - (height - inset - 0.5 + 10.0 + 10.0 + 10.0)]) {
+        // add key to stalk so orientation is always correct
+        difference() {
+            cylinder(r = 0.4, h = 13.0, $fn = facets);
+        }
+    }
+}
+
 // render individual capsules
 //
 module render_octa_capsule_top() {

+ 378 - 187
Octathingy_mount_pcb.scad

@@ -1,14 +1,14 @@
-//
+////
 // Spherical Harmonics Ear Project (*SpHEAR)
 //
-// Octathingy, Second Order Ambisonics Microphone
+// OctaSpHEAR or Octathingy, Second Order Ambisonics Microphone
 //
 // based on:
 // "A second-order soundfield microphone with improved polar pattern shape"
 // by Eric Benjamin, Audio Engineering Society Convention Paper 8728, 
 // October 2012, San Francisco
 //
-// Copyright 2015-2018, Fernando Lopez-Lezcano, All Rights Reserved
+// Copyright 2015-2019, Fernando Lopez-Lezcano, All Rights Reserved
 // nando@ccrma.stanford.edu
 //
 //  This program is free software: you can redistribute it and/or modify
@@ -28,84 +28,17 @@
 //   Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)
 // http://creativecommons.org/licenses/by-nc-sa/4.0/
 
-include <Octathingy_common.scad>;
-include <CCRMA_logo.scad>;
-
 // d-sub connector
 include <db25.scad>;
 
-////
-//// overrides
-
-// inner radius of mount stalk
-mount_radius = 4.0;
-
 ////
 //// default model parameters
 ////
 
-// size of Zapnspark printed circuit board
-// kicad length = 79.375
-// measured length = 79.20 (2016.08.25)
-pcb_length = pcb_version == 2 ? 72.39 : 79.20;
-// kicad width = 19.050
-// measured width = 18.82 (2016.08.25)
-pcb_width = pcb_version == 2 ? 15.34 : 18.85;
-// ultimaker spec thickness = 1.61
-// measured thickness = 1.56 (w/ copper)
-pcb_thickness = pcb_version == 2 ? 1.68 + 0.02 : 1.58;
-
-// tolerance to add to length and width of pcb
-//
-// measured 3d print width = 18.70 (with pcb_fit = 0.3)
-// actual printed = 18.70 - 0.3 = 16.97
-// total correction = 18.85 - 16.97 = 1.88
-//
-pcb_fit = 0.4;
-
-// tolerance add to thickness of pcb
-//
-// printed with pcb_tfit = 0.15 -> 1.58 + 0.15 = 1.73 (ideal printed)
-// measured print channel = 1.63 : 0.1 thinner (ultimaker 2 plus, 2016.08.24)
-// measured pcb thickness = 1.58 (othermill)
-//
-pcb_tfit = 0.15;
-
-// we leave part of the pcb exposed on the bottom of the body so that we
-// can solder the wires that connect the microphone with the
-// preamplifier, same at the top of the pcb to solder the wires
-// to the capsules
-pcb_low_exp = 12.0;
-pcb_hi_exp = 8.0;
-
-// lip fit for flares
-lip_fit = 0.15;
-
-// clearance from the bottom and top of pcb's to the start of the flare,
-// this adds space for the protuding molex pins on which we solder
-pcb_low_clear = 15.0;
-pcb_hi_clear = 15.0;
-
-// depth of slot into which the printed circuit board fits
-pcb_slot_depth = 1.0;
-
-// diameter of four conductor cable
-cable_diam = 9.5;
-
-// lip that mounts flares into main body box
-mount_lip = 10.0;
-
 // capsule array mount, height of flare and stalk
 flare_height = 50;
 stalk_height = 60;
 
-// wall thickness
-wall = 1.0;
-
-// back and front clearance of pcb (components and leads)
-pcb_front = pcb_version == 2 ? 2.50 : 3.00;
-pcb_back = pcb_version == 2 ? 1.70 : 1.80;
-
 // calculated minimum "radius" of microphone box
 box_radius = pcb_front + (pcb_thickness + pcb_tfit) + pcb_back + 2 * wall;
 
@@ -116,39 +49,10 @@ mount_corner = box_radius - pcb_width / 2 + pcb_slot_depth + 4.0;
 render_screw_holes = true;
 radial_pcb_offset = pcb_version == 2 ? 15.0 : 17.0;
 octa_pcb_mount_height = pcb_length - pcb_low_exp - pcb_hi_exp;
-octa_pcb_radius = radial_pcb_offset + pcb_width/2 + (pcb_version == 2 ? 4.75 : 5) * wall;
-
-// 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;
+octa_pcb_wall = (pcb_version == 2 ? 4.75 : 5) * wall;
+// windscreen thread offset
+octa_pcb_thread_offset = (pcb_version == 2 ? -1.82 : 0.0);
+octa_pcb_radius = radial_pcb_offset + pcb_width/2 + octa_pcb_wall;
 
 // shock mount parameters
 //
@@ -175,19 +79,19 @@ ring_arm_gap = 16;
 
 // the main body that holds the phantom power interfaces
 
-module one_pcb_slot (pcb_w, pcb_l, pcb_t, slot_d, front, back, test = false) {
+module one_pcb_slot_old (height, pcb_w, pcb_l, pcb_t, pcb_offset, slot_d, front, back, test = false) {
     d = pcb_t + front + back;
     render() translate([-(pcb_w/2 + wall/2), -back, 0]) {
         // make cage with slots for pcb
         difference() {
             translate([-2 * wall, 0, 0]) {
-                cube([pcb_w + 4 * wall, d, pcb_l]);
+                cube([pcb_w + 4 * wall, d, height]);
             }
             translate([slot_d, 0, 0]) {
-                cube([pcb_w - 2 * slot_d, pcb_t + front + back, pcb_l]);
+                cube([pcb_w - 2 * slot_d, pcb_t + front + back, height]);
             }
             translate([0, back, 0]) {
-                cube([pcb_w, pcb_t, pcb_l]);
+                cube([pcb_w, pcb_t, height]);
             }
             // make top and bottom entry channels
             translate([slot_d, back + pcb_t/2, 0]) {
@@ -196,20 +100,20 @@ module one_pcb_slot (pcb_w, pcb_l, pcb_t, slot_d, front, back, test = false) {
             translate([pcb_w - slot_d, back + pcb_t/2, 0]) {
                 rotate([0, 0, 45]) cylinder(r1 = pcb_t * 1.1, r2 = 0, h = 8.0, $fn = 4);
             }
-            translate([slot_d, back + pcb_t/2, pcb_l - 8.0]) {
+            translate([slot_d, back + pcb_t/2, height - 8.0]) {
                 rotate([0, 0, 45]) cylinder(r2 = pcb_t * 1.1, r1 = 0, h = 8.0, $fn = 4);
             }
-            translate([pcb_w - slot_d, back + pcb_t/2, pcb_l - 8.0]) {
+            translate([pcb_w - slot_d, back + pcb_t/2, height - 8.0]) {
                 rotate([0, 0, 45]) cylinder(r2 = pcb_t * 1.1, r1 = 0, h = 8.0, $fn = 4);
             }
         }
         // add spar in the back
         translate([-2 * wall, -back + wall, 0]) {
-            cube([pcb_w + 4 * wall, wall, pcb_l]);
+            cube([pcb_w + 4 * wall, wall, height]);
         }
         // pcb for testing fit
         if (test) {
-            translate([0, back, 0]) {
+            translate([0, back, pcb_offset]) {
                 cube([pcb_w, pcb_t, pcb_l]);
             }
             // small electrolytic capacitors (pcb_version == 2)
@@ -238,6 +142,56 @@ module one_pcb_slot (pcb_w, pcb_l, pcb_t, slot_d, front, back, test = false) {
     }
 }
 
+// one printed circuit board with space in the back and front
+
+module one_pcb_slot (height, pcb_w, pcb_l, pcb_t, pcb_offset, slot_d, front, back, test = false) {
+    render() translate([-(pcb_w/2 + 0.5), 0, 0]) {
+        // printed circuit board with space for solder and components
+        cube([pcb_w, pcb_t, pcb_l]);
+        // open space in back and front
+        // tune front and back by hand
+        translate([slot_d, -2.0, 0]) cube([pcb_w - (2.0 * slot_d), 15, pcb_l]);
+        // make top and bottom entry channels
+        translate([slot_d, pcb_t/2, 0]) {
+            rotate([0, 0, 45]) cylinder(r1 = pcb_t * 1.1, r2 = 0, h = 8.0, $fn = 4);
+        }
+        translate([pcb_w - slot_d, pcb_t/2, 0]) {
+            rotate([0, 0, 45]) cylinder(r1 = pcb_t * 1.1, r2 = 0, h = 8.0, $fn = 4);
+        }
+        translate([slot_d, pcb_t/2, height - 8.0]) {
+            rotate([0, 0, 45]) cylinder(r2 = pcb_t * 1.1, r1 = 0, h = 8.0, $fn = 4);
+        }
+        translate([pcb_w - slot_d, pcb_t/2, height - 8.0]) {
+            rotate([0, 0, 45]) cylinder(r2 = pcb_t * 1.1, r1 = 0, h = 8.0, $fn = 4);
+        }
+    }
+}
+
+// the partition that connects inner and outer sections of body
+
+module one_pcb_parts (height, pcb_w, pcb_l, pcb_t, pcb_offset, slot_d, front, back) {
+    //render() translate([-(pcb_w/2 + wall), -(back + wall), 0]) {
+    render() translate([-(pcb_w/2 + 0.5), 0, 0]) {
+        // printed circuit board
+        translate([0, 0, pcb_offset]) cube([pcb_w, pcb_t, pcb_l]);
+        // small electrolytic capacitors (pcb_version == 2)
+        // https://www.mouser.com/datasheet/2/293/e-umw-1219455.pdf
+        cap_diam = 8.0;
+        // should be 5, but transistors are a bit taller;
+        cap_len = 6.0;
+        translate([pcb_w/2, cap_len + pcb_t, 6]) {
+            rotate([90, 0, 0]) cylinder(r = (cap_diam/2), h = cap_len, $fn = facets);
+        }
+        // film capacitors
+        cap_h = 12;
+        cap_w = 9;
+        cap_t = 5.5;
+        translate([pcb_w/2 - cap_w/2, pcb_t, 10]) {
+            cube([cap_w, cap_t, cap_h]);
+        }
+    }
+}
+
 module rounded_octagon(height, radius) {
     intersection() {
         cylinder(r = radius, h = height, $fn = 8);
@@ -252,9 +206,13 @@ module rounded_octagon_wall(height, radius, wall) {
     }
 }
 
-octa_pcb_twist = pcb_version == 2 ? 12 : 16;
+// twist angle to optimize space usage inside body
+//octa_pcb_twist = pcb_version == 2 ? 12 : 16;
+octa_pcb_twist = pcb_version == 2 ? 13.5 : 16;
+// tilt angle to clear upper flare thread
+octa_pcb_tilt = pcb_version == 2 ? -0.7 : 0.0;
 
-module octa_mount_body(height, radius, lower_lip, upper_lip, clear) {
+module octa_mount_body_old(height, radius, lower_lip, upper_lip, clear) {
     // rotate pcb assembly so it does not interfere with the screws
     offset_angle = -octa_pcb_twist;
     // rotate individual pcb's to better use the internal space of the body
@@ -267,10 +225,10 @@ module octa_mount_body(height, radius, lower_lip, upper_lip, clear) {
                     rounded_octagon_wall(height, radius, 2 * wall);
                     // slots for printed circuit boards
                     intersection() {
-                        for (r = [0:360/8:360]) rotate([0, 0, r + offset_angle]) {
+                        for (r = [0:360/8:360]) rotate([0, octa_pcb_tilt, r + offset_angle]) {
                             translate([radial_pcb_offset, 0, 0]) {
                                 rotate([0, 0, 180 + twist_angle]) {
-                                    one_pcb_slot(pcb_width + pcb_fit, height * 2/3, pcb_thickness + pcb_tfit, 
+                                    one_pcb_slot(height * 2/3, pcb_width + pcb_fit, pcb_length, pcb_thickness + pcb_tfit, -10,
                                         pcb_slot_depth, pcb_front, pcb_back, false);
                                 }
                             }
@@ -316,6 +274,87 @@ module octa_mount_body(height, radius, lower_lip, upper_lip, clear) {
     }
 }
 
+module octa_mount_body(height, radius, lower_lip, upper_lip, clear) {
+    // rotate pcb assembly so it does not interfere with the screws
+    offset_angle = -octa_pcb_twist;
+    // rotate individual pcb's to better use the internal space of the body
+    twist_angle = octa_pcb_twist;
+    difference() {
+        union() {
+            difference() {
+                union() {
+                    // main body
+                    rounded_octagon_wall(height, radius, 2 * wall);
+                    difference() {
+                        // fill the inside of the body
+                        translate([0, 0, -1]) rounded_octagon(height * 2/3, radius);
+                        // remove everything else
+                        union() {
+                            translate([0, 0, -1]) for (r = [0:360/8:360]) rotate([0, octa_pcb_tilt, r + offset_angle]) {
+                                translate([radial_pcb_offset, 0, 0]) {
+                                    rotate([0, 0, 180 + twist_angle]) {
+                                        one_pcb_slot(height * 2/3, pcb_width + pcb_fit, pcb_length, pcb_thickness + pcb_tfit, -10,
+                                            pcb_slot_depth, pcb_front, pcb_back);
+                                    }
+                                }
+                            }
+                            // make center hole
+                            cylinder(r = 6.0, h = height, $fn = facets);
+                        }
+                    }
+                    translate([0, 0, -1]) for (r = [0:360/8:360]) rotate([0, octa_pcb_tilt, r + offset_angle]) {
+                        translate([radial_pcb_offset, 0, 0]) {
+                            rotate([0, 0, 180 + twist_angle]) {
+                                // add wall that connects core with outer shell
+                                translate([-(pcb_width/2 + 2 * wall), -(wall + pcb_back), 0]) {
+                                    cube([pcb_width + 2 * wall, wall, height * 2/3]);
+                                }
+                                // add components if we are testing for fit
+                                *one_pcb_parts(height * 2/3, pcb_width + pcb_fit, pcb_length, pcb_thickness + pcb_tfit, -10,
+                                    pcb_slot_depth, pcb_front, pcb_back);
+                           }
+                        }
+                    }
+                }
+                // clip inside of body below body (we need this because of pcb tilt)
+                translate([0, 0, -2.0]) rounded_octagon(2.0, radius);
+                // upper lip for flare to microphone
+                translate([0, 0, height - upper_lip]) {
+                    rounded_octagon_wall(upper_lip, radius, wall + lip_fit);
+                }
+                // lower lip for flare to cable or connector
+                translate([0, 0, 0]) {
+                    rounded_octagon_wall(upper_lip, radius, wall + lip_fit);
+                }
+            }
+            if (render_screw_holes) {
+                // add backplates for upper lip screws
+                for (r = [45, 135, 225, 315]) {
+                    rotate([0, 0, r]) translate([-(radius - 3 * wall), -2.5, 0]) {
+                        cube([2, 5, height]);
+                    }
+                }
+            }
+        }
+        if (render_screw_holes) {
+            // make eight holes in the the body for screws that hold both flares
+            // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
+            difference() {
+                for (z = [lower_lip/2, height - upper_lip/2]) {
+                    for (r = [45, 135, 225, 315]) {
+                        rotate([0, 0, r]) translate([-(radius + 2 * wall), 0, z]) {
+                            rotate([0, 90, 0]) {
+                                cylinder(r = 0.7, h = radius + wall, $fn = facets);
+                            }
+                        }
+                    }
+                }
+                cylinder(r = radius/2, h = height);
+            }
+        }
+    }
+}
+
 // flare from the body to the microphone stalk
 
 module octa_mount_flare_no_ws(height, lip, transition, radius, top_radius, stalk_height, dot) {
@@ -537,13 +576,55 @@ module octa_mount_flare_old(height, lip, transition, radius, top_radius, stalk_h
     }
 }
 
+// stalk from flare to capsule array mount
+
+module octa_mount_stalk(height, lip, transition, radius, top_radius, stalk_height, dot) {
+    translate([0, 0, height + transition]) {
+        translate ([0, 0, -10.0]) difference() {
+            cylinder(r = top_radius, h = stalk_height + 10.0, $fn = facets);
+            cylinder(r = top_radius - wall, h = stalk_height + 10.0, $fn = facets);
+        }
+        // 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);
+            }
+        }
+        // add flange for coupling into flare
+        difference() {
+            cylinder(r2 = top_radius, r1 = top_radius + wall, h = 10.0, $fn = facets);
+            cylinder(r2 = top_radius - wall, r1 = top_radius, h = 10.0, $fn = facets);
+        }
+        translate([top_radius, 0, -10.0]) {
+            // add key to stalk so orientation is always correct
+            difference() {
+                cylinder(r = 0.4, h = 10.0, $fn = facets);
+            }
+        }
+    }
+}
+
+// flare from body to capsule array stalk
+
 module octa_mount_flare(height, lip, transition, radius, top_radius, stalk_height, dot) {
     // transition from bottom box to windscreen mounting thread
     transition_to_threads = 5;
     // bottom box
     difference() {
         union() {
-            rounded_octagon_wall(height, radius, 2 * wall);
+            rounded_octagon_wall(height - windscreen_thread_height, radius, 2 * wall);
             if (render_screw_holes) {
                 // small pedestals for the screws that attach the flare to the body
                 // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
@@ -557,13 +638,14 @@ module octa_mount_flare(height, lip, transition, radius, top_radius, stalk_heigh
             }
             // indicator of "front" of microphone
             rotate([0, 0, 180 + 22.5]) translate([radius - 2, 0, 0]) {
-                cylinder(r = 1.0, h = lip/2, $fn = facets);
+                cylinder(r = 1.0, h = lip/3, $fn = facets);
             }
             // stops for shock mount
             for (r = [0, 90, 180, 270]) rotate([0, 0, r - 22.5]) {
                 translate([radius - 3.4, 0, 0]) scale([2.0, 1.0, 1.0]) {
                     difference() {
-                        cylinder(r = 2.0, h = lip + transition_to_threads, $fn = facets);
+                        // cylinder(r = 2.0, h = lip + transition_to_threads, $fn = facets);
+                        cylinder(r = 2.0, h = 5.0, $fn = facets);
                         translate([-2, -2.0, 0]) cube([2.0, 4.0, lip + transition_to_threads]);
                     }
                 }
@@ -592,28 +674,16 @@ module octa_mount_flare(height, lip, transition, radius, top_radius, stalk_heigh
             }
         }
     }
-    // flare to windscreen threads
-    translate([0, 0, height - windscreen_thread_height - transition_to_threads]) {
-        difference() {
-            hull() {
-                rounded_octagon(thin_mint, radius);
-                translate([0, 0, transition_to_threads]) {
-                    cylinder(r = windscreen_thread_radius + 0.5, h = thin_mint, $fn = facets);
-                }
-            }
-            hull() {
-                rounded_octagon(thin_mint, radius - wall);
-                translate([0, 0, transition_to_threads]) {
-                    cylinder(r = windscreen_thread_radius - windscreen_thread_depth - wall, h = thin_mint, $fn = facets);
-                }
-            }
-        }
-    }
     // windscreen mounting threads
     translate([0, 0, height - windscreen_thread_height]) difference() {
         metric_thread(diameter = windscreen_thread_radius * 2, pitch = windscreen_thread_pitch,
             length = windscreen_thread_height, angle = windscreen_thread_angle, internal = false);
         cylinder(r = windscreen_thread_radius - wall - windscreen_thread_depth, h = windscreen_thread_height + thin_mint, $fn = facets);
+        // clip thread tips
+        difference() {
+            cylinder(r = windscreen_thread_radius + wall, h = windscreen_thread_height + thin_mint, $fn = facets);
+            cylinder(r = windscreen_thread_radius - windscreen_thread_depth * 0.3, h = windscreen_thread_height + thin_mint, $fn = facets);
+        }
     }
     // flare to stalk
     translate([0, 0, height - 1.5]) {
@@ -647,7 +717,7 @@ module octa_mount_flare(height, lip, transition, radius, top_radius, stalk_heigh
     }
 }
 
-// flares from the body to a dual cable housing
+// flare from the body to a dual cable housing
 
 module octa_mount_flare_dual(height, lip, transition, xradius, yradius, corner, top_radius, stalk_height) {
     // hack to get it to render, fix problem in rounded_block when radius is equal to corner...
@@ -1016,7 +1086,6 @@ module octa_shock_mount_band(band_height, radius, delta_radius) {
 // shock mount internal ring
 
 module octa_shock_mount_internal_ring(height, radius, band_height, corner) {
-    echo(radius);
     delta_radius = pcb_version == 2 ? 7.5 : 6;
     // octagonal band
     octa_shock_mount_band(band_height, radius, delta_radius);
@@ -1050,9 +1119,106 @@ module octa_shock_mount_internal_ring(height, radius, band_height, corner) {
     }
 }
 
+// shock mount sleeve, slips over microphone body and has hooks for the elastic bands
+
+module elastic_band_hook (slot_r = 1.1) {
+    hook_l = 6.0;
+    translate([slot_r, hook_l/2, 0]) {
+        rotate([90, 0, 0]) scale([1, 2.2, 1]) cylinder(r = slot_r, h = hook_l, $fn = facets);
+    }
+}
+
+module octa_shock_mount_sleeve(radius, height, hooks = true, logo = true) {
+    // gap between body and sleeve
+    gap = internal_ring_gap + 0;
+    difference() {
+        // fit gap for slide tubes
+        sgap = 0.2;
+        stop_ro = 2.0 + 2 * wall + sgap;
+        union() {
+            // sleeve
+            rotate([0, 0, 22.5]) rounded_octagon_wall(height, radius + 2 * wall + gap, 2 * wall);
+            // tubes for stops
+            for (r = [0, 90, 180, 270]) {
+                rotate([0, 0, r + 45]) {
+                    translate([radius - 2 * wall + gap, 0, 0]) {
+                        difference() {
+                            scale([1, 1.4, 1]) cylinder(r = stop_ro, h = height, $fn = facets);
+                            translate([-2 * stop_ro, -2 * stop_ro, 0]) {
+                                cube([2 * stop_ro, 4 * stop_ro, height]);
+                            }
+                        }
+                    }
+                }
+            }
+            // pillars for elastic band hooks
+            if (hooks) {
+                for (r = [0, 90, 180, 270]) rotate([0, 0, r + 45]) {
+                    pill_r = 2.5;
+                    translate([radius + stop_ro + gap - 2 * wall, 0, 0]) {
+                        difference() {
+                            scale([2, 1, 1]) cylinder(r = pill_r, h = height, $fn = facets);
+                            translate([-7 * wall, -pill_r, 0]) cube([6 * wall, pill_r * 2, height]);
+                        }
+                    }
+                }
+            }
+            // add ccrma logo
+            if (logo) {
+                rotate([0, 0, 90]) {
+                    translate([0, -(radius - (pcb_version == 2 ? gap + 1.4 : 0) + 2 * wall),
+                    height / 2]) {
+                        rotate([90, 270, 0]) {
+                            logo_scale = 1 / (pcb_version == 2 ? 3.0 : 2.4);
+                            scale([logo_scale, logo_scale, 1.0]) {
+                                ccrma_logo(1.65);
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        // slots for stops and screws
+        for (r = [0, 90, 180, 270]) {
+            // stops
+            stop_r = 2.0 + sgap;
+            rotate([0, 0, r + 45]) {
+                translate([radius - 2 * wall + gap, 0, 0]) {
+                    // there is a little bit of play between the wd assembly and the top
+                    ws_play = 0.4;
+                    cylinder(r = stop_r, h = height - 10.0 - ws_play, $fn = facets);
+                }
+            }
+            // screws
+            screw_h = 1.3;
+            rotate([0, 0, r + 22.5]) {
+                translate([radius - 1.5 * wall + gap, -3.5/2, 0]) {
+                    cube([screw_h + sgap, 3.5, height - 8]);
+                }
+            }
+        }
+        // slot for front mark
+        translate([radius - 2 * wall, 0, 0]) cylinder(r = 1.5, h = height, $fn = facets);
+        // shave channel for logo
+        translate([radius - 2 * wall, -10/2, 0]) cube([wall/3, 10, height]);
+        // upper elastic band hooks
+        for (r = [0, 90, 180, 270]) rotate([0, 0, r + 45]) {
+            translate([radius + stop_ro + gap - 2*wall, 0, height - 1.6]) {
+                elastic_band_hook();
+            }
+        }
+        // lower elastic band hooks
+        for (r = [0, 90, 180, 270]) rotate([0, 0, r + 45]) {
+            translate([radius + stop_ro + gap - 2*wall, 0, 1.6]) {
+                rotate([180, 0, 0]) elastic_band_hook();
+            }
+        }
+    }
+}
+
 // shock mount external ring
 
-module octa_shock_mount_external_ring(height, radius, corner) {
+module octa_shock_mount_external_ring_old(height, radius, corner) {
     // main ring
     rotate([0, 0, 22.5]) rounded_octagon_wall(ring_ext_height, radius, ring_wall);
     for (rot = [0, 90, 180, 270]) {
@@ -1104,6 +1270,60 @@ module octa_shock_mount_external_ring(height, radius, corner) {
     }
 }
 
+module octa_shock_mount_external_ring(height, radius, corner) {
+    // main ring
+    rotate([0, 0, 22.5]) rounded_octagon_wall(ring_ext_height, radius, ring_wall);
+    for (m = [0, 1]) mirror([0, m, 0]) {
+        for (rot = [0, 90, 180, 270]) {
+            // anchors for rubber bands
+            rotate([0, 0, rot + 20]) {
+                translate([radius * cos(22.5) + ring_wall + 2.0, -5, 0]) {
+                    minkowski() {
+                        cube([4 - 3, 6, ring_ext_height]);
+                        cylinder(r = 1.0, h = thin_mint, $fn = facets);
+                    }
+                }
+                translate([radius * cos(22.5), -2, 0]) {
+                    cube([7, 4, ring_ext_height]);
+                }
+            }
+        }
+    }
+    // connection to hub
+    translate([radius * cos(22.5), -2, 0]) {
+        cube([10, 4, ring_ext_height * 2]);
+    }
+    // reinforce connection to ring
+    intersection() {
+        translate([radius * cos(22.5), 0, 0]) {
+            difference() {
+                cylinder(r = 6, h = ring_ext_height * 2, $fn = 4);
+                translate([-10, -5, 0]) {
+                    cube([10, 10, ring_ext_height * 2]);
+                }
+            }
+        }
+        translate([radius + ring_wall - 7, 0, 0]) {
+            rotate([0, 0, 45]) cylinder(r1 = radius * 1.5, r2 = ring_wall/2 + 1, h = ring_ext_height * 2, $fn = 4);
+        }
+    }
+    // reinforcement
+    intersection() {
+        rotate([0, 0, 22.5]) rounded_octagon_wall(ring_ext_height * 2, radius, ring_wall);
+        translate([radius - 6.5, 0, 0]) {
+            rotate([0, 0, 45]) cylinder(r1 = radius * 1.5, r2 = ring_wall/2 + 1, h = ring_ext_height * 2, $fn = 4);
+        }
+    }
+    // rotating mount
+    o_rad = 8;
+    i_rad = 3;
+    rotate([0, 90, -90]) {
+        translate([-o_rad, radius * cos(22.5) + o_rad + ring_wall * 2, -2]) {
+            shock_mount_ring(o_rad, i_rad, ring_wall);
+        }
+    }
+}
+
 
 // stand mount with quick clip connector
 
@@ -1136,46 +1356,6 @@ module octa_quik_release_stand_mount(band_height, radius) {
     }
 }
 
-// mount pillars that plug into robotic arm sockets
-
-module sphear_arm_mount_pillars(radius, height, grip_sep, grip_width) {
-    // pillars for arm grips
-    m_r = 1.0;
-    for (m = [0, 1]) mirror([m, 0, 0]) translate([radius + 3 * wall + m_r, - grip_width/2 + m_r, 0]) {
-        minkowski() {
-            cube([5 - 2*m_r, grip_width - 2*m_r, height]);
-            cylinder(r = m_r, h = thin_mint, $fn = 32);
-        }
-    }
-    // transition
-    tran_h = 30.0;
-    for (m = [0, 1]) mirror([m, 0, 0]) {
-        hull() {
-            translate([radius + 3 * wall + m_r, -grip_width/2 + m_r, height]) {
-                minkowski() {
-                    cube([5 - 2 * m_r, grip_width - 2 * m_r, thin_mint]);
-                    cylinder(r = m_r, h = thin_mint, $fn = 32);
-                }
-            }
-            translate([grip_sep - wall + m_r, -(arm_w + 2 * fit + 2 * wall)/2 + m_r, height + tran_h]) {
-                minkowski() {
-                    cube([arm_l - 2 * fit + 2 * wall - 2 * m_r, arm_w - 2 * fit + 2 * wall - 2 * m_r, thin_mint]);
-                    cylinder(r = m_r, h = thin_mint, $fn = 32);
-                }
-            }
-        }
-    }
-    // grip pillar, plugs into slots
-    for (m = [0, 1]) mirror([m, 0, 0]) {
-        translate([grip_sep + m_r, -(arm_w + 2 * fit)/2 + m_r, height + tran_h]) {
-            minkowski() {
-                cube([arm_l - 2 * fit - 2 * m_r, arm_w - 2 * fit - 2 * m_r, 20 - 3.0]);
-                cylinder(r = m_r, h = thin_mint, $fn = 32);
-            }
-        }
-    }
-}
-
 // octathingy arm mount for robotic arm
 
 module octa_arm_mount(band_height, radius, height) {
@@ -1184,26 +1364,36 @@ module octa_arm_mount(band_height, radius, height) {
     // octagonal band
     octa_shock_mount_band(band_height, radius, pcb_version == 2 ? 7.5 : 6);
     // pillars for arm grips
-    //
-    // this separation between pillars comes from original arm gripper (it
-    // could be something else now), this should be move to a common parameter
-    grip_sep = 25.4 * 1.5 / 2;
-    grip_width = 15.0;
     sphear_arm_mount_pillars(radius, height - 50.0, grip_sep, grip_width);
 }
 
+module octa_arm_mount_pillars(band_height, radius, height, grip_width, grip_depth) {
+    vertical_offset = 18;
+    mount_offset = 3.0;
+    // pillars for arm grips
+    sphear_arm_mount_pillars(radius, height - 60.0, grip_sep, grip_width, grip_depth);
+}
+
 ////
 //// render all the different parts
 ////
 
+// microphone body: stalk from capsule flare to capsule array (for microphone version 1)
+//
+module render_octa_capsule_stalk(z_offset) {
+    translate([0, 0, z_offset]) {
+        octa_mount_stalk(pcb_hi_clear + pcb_hi_exp, mount_lip, flare_height, octa_pcb_radius, mount_radius + wall, stalk_height, 1);
+        translate([0, 0, pcb_hi_clear + pcb_hi_exp + flare_height + stalk_height]) {
+            octa_capsule_array_mount([45, 135, -45, -135]);
+        }
+    }
+}
+
 // microphone body: flare to capsule array (slips into PCB holder body)
 //
 module render_octa_capsule_flare(z_offset) {
     translate([0, 0, z_offset]) {
         octa_mount_flare(pcb_hi_clear + pcb_hi_exp, mount_lip, flare_height, octa_pcb_radius, mount_radius + wall, stalk_height, 1);
-        *translate([0, 0, pcb_hi_clear + pcb_hi_exp + flare_height + stalk_height]) {
-            octa_capsule_array_mount([45, 135, -45, -135]);
-        }
     }
 }
 
@@ -1300,8 +1490,9 @@ module render_octa_body(z_offset, spread, showint) {
 module render_octa_microphone(z_offset, spread) {
     render_octa_body(z_offset, spread);
     lippy = spread - mount_lip;
-    *render_octa_capsule_array(z_offset + octa_pcb_mount_height + mount_top_height +
+    render_octa_capsule_array(z_offset + octa_pcb_mount_height + mount_top_height +
             flare_height + stalk_height + pcb_hi_clear + pcb_hi_exp + 2 * lippy + spread + mic_radius);
+    render_octa_capsule_stalk(z_offset + (pcb_version == 2 ? 43.2 : 49.2) - 10.0);
 }
 
 // microphone: render the full assembly with vertical separation between components

+ 123 - 21
SpHEAR_common.scad

@@ -3,7 +3,7 @@
 //
 // Common Modules and Variables
 //
-// Copyright 2015-2018, Fernando Lopez-Lezcano, All Rights Reserved
+// Copyright 2015-2019, Fernando Lopez-Lezcano, All Rights Reserved
 // nando@ccrma.stanford.edu
 //
 //  This program is free software: you can redistribute it and/or modify
@@ -23,6 +23,8 @@
 //   Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)
 // http://creativecommons.org/licenses/by-nc-sa/4.0/
 
+include <CCRMA_logo.scad>;
+
 ////
 //// default model parameters
 ////
@@ -30,18 +32,20 @@
 // microphone capsule array
 //
 // dimensions of the electret microphone capsule
-capsule_radius = 5;
-capsule_height = 4.5;
+// (specified in each master scad file)
+// capsule_radius
+// capsule_height
 
-// height and width of capsule stop ring
-capsule_ring_h = 0.4;
-capsule_ring_w = 0.5;
+// distance between the face of a capsule and the center of array
+// (specified in each master scad file)
+// mic_radius
 
 // wall thickness of the capsule holder
-wall = 1;
+wall = 1.0;
 
-// distance between the face of a capsule and the center of array
-mic_radius = 9.6;
+// height and width of capsule stop ring
+capsule_ring_h = 0.4;
+capsule_ring_w = 0.5;
 
 // dimensions of the capsule holder connection legs
 // a width of 4mm is too thin, 5mm prints better
@@ -62,6 +66,9 @@ ridge_hfit = 3;
 mount_radius = 3.5;
 mount_wall = 0.75;
 
+// lip that mounts flares into main body box
+mount_lip = 10.0;
+
 // height and eccentricity of top connector
 mount_top_height = 10.0;
 mount_top_eccentricity = 1.3;
@@ -88,6 +95,39 @@ mic_mount_slot_radius = 6.25  / 2;
 mic_mount_wall = 1.5;
 mic_mount_height = 20.0 + mic_wire_hole_offset + mic_wire_hole_radius + 2 * mic_mount_wall;
 
+// 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;
+
+// robotic arm interface
+
+// this separation between pillars comes from original arm Widow XL gripper
+// (it could be something else now)
+grip_sep = 25.4 * 1.5 / 2;
+grip_width = 15.0;
+grip_depth = 5.0;
+
 //// end of model parameters
 ////
 //// rendering control
@@ -117,16 +157,83 @@ fudge = 0.12;
 // 0.1: initial setting
 // 0.1 ->0.15: Ultimaker 2 + Extended plus APL (2016.06.17)
 // 0.15->0.10 (2017.01.21)
-fit = 0.08;
+// Octathingy_common builds -> 0.1, TinySpHEAR_common builds -> 0.15
+fit = 0.15;
 
-// number of facets for rendering cylinders
-facets = 64;
+// number of facets for rendering cylinders (64 for coarse rendering)
+facets = 128;
 // render capsule holders with better resolution
 cfacets = 128;
 // "a wafer-thin mint..."
 // something to use when we need tiny 3d slivers
 thin_mint = 0.001;
 
+//////// Printed circuit board parameters
+
+// size of Zapnspark printed circuit board
+// kicad length = 79.375
+// measured length = 79.20 (2016.08.25)
+pcb_length = pcb_version == 2 ? 72.39 : 79.20;
+// kicad width = 19.050
+// measured width = 18.82 (2016.08.25)
+// v2 (kicad) 15.24 (measured) 15.34
+pcb_width = pcb_version == 2 ? 15.34 : 18.85;
+// ultimaker spec thickness = 1.61
+// measured thickness = 1.56 (w/ copper)
+pcb_thickness = pcb_version == 2 ? 1.68 + 0.02 : 1.58;
+
+// tolerance to add to length and width of pcb
+//
+// measured 3d print width = 18.70 (with pcb_fit = 0.3)
+// actual printed = 18.70 - 0.3 = 16.97
+// total correction = 18.85 - 16.97 = 1.88
+//
+pcb_fit = 0.4;
+
+// tolerance add to thickness of pcb
+//
+// printed with pcb_tfit = 0.15 -> 1.58 + 0.15 = 1.73 (ideal printed)
+// measured print channel = 1.63 : 0.1 thinner (ultimaker 2 plus, 2016.08.24)
+// measured pcb thickness = 1.58 (othermill)
+//
+pcb_tfit = 0.15;
+
+// we leave part of the pcb exposed on the bottom of the body so that we
+// can solder the wires that connect the microphone with the
+// preamplifier, same at the top of the pcb to solder the wires
+// to the capsules
+pcb_low_exp = 12.0;
+pcb_hi_exp = 8.0;
+
+// lip fit for flares
+lip_fit = 0.15;
+
+// clearance from the bottom and top of pcb's to the start of the flare,
+// this adds space for the protuding molex pins on which we solder
+pcb_low_clear = pcb_version == 2 ? 12.0 : 15.0;
+pcb_hi_clear = pcb_version == 2 ? 12.0 : 15.0;
+
+// depth of slot into which the printed circuit board fits
+pcb_slot_depth = 1.0;
+
+// diameter of four conductor cable
+cable_diam = 9.5;
+
+// XXX back and front clearance of pcb (components and leads)
+// XXX this is different for the Octathingy
+pcb_front = pcb_version == 2 ? 2.50 : 3.00;
+pcb_back = pcb_version == 2 ? 1.70 : 1.80;
+
+// shared windscreen parameters
+windscreen_height = 60;
+windscreen_w = 4.0;
+beam_radius = 1.3;
+windscreen_thread_height = pcb_version == 2 ? 8.0 : 10.0;
+windscreen_thread_pitch = 2.0;
+windscreen_thread_angle = 30;
+windscreen_thread_depth = cos(windscreen_thread_angle) * windscreen_thread_pitch * 5/8 + 0.5;
+windscreen_thread_fit = 3 * fit;
+
 ////////
 // microphone capsule holder
 
@@ -697,22 +804,17 @@ module tetra_arm_mount(pillar_h, height, radius, band_height, corner, gap) {
         }
     }
     // pillars for arm grips
-    //
-    // this separation between pillars comes from original arm gripper (it
-    // could be something else now), this should be move to a common parameter
-    grip_sep = 25.4 * 1.5 / 2;
-    grip_width = 15.0;
-    sphear_arm_mount_pillars(radius, pillar_h, grip_sep, grip_width);
+    sphear_arm_mount_pillars(radius, pillar_h, grip_sep, grip_width, grip_depth);
 }
 
 // mount pillars that plug into robotic arm sockets
 
-module sphear_arm_mount_pillars(radius, height, grip_sep, grip_width) {
+module sphear_arm_mount_pillars(radius, height, grip_sep, grip_width, grip_depth) {
     // pillars for arm grips
     m_r = 1.0;
     for (m = [0, 1]) mirror([m, 0, 0]) translate([radius + 3 * wall + m_r, - grip_width/2 + m_r, 0]) {
         minkowski() {
-            cube([5 - 2*m_r, grip_width - 2*m_r, height]);
+            cube([grip_depth - 2*m_r, grip_width - 2*m_r, height]);
             cylinder(r = m_r, h = thin_mint, $fn = 32);
         }
     }
@@ -722,7 +824,7 @@ module sphear_arm_mount_pillars(radius, height, grip_sep, grip_width) {
         hull() {
             translate([radius + 3 * wall + m_r, -grip_width/2 + m_r, height]) {
                 minkowski() {
-                    cube([5 - 2 * m_r, grip_width - 2 * m_r, thin_mint]);
+                    cube([grip_depth - 2 * m_r, grip_width - 2 * m_r, thin_mint]);
                     cylinder(r = m_r, h = thin_mint, $fn = 32);
                 }
             }

+ 72 - 13
SpHEAR_windscreen.scad

@@ -23,15 +23,6 @@
 //   Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)
 // http://creativecommons.org/licenses/by-nc-sa/4.0/
 
-include <SpHEAR_common.scad>
-
-// http://dkprojects.net/openscad-threads/
-// used for the windscreeen mount threads
-include <threads.scad>;
-
-// default number of facets for rendering
-facets = 128;
-
 ////
 //// default model parameters
 ////
@@ -64,6 +55,22 @@ module sphear_windscreen_frame(sides, height, radius, beam_radius, twist) {
     }
 }
 
+// windscreen tapered frame
+
+module sphear_windscreen_tapered_frame(sides, height, radius, radius_h, beam_radius, twist) {
+    echo(radius_h/radius);
+    inc = 360/sides;
+    for (r = [0:inc:360]) for (t = [1, -1]) rotate([0, 0, r]) {
+        render() {
+            linear_extrude(height = height, center = false, convexity = 0, twist = twist * t, scale = radius_h/radius, $fn = facets/2) {
+                translate([radius, 0, 0]) {
+                    circle(r = beam_radius, $fn = facets/2);
+                }
+            }
+        }
+    }
+}
+
 // windscreen inset frame
 
 module sphear_windscreen_inset_frame(sides, height, radius, iradius, beam_radius, xscale = 1.0, yscale = 1.0) {
@@ -157,10 +164,10 @@ module sphear_windscreen_mount(height, radius, beam_radius) {
 
 // round windscreen mount to body with thread
 
-module sphear_windscreen_round_mount(height, radius, wradius, wall) {
+module sphear_windscreen_round_mount(height, radius, wradius, wall, knurl = false) {
     difference() {
         cylinder(r = radius + wall, h = height, $fn = facets);
-        metric_thread(diameter = radius * 2 + windscreen_thread_fit, pitch = windscreen_thread_pitch,
+        rotate([0, 0, -22.5/2]) metric_thread(diameter = radius * 2 + windscreen_thread_fit, pitch = windscreen_thread_pitch,
                 length = height, angle = windscreen_thread_angle, internal = true);
     }
     // outer ring that attaches to windscreen
@@ -172,6 +179,11 @@ module sphear_windscreen_round_mount(height, radius, wradius, wall) {
             }
         }
         cylinder(r = radius + wall, h = height, $fn = facets);
+        if (knurl) {
+            for (r = [0:45/4:360]) rotate([0, 0, r]) {
+                translate([radius + 2 * wall + 1.0 - 0.4, 0, 0]) scale([1.0, 1.5, 1]) cylinder(r = 2.0, h = height, $fn = facets);
+            }
+        }
     }
     // marker for center of microphone
     translate([-(wradius), 0, 0]) {
@@ -323,13 +335,51 @@ module sphear_lower_windscreen(sides, height, radius, beam_radius, conn_radius,
     sphear_windscreen_round_mount(windscreen_thread_height, windscreen_thread_radius, windscreen_radius, 2 * wall);
 }
 
+// lower windscreen frame with inset
+
+module sphear_lower_tapered_windscreen(sides, height, radius, radius_h, beam_radius, conn_radius, pin_height, connectors = true) {
+    ang = 360 / sides;
+    // frame
+    rotate([0, 0, ang/2]) {
+        sphear_windscreen_tapered_frame(sides, height, radius, radius_h, beam_radius, 45);
+    }
+    // frame crossing reinforcements
+    rotate([0, 0, ang/2]) {
+        // first mid crossing
+        translate([0, 0, height/3]) {
+            sphear_windscreen_frame_reinforcements(sides, radius * (radius_h/radius*0.84), beam_radius, ang/2, 0);
+        }
+        // second mid crossing
+        translate([0, 0, height*2/3]) {
+            sphear_windscreen_frame_reinforcements(sides, radius * (radius_h/radius*0.92), beam_radius, 0, 0);
+        }
+    }
+    // connector to upper frame
+    for (r = [1:ang:360]) rotate([0, 0, r]) {
+        translate([radius * (radius_h/radius), -beam_radius/2, height - 1.0 + 0.4]) {
+            render() {
+                difference() {
+                    sphere(r = conn_radius, $fn = facets);
+                    translate([-2 * conn_radius, -2 * conn_radius, (beam_radius) / 2]) {
+                        cube([4 * conn_radius, 4 * conn_radius, 4 * conn_radius]);
+                    }
+                }
+                // pin
+                cylinder(r = beam_radius - fit, h = pin_height, $fn = facets);
+            }
+        }
+    }
+    // mount to body
+    sphear_windscreen_round_mount(windscreen_thread_height, windscreen_thread_radius, windscreen_radius - 1.75, 2 * wall);
+}
+
 //
 // Render components
 //
 
 // upper windscreen
 
-module render_sphear_upper_windscreen(zoffset) {
+module render_sphear_upper_windscreen(windscreen_radius, zoffset) {
     translate([0, 0, zoffset]) {
         sphear_upper_windscreen(windscreen_sides, windscreen_height, windscreen_radius,
             windscreen_beam_radius, windscreen_conn_radius, windscreen_pin_height, connectors = true);
@@ -338,13 +388,22 @@ module render_sphear_upper_windscreen(zoffset) {
 
 // lower windscreen
 
-module render_sphear_lower_windscreen(zoffset) {
+module render_sphear_lower_windscreen(windscreen_radius, zoffset) {
     translate([0, 0, zoffset]) {
         sphear_lower_windscreen(windscreen_sides, windscreen_height, windscreen_radius,
             windscreen_beam_radius, windscreen_conn_radius, windscreen_pin_height, connectors = true);
     }
 }
 
+// lower windscreen
+
+module render_sphear_lower_tapered_windscreen(windscreen_radius_l, windscreen_radius_u, zoffset) {
+    translate([0, 0, zoffset]) {
+        sphear_lower_tapered_windscreen(windscreen_sides, windscreen_height, windscreen_radius_l, windscreen_radius_u,
+            windscreen_beam_radius, windscreen_conn_radius, windscreen_pin_height, connectors = true);
+    }
+}
+
 // windscreen thread cover
 
 module render_sphear_windscreen_thread_cover(zoffset) {

+ 17 - 40
TinySpHEAR_common.scad

@@ -4,7 +4,7 @@
 // TinySpHEAR, First Order (B-format) Ambisonics Microphone
 // Common Modules and Variables
 //
-// Copyright 2015-2016, Fernando Lopez-Lezcano, All Rights Reserved
+// Copyright 2015-2019, Fernando Lopez-Lezcano, All Rights Reserved
 // nando@ccrma.stanford.edu
 //
 //  This program is free software: you can redistribute it and/or modify
@@ -31,44 +31,10 @@
 //// default model parameters
 ////
 
-// microphone capsule array
-//
-// dimensions of the electret microphone capsule
-capsule_radius = 5;
-capsule_height = 4.5;
-
-// distance between the face of a capsule and the center of array
-mic_radius = 9.6;
-
-// dimensions of the capsule holder connection legs
-// a width of 4mm is too thin, 5mm prints better
-leg_width = 5;
-leg_thick = 1.75;
-
-// width of the ridge that connects to the mount
-ridge_width = 2.0;
-ridge_slot_width = 2.0;
-// depth of the connector mount ridge
-ridge_depth = 3.0;
-// add to the thickness of ridges
-ridge_wfit = 0.1;
-ridge_hfit = 3;
-
-// wall thickness of the capsule holder
-wall = 1;
-
-// microphone mount
-//
-mount_radius = 3.5;
-mount_wall = 0.75;
-
 // height and eccentricity of top connector
 mount_top_height = 15.0;
 mount_top_eccentricity = 1.3;
 
-// height of mount
-mount_height = 40;
-
 // microphone stand mount
 //
 // diameter of existing shielded wires (x 4)
@@ -87,6 +53,22 @@ mic_mount_slot_radius = 6.25  / 2;
 mic_mount_wall = 1.5;
 mic_mount_height = 20.0 + mic_wire_hole_offset + mic_wire_hole_radius + 2 * mic_mount_wall;
 
+// back (leads) and front (components) clearance of pcb
+pcb_front = pcb_version == 2 ? 10.00 : 13.25;
+pcb_back = pcb_version == 2 ? 2.0 : 3.0;
+
+// calculated minimum "radius" of microphone box
+box_radius = pcb_front + (pcb_thickness + pcb_tfit) + pcb_back + (pcb_version == 2 ? 1 : 2) * wall;
+
+// calculated main body corner radius
+mount_corner = box_radius - pcb_width / 2 + pcb_slot_depth + (pcb_version == 2 ? 1 : 4);
+
+// calculated radius at the corners
+box_corner_radius = (box_radius + wall - mount_corner) / sin(45) + mount_corner;
+
+// windscreen thread radius (for version 1 of microphone)
+windscreen_thread_radius = box_corner_radius + windscreen_thread_depth;
+
 //// end of model parameters
 ////
 //// rendering control
@@ -133,11 +115,6 @@ fudge = 0.12;
 // 0.1 ->0.15: Ultimaker 2 + Extended plus APL (2016.06.17)
 fit = 0.15;
 
-// number of facets for rendering cylinders
-facets = 64;
-// render capsule holders with better resolution
-cfacets = 128;
-
 // microphone structure geometry
 capsule_sep_min = (mic_radius - capsule_height) * cos(elev_angle) - (capsule_radius + wall) * sin(elev_angle);
 capsule_sep_max = mic_radius * cos(elev_angle) - (capsule_radius + wall) * sin(elev_angle);

+ 2 - 194
TinySpHEAR_mount_pcb.scad

@@ -24,82 +24,13 @@
 //   Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)
 // http://creativecommons.org/licenses/by-nc-sa/4.0/
 
-include <SpHEAR_common.scad>;
-include <TinySpHEAR_common.scad>;
-include <CCRMA_logo.scad>;
-
-// http://dkprojects.net/openscad-threads/
-// used for the windscreeen mount threads
-include <threads.scad>;
-
 ////
 //// default model parameters
 ////
 
-// which version of the pcb we are building for
-// 1: single layer, milled in house
-// 2: double layer with ground plane, smaller, fabricated
-pcb_version = 2;
-
-// size of Zapnspark printed circuit board
-// kicad length = 79.375
-// measured length = 79.20 (2016.08.25)
-pcb_length = pcb_version == 2 ? 72.39 : 79.20;
-// kicad width = 19.050
-// measured width = 18.82 (2016.08.25)
-// v2 (kicad) 15.24 (measured) 15.34
-pcb_width = pcb_version == 2 ? 15.34 : 18.85;
-// ultimaker spec thickness = 1.61
-// measured thickness = 1.56 (w/ copper)
-pcb_thickness = pcb_version == 2 ? 1.68 + 0.02 : 1.58;
-
-// tolerance to add to length and width of pcb
-//
-// measured 3d print width = 18.70 (with pcb_fit = 0.3)
-// actual printed = 18.70 - 0.3 = 16.97
-// total correction = 18.85 - 16.97 = 1.88
-//
-pcb_fit = 0.4;
-
-// tolerance add to thickness of pcb
-//
-// printed with pcb_tfit = 0.15 -> 1.58 + 0.15 = 1.73 (ideal printed)
-// measured print channel = 1.63 : 0.1 thinner (ultimaker 2 plus, 2016.08.24)
-// measured pcb thickness = 1.58 (othermill)
-//
-pcb_tfit = 0.15;
-
-// we leave part of the pcb exposed on the bottom of the body so that we
-// can solder the wires that connect the microphone with the
-// preamplifier, same at the top of the pcb to solder the wires
-// to the capsules
-pcb_low_exp = 12.0;
-pcb_hi_exp = 8.0;
-
-// clearance from the bottom and top of pcb's to the start of the flare,
-// this adds space for the protuding molex pins on which we solder
-pcb_low_clear = pcb_version == 2 ? 12.0 : 15.0;
-pcb_hi_clear = pcb_version == 2 ? 12.0 : 15.0;
-
-// back (leads) and front (components) clearance of pcb
-pcb_front = pcb_version == 2 ? 10.00 : 13.25;
-pcb_back = pcb_version == 2 ? 2.0 : 3.0;
-
-// depth of slot into which the printed circuit board fits
-pcb_slot_depth = 1.0;
-
-// diameter of four conductor cable (Mogami W2931)
-cable_diam = 9.5;
-
 // diameter of microphone capsule cable (Mogami 2490)
 capsule_cable_diam = 1.7;
 
-// lip that mounts flares into main body box
-mount_lip = 10.0;
-
-// lip fit for flares
-lip_fit = 0.05;
-
 // capsule array mount, height of flare and stalk
 flare_height = pcb_version == 2 ? 45 : 50;
 stalk_height = pcb_version == 2 ? 35 : 40;
@@ -107,61 +38,12 @@ stalk_height = pcb_version == 2 ? 35 : 40;
 // adjust mic array to mount relative height
 mic_to_mount_fit = 0.0;
 
-// wall thickness
-wall = 1.0;
-
-// calculated minimum "radius" of microphone box
-box_radius = pcb_front + (pcb_thickness + pcb_tfit) + pcb_back + (pcb_version == 2 ? 1 : 2) * wall;
-
-// calculated main body corner radius
-mount_corner = box_radius - pcb_width / 2 + pcb_slot_depth + (pcb_version == 2 ? 1 : 4);
-
-// calculated radius at the corners
-box_corner_radius = (box_radius + wall - mount_corner) / sin(45) + mount_corner;
-
-//// snap joints to join the body to the two flares
-//
-// render snap joints to join all three main assemblies
-render_snap_joints = false;
-
-// 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;
-
 //// screw holes to join the body to the two flares
 //
 render_screw_holes = true;
 // rotation of holes to avoid pcb slots
 screw_rotation = -3.0;
 
-// 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
 //
 
@@ -188,19 +70,6 @@ ring_ext_height = 6;
 // gap between external ring and support arm
 ring_arm_gap = 20;
 
-// windscreen parameters
-//
-
-windscreen_height = 60;
-windscreen_w = 4.0;
-beam_radius = 1.3;
-windscreen_thread_height = pcb_version == 2 ? 8.0 : 10.0;
-windscreen_thread_pitch = 2.0;
-windscreen_thread_angle = 30;
-windscreen_thread_depth = cos(windscreen_thread_angle) * windscreen_thread_pitch * 5/8 + 0.5;
-windscreen_thread_radius = box_corner_radius + windscreen_thread_depth;
-windscreen_thread_fit = 3 * fit;
-// windscreen_thread_fit = 4 * fit;
 
 // all four printed circuit boards
 
@@ -270,34 +139,6 @@ module tetra_mount_body(height, radius, corner, lower_lip, upper_lip, screw_rota
                     }
                 }
             }
-            if (render_snap_joints) {
-                // slots for snap joint hooks
-                // lower
-                for (m=[-1, 1]) rotate([0, 90, 0]) {
-                    translate([-lower_lip * 3/4, (radius - wall/2)*m, -(snap_joint_hook_w/2 + 0.25)]) {
-                        cylinder(r = snap_joint_hook_r, h = snap_joint_hook_w + 0.5, $fn = facets);
-                    }
-                }
-                // upper
-                for (m=[-1, 1]) rotate([0, 90, 0]) {
-                    translate([- height + upper_lip * 3/4, (radius - wall/2)*m, -(snap_joint_hook_w/2 + 0.25)]) {
-                        cylinder(r = snap_joint_hook_r, h = snap_joint_hook_w + 0.5, $fn = facets);
-                    }
-                }
-            }
-        }
-    }
-    if (render_snap_joints) {
-        // 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, (radius - wall), -(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
@@ -375,14 +216,6 @@ module tetra_mount_flare(height, lip, transition, bot_radius, bot_corner, top_ra
                     }
                 }
             }
-            if (render_snap_joints) {
-                // make snap joint arm thicker
-                for (r = [0, 180]) rotate([0, 0, r]) {
-                    translate([- snap_joint_hook_w - snap_joint_slot_w / 2, bot_radius, 0]) {
-                        cube([snap_joint_hook_w * 2 + snap_joint_slot_w, wall / 2, lip * 1.25]);
-                    }
-                }
-            }
         }
         rounded_block_relative(height, bot_radius, bot_radius, bot_corner, -(2 * wall));
         // cut flange to mount on body
@@ -398,16 +231,6 @@ module tetra_mount_flare(height, lip, transition, bot_radius, bot_corner, top_ra
                 }
             }
         }
-        if (render_snap_joints) {
-            // 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_radius - 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() {
@@ -418,21 +241,6 @@ module tetra_mount_flare(height, lip, transition, bot_radius, bot_corner, top_ra
             }
         }
     }
-    if (render_snap_joints) {
-        // add snap joint hook to arm
-        for (r = [0, 180]) rotate([0, 0, r]) {
-            translate([- snap_joint_hook_w / 2, bot_radius - wall/2, 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() {
@@ -787,7 +595,7 @@ module render_tetra_microphone(z_offset, spread) {
     render_tetra_body(z_offset, spread);
     lippy = spread - mount_lip;
     render_tetra_capsule_array(z_offset + tetra_pcb_mount_height + mount_top_height +
-            flare_height + stalk_height + pcb_hi_clear + pcb_hi_exp + 2 * lippy + spread/2 + mic_radius);
+            flare_height + stalk_height + pcb_hi_clear + pcb_hi_exp + 2 * lippy + spread/2 + mic_radius, 0);
 }
 
 // microphone: render the full assembly with a vertical separation
@@ -799,7 +607,7 @@ module render_tetra_microphone_cutout(z_offset, spread) {
         render_tetra_microphone(z_offset, spread);
         // a cube that blots out 1/4 of the microphone
         rotate([0, 0, 90]) {
-            translate([0, 0, -50]) {
+            translate([0, 0, -300]) {
                 cube([50, 100, 650]);
             }
         }

+ 0 - 3
db25.scad

@@ -53,9 +53,6 @@ d_s = 3.4 / 2;
 // thickness of plate
 t = 1.0;
 
-// facets of cylinders
-facets = 32;
-
 // mini-xlr diameter
 xlr_diam = 0.444 * 2.54;