//
// *SpHEAR Project (Spherical Harmonics Ears),
//
// Mount for four interface 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 .
//
//
// 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 ;
// size of printed circuit board
pcb_length = 85.090;
// measured = 16.26 (fit = 0.25)
pcb_width = 16.51;
// measured = 1.33 (fit = 0.28)
pcb_thickness = 1.61;
// we leave 12mm 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;
// diameter of four conductor cable
cable_diam = 9.5;
// lip that mounts flares into main body box
mount_lip = 6.0;
// main body corner radius
mount_corner = 10.0;
// capsule array mount, height of flare and stalk
flare_height = 50;
stalk_height = 40;
// add to length and width of pcb
pcb_fit = 0.25 / 2;
// add to thickness of pcb
pcb_tfit = 0.3;
// lip fit for flares
// 0.20 seems to be fine (0.3 was too lose)
lip_fit = 0.20 / 2;
// wall thickness
wall = 1.0;
// back and front clearance of pcb (components and leads)
// pcb_front = 10.2;
pcb_front = 12.5;
pcb_back = 2.0;
// calculated minimum "radius" of microphone box
box_radius = pcb_front + (pcb_thickness + pcb_tfit) + pcb_back + 2 * wall;
// 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 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 + 2*pcb_fit, pcb_width + 2*pcb_fit, pcb_thickness + pcb_tfit, slot_depth, front, back);
}
}
}
// create a box with rounded corners
module tetra_mount_box(height, radius, corner) {
rd = radius - corner;
minkowski() {
translate([-rd, -rd, 0]) {
cube([rd * 2, rd * 2, height / 2]);
}
cylinder(r = corner, h = height / 2, $fn = facets);
}
}
module tetra_mount_box_relative(height, ref_radius, ref_corner, radius_inc) {
corner = (ref_radius + radius_inc) * (ref_radius - ref_corner) / ref_radius;
tetra_mount_box(height, ref_radius + radius_inc, corner);
}
// the main body of the microphone mount
module tetra_mount_body(height, radius, corner, lower_lip, upper_lip, clear) {
difference() {
tetra_mount_box(height, radius, corner);
union() {
// hollow out the inside with slots for pcbs
tetra_pcb_clear(pcb_length, pcb_width, pcb_thickness, 1.0, pcb_front, pcb_back);
// trim square angles
cylinder(r = pcb_front, h = height, $fn = facets);
// remove slots from inside body
slot_len = 15;
translate([0, 0, slot_len]) {
hull() {
tetra_mount_box_relative(height - (3 * slot_len), radius, corner, - (2 * wall));
translate([0, 0, height - (2 * slot_len) + height / 3]) {
cylinder(r = radius / 3, h = 1, $fn = facets);
}
}
}
// upper lip for flare to microphone
translate([0, 0, height - upper_lip]) {
difference() {
tetra_mount_box(upper_lip, radius, corner);
tetra_mount_box_relative(upper_lip, radius, corner, -(wall + lip_fit));
}
}
// lower lip for flare to cable
translate([0, 0, 0]) {
difference() {
tetra_mount_box(lower_lip, radius, corner);
tetra_mount_box_relative(lower_lip, radius, corner, -(wall + lip_fit));
}
}
}
}
// external slot for microphone holder
if (0) {
mount_slot_len = 30;
mount_slot_stem = 4;
mount_slot_width = 2;
mount_slot_radius = 2;
translate([-(radius + mount_slot_stem), -(mount_slot_width/2), 0]) {
cube([mount_slot_stem, mount_slot_width, mount_slot_len]);
}
translate([-(radius + mount_slot_stem), 0, 0]) {
cylinder(r = mount_slot_radius, h = mount_slot_len, $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);
}
}
}
// 12.3 x 10.53 caps
cap_h = 12.3;
cap_w = 10.53/2;
for (rot = [0, 180, 270]) {
rotate([0, 0, rot]) {
translate([-pcb_front + cap_h, -cap_w/2 - 2.5, 0]) {
cube([cap_h, cap_w, 20]);
}
}
}
}
}
module tetra_mount_body_new(height, radius, corner, lower_lip, upper_lip, clear) {
difference() {
tetra_mount_box(height, radius, corner);
union() {
// hollow out the inside with slots for pcbs
tetra_pcb_clear(pcb_length, pcb_width, pcb_thickness, 1.0, 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]) {
tetra_mount_box_relative(height, radius, corner, - (2 * wall));
}
// upper lip for flare to microphone
translate([0, 0, height - upper_lip]) {
difference() {
tetra_mount_box(upper_lip, radius, corner);
tetra_mount_box_relative(upper_lip, radius, corner, -(wall + lip_fit));
}
}
// lower lip for flare to cable
translate([0, 0, 0]) {
difference() {
tetra_mount_box(lower_lip, radius, corner);
tetra_mount_box_relative(lower_lip, radius, corner, -(wall + lip_fit));
}
}
}
}
// external slot for microphone holder
if (0) {
mount_slot_len = 30;
mount_slot_stem = 4;
mount_slot_width = 2;
mount_slot_radius = 2;
translate([-(radius + mount_slot_stem), -(mount_slot_width/2), 0]) {
cube([mount_slot_stem, mount_slot_width, mount_slot_len]);
}
translate([-(radius + mount_slot_stem), 0, 0]) {
cylinder(r = mount_slot_radius, h = mount_slot_len, $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);
}
}
}
// 12.3 x 10.53 caps
cap_h = 12.3;
cap_w = 10.53/2;
for (rot = [0, 180, 270]) {
rotate([0, 0, rot]) {
translate([-pcb_front + cap_h, -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, stalk_height) {
// bottom rounded box
difference() {
tetra_mount_box(height, bot_radius, bot_corner);
tetra_mount_box_relative(height, bot_radius, bot_corner, -(2 * wall));
// flange to mount on body
// temporarily add 0.05 for best fit on already printed body (FIXME)
tetra_mount_box_relative(lip + 1.0, bot_radius, bot_corner, - (wall + 0.05));
}
// flare to round section
translate([0, 0, height]) {
difference() {
hull() {
tetra_mount_box(1, bot_radius, bot_corner);
translate([0, 0, transition]) {
cylinder(r = top_radius, h = 1, $fn = facets);
}
}
hull() {
tetra_mount_box_relative(1, bot_radius, bot_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);
}
}
}
// top conical section that plugs into capsule array
module tetra_capsule_array_mount(angles) {
difference() {
translate([0, 0, 0]) {
rotate([0, 0, 45]) {
difference() {
ellipsoid(mount_top_height, mount_radius + wall, mount_radius_capsule, mount_top_eccentricity);
ellipsoid(mount_top_height, mount_radius, mount_radius_capsule * 0.5, mount_top_eccentricity * 1.05);
}
}
}
// indentations that match the two lower capsule holders
// add ridge height adjustment
translate([0, 0, mount_top_height + (mic_radius - capsule_height) + capsule_height * sin(elev_angle)]) {
capsule(angles[0], -elev_angle, [], 0, 1, 0.1, 3, 1);
capsule(angles[1], -elev_angle, [], 0, 1, 0.1, 3, 1);
}
}
}
// internal ring of shock mount
module tetra_shock_mount_body_ring(height, radius, corner, gap, lip) {
slot_sep = radius * 2 / 2.5;
slot_w = 5;
slot_o = height / 3;
// connecting bar dimensions
bar_w = 10;
bar_d = 2;
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, -(bar_w/2 + wall), 0]) {
cube([bar_d + wall, bar_w + 2 * wall, height]);
}
for (m = [0, 1]) mirror([0, m, 0]) {
translate([radius + gap + 4 * wall, -(bar_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, -bar_w/2, 0]) {
cube([bar_d, bar_w, height - 2.75 * wall]);
translate([bar_d / 2, 0, height - 3 * wall]) {
rotate([-90, 0, 0]) {
cylinder(r = bar_d / 2, h = bar_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]]);
}
}
}
}
}
}
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);
}
}
module tetra_shock_mount_main_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);
}
}
}
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]);
}
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, mic_mount_height]) {
difference() {
cylinder(h = mic_mount_radius,
r1 = mic_mount_radius + mount_wall + wall, r2 = 5, $fn = facets);
cylinder(h = mic_mount_radius,
r1 = mic_mount_radius + mount_wall, 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([-(mic_mount_height + o_rad + 6), 0, thk/2 + fit]) {
rotate([0, 0, 45])
tetra_shock_mount_ring(o_rad, i_rad, thk);
}
}
}
}
}
*tetra_shock_mount_stand(mic_mount_height, mount_wall, mic_mount_wall);
*translate([-18, 10, 0])
tetra_shock_mount_connector(ring_sep, 4, 10, 2, 0.1);
*translate([-18, -10, 0])
tetra_shock_mount_connector(ring_sep, 4, 10, 2, 0.1);
// main body of microphone mount
//
//translate([0, 0, -(pcb_length - pcb_low_exp - pcb_hi_exp + 10)]) {
*tetra_mount_body_new(pcb_length - pcb_low_exp - pcb_hi_exp, box_radius + wall, mount_corner, mount_lip, mount_lip, 0);
//}
// flare to microphone stalk
//
//translate([0, 0, pcb_length - pcb_low_exp - pcb_hi_exp + 10]) {
*translate([0, 0, 0]) {
tetra_mount_flare(10 + pcb_hi_exp, mount_lip, flare_height, box_radius + wall, mount_corner,
mount_radius + wall, stalk_height);
translate([0, 0, 10 + pcb_hi_exp + flare_height + stalk_height]) {
tetra_capsule_array_mount([-45, 135]);
}
}
// flare to microphone cable
//
//translate([0, 0, -(10 + pcb_length - pcb_low_exp - pcb_hi_exp + 10)]) {
*translate([0, 0, -17]) {
rotate([0, 180, 0]) {
tetra_mount_flare(10 + pcb_low_exp, mount_lip, 20, box_radius + wall, mount_corner, cable_diam / 2 + wall, 10);
}
}
// shock mount
//
ring_sep = 30;
ring_height = 6;
band_angle = 40;
main_radius_inc = (ring_sep / 2) / tan(band_angle);
body_ring_gap = 1.0;
translate([0, 0, 0]) {
//rotate([0, 180, 0]) {
*tetra_shock_mount_body_ring(10, box_radius + wall, mount_corner, body_ring_gap, 1);
*rotate([0, 180, 0]) {
translate([0, 0, ring_sep + 2]) {
tetra_shock_mount_body_ring(10, box_radius + wall, mount_corner, body_ring_gap, 1);
}
}
// mock up the connecting rods
*for (r = [0, 90, 180, 270]) rotate([0, 0, r])
translate([box_radius + 3 * wall + body_ring_gap, 0, -1])
rotate([0, 90, 0])
translate([-4, -5, 1]) {
tetra_shock_mount_connector(ring_sep, 4, 10, 2, 0.1);
}
//}
}
//translate([0, 0, - ring_sep / 2 - 5]) {
translate([0, 0, 0]) {
tetra_shock_mount_main_ring(10, box_radius + wall, mount_corner, main_radius_inc, 0);
}
// first try at a ccrma logo
//
*rotate([90, 0, 0]) {
translate([0, 10, box_radius + 1.5]) {
scale([0.03, 0.03, 0.02]) {
surface(file = "ccrma-black.png", center = true, invert = true);
}
}
}
// the microphone itself
rendermic = 1;
*translate([0, 0, 2.8 + pcb_hi_exp + flare_height + stalk_height + 30]) {
// all four capsules
capsule(45, elev_angle, leg_angles_top, 60, 0, 0.0, 0.0, 0);
capsule(-135, elev_angle, leg_angles_top, 60, 0, 0.0, 0.0, 0);
capsule(-45, -elev_angle, leg_angles_bot, 0, 1, 0.0, 0.0, 0);
capsule(135, -elev_angle, leg_angles_bot, 0, 1, 0.0, 0.0, 0);
// the mount
*mount([-45, 135], mount_wall, mic_mount_wall, mic_mount_height + mount_top_height + mount_height + capsule_bottom);
}