| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221 |
- //
- // *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 <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/
- // 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;
- // diameter of four conductor cable
- cable_diam = 8.75;
- // 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 (fit = 0.25)
- // tried with 0.30 and seems to be fine
- lip_fit = 0.30 / 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;
- // number of facets for rendering cylinders
- facets = 64;
- // 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);
- }
- }
- }
- 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);
- }
- }
- // the main body of the microphone mount
- module tetra_mount_body(height, radius, corner, lower_lip, upper_lip, clear) {
- rd = radius - corner;
- 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);
- // upper lip for flare to microphone
- translate([0, 0, height - upper_lip]) {
- difference() {
- tetra_mount_box(upper_lip, radius, corner);
- tetra_mount_box(upper_lip, radius - (wall + lip_fit), corner);
- }
- }
- // lower lip for flare to cable
- translate([0, 0, 0]) {
- difference() {
- tetra_mount_box(lower_lip, radius, corner);
- tetra_mount_box(lower_lip, radius - (wall + lip_fit), corner);
- }
- }
- }
- }
- // external slot for microphone holder
- 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, transition, bot_radius, bot_corner, top_radius, stalk_height) {
- // bottom rounded box
- difference() {
- tetra_mount_box(height, bot_radius, bot_corner);
- tetra_mount_box(height, bot_radius - wall, bot_corner);
- }
- // 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(1, bot_radius - wall, bot_corner);
- 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);
- }
- }
- }
- echo("box radius is ", box_radius);
- // main body of microphone mount
- tetra_mount_body(pcb_length, box_radius + wall, 10, 6, 6, 0);
- // flare to microphone stalk
- // translate([0, 0, pcb_length + 10]) {
- *translate([0, 0, 0]) {
- tetra_mount_flare(10, 50, box_radius + wall, 10, 5, 40);
- }
- // flare to microphone cable
- *translate([0, 0, -10]) {
- rotate([0, 180, 0]) {
- tetra_mount_flare(10, 20, 17, 10, cable_diam / 2, 10);
- }
- }
|