| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140 |
- //
- // 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 <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 = 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 = 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 = 3.00;
- pcb_back = 1.80;
- // 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 + 4.0;
- // body parameters
- render_screw_holes = true;
- radial_pcb_offset = 17.0;
- octa_pcb_mount_height = pcb_length - pcb_low_exp - pcb_hi_exp;
- octa_pcb_radius = radial_pcb_offset + pcb_width/2 + 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;
- // 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;
- // wall thickness and height of shock mount rings
- ring_wall = 4 * wall;
- ring_ext_height = 6;
- // gap between external ring and support arm
- 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) {
- 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]);
- }
- translate([slot_d, 0, 0]) {
- cube([pcb_w - 2 * slot_d, pcb_t + front + back, pcb_l]);
- }
- translate([0, back, 0]) {
- cube([pcb_w, pcb_t, pcb_l]);
- }
- // make top and bottom entry channels
- translate([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([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]) {
- 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]) {
- 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]);
- }
- }
- // add capacitor if in test mode
- if (test) {
- cap_diam = 10.2;
- translate([0, cap_diam/2 + pcb_t, 0]) {
- cylinder(r = cap_diam/2, h = 20, $fn = facets);
- }
- }
- }
- module rounded_octagon(height, radius) {
- intersection() {
- cylinder(r = radius, h = height, $fn = 8);
- cylinder(r = radius - wall, h = height, $fn = facets);
- }
- }
- module rounded_octagon_wall(height, radius, wall) {
- difference() {
- rounded_octagon(height, radius);
- rounded_octagon(height + thin_mint, radius - wall);
- }
- }
- module octa_mount_body(height, radius, lower_lip, upper_lip, clear) {
- // rotate pcb assembly so it does not interfere with the screws
- offset_angle = -16;
- // rotate individual pcb's to better use the internal space of the body
- twist_angle = 16;
- difference() {
- union() {
- difference() {
- union() {
- // main body
- 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]) {
- 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,
- pcb_slot_depth, pcb_front, pcb_back, false);
- }
- }
- }
- // clip outside
- rounded_octagon(height, 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) {
- // bottom box
- difference() {
- union() {
- rounded_octagon_wall(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)
- for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
- translate([radius - wall - 1.75, 0, lip/2]) {
- rotate([0, 90, 0]) {
- cylinder(r = 1.5, h = 2 * wall, $fn = facets);
- }
- }
- }
- }
- }
- // flange to mount on body
- rounded_octagon_wall(lip + 1.00, radius - wall, wall);
- // and make a smooth transition to avoid overhangs
- translate([0, 0, lip + 1.00]) {
- hull() {
- rounded_octagon_wall(thin_mint, radius - wall, wall);
- translate([0, 0, 1.0]) {
- rounded_octagon_wall(thin_mint, radius - 2 * wall, wall);
- }
- }
- }
- if (render_screw_holes) {
- // holes for screws that attach the flare to the body
- // Number 0 Size, 1/4" Long = thread diameter: 1.6mm, head diameter: 2.75
- for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
- translate([radius/2, 0, lip/2]) {
- rotate([0, 90, 0]) {
- cylinder(r = (1.6 + 0.1)/2, h = radius, $fn = facets);
- }
- }
- }
- }
- }
- // flare to round section
- translate([0, 0, height]) {
- difference() {
- hull() {
- rounded_octagon(thin_mint, radius);
- translate([0, 0, transition]) {
- cylinder(r = top_radius, h = thin_mint, $fn = facets);
- }
- }
- hull() {
- rounded_octagon(thin_mint, radius - wall);
- translate([0, 0, transition]) {
- cylinder(r = top_radius - wall, h = thin_mint, $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);
- }
- }
- }
- }
- }
- // 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);
- }
- }
- }
- }
- 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);
- 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)
- for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
- translate([radius - wall - 1.75, 0, lip/2]) {
- rotate([0, 90, 0]) {
- cylinder(r = 1.5, h = 2 * wall, $fn = facets);
- }
- }
- }
- }
- // indicator of "front" of microphone
- rotate([0, 0, 180]) translate([radius - 0.75, 0, 0]) {
- cylinder(r = 1.0, h = lip/2, $fn = facets);
- }
- }
- // flange to mount on body
- rounded_octagon_wall(lip + 1.00, radius - wall, wall);
- // and make a smooth transition to avoid overhangs
- translate([0, 0, lip + 1.00]) {
- hull() {
- rounded_octagon_wall(thin_mint, radius - wall, wall);
- translate([0, 0, 1.0]) {
- rounded_octagon_wall(thin_mint, radius - 2 * wall, wall);
- }
- }
- }
- if (render_screw_holes) {
- // holes for screws that attach the flare to the body
- // Number 0 Size, 1/4" Long = thread diameter: 1.6mm, head diameter: 2.75
- for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
- translate([radius/2, 0, lip/2]) {
- rotate([0, 90, 0]) {
- cylinder(r = (1.6 + 0.1)/2, h = radius, $fn = facets);
- }
- }
- }
- }
- }
- // 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);
- }
- // flare to stalk
- translate([0, 0, height - 1.5]) {
- difference() {
- hull() {
- cylinder(r = windscreen_thread_radius - windscreen_thread_depth, h = thin_mint, $fn = facets);
- translate([0, 0, transition + 1.5]) {
- cylinder(r = top_radius, h = thin_mint, $fn = facets);
- }
- }
- hull() {
- cylinder(r = windscreen_thread_radius - windscreen_thread_depth - wall, h = thin_mint, $fn = facets);
- translate([0, 0, transition + 1.5]) {
- cylinder(r = top_radius - wall, h = thin_mint, $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);
- }
- // 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);
- }
- }
- }
- }
- // 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 rounded_block when radius is equal to corner...
- delta = 0.001;
- difference() {
- union() {
- // bottom rounded box
- difference() {
- rounded_block(height, xradius, yradius, corner);
- rounded_block_relative(height, xradius, yradius, corner, -(2 * wall));
- // flange to mount on body
- rounded_block_relative(lip + 1.00, xradius, yradius, corner, - (wall));
- // and make a smooth transition to avoid overhangs
- translate([0, 0, lip + 1.00]) {
- hull() {
- rounded_block_relative(thin_mint, xradius, yradius, corner, - wall);
- translate([0, 0, 1.0]) {
- rounded_block_relative(thin_mint, xradius, yradius, corner, - 2 * wall);
- }
- }
- }
- }
- // flare to rounded section
- translate([0, 0, height]) {
- difference() {
- hull() {
- rounded_block(thin_mint, xradius, yradius, corner);
- translate([0, 0, transition]) {
- rounded_block(thin_mint, top_radius + wall / 2, top_radius * 2 + wall / 2, top_radius - delta);
- }
- }
- hull() {
- rounded_block_relative(thin_mint, xradius, yradius, corner, - 2 * wall);
- translate([0, -top_radius, transition]) {
- cube([thin_mint, (top_radius) * 2, thin_mint]);
- }
- }
- }
- }
- // corner box cable stalk
- translate([0, 0, height + transition]) {
- rounded_block(stalk_height, top_radius + wall / 2, top_radius * 2 + wall / 2, top_radius - delta);
- }
- }
- // holes for the cables
- for (offset = [top_radius - wall/2, -(top_radius - wall/2)]) {
- translate([0, offset, 0]){
- cylinder(r = top_radius - wall, h = height + transition + stalk_height, $fn = facets);
- }
- }
- }
- }
- // flare from the body to a dual conector housing
- // bottom connector holder
- module tetra_mount_connector_holder(height, radius, inside_radius, sleeve_height, sleeve_radius) {
- difference() {
- union() {
- cylinder(r = radius, h = height, $fn = facets);
- // add seats for screw heads
- for (m = [-1, 1]) translate([m * conn_core_holes_w / 2, radius / 2, conn_core_holes_h]) {
- rotate([90, 0, 0]) {
- scale([1, 1, 1]) cylinder(r = conn_core_screw_d / 2, h = radius * 1.43, $fn = facets);
- }
- }
- }
- cylinder(r = inside_radius, h = height, $fn = facets);
- // transition from thin wall to thick wall at the bottom of connector
- *cylinder(r1 = radius - wall, r2 = inside_radius, h = 2.0, $fn = facets);
- // holes for connector core screws
- for (m = [-1, 1]) translate([m * conn_core_holes_w / 2, - radius / 3, conn_core_holes_h]) {
- rotate([90, 0, 0]) {
- cylinder(r = conn_core_holes_d / 2, h = radius, $fn = facets);
- }
- }
- // substract cutout for screw heads
- for (m = [-1, 1]) translate([m * conn_core_holes_w / 2, - radius + 1.5, conn_core_holes_h]) {
- rotate([90, 0, 0]) {
- cylinder(r = conn_core_screw_d / 2, h = 2.0, $fn = facets);
- }
- }
- }
- // thinner cylinder sits inside connector sleeve
- translate([0, 0, height]) {
- difference() {
- cylinder(r = sleeve_radius, h = sleeve_height, $fn = facets);
- cylinder(r = inside_radius, h = sleeve_height, $fn = facets);
- }
- }
- }
- // flare to dual cable connectors
- module octa_mount_flare_connector(height, lip, transition, radius, top_xradius, top_yradius) {
- // hack to get it to render, fix problem in rounded_block when radius is equal to corner...
- delta = 0.001;
- // bottom rounded box
- difference() {
- union() {
- rounded_octagon_wall(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)
- for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
- translate([radius - wall - 1.75, 0, lip/2]) {
- rotate([0, 90, 0]) {
- cylinder(r = 1.5, h = 2 * wall, $fn = facets);
- }
- }
- }
- }
- }
- // flange to mount on body
- rounded_octagon_wall(lip + 1.00, radius - wall, wall);
- // and make a smooth transition to avoid overhangs
- translate([0, 0, lip + 1.00]) {
- hull() {
- rounded_octagon_wall(thin_mint, radius - wall, wall);
- translate([0, 0, 1.0]) {
- rounded_octagon_wall(thin_mint, radius - 2 * wall, wall);
- }
- }
- }
- if (render_screw_holes) {
- // holes for screws that attach the flare to the body
- // Number 0 Size, 1/4" Long = thread diameter: 1.6mm, head diameter: 2.75
- for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
- translate([radius/2, 0, lip/2]) {
- rotate([0, 90, 0]) {
- cylinder(r = (1.6 + 0.1)/2, h = radius, $fn = facets);
- }
- }
- }
- }
- }
- // flare to rounded section
- translate([0, 0, height]) {
- difference() {
- hull() {
- rounded_octagon(thin_mint, radius);
- translate([0, 0, transition]) {
- rounded_block(thin_mint, top_xradius, top_yradius, top_xradius - delta);
- }
- }
- hull() {
- rounded_octagon(thin_mint, radius - 2 * wall);
- translate([0, -top_xradius, transition]) {
- cube([thin_mint, (top_xradius) * 2, thin_mint]);
- }
- }
- }
- }
- }
- // flare to d-sub 25 pin connector
- module octa_mount_flare_dsub(height, lip, transition, radius, top_xradius, top_yradius) {
- // bottom octagonal box
- difference() {
- union() {
- rounded_octagon_wall(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)
- for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
- translate([radius - wall - 1.75, 0, lip/2]) {
- rotate([0, 90, 0]) {
- cylinder(r = 1.5, h = 2 * wall, $fn = facets);
- }
- }
- }
- }
- }
- // flange to mount on body
- rounded_octagon_wall(lip + 1.00, radius - wall, wall);
- // and make a smooth transition to avoid overhangs
- translate([0, 0, lip + 1.00]) {
- hull() {
- rounded_octagon_wall(thin_mint, radius - wall, wall);
- translate([0, 0, 1.0]) {
- rounded_octagon_wall(thin_mint, radius - 2 * wall, wall);
- }
- }
- }
- if (render_screw_holes) {
- // holes for screws that attach the flare to the body
- // Number 0 Size, 1/4" Long = thread diameter: 1.6mm, head diameter: 2.75
- for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
- translate([radius/2, 0, lip/2]) {
- rotate([0, 90, 0]) {
- cylinder(r = (1.6 + 0.1)/2, h = radius, $fn = facets);
- }
- }
- }
- }
- }
- // flare to db25 connector mounting plate
- expand = 3;
- // height of connector
- guard_height = 9.525;
- // thickness of db25 plate
- db25_t = 3 * wall;
- translate([0, 0, height]) {
- minkr = 2.0;
- difference() {
- hull() {
- rounded_octagon(thin_mint, radius);
- rotate([0, 0, -22.5]) translate([0, 0, transition]) {
- minkowski() {
- db25_plate(th = thin_mint, border = expand);
- cylinder(r = minkr, h = thin_mint, $fn = facets);
- }
- }
- }
- hull() {
- rounded_octagon(thin_mint, radius - 2 * wall);
- rotate([0, 0, -22.5]) translate([0, 0, transition]) {
- minkowski() {
- db25_plate(th = thin_mint);
- cylinder(r = minkr, h = thin_mint, $fn = facets);
- }
- }
- }
- }
- // db25 mounting plate
- rotate([0, 0, -22.5]) translate([0, 0, transition]) {
- difference() {
- db25_plate(th = db25_t, border = expand);
- db25_cutout(th = db25_t);
- }
- // add guard wall around connector
- difference() {
- minkowski() {
- db25_plate(th = guard_height + db25_t, border = expand);
- cylinder(r = minkr, h = thin_mint, $fn = facets);
- }
- db25_plate(th = guard_height + db25_t + thin_mint, border = expand);
- }
- }
- // for testing
- *rotate([0, 0, -22.5]) translate([0, 0, 30]) db25_plate(th = 1.0);
- }
- }
- module octa_mount_stand(height, lip, transition, radius, top_xradius, top_yradius) {
- // flare to db25 connector mounting plate
- expand = 3;
- // height of connector
- guard_height = 9.525;
- // thickness of db25 plate
- db25_t = 3 * wall;
- translate([0, 0, height]) {
- minkr = 2.0;
- // db25 mounting plate
- rotate([0, 0, -22.5]) translate([0, 0, transition]) {
- // add guard wall around connector
- difference() {
- minkowski() {
- db25_plate(th = guard_height + db25_t, border = 1.8 * expand);
- cylinder(r = minkr, h = thin_mint, $fn = facets);
- }
- db25_plate(th = guard_height + db25_t + thin_mint, border = 1.8 * expand);
- }
- }
- // ring and connector
- translate([0, 0, height]) {
- o_rad = 8;
- i_rad = 3;
- rotate([0, 90, -22.5]) {
- // connector
- translate([-guard_height, 13, 0]) cube([guard_height, 10, o_rad/2]);
- translate([-guard_height, 9, o_rad/4]) rotate([0, 90, 0]) {
- difference() {
- cylinder(r = o_rad, h = guard_height, $fn = facets);
- translate([-10, -16, 0]) cube([20, 20, 10]);
- }
- }
- // ring
- translate([-o_rad, 30, 0]) {
- shock_mount_ring(o_rad, i_rad, ring_wall);
- }
- }
- }
- }
- }
- // top conical section that plugs into capsule array
- module octa_capsule_array_mount(angles) {
- difference() {
- union() {
- difference() {
- cylinder(h = mount_top_height, r1 = mount_radius + wall, r2 = mount_radius_capsule, $fn = facets);
- cylinder(h = mount_top_height, r1 = mount_radius, r2 = mount_radius_capsule - 3 * wall * wall, $fn = facets);
- }
- // second set of optional "leaves" to get a better mount
- *difference() {
- cylinder(h = mount_top_height, r1 = mount_radius + wall, r2 = mount_radius_capsule * 0.8, $fn = facets);
- cylinder(h = mount_top_height, r1 = mount_radius, r2 = mount_radius_capsule * 0.8 - 1.2 * wall, $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
- 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_capsule) {
- 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);
- }
- }
- }
- }
- }
- }
- }
- }
- //
- // shock mount components
- //
- // shock mount internal ring
- module octa_shock_mount_internal_ring(height, radius, band_height, corner, gap) {
- rotate([0, 0, 22.5]) {
- // inner octagon, hugs the body
- difference() {
- rounded_octagon_wall(band_height, radius + 3 * wall, 2 * wall);
- rotate([0, 0, -22.5 + 90]) translate([-40, -20, 0]) {
- cube([80, 40, 20 + thin_mint]);
- }
- }
- }
- // joins inner and outer octagons
- for (m = [0, 1]) mirror([m, 0, 0]) {
- translate([octa_pcb_radius, -10, 0]) {
- cube([2, 20, band_height]);
- }
- }
- // 8 columns for mounting rubber bands
- for (r = [0, 90, 180, 270]) rotate([0, 0, r]) {
- for (m = [0, 1]) mirror([m, 0, 0]) {
- translate([radius + 1.0, radius/2 - 2, 0]) {
- rotate([0, 0, 0]) {
- difference() {
- // columns
- union() {
- translate([3, 0, 0]) scale([1.2, 0.75, 1.0]) cylinder(r = 3, h = height, $fn = facets);
- }
- // lower slots for rubber bands
- translate([3, radius/2, 0]) scale([1.0, 1.0, 3.0]) rotate([90, 0, 0]) {
- cylinder(r = 1.2, h = radius * 2, $fn = facets);
- }
- // upper slots for rubber bands
- translate([3, radius/2, height]) scale([1.0, 1.0, 3.0]) rotate([90, 0, 0]) {
- cylinder(r = 1.2, h = radius * 2, $fn = facets);
- }
- }
- }
- }
- }
- // the outer octagon, holds the columns
- rotate([0, 0, 22.5]) rounded_octagon_wall(band_height, radius + 6, 2 * wall);
- }
- }
- // shock mount external ring
- module octa_shock_mount_external_ring(height, radius, corner, gap) {
- // main ring
- rotate([0, 0, 22.5]) rounded_octagon_wall(ring_ext_height, 2 * radius - ring_wall, ring_wall);
- for (rot = [0, 90, 180, 270]) {
- // anchors for rubber bands
- rotate([0, 0, rot]) {
- translate([radius + gap + 2 * ring_wall, -7.5, 0]) {
- cube([4, 15, ring_ext_height]);
- }
- translate([radius + gap + ring_wall, -2, 0]) {
- cube([7, 4, ring_ext_height]);
- }
- }
- }
- // connection to stand mount
- intersection() {
- translate([ring_arm_gap, 0, 0]) {
- rotate([0, 0, 22.5]) rounded_octagon_wall(ring_ext_height, 2 * radius - ring_wall, ring_wall);
- }
- translate([ring_arm_gap / 2, -(radius + 2 * corner), 0]) {
- cube([(radius + 2 * corner) + ring_arm_gap, 2 * (radius + 2 * corner), ring_ext_height]);
- }
- }
- // connection to hub
- translate([radius + corner + ring_arm_gap - 0.7, -2, 0]) {
- cube([10, 4, ring_ext_height * 2]);
- }
- // rotating mount
- o_rad = 8;
- i_rad = 3;
- rotate([0, 90, -90]) {
- translate([-o_rad, radius + corner + ring_arm_gap + o_rad + 2 * ring_wall, -2]) {
- shock_mount_ring(o_rad, i_rad, ring_wall);
- }
- }
- }
- ////
- //// 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, 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: main body, holds printed circuit boards
- //
- module render_octa_pcb_mount(z_offset, showint) {
- translate([0, 0, z_offset]) {
- octa_mount_body(octa_pcb_mount_height, octa_pcb_radius, mount_lip, mount_lip, 0);
- // add ccrma logo
- rotate([0, 0, -90 + 22.5]) {
- translate([0, -(octa_pcb_radius - 3.75), octa_pcb_mount_height / 2]) {
- rotate([90, 270, 0]) {
- logo_scale = 1 / 2.4;
- 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: flare to dual cable connectors (slips into PCB holder body)
- //
- module render_octa_connector_flare(z_offset, flip) {
- conn_offset = 2.0;
- conn_wall = conn_core_o_diam / 2 - conn_core_diam / 2;
- translate([0, 0, z_offset]) {
- difference() {
- union() {
- octa_mount_flare_connector(pcb_low_clear + pcb_low_exp, mount_lip, 20,
- octa_pcb_radius,
- conn_core_o_diam / 2, conn_core_o_diam + conn_offset);
- for (m = [0, 1]) mirror([0, m, 0]) translate([0, conn_core_o_diam / 2 + conn_offset, pcb_low_clear + pcb_low_exp + 20]) {
- // add two connectors
- rotate([0, 0, -90]) {
- tetra_mount_connector_holder(conn_core_sleeve, conn_core_o_diam / 2, conn_core_diam / 2,
- conn_core_overlap, conn_core_s_diam / 2);
- }
- // add wall in between the two connectors
- translate([- 2 * wall, - (conn_core_o_diam / 2 + conn_offset), 0]) {
- cube([4 * wall, conn_offset + wall, 10]);
- }
- }
- }
- // redo the hole in the connector holder so that it drills into the top of the flare
- for (m = [0, 1]) mirror([0, m, 0]) translate([0, conn_core_o_diam / 2 + conn_offset, 0]) {
- cylinder(r = conn_core_diam / 2, h = 100, $fn = facets);
- }
- }
- }
- }
- // microphone body: render all parts with a vertical separation
- //
- module render_octa_body(z_offset, spread, showint) {
- rotate([0, 180, 0]) {
- render_octa_connector_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 vertical separation between components
- //
- 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 vertical separation between components
- // cut out half 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, 90]) {
- translate([0, 0, -50]) {
- cube([50, 100, 650]);
- }
- }
- }
- }
- // shock mount: microphone clip on stand mount
- //
- module render_octa_shock_mount_stand(z_offset) {
- translate([z_offset]) {
- shock_mount_stand(mic_mount_height, mount_wall, mic_mount_wall);
- }
- }
- // shock mount: external ring
- //
- module render_octa_shock_mount_external_ring_old(z_offset) {
- translate([0, 0, z_offset]) {
- shock_mount_external_ring(ring_height, box_radius + wall, box_radius * 2 - wall, mount_corner, main_radius_inc, 0);
- }
- }
- module render_octa_shock_mount_external_ring(z_offset) {
- translate([0, 0, z_offset]) {
- octa_shock_mount_external_ring(ring_height, octa_pcb_radius, 20, main_radius_inc);
- }
- }
- // shock mount: bottom internal ring
- //
- module render_octa_shock_mount_internal_ring_bot(z_offset) {
- translate([0, 0, z_offset]) {
- shock_mount_internal_ring(ring_height, box_radius + wall, box_radius * 2 - wall, mount_corner, internal_ring_gap, 1);
- }
- }
- module render_octa_shock_mount_internal_ring_bot(z_offset) {
- translate([0, 0, z_offset]) {
- shock_mount_internal_ring(ring_height, A/2 + wall, A/2 + 3, octa_pcb_radius * 2/3, internal_ring_gap, 1);
- }
- }
- // shock mount: top internal ring
- //
- module render_octa_shock_mount_internal_ring_top_old(z_offset) {
- translate([0, 0, z_offset]) {
- shock_mount_internal_ring(ring_height, box_radius + wall, box_radius * 2 - wall, mount_corner, internal_ring_gap, 0);
- }
- }
- module render_octa_shock_mount_internal_ring_top(z_offset) {
- translate([0, 0, z_offset]) {
- shock_mount_internal_ring(ring_height, A/2 + wall, A/2 + 3, octa_pcb_radius * 2/3, internal_ring_gap, 0);
- }
- }
- // shock mount: all four internal ring connectors
- //
- module render_octa_shock_mount_ring_connectors(offset) {
- for (o = [0, 1, 2, 3]) {
- translate([-18, (10 + offset) * o, 0]) {
- shock_mount_connector(ring_sep, 4, connector_w, connector_d, 0.1);
- }
- }
- }
- // shock mount: render all parts
- //
- module render_octa_shock_mount(z_offset) {
- // internal rings
- translate([0, 0, z_offset + ring_sep / 2]) {
- render_octa_shock_mount_internal_ring_top(0);
- rotate([0, 180, 0]) {
- render_octa_shock_mount_internal_ring_bot(ring_sep + 2);
- }
- // insert the connecting rods
- for (r = [0, 90, 180, 270]) {
- rotate([0, 0, r]) {
- translate([((r % 180) ? box_radius * 2 : box_radius) + 3 * wall + internal_ring_gap, 0, -1]) {
- rotate([0, 90, 0]) {
- translate([-4, -5, 1]) {
- shock_mount_connector(ring_sep, 4, connector_w, connector_d, 0.1);
- }
- }
- }
- }
- }
- }
- // external ring
- translate([0, 0, z_offset - ring_height / 4]) {
- render_octa_shock_mount_external_ring(0);
- }
- // mount to stand
- translate([box_radius + mount_corner + ring_wall + ring_arm_gap + 8 + ring_wall / 2 + 4, 0, -(mic_mount_height + mic_mount_radius + ring_height / 4)]) {
- render_octa_shock_mount_stand(0);
- }
- }
|