Просмотр исходного кода

add Octathingy model with a microphone mount for the zapnspark boards

Fernando Pablo Lopez-Lezcano 10 лет назад
Родитель
Сommit
b1a284bc77
3 измененных файлов с 1020 добавлено и 0 удалено
  1. 82 0
      Octathingy_EM182.scad
  2. 181 0
      Octathingy_common.scad
  3. 757 0
      Octathingy_mount_pcb.scad

+ 82 - 0
Octathingy_EM182.scad

@@ -0,0 +1,82 @@
+//
+// Spherical Harmonics Ear Project (*SpHEAR)
+//
+// 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
+//
+// Microphone optimized for EM182 capsules and Zapnspark interface
+// 
+// Copyright 2015-2016, Fernando Lopez-Lezcano, All Rights Reserved
+// nando@ccrma.stanford.edu
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+// 3d Models released under the Creative Commons license as follows:
+//   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 <Octathingy_mount_pcb.scad>;
+
+// dimensions of the electret microphone capsule
+capsule_radius = 5;
+capsule_height = 4.5;
+mic_radius = 14;
+
+////
+//// render the different assemblies
+////
+
+//// microphone body and array
+
+*render_octa_capsule_array(0);
+
+*render_octa_capsule_flare(0);
+
+*render_octa_pcb_mount(0, 0);
+
+*render_octa_cable_flare(0);
+
+// the whole body
+*render_octa_body(0, 10, 0);
+
+// the whole microphone
+// or use render_octa_microphone_cutout(0, 0) for a "transparent" view
+//
+*render_octa_microphone(0, 0, 0);
+
+//// microphone shock mount
+
+*render_octa_shock_mount_stand(0);
+
+*render_octa_shock_mount_external_ring(0);
+
+*render_octa_shock_mount_internal_ring_bot(0);
+
+*render_octa_shock_mount_internal_ring_top(0);
+
+*render_octa_shock_mount_ring_connectors(5);
+
+// the full mount
+*render_octa_shock_mount(0);
+
+// individual capsule holders
+
+*render_octa_capsule_top(0);
+
+*render_octa_capsule_bot(0);

+ 181 - 0
Octathingy_common.scad

@@ -0,0 +1,181 @@
+//
+// Spherical Harmonics Ear Project (*SpHEAR)
+//
+// 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
+// nando@ccrma.stanford.edu
+//
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+// 3d Models released under the Creative Commons license as follows:
+//   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;
+
+// wall thickness of capsule holder
+wall = 1;
+
+// dimensions of microphone holder
+mount_radius = 4.5;
+mount_wall = 0.75;
+
+// 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 = 0;
+
+//// end of model parameters
+////
+//// rendering control
+
+// what type of connection to use between capsule holders:
+// 0 -> original cylindrical angled legs
+// 1 -> interlocking horizontal legs
+// 2 -> interlocking vertical legs
+connect = 1;
+
+// adjustment for the radius of the capsule
+//   measured inside diameter of a trial print was around 7.5 to 8.2 
+//   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;
+
+//// end of rendering control
+////
+
+// define the elevation angle of the upper and lower rings
+//
+// http://eusebeia.dyndns.org/4d/antiprism4
+//
+// The Cartesian coordinates of the square antiprism, 
+// centered on the origin and having edge length 2, are:
+//
+//    (0, ±√2, 1/∜2)
+//    (±√2, 0, 1/∜2)
+//    (±1, ±1, −1/∜2)
+//
+// the elevation angle for the two rings of 4 is:
+//
+// 1/2*∜2 = 0.420448207627 (z for edge length = 1)
+// atan(1/(2*∜2) / 0.707) = 30.7358671024
+elev_angle =  90 - (tetra_compat == 0 ? atan(1 / (2 * sqrt(sqrt(2))) * sqrt(2)) : atan(sqrt(1/2)));
+
+// calculate half angle between vertices in the square antiprism
+// these angles define the length of the connecting legs
+//
+// z coordinate of antiprism vertices
+vert_z = (sqrt(2) / 2) / tan(elev_angle);
+// vector length (same for all antiprism vertices)
+vert_n = norm([-0.5, -0.5, vert_z]);
+// half angle between adjacent vertices in either the upper or lower rings
+vert_angle_h = acos(([-0.5, -0.5, vert_z] / vert_n) * ([0.5, -0.5, vert_z] / vert_n)) / 2;
+// half angle between adjacent vertices in the upper and lower rings
+vert_angle_v = acos(([0.0, -1 / sqrt(2), -vert_z] / vert_n) * ([0.5, -0.5, vert_z] / vert_n)) / 2;
+
+// angles of the connection legs and adjacent capsule holders
+leg_angles = tetra_compat == 0 ?
+    [
+        [-63, 90 - vert_angle_h], 
+        [63, 90 - vert_angle_h],
+        [-141, 90 - vert_angle_v],
+        [141, 90 - vert_angle_v]
+    ] :
+    [
+        [-60.5, vert_angle_h], 
+        [60.5, vert_angle_h],
+        [-144.5, vert_angle_v],
+        [144.5, vert_angle_v]
+    ];
+
+// microphone holder geometry
+capsule_sep_min = (mic_radius - capsule_height) * sin(elev_angle) - (capsule_radius + wall) * cos(elev_angle);
+capsule_sep_max = mic_radius * sin(elev_angle) - (capsule_radius + wall) * cos(elev_angle);
+capsule_bottom = mic_radius * cos(elev_angle) + (capsule_radius + wall) * sin(elev_angle);
+mount_radius_capsule = capsule_sep_max;
+
+// render the capsule array
+//
+module render_octa_capsule_array(z_offset) {
+    translate([0, 0, z_offset]) {
+        for (az = [45, 135, -45, -135]) {
+            rotate([0, elev_angle, az]) {
+                translate([0, 0, mic_radius - capsule_height]) {
+                    capsule(leg_angles, 180, 0, 0.0, 0.0, 0);
+                }
+            }
+            rotate([0, 180 - elev_angle, az + 45]) {
+                translate([0, 0, mic_radius - capsule_height]) {
+                    capsule(leg_angles, 0, 1, 0.0, 0.0, 0);
+                }
+            }
+        }
+    }
+}
+
+// render individual capsules
+//
+module render_octa_capsule_top() {
+    capsule(leg_angles, 180, 0, 0.0, 0.0, 0);
+}
+
+module render_octa_capsule_bot() {
+    capsule(leg_angles, 0, 1, 0.0, 0.0, 0);
+}
+
+// render simple microphone stand mount
+//
+module render_simple_stand_mount(z_offset) {
+    translate([0, 0, z_offset]) {
+        mount([-45, 135], mount_wall, mic_mount_wall, mic_mount_height + mount_top_height + mount_height + capsule_bottom);
+    }
+}

+ 757 - 0
Octathingy_mount_pcb.scad

@@ -0,0 +1,757 @@
+//
+// Spherical Harmonics Ear Project (*SpHEAR)
+//
+// 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
+// nando@ccrma.stanford.edu
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//  
+// 3d Models released under the Creative Commons license as follows:
+//   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 <Octathingy_common.scad>;
+include <CCRMA_logo.scad>;
+
+////
+//// overrides
+
+mount_radius = 5;
+
+////
+//// default model parameters
+////
+
+// size of Zapnspark printed circuit board
+// kicad length = 79.375
+// measured length = 79.20 (2016.08.25)
+pcb_length = 79.20;
+// kicad width = 19.050
+// measured width = 18.82 (2016.08.25)
+pcb_width = 18.85;
+// ultimaker spec thickness = 1.61
+// measured thickness = 1.56 (w/ copper)
+pcb_thickness = 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 = 6.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 = 13.25;
+pcb_back = 3.0;
+
+// calculated minimum "radius" of microphone box
+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 + 1.0;
+
+// shock mount parameters
+//
+
+ring_sep = 30.0;
+ring_height = 10.0;
+rubber_band_angle = 40;
+main_radius_inc = (ring_sep / 2) / tan(rubber_band_angle);
+
+// gap between internal ring and microphone body
+internal_ring_gap = 1.0;
+
+// connector that joins the two internal rings
+connector_w = 10.0;
+connector_d = 2.0;
+
+// the printed circuit board
+
+module pcb(length, width, thick) {
+    translate([-width/2, 0, 0]) {
+        cube([width, thick, length]);
+    }
+}
+
+// the printed circuit board plus space in the front and back for components
+
+module pcb_clear(length, width, thick, slot_depth, front, back) {
+    translate([0, - (thick + front)]) {
+        pcb(length, width, thick);
+        // clear space in the front
+        translate([- (width/2 - slot_depth), thick, 0]) {
+            cube([width - 2 * slot_depth, front, length]);
+        }
+        // clear space in the back
+        translate([- (width/2 - slot_depth), - back, 0]) {
+            cube([width - 2 * slot_depth, back, length]);
+        }    
+    }
+}
+
+// all eight printed circuit boards
+
+module octa_pcb_clear(length, width, thick, slot_depth, front, back) {
+    for (ytrans = [-1, 1]) {
+        translate([0, ytrans * (front + back + thick), 0]) {
+            for (rot = [0, 90, 180, 270]) {
+                rotate([0, 0, rot]) {
+                    pcb_clear(pcb_length + pcb_fit, pcb_width + pcb_fit, pcb_thickness + pcb_tfit, slot_depth, front, back);
+                }
+            }
+        }
+    }
+}
+
+// box with rounded corners
+
+module solid_round_box(height, width, depth, radius) {
+    dw = width - radius;
+    dd = depth - radius;
+    minkowski() {
+        translate([-dw, -dd, 0]) {
+            cube([dw * 2, dd * 2, height / 2]);
+        }
+        cylinder(r = radius, h = height / 2, $fn = facets);
+    }
+}
+
+module round_box(height, width, depth, radius, wall) {
+    iradius = radius * ((width - wall) / width);
+    difference() {
+        solid_round_box(height, width, depth, radius);
+        solid_round_box(height, width - wall, depth - wall, iradius);
+    }
+}
+
+module octa_mount_box(height, xr, yr, corner) {
+    xrd = xr - corner;
+    yrd = yr - corner;
+    minkowski() {
+        translate([-xrd, -yrd, 0]) {
+            cube([xrd * 2, yrd * 2, height / 2]);
+        }
+        cylinder(r = corner, h = height / 2, $fn = facets);
+    }
+}
+
+// inset box with rounded corners
+
+module octa_mount_box_relative(height, ref_xradius, ref_yradius, ref_corner, radius_inc) {
+    corner = ref_corner * ((ref_xradius + radius_inc) / ref_xradius);
+    octa_mount_box(height, ref_xradius + radius_inc, ref_yradius + radius_inc, corner);
+}
+
+// the main body of the microphone mount
+
+module octa_mount_body(height, width, depth, radius, lower_lip, upper_lip, clear) {
+    // outer shell
+    difference() {
+        round_box(height, width, depth, radius, 2 * wall);
+        // upper lip for flare to microphone
+        translate([0, 0, height - upper_lip]) {
+            round_box(upper_lip, width, depth, radius, wall + lip_fit);
+        }
+            // lower lip for flare to cable
+            translate([0, 0, 0]) {
+                round_box(upper_lip, width, depth, radius, wall + lip_fit);
+            }
+    }
+    // mounting slots for pcb's
+    slot_len = 30;
+    difference() {
+        solid_round_box(slot_len, width - wall - lip_fit, depth - wall - lip_fit, radius);
+        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);
+            // trim square angles
+            for (ytrans = [-1, 1]) {
+                translate([0, ytrans * (pcb_front + pcb_back + pcb_thickness), 0]) {
+                    cylinder(r = pcb_front + pcb_thickness, h = height, $fn = facets);
+                }
+            }
+        }
+    }
+    // add parts for clearance check
+    if (clear == 1) {
+        // electrolytic capacitors
+        cap_diam = 10.2;
+        for (rot = [0, 180, 270]) {
+            rotate([0, 0, rot]) {
+                translate([-pcb_front + cap_diam/2, 0, 0]) {
+                    *cylinder(r = (cap_diam/2), h = 20, $fn = facets);
+                }
+            }
+        }
+        // PCBs
+        for (rot = [0, 180, 270]) {
+            rotate([0, 0, rot]) {
+                translate([-(pcb_front + pcb_thickness), -pcb_width/2, -pcb_low_exp]) {
+                    cube([pcb_thickness, pcb_width, pcb_length]);
+                }
+            }
+        }
+        // connectors
+        cap_h = 12.3;
+        cap_w = 10.53/2;
+        for (rot = [0, 180, 270]) {
+            rotate([0, 0, rot]) {
+                translate([-pcb_front, -cap_w/2 - 2.5, 0]) {
+                    *cube([cap_h, cap_w, 20]);
+                }
+            }
+        }
+    }
+}
+
+// flares from the body to the microphone stalk and cable
+
+module octa_mount_flare(height, lip, transition, xradius, yradius, corner, top_radius, stalk_height, dot) {
+    // bottom rounded box
+    difference() {
+        octa_mount_box(height, xradius, yradius, corner);
+        octa_mount_box_relative(height, xradius, yradius, corner, -(2 * wall));
+        // flange to mount on body
+        octa_mount_box_relative(lip + 1.00, xradius, yradius, corner, - (wall));
+    }
+    // flare to round section
+    translate([0, 0, height]) {
+        difference() {
+            hull() {
+                octa_mount_box(1, xradius, yradius, corner);
+                translate([0, 0, transition]) {
+                    cylinder(r = top_radius, h = 1, $fn = facets);
+                }
+            }
+            hull() {
+                octa_mount_box_relative(1, xradius, yradius, corner, - 2 * wall);
+                translate([0, 0, transition]) {
+                    cylinder(r = top_radius - wall, h = 1, $fn = facets);
+                }
+            }
+        }
+    }
+    // cylindrical stalk
+    translate([0, 0, height + transition]) {
+        difference() {
+            cylinder(r = top_radius, h = stalk_height, $fn = facets);
+            cylinder(r = top_radius - wall, h = stalk_height, $fn = facets);
+        }
+        // add marker for "back of microphone" orientation
+        if (dot == 1) {
+            rotate([0, 0, 90]) {
+                translate([0, top_radius - wall * 2 / 3, stalk_height - top_radius]) {
+                    difference() {
+                        sphere(r = top_radius / 3, $fn = 32);
+                        translate([0, -top_radius + top_radius / 2, 0]) {
+                            cube([top_radius, top_radius, top_radius], center = true);
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
+
+// flares 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 octa_mount_box when radius is equal to corner...
+    delta = 0.001;
+    // bottom rounded box
+    difference() {
+        octa_mount_box(height, xradius, yradius, corner);
+        octa_mount_box_relative(height, xradius, yradius, corner, -(2 * wall));
+        // flange to mount on body
+        octa_mount_box_relative(lip + 1.00, xradius, yradius, corner, - (wall));
+    }
+    // flare to rounded section section
+    translate([0, 0, height]) {
+        difference() {
+            hull() {
+                octa_mount_box(0.01, xradius, yradius, corner);
+                translate([0, 0, transition]) {
+                    octa_mount_box(0.01, top_radius, top_radius * 2, top_radius - delta);
+                }
+            }
+            hull() {
+                octa_mount_box_relative(0.01, xradius, yradius, corner, - 2 * wall);
+                translate([0, 0, transition]) {
+                    octa_mount_box(0.01, top_radius - wall, (top_radius * 2) - 1.5 * wall, top_radius - wall - delta);
+                }
+            }
+        }
+    }
+    // corner box cable stalk
+    translate([0, 0, height + transition]) {
+        difference() {
+            octa_mount_box(stalk_height, top_radius, top_radius * 2, top_radius - delta);
+            // add holes for two cables
+            for (offset = [top_radius - wall/2, -(top_radius  - wall/2)]) {
+                translate([0, offset, 0]){
+                        cylinder(r = top_radius - wall, h = stalk_height, $fn = facets);
+                }
+            }
+        }
+    }
+}
+
+// top conical section that plugs into capsule array
+
+module octa_capsule_array_mount(angles) {
+    difference() {
+        translate([0, 0, 0]) {
+            rotate([0, 0, 45]) {
+                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 * 0.8, $fn = facets);
+                }
+            }
+        }
+        // indentations that match the four lower capsule holders
+        // add ridge height adjustment
+        translate([0, 0, mount_top_height + (mic_radius - capsule_height) + capsule_height * cos(90 - elev_angle) - 2]) {
+            for (az = angles) {
+                rotate([0, 180 - elev_angle, az + 45]) {
+                    translate([0, 0, mic_radius - capsule_height]) {
+                        capsule(leg_angles, 0, 1, ridge_wfit, ridge_hfit, 1);
+                    }
+                }
+            }
+        }
+        // indentations at the top to open up the array a bit
+        echo (mount_radius_capsule);
+        translate([0, 0, mount_top_height + mount_radius_capsule / 8]) {
+            for (rot = [45, 135, -135, -45]) {
+                translate([0, 0, 0]) {
+                    rotate([0, 90, rot]) {
+                        linear_extrude(height = mount_radius + wall * 4) {
+                            minkowski() {
+                                polygon(points = [[0, mount_radius_capsule * 0.35], [0, - mount_radius_capsule * 0.35], 
+                                                  [mount_radius_capsule * 2 / 3, 0]]);
+                                circle(r = 1.0, $fn = facets);
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
+
+// internal ring of shock mount
+
+module tetra_shock_mount_internal_ring(height, radius, corner, gap, lip) {
+    slot_sep = radius * 2 / 2.5;
+    slot_w = 5;
+    slot_o = height / 3;
+    difference() {
+        union() {
+            // base ring
+            difference() {
+                tetra_mount_box_relative(slot_o, radius + gap, corner, 3 * wall);
+                tetra_mount_box(slot_o, radius + gap, corner);
+            }
+            // upper ring with slots for rubber bands
+            difference() {
+                tetra_mount_box_relative(height, radius + gap + 2 * wall, corner, 2 * wall);
+                tetra_mount_box_relative(height, radius + gap + wall, corner, 1 * wall);
+                for (rot = [0, 90, 180, 270]) rotate([0, 0, rot]) {
+                    // slots for rubber bands
+                    minkr = 1.25;
+                    for (m = [0, 1]) mirror([0, m, 0]) {
+                        translate([-slot_w / 2 + slot_sep, radius + gap, slot_o + minkr]) {
+                            minkowski() {
+                                cube([slot_w - minkr, 10, slot_o - minkr]);
+                                rotate([90, 0, 0]) cylinder(r = minkr, h = 1, $fn = facets);
+                            }
+                            translate([slot_w / 2, -2, 0]) {
+                                cube([slot_w / 2, 10, 10]);
+                            }
+                        }
+                    }
+                }
+            }
+            // body for bars that connect both rings together
+            for (rot = [0, 90, 180, 270]) rotate([0, 0, rot]) {
+                translate([radius + gap + 3 * wall, -(connector_w/2 + wall), 0]) {
+                    cube([connector_d + wall, connector_w + 2 * wall, height]);
+                }
+                for (m = [0, 1]) mirror([0, m, 0]) {
+                    translate([radius + gap + 4 * wall, -(connector_w/2 + wall), 0]) {
+                        cylinder(r = wall * 2, h = height, $fn = 3);
+                    }
+                }
+            }
+        }
+        // carve holes for bars that connect both rings
+        for (rot = [0, 90, 180, 270]) rotate([0, 0, rot]) {
+            translate([radius + gap + 3 * wall, -connector_w/2, 0]) {
+                cube([connector_d, connector_w, height - 2.75 * wall]);
+                translate([connector_d / 2, 0, height - 3 * wall]) {
+                    rotate([-90, 0, 0]) {
+                        cylinder(r = connector_d / 2, h = connector_w, $fn = facets);
+                    }
+                }
+            }
+        }
+    }
+    for (rot = [0, 90, 180, 270]) rotate([0, 0, rot]) {
+        // lip to support microphone on lower ring only
+        if (lip == 1) {
+            lip_w = 10;
+            translate([radius + gap + 2.5 * wall, -lip_w/2, height]) {
+                rotate([90, 90, 180]) {
+                    linear_extrude(height = lip_w) {
+                        polygon([[0, 0], [0, 4], [1, 4], [height * 2/3, 0]]);
+                    }
+                }
+            }
+        }
+    }    
+}
+
+// eyelet for connecting the external ring to the stand mount
+
+module tetra_shock_mount_ring(outside_radius, inside_radius, thickness) {
+    difference() {
+        union() {
+            cylinder(r = outside_radius, h = thickness, $fn = facets);
+            translate([0, -outside_radius, 0]) {
+                cube([outside_radius, outside_radius, thickness]);
+            }
+        }
+        cylinder(r = inside_radius, h = thickness, $fn = facets);
+    }
+}
+
+// external ring of shock mount (connects to stand mount)
+
+module tetra_shock_mount_external_ring(height, radius, corner, gap, lip) {
+    difference() {
+        tetra_mount_box_relative(6, radius, mount_corner, gap);
+        tetra_mount_box_relative(6, radius, mount_corner, gap - 4 * wall);
+    }
+    for (rot = [0, 90, 180, 270]) {
+        rotate([0, 0, rot]) {
+            translate([radius + gap + 4 * wall, -7.5, 0]) {
+                cube([4, 15, 6]);
+            }
+            translate([radius + gap, -2, 0]) {
+                cube([7, 4, 6]);
+            }
+        }
+    }
+    // connection to stand mount
+    translate([0, 18, 0]) {
+        intersection() {
+            difference() {
+                tetra_mount_box_relative(6, radius, mount_corner - 5, gap);
+                tetra_mount_box_relative(6, radius, mount_corner - 5, gap - 4 * wall);
+            }
+            translate([-(radius + 2 * mount_corner), 0, 0]) {
+                cube([2 * (radius + 2 * mount_corner), radius + 2 * mount_corner, 6]);
+            }
+        }
+    }
+    // connection to hub
+    translate([-2, radius + 2 * mount_corner + 12, 0]) {
+        cube([4, 10, 6]);
+    }
+    // rotating mount
+    o_rad = 8;
+    i_rad = 3;
+    thk = 4;
+    rotate([0, 90, 0]) {
+        translate([-o_rad, 66, -2]) {
+            tetra_shock_mount_ring(o_rad, i_rad, thk);
+        }
+    }
+}
+
+// connector that joins the two internal rings
+
+module tetra_shock_mount_connector(length, lip, width, thickness, fit) {
+    cube([length + 2 * lip , width - 2 * fit, thickness - 2 * fit]);
+    translate([lip, -(thickness / 2), 0])
+        cube([length , width + thickness, thickness * 3 / 2]);
+}
+
+// mount to standard microphone clip stand mount
+
+module tetra_shock_mount_stand(height, wall, stand_wall) {
+    // stand mount
+    translate([0, 0, 0]) {
+        difference() {
+            union() {
+                // main mount cylinder
+                translate([0, 0, 0]) {
+                    difference() {
+                        cylinder(r = mic_mount_radius + mic_mount_fit + stand_wall, 
+                                h = height, $fn = facets);
+                        // make the hole for the mount (* 1.5 to cut the ridge as well)
+                        cylinder(r = mic_mount_radius + mic_mount_fit, h = height, $fn = facets);
+                    }
+                }
+            }
+            // slot for fitting into microphone stand
+            translate([mic_mount_radius - stand_wall / 2, - mic_mount_slot_width / 2, 0]) {
+                cube([2 * stand_wall, mic_mount_slot_width, mic_mount_slot_height]);
+            }
+            // eyelet for microphone stand
+            translate([mic_mount_radius - stand_wall / 2, 0,  mic_mount_slot_height]) {
+                rotate([0, 90, 0]) {
+                    cylinder(r = mic_mount_slot_radius, h = 2 * stand_wall, $fn = facets);
+                }
+            }
+        }
+        // top of mount
+        translate([0, 0, height]) {
+            difference() {
+                cylinder(h = mic_mount_radius, 
+                        r1 = mic_mount_radius + mount_wall + wall + mic_mount_fit, r2 = 5, $fn = facets);
+                cylinder(h = mic_mount_radius, 
+                        r1 = mic_mount_radius + mount_wall + mic_mount_fit, r2 = 1, $fn = facets);
+            }
+            translate([0, 0, mic_mount_radius - 1]) {
+                cylinder(h = 1, r = 5, $fn = facets);
+            }
+        }
+        // eyelets
+        o_rad = 8;
+        i_rad = 3;
+        thk = 4;
+        for (m = [0, 1]) mirror([0, m, 0]) {
+            rotate([90, 90, 0]) {
+                translate([-(height + o_rad + 6), 0, thk/2 + fit]) {
+                    rotate([0, 0, 45]) 
+                        tetra_shock_mount_ring(o_rad, i_rad, thk);
+                }
+            }
+        }
+    }
+}
+
+////
+//// render all the different parts
+////
+
+// 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, box_radius + wall,  box_radius * 2 - wall, 
+                         mount_corner, 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: main body, holds printed circuit boards
+//
+octa_pcb_mount_height = pcb_length - pcb_low_exp - pcb_hi_exp;
+
+module render_octa_pcb_mount(z_offset, showint) {
+    translate([0, 0, z_offset]) {
+        octa_mount_body(octa_pcb_mount_height, box_radius + wall, box_radius * 2 - wall, mount_corner, mount_lip, mount_lip, 0);
+    }
+    // add ccrma logo
+    rotate([0, 0, -90]) {
+        translate([0, -(box_radius - 0.5), tetra_pcb_mount_height / 2]) {
+            rotate([90, 270, 0]) {
+                logo_scale = 1 / 2.2;
+                scale([logo_scale, logo_scale, 1.0]) {
+                    ccrma_logo(1.65);
+                }
+            }
+        }
+    }
+}
+
+// microphone body: flare to microphone cable (slips into PCB holder body)
+//
+module render_octa_cable_flare(z_offset, flip) {
+    translate([0, 0, z_offset]) {
+        octa_mount_flare_dual(pcb_low_clear + pcb_low_exp, mount_lip, 20, box_radius + wall, box_radius * 2 - wall, 
+                              mount_corner, cable_diam / 2 + wall, 10, 0);
+    }
+}
+
+// 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);
+    }
+    lippy = spread - mount_lip;
+    render_octa_pcb_mount(lippy, showint);
+    render_octa_capsule_flare(octa_pcb_mount_height + 2 * lippy);
+}
+
+// microphone: render the full assembly with a vertical separation
+//
+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 +
+            flare_height + stalk_height + pcb_hi_clear + pcb_hi_exp + 2 * lippy + spread + mic_radius);
+}
+
+// microphone: render the full assembly with a vertical separation
+//             cut out halt of the assembly so that we can see the inside
+//
+
+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]) {
+            translate([0, 0, -50]) {
+                cube([50, 100, 650]);
+            }
+        }
+    }
+}
+
+// shock mount: microphone clip on stand mount
+//
+
+module render_tetra_shock_mount_stand(z_offset) {
+    translate([z_offset]) {
+        tetra_shock_mount_stand(mic_mount_height, mount_wall, mic_mount_wall);
+    }
+}
+
+// shock mount: external ring
+//
+
+module render_tetra_shock_mount_external_ring(z_offset) {
+    translate([0, 0, z_offset]) {
+        tetra_shock_mount_external_ring(ring_height, box_radius + wall, mount_corner, main_radius_inc, 0);
+    }
+}
+
+// shock mount: bottom internal ring
+//
+
+module render_tetra_shock_mount_internal_ring_bot(z_offset) {
+    translate([0, 0, z_offset]) {
+        tetra_shock_mount_internal_ring(ring_height, box_radius + wall, mount_corner, internal_ring_gap, 1);
+    }
+}
+
+// shock mount: all four internal ring connectors
+//
+
+module render_tetra_shock_mount_ring_connectors(offset) {
+    for (o = [0, 1, 2, 3]) {
+        translate([-18, (10 + offset) * o, 0]) {
+            tetra_shock_mount_connector(ring_sep, 4, connector_w, connector_d, 0.1);
+        }
+    }
+}
+
+// shock mount: top internal ring
+//
+
+module render_tetra_shock_mount_internal_ring_top(z_offset) {
+    translate([0, 0, z_offset]) {
+        tetra_shock_mount_internal_ring(ring_height, box_radius + wall, mount_corner, internal_ring_gap, 0);
+    }
+}
+
+// shock mount: render all parts
+//
+
+module render_tetra_shock_mount(z_offset) {
+    // internal rings
+    translate([0, 0, z_offset + ring_sep / 2]) {
+        render_tetra_shock_mount_internal_ring_top(0);
+        rotate([0, 180, 0]) {
+            render_tetra_shock_mount_internal_ring_bot(ring_sep + 2);
+        }
+        // insert the connecting rods
+        for (r = [0, 90, 180, 270]) {
+            rotate([0, 0, r]) {
+                translate([box_radius + 3 * wall + internal_ring_gap, 0, -1]) {
+                    rotate([0, 90, 0]) {
+                        translate([-4, -5, 1]) {
+                            tetra_shock_mount_connector(ring_sep, 4, connector_w, connector_d, 0.1);
+                        }
+                    }
+                }
+            }
+        }
+    }
+    // external ring
+    translate([0, 0, z_offset - ring_height / 4]) {
+        render_tetra_shock_mount_external_ring(0);
+    }
+    // mount to stand
+    translate([0, 85, -(mic_mount_height + mic_mount_radius + ring_height / 4)]) {
+        rotate([0, 0, 90]) {
+            render_tetra_shock_mount_stand(0);
+        }
+    }
+}
+