| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105 |
- //
- // Spherical Harmonics Ear Project (*SpHEAR)
- //
- // TinySpHEAR, First Order (B-format) Ambisonics Microphone
- // Mount for four Zapnspark phantom power printed circuit boards
- //
- // 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 <TinySpHEAR_common.scad>;
- include <CCRMA_logo.scad>;
- // http://dkprojects.net/openscad-threads/
- // used for the windscreeen mount threads
- include <threads.scad>;
- ////
- //// 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;
- // 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;
- // back and front clearance of pcb (components and leads)
- pcb_front = 13.25;
- pcb_back = 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 = 50;
- stalk_height = 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 + 2 * wall;
- // calculated main body corner radius
- mount_corner = box_radius - pcb_width / 2 + pcb_slot_depth + 4.0;
- // 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;
- // 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 = 20;
- // windscreen parameters
- //
- windscreen_height = 60;
- windscreen_w = 4.0;
- beam_radius = 1.3;
- windscreen_thread_height = 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
- module tetra_pcb_clear(length, width, thick, slot_depth, front, back) {
- 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);
- }
- }
- }
- // the main body of the microphone mount
- module tetra_mount_body(height, radius, corner, lower_lip, upper_lip, clear) {
- difference() {
- rounded_block(height, radius, radius, corner);
- union() {
- // hollow out the inside with slots for pcbs
- tetra_pcb_clear(pcb_length, pcb_width, pcb_thickness, pcb_slot_depth, pcb_front, pcb_back);
- // trim square angles
- cylinder(r = pcb_front, h = height, $fn = facets);
- // remove slots from inside body
- slot_len = 30;
- translate([0, 0, slot_len]) {
- difference() {
- rounded_block_relative(height, radius, radius, corner, - (2 * wall));
- if (render_screw_holes) {
- // add columns for upper screw holes
- col_w = 3.5;
- for (r = [45, 135, 225, 315]) rotate([0, 0, r])
- translate([radius - col_w*2/3, -col_w/2, 0]) {
- cube([col_w, col_w, height]);
- }
- }
- }
- }
- // upper lip for flare to microphone
- translate([0, 0, height - upper_lip]) {
- difference() {
- rounded_block(upper_lip, radius, radius, corner);
- rounded_block_relative(upper_lip, radius, radius, corner, -(wall + lip_fit));
- }
- }
- // lower lip for flare to cable
- translate([0, 0, 0]) {
- difference() {
- rounded_block(lower_lip, radius, radius, corner);
- rounded_block_relative(lower_lip, radius, radius, corner, -(wall + lip_fit));
- }
- }
- 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)
- 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);
- }
- }
- }
- }
- 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
- 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 tetra_mount_flare(height, lip, transition, bot_radius, bot_corner, top_radius, windscreen) {
- // bottom rounded box
- difference() {
- union() {
- rounded_block(height, bot_radius, bot_radius, bot_corner);
- if (windscreen) {
- translate([0, 0, lip]) {
- metric_thread(diameter = windscreen_thread_radius * 2, pitch = windscreen_thread_pitch,
- length = lip, angle = windscreen_thread_angle, internal = false);
- }
- cylinder(r2 = box_corner_radius + 1.5, r1 = box_radius + 0.5, h = windscreen_thread_height, $fn = facets);
- // index for back of microphone
- translate([-bot_radius, 0, 0]) {
- cylinder(r = 1.0, h = height, $fn = facets);
- }
- }
- if (render_screw_holes) {
- // small supports 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([bot_radius + wall/3, 0, lip/2]) {
- rotate([0, 90, 0]) {
- cylinder(r = 1.5, h = 2 * wall, $fn = facets);
- }
- }
- }
- }
- 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
- rounded_block_relative(lip + 1.00, bot_radius, bot_radius, bot_corner, - (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([bot_radius + wall, 0, lip/2]) {
- rotate([0, 90, 0]) {
- cylinder(r = (1.6 + 0.1)/2, h = bot_radius, $fn = facets);
- }
- }
- }
- }
- 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() {
- rounded_block_relative(thin_mint, bot_radius, bot_radius, bot_corner, - wall);
- translate([0, 0, 1.0]) {
- rounded_block_relative(thin_mint, bot_radius, bot_radius, bot_corner, - 2 * wall);
- }
- }
- }
- }
- 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() {
- hull() {
- rounded_block(thin_mint, bot_radius, bot_radius, bot_corner);
- translate([0, 0, transition]) {
- cylinder(r = top_radius, h = thin_mint, $fn = facets);
- }
- }
- hull() {
- rounded_block_relative(thin_mint, bot_radius, bot_radius, bot_corner, - wall);
- translate([0, 0, transition]) {
- cylinder(r = top_radius - wall, h = thin_mint, $fn = facets);
- }
- }
- }
- }
- }
- // stalk that connects upper flare to capsule array mount
- module tetra_mount_array_stalk(height, radius) {
- difference() {
- cylinder(r = radius, h = height, $fn = facets);
- cylinder(r = radius - wall, h = height, $fn = facets);
- }
- // add marker for "back of microphone" orientation
- *rotate([0, 0, 90]) {
- translate([0, radius - wall * 2 / 3, height - radius]) {
- difference() {
- sphere(r = radius / 3, $fn = 32);
- translate([0, -radius + radius / 2, 0]) {
- cube([radius, radius, radius], center = true);
- }
- }
- }
- }
- }
- // bottom cable holder
- module tetra_mount_cable_holder(height, radius) {
- difference() {
- cylinder(r = radius, h = height, $fn = facets);
- cylinder(r = radius - wall, h = height, $fn = facets);
- }
- }
- // 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);
- }
- }
- }
- // top conical section that plugs into capsule array
- module tilted_cylinder(radius, height, offset) {
- hull() {
- cylinder(r = radius, h = thin_mint, $fn = facets);
- translate([offset, 0, height]) {
- cylinder(r = radius, h = thin_mint, $fn = facets);
- }
- }
- }
- module tilted_cube(width, depth, height, offset) {
- hull() {
- cube([width, depth, thin_mint]);
- translate([offset, 0, height]) {
- cube([width, depth, thin_mint]);
- }
- }
- }
- module tetra_capsule_array_mount_old(angles, mount_radius, mount_wall) {
- difference() {
- union() {
- rotate([0, 0, 45]) {
- wire_offset = wall;
- wire_diam = mic_wire_diam + mic_wire_fit;
- // FIXME: this 1.75 is the former leg_thick value, it should be calculated
- // based on the capsule diameter so that the cable fits in between the capsules
- // sleeve_width = 1.75 + wire_offset + wire_diam * 2 + wall / 2;
- sleeve_width = 3.75 + wire_offset + wire_diam * 2 + wall / 2;
- sleeve_width_max = capsule_radius + wall;
- sleeve_w = (sleeve_width > sleeve_width_max) ? sleeve_width : sleeve_width_max;
- difference() {
- hull() {
- cylinder(r = mount_radius + mount_wall, h = thin_mint, $fn = facets);
- translate([0, 0, mount_top_height]) {
- rounded_block(thin_mint, sleeve_w, mount_radius_capsule - wall/2, mount_radius*4/5);
- }
- }
- // cavity for printing without support
- scale([1.0, 1.0, 3.0]) {
- sphere(r = mount_radius, $fn = facets);
- }
- // holes for cables
- // offset for outer hole
- hole_offset_l = mount_radius - wire_diam / 2;
- hole_offset_h = (sleeve_w - wall - wire_diam / 2) - hole_offset_l;
- for (m = [0, 1]) mirror([m, 0, 0]) {
- translate([hole_offset_l - wire_diam, 0, 0]) {
- tilted_cylinder(wire_diam / 2, mount_top_height, hole_offset_h);
- }
- translate([hole_offset_l, 0, 0]) {
- tilted_cylinder(wire_diam / 2, mount_top_height, hole_offset_h);
- }
- // shave the inside of the double tube
- translate([hole_offset_l - wire_diam, - wire_diam / 4, 0]) {
- tilted_cube(wire_diam, wire_diam/2, mount_top_height, hole_offset_h);
- }
- }
- }
- }
- }
- // indentations that match the two lower capsule holders
- // add ridge height adjustment
- translate([0, 0, mount_top_height + (mic_radius - capsule_height) + capsule_height * cos(elev_angle) - mic_to_mount_fit]) {
- rotate([0, (90 + elev_angle), angles[0]]) {
- translate([0, 0, mic_radius - capsule_height]) {
- capsule(leg_angles_top, 0, 0, 0.0, 0.0, 1);
- }
- }
- rotate([0, (90 + elev_angle), angles[1]]) {
- translate([0, 0, mic_radius - capsule_height]) {
- capsule(leg_angles_top, 0, 0, 0.0, 0.0, 1);
- }
- }
- }
- // slice top sides of mount
- for (rot = [45, 45 + 180]) {
- translate([0, 0, 0]) {
- rotate([0, 30, rot]) {
- translate([-mount_radius_capsule, -(mount_radius_capsule), mount_top_height])
- cube([mount_radius_capsule*2, mount_radius_capsule*2, 10]);
- }
- }
- }
- }
- }
- module tetra_capsule_array_mount(angles, mount_radius, mount_wall) {
- pedestal = 3.0;
- difference() {
- union() {
- rotate([0, 0, 45]) {
- wire_offset = wall;
- wire_diam = mic_wire_diam + mic_wire_fit;
- difference() {
- // outer sleeve
- hull() {
- for (r = [0, 180]) rotate([0, 0, r]) {
- for (t = [1, -1]) translate([mount_radius + 2 * wall, (wire_diam/2 + wall/4) * t, mount_top_height - pedestal]) {
- cylinder(r = wire_diam/2 + wall, h = pedestal, $fn = facets);
- }
- }
- cylinder(r = mount_radius + mount_wall, h = thin_mint, $fn = facets);
- }
- // holes for cables in top part of sleeve
- for (r = [0, 180]) rotate([0, 0, r]) {
- for (t = [1, -1]) translate([mount_radius + 2 * wall, (wire_diam/2 + wall/4) * t, mount_top_height - pedestal]) {
- cylinder(r = wire_diam/2, h = pedestal, $fn = facets);
- }
- }
- // holes for cables in bottom part of sleeve
- for (r = [0, 180]) rotate([0, 0, r]) {
- for (t = [1, -1]) {
- hull() {
- translate([mount_radius - wire_diam/2 - wall, wire_diam/2 * t, 0]) {
- cylinder(r = wire_diam/2, h = thin_mint, $fn = facets);
- }
- translate([mount_radius + 2 * wall, (wire_diam/2 + wall/4) * t, mount_top_height - pedestal]) {
- cylinder(r = wire_diam/2, h = thin_mint, $fn = facets);
- }
- }
- }
- }
- // cavity for printing without support
- scale([1.0, 1.0, 3.0]) {
- sphere(r = mount_radius, $fn = facets);
- }
- }
- }
- }
- // indentations that match the two lower capsule holders
- // add ridge height adjustment
- translate([0, 0, mount_top_height + (mic_radius - capsule_height) + capsule_height * cos(elev_angle) - mic_to_mount_fit]) {
- rotate([0, (90 + elev_angle), angles[0]]) {
- translate([0, 0, mic_radius - capsule_height]) {
- capsule(leg_angles_top, 0, 0, 0.0, 0.0, 1);
- }
- }
- rotate([0, (90 + elev_angle), angles[1]]) {
- translate([0, 0, mic_radius - capsule_height]) {
- capsule(leg_angles_top, 0, 0, 0.0, 0.0, 1);
- }
- }
- }
- // slice top sides of mount
- for (r = [45, 45 + 180]) rotate([0, 0, r]) {
- translate([mount_radius_capsule, -mount_radius_capsule*1.5, mount_top_height]) {
- rotate([0, 30, 0]) {
- cube([mount_radius_capsule*3, mount_radius_capsule*3, 10]);
- }
- }
- }
- }
- }
- // windscreen frame
- module tetra_windscreen(radius, corner, height, beam_radius, twist, support) {
- // octagonal helix windscreen frame
- for (r = [0, 45, 90, 135, 180, -135, -90, -45]) for (t = [1, -1]) rotate([0, 0, r]) {
- linear_extrude(height = height, center = false, convexity = 0, twist = twist * t, $fn = facets) {
- translate([radius + beam_radius + windscreen_thread_depth, 0, 0]) {
- // square(size = beam_radius * 1.5, center = true);
- circle(r = beam_radius, $fn = facets);
- }
- }
- }
- // connectors to top
- translate([0, 0, height]) {
- for (r = [0, 45, 90, 135, 180, -135, -90, -45]) rotate([0, 0, r + twist]) {
- translate([radius + beam_radius + windscreen_thread_depth, 0, 0]) {
- // cylinder(r = beam_radius * 2/3, h = 2.0, $fn = facets);
- cylinder(r = beam_radius * 1, h = 2.0, $fn = facets);
- //
- // suppport structure for standalone beams
- // these are removed after printing
- if (support) {
- for (s = [0, -129, 120]) rotate([0, 0, s]) {
- translate([0, -0.3, 0]) {
- cube([6, 0.6, 2]);
- }
- }
- }
- }
- }
- }
- }
- // windscreen frame
- module tetra_windscreen_frame(sides, radius, height, beam_radius, twist) {
- 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, $fn = facets) {
- translate([radius, 0, 0]) {
- circle(r = beam_radius, $fn = facets);
- }
- }
- }
- }
- // windscreen inset frame
- module tetra_windscreen_inset_frame(sides, radius, iradius, height, beam_radius, xscale = 1.0, yscale = 1.0) {
- inc = 360/sides;
- difference() {
- for (r = [0:inc:360]) for (t = [1, -1]) rotate([0, 0, r]) {
- render() {
- hull() {
- translate([iradius, 0, 0]) {
- scale([xscale, yscale, 1.0]) cylinder(r = beam_radius, h = thin_mint, $fn = facets);
- }
- rotate([0, 0, inc/2 * t]) translate([radius, 0, height]) {
- cylinder(r = beam_radius, h = thin_mint, $fn = facets);
- }
- }
- }
- }
- cylinder(r = iradius, h = height, $fn = facets);
- }
- }
- // windscreen frame reinforcements
- module tetra_windscreen_frame_reinforcements(sides, radius, beam_radius, zrotation, yrotation) {
- for (r = [0:360/sides:360]) rotate([0, 0, r + zrotation]) {
- translate([radius, 0, 0]) {
- render() rotate([0, yrotation, 0]) intersection() {
- scale([1.0, 1.55, 1.0]) {
- translate([0, 0, -beam_radius * 2]) {
- cylinder(r = beam_radius, h = beam_radius * 4, $fn = facets);
- }
- }
- scale([1, 2, 2.5]) sphere(r = beam_radius, $fn = facets);
- }
- }
- }
- }
- // windscreen frame dome (two plus two)
- module tetra_windscreen_dome_two(radius, beam_radius) {
- rad = radius * cos(180/8);
- difference() {
- for (r = [0, 90]) rotate([0, 0, r]) {
- for (t = [1, -1]) {
- translate([(rad/2 - 1.73 * beam_radius) * t, rad, 0]) rotate([0, 90, 0]) {
- translate([0, -rad, 0]) {
- rotate_extrude(convexity = 10, $fn = facets) {
- translate([rad, 0, 0]) {
- circle(r = beam_radius, $fn = facets);
- }
- }
- }
- }
- }
- }
- brad = rad + beam_radius + thin_mint;
- translate([-brad, -brad, - 2 * brad]) {
- cube([2 * brad, 2 * brad, 2 * brad]);
- }
- }
- }
- // windscreen frame dome (three plus three)
- module tetra_windscreen_dome_three(radius, beam_radius) {
- difference() {
- for (r = [0, 90]) rotate([0, 0, r + 22.5]) {
- translate([0, 0, 0]) rotate([0, 90, 0]) {
- rotate_extrude(convexity = 10, $fn = facets) {
- translate([radius, 0, 0]) {
- circle(r = beam_radius, $fn = facets);
- }
- }
- }
- for (t = [1, -1]) {
- translate([radius * cos(45) * t, 0, 0]) rotate([0, 90, 0]) {
- rotate_extrude(convexity = 10, $fn = facets) {
- translate([radius * cos(45), 0, 0]) {
- circle(r = beam_radius, $fn = facets);
- }
- }
- }
- }
- }
- brad = radius + 2 * beam_radius + thin_mint;
- translate([-brad, -brad, - 2 * brad]) {
- cube([2 * brad, 2 * brad, 2 * brad]);
- }
- }
- }
- module tetra_windscreen_dome_three_n(radius, beam_radius) {
- difference() {
- for (r = [0, 90]) rotate([0, 0, r + 22.5]) {
- for (t = [1, -1]) {
- translate([radius * cos(45) * t, 0, 0]) rotate([0, 90, 0]) {
- rotate_extrude(convexity = 10, $fn = facets) {
- translate([radius * cos(45), 0, 0]) {
- circle(r = beam_radius, $fn = facets);
- }
- }
- }
- }
- }
- brad = radius + 2 * beam_radius + thin_mint;
- translate([-brad, -brad, - 2 * brad]) {
- cube([2 * brad, 2 * brad, 2 * brad]);
- }
- }
- }
- module tetra_windscreen_dome(sides, radius, beam_radius) {
- arcs = sides/2 - 1;
- ang = 360 / sides;
- difference() {
- for (r = [0, 90]) rotate([0, 0, r]) {
- for (t = [1, -1]) {
- translate([radius * sin(ang/2) * t, 0, 0]) rotate([0, 90, 0]) {
- render() rotate_extrude(convexity = 10, $fn = facets) {
- translate([radius * cos(ang/2), 0, 0]) {
- circle(r = beam_radius, $fn = facets);
- }
- }
- }
- translate([radius * sin(ang/(2/3)) * t, 0, 0]) rotate([0, 90, 0]) {
- render() rotate_extrude(convexity = 10, $fn = facets) {
- translate([radius * cos(ang/(2/3)), 0, 0]) {
- circle(r = beam_radius, $fn = facets);
- }
- }
- }
- }
- }
- brad = radius + 2 * beam_radius + thin_mint;
- translate([-brad, -brad, - 2 * brad]) {
- cube([2 * brad, 2 * brad, 2 * brad]);
- }
- }
- }
- // windscreen mount to body with thread
- module tetra_windscreen_mount(height, radius, beam_radius) {
- octagon_radius = (radius + 2 * beam_radius + wall) * cos(PI/8);
- difference() {
- cylinder(r = radius + 2 * beam_radius + windscreen_thread_depth, h = height, $fn = facets);
- metric_thread(diameter = radius * 2 + windscreen_thread_fit, pitch = windscreen_thread_pitch,
- length = height, angle = windscreen_thread_angle, internal = true);
- // make outside be a octagon instead of a circle
- rotate([0, 0, 22.5]) translate([0, 0, -thin_mint]) {
- difference() {
- cylinder(r = 1.5 * radius, h = height + 2 * thin_mint);
- cylinder(r = octagon_radius, h = height + 2 * thin_mint, $fn = 8);
- }
- }
- }
- // marker for center of screen
- translate([-(radius + wall), 0, 0]) {
- cylinder(r = 1.0, h = height, $fn = facets);
- }
- }
- module tetra_windscreen_round_mount(height, radius, wall) {
- difference() {
- cylinder(r = radius + wall, h = height, $fn = facets);
- metric_thread(diameter = radius * 2 + windscreen_thread_fit, pitch = windscreen_thread_pitch,
- length = height, angle = windscreen_thread_angle, internal = true);
- }
- // add better attachment points for windscreen
- difference() {
- union() {
- cylinder(r = radius + 2 * wall, h = height/2, $fn = facets);
- translate([0, 0, height/2]) {
- cylinder(r1 = radius + 2 * wall, r2 = radius + wall, h = height/2, $fn = facets);
- }
- }
- cylinder(r = radius + wall, h = height, $fn = facets);
- }
- // marker for center of microphone
- translate([-(radius + 2 * wall), 0, 0]) {
- cylinder(r = 1.0, h = height/2, $fn = facets);
- }
- }
- // small tube to connect both helical windscreen mounts
- module tetra_windscreen_connector(beam_radius) {
- difference() {
- cylinder(r = beam_radius + 0.8, h = 5, $fn = facets);
- cylinder(r = beam_radius + 2 * fit, h = 5, $fn = facets);
- }
- }
- ////
- //// render all the different parts
- ////
- // microphone body: flare to capsule array (slips into PCB holder body)
- //
- module render_tetra_capsule_flare(z_offset) {
- translate([0, 0, z_offset]) {
- tetra_mount_flare(pcb_hi_clear + pcb_hi_exp,
- mount_lip, flare_height, box_radius + wall, mount_corner, mount_radius + wall, true);
- translate([0, 0, pcb_hi_clear + pcb_hi_exp + flare_height]) {
- tetra_mount_array_stalk(stalk_height, mount_radius + wall);
- }
- translate([0, 0, pcb_hi_clear + pcb_hi_exp + flare_height + stalk_height]) {
- tetra_capsule_array_mount([-45, 135], mount_radius, wall);
- }
- }
- }
- // microphone body: main body, holds printed circuit boards
- //
- tetra_pcb_mount_height = pcb_length - pcb_low_exp - pcb_hi_exp;
- module render_tetra_pcb_mount(z_offset, showint) {
- translate([0, 0, z_offset]) {
- tetra_mount_body(tetra_pcb_mount_height, box_radius + wall, mount_corner, mount_lip, mount_lip, showint);
- // 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.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_tetra_cable_flare(z_offset, flip) {
- translate([0, 0, z_offset]) {
- tetra_mount_flare(pcb_low_clear + pcb_low_exp, mount_lip, 20, box_radius + wall, mount_corner, cable_diam / 2 + wall, false);
- translate([0, 0, pcb_low_clear + pcb_low_exp + 20]) {
- tetra_mount_cable_holder(10, cable_diam / 2 + wall);
- }
- }
- }
- // microphone body: flare to 12 pin connector (slips into PCB holder body)
- //
- module render_tetra_connector_flare(z_offset, flip) {
- translate([0, 0, z_offset]) {
- tetra_mount_flare(pcb_low_clear + pcb_low_exp, mount_lip, 20, box_radius + wall, mount_corner, conn_core_o_diam / 2, false);
- rotate([0, 0, -90]) translate([0, 0, pcb_low_clear + pcb_low_exp + 20]) {
- tetra_mount_connector_holder(conn_core_sleeve, conn_core_o_diam / 2, conn_core_diam / 2, conn_core_overlap, conn_core_s_diam / 2);
- }
- }
- }
- // microphone body: render all parts with a vertical separation
- //
- module render_tetra_body(z_offset, spread, showint) {
- rotate([0, 180, 0]) {
- render_tetra_connector_flare(0);
- }
- lippy = spread - mount_lip;
- render_tetra_pcb_mount(lippy, showint);
- render_tetra_capsule_flare(tetra_pcb_mount_height + 2 * lippy);
- }
- // microphone: render the full assembly with a vertical separation
- //
- 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 + 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_tetra_microphone_cutout(z_offset, spread) {
- difference() {
- render_tetra_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]);
- }
- }
- }
- }
- // windscreen components
- module render_tetra_windscreen_top(z_offset) {
- translate([0, 0, z_offset]) {
- rotate([0, 0, 22.5]) scale([1, 1, 6/7]) {
- tetra_windscreen_dome(box_corner_radius + beam_radius/2, beam_radius);
- }
- rotate([0, 180, 22.5]) {
- tetra_windscreen(box_corner_radius + beam_radius/2, mount_corner, windscreen_height, beam_radius, 45);
- }
- }
- }
- module render_tetra_windscreen_bottom(z_offset) {
- translate([0, 0, z_offset]) rotate([0, 0, 22.5]) {
- tetra_windscreen(box_corner_radius + beam_radius/2, mount_corner, windscreen_height, beam_radius, 45);
- }
- }
- module render_tetra_windscreen_mount(z_offset) {
- translate([0, 0, z_offset]) {
- tetra_windscreen_mount(windscreen_thread_height, windscreen_thread_radius, beam_radius);
- }
- }
- module render_tetra_windscreen_connectors(z_offset) {
- translate([0, 0, z_offset]) {
- for (r = [0, 45, 90, 135, 180, -135, -90, -45]) rotate([0, 0, r + 22.5]) {
- translate([box_corner_radius + beam_radius * 2 + 0.5, 0, 0]) {
- tetra_windscreen_connector(beam_radius);
- }
- }
- }
- }
- // shock mount: microphone clip on stand mount
- //
- module render_tetra_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_tetra_shock_mount_external_ring(z_offset) {
- translate([0, 0, z_offset]) {
- shock_mount_external_ring(ring_height, box_radius + wall, 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]) {
- shock_mount_internal_ring(ring_height, box_radius + wall, 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]) {
- 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]) {
- shock_mount_internal_ring(ring_height, box_radius + wall, 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]) {
- 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([box_radius + mount_corner + ring_wall + ring_arm_gap + 8 + ring_wall / 2 + 1, 0, -(mic_mount_height + mic_mount_radius + ring_height / 4 + 2.2)]) {
- render_tetra_shock_mount_stand(0);
- }
- }
|