Octathingy_mount_pcb.scad 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757
  1. //
  2. // Spherical Harmonics Ear Project (*SpHEAR)
  3. //
  4. // Octathingy, Second Order Ambisonics Microphone
  5. //
  6. // based on:
  7. // "A second-order soundfield microphone with improved polar pattern shape"
  8. // by Eric Benjamin, Audio Engineering Society Convention Paper 8728,
  9. // October 2012, San Francisco
  10. //
  11. // Copyright 2015-2016, Fernando Lopez-Lezcano, All Rights Reserved
  12. // nando@ccrma.stanford.edu
  13. //
  14. // This program is free software: you can redistribute it and/or modify
  15. // it under the terms of the GNU General Public License as published by
  16. // the Free Software Foundation, either version 3 of the License, or
  17. // (at your option) any later version.
  18. //
  19. // This program is distributed in the hope that it will be useful,
  20. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. // GNU General Public License for more details.
  23. //
  24. // You should have received a copy of the GNU General Public License
  25. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  26. //
  27. // 3d Models released under the Creative Commons license as follows:
  28. // Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)
  29. // http://creativecommons.org/licenses/by-nc-sa/4.0/
  30. include <SpHEAR_common.scad>;
  31. include <Octathingy_common.scad>;
  32. include <CCRMA_logo.scad>;
  33. ////
  34. //// overrides
  35. mount_radius = 5;
  36. ////
  37. //// default model parameters
  38. ////
  39. // size of Zapnspark printed circuit board
  40. // kicad length = 79.375
  41. // measured length = 79.20 (2016.08.25)
  42. pcb_length = 79.20;
  43. // kicad width = 19.050
  44. // measured width = 18.82 (2016.08.25)
  45. pcb_width = 18.85;
  46. // ultimaker spec thickness = 1.61
  47. // measured thickness = 1.56 (w/ copper)
  48. pcb_thickness = 1.58;
  49. // tolerance to add to length and width of pcb
  50. //
  51. // measured 3d print width = 18.70 (with pcb_fit = 0.3)
  52. // actual printed = 18.70 - 0.3 = 16.97
  53. // total correction = 18.85 - 16.97 = 1.88
  54. //
  55. pcb_fit = 0.4;
  56. // tolerance add to thickness of pcb
  57. //
  58. // printed with pcb_tfit = 0.15 -> 1.58 + 0.15 = 1.73 (ideal printed)
  59. // measured print channel = 1.63 : 0.1 thinner (ultimaker 2 plus, 2016.08.24)
  60. // measured pcb thickness = 1.58 (othermill)
  61. //
  62. pcb_tfit = 0.15;
  63. // we leave part of the pcb exposed on the bottom of the body so that we
  64. // can solder the wires that connect the microphone with the
  65. // preamplifier, same at the top of the pcb to solder the wires
  66. // to the capsules
  67. pcb_low_exp = 12.0;
  68. pcb_hi_exp = 8.0;
  69. // lip fit for flares
  70. lip_fit = 0.15;
  71. // clearance from the bottom and top of pcb's to the start of the flare,
  72. // this adds space for the protuding molex pins on which we solder
  73. pcb_low_clear = 15.0;
  74. pcb_hi_clear = 15.0;
  75. // depth of slot into which the printed circuit board fits
  76. pcb_slot_depth = 1.0;
  77. // diameter of four conductor cable
  78. cable_diam = 9.5;
  79. // lip that mounts flares into main body box
  80. mount_lip = 6.0;
  81. // capsule array mount, height of flare and stalk
  82. flare_height = 50;
  83. stalk_height = 60;
  84. // wall thickness
  85. wall = 1.0;
  86. // back and front clearance of pcb (components and leads)
  87. pcb_front = 13.25;
  88. pcb_back = 3.0;
  89. // calculated minimum "radius" of microphone box
  90. box_radius = pcb_front + (pcb_thickness + pcb_tfit) + pcb_back + 2 * wall;
  91. // calculated main body corner radius
  92. mount_corner = box_radius - pcb_width / 2 + pcb_slot_depth + 1.0;
  93. // shock mount parameters
  94. //
  95. ring_sep = 30.0;
  96. ring_height = 10.0;
  97. rubber_band_angle = 40;
  98. main_radius_inc = (ring_sep / 2) / tan(rubber_band_angle);
  99. // gap between internal ring and microphone body
  100. internal_ring_gap = 1.0;
  101. // connector that joins the two internal rings
  102. connector_w = 10.0;
  103. connector_d = 2.0;
  104. // the printed circuit board
  105. module pcb(length, width, thick) {
  106. translate([-width/2, 0, 0]) {
  107. cube([width, thick, length]);
  108. }
  109. }
  110. // the printed circuit board plus space in the front and back for components
  111. module pcb_clear(length, width, thick, slot_depth, front, back) {
  112. translate([0, - (thick + front)]) {
  113. pcb(length, width, thick);
  114. // clear space in the front
  115. translate([- (width/2 - slot_depth), thick, 0]) {
  116. cube([width - 2 * slot_depth, front, length]);
  117. }
  118. // clear space in the back
  119. translate([- (width/2 - slot_depth), - back, 0]) {
  120. cube([width - 2 * slot_depth, back, length]);
  121. }
  122. }
  123. }
  124. // all eight printed circuit boards
  125. module octa_pcb_clear(length, width, thick, slot_depth, front, back) {
  126. for (ytrans = [-1, 1]) {
  127. translate([0, ytrans * (front + back + thick), 0]) {
  128. for (rot = [0, 90, 180, 270]) {
  129. rotate([0, 0, rot]) {
  130. pcb_clear(pcb_length + pcb_fit, pcb_width + pcb_fit, pcb_thickness + pcb_tfit, slot_depth, front, back);
  131. }
  132. }
  133. }
  134. }
  135. }
  136. // box with rounded corners
  137. module solid_round_box(height, width, depth, radius) {
  138. dw = width - radius;
  139. dd = depth - radius;
  140. minkowski() {
  141. translate([-dw, -dd, 0]) {
  142. cube([dw * 2, dd * 2, height / 2]);
  143. }
  144. cylinder(r = radius, h = height / 2, $fn = facets);
  145. }
  146. }
  147. module round_box(height, width, depth, radius, wall) {
  148. iradius = radius * ((width - wall) / width);
  149. difference() {
  150. solid_round_box(height, width, depth, radius);
  151. solid_round_box(height, width - wall, depth - wall, iradius);
  152. }
  153. }
  154. module octa_mount_box(height, xr, yr, corner) {
  155. xrd = xr - corner;
  156. yrd = yr - corner;
  157. minkowski() {
  158. translate([-xrd, -yrd, 0]) {
  159. cube([xrd * 2, yrd * 2, height / 2]);
  160. }
  161. cylinder(r = corner, h = height / 2, $fn = facets);
  162. }
  163. }
  164. // inset box with rounded corners
  165. module octa_mount_box_relative(height, ref_xradius, ref_yradius, ref_corner, radius_inc) {
  166. corner = ref_corner * ((ref_xradius + radius_inc) / ref_xradius);
  167. octa_mount_box(height, ref_xradius + radius_inc, ref_yradius + radius_inc, corner);
  168. }
  169. // the main body of the microphone mount
  170. module octa_mount_body(height, width, depth, radius, lower_lip, upper_lip, clear) {
  171. // outer shell
  172. difference() {
  173. round_box(height, width, depth, radius, 2 * wall);
  174. // upper lip for flare to microphone
  175. translate([0, 0, height - upper_lip]) {
  176. round_box(upper_lip, width, depth, radius, wall + lip_fit);
  177. }
  178. // lower lip for flare to cable
  179. translate([0, 0, 0]) {
  180. round_box(upper_lip, width, depth, radius, wall + lip_fit);
  181. }
  182. }
  183. // mounting slots for pcb's
  184. slot_len = 30;
  185. difference() {
  186. solid_round_box(slot_len, width - wall - lip_fit, depth - wall - lip_fit, radius);
  187. union() {
  188. // hollow out the inside with slots for pcbs
  189. octa_pcb_clear(slot_len, pcb_width, pcb_thickness, pcb_slot_depth, pcb_front, pcb_back);
  190. // trim square angles
  191. for (ytrans = [-1, 1]) {
  192. translate([0, ytrans * (pcb_front + pcb_back + pcb_thickness), 0]) {
  193. cylinder(r = pcb_front + pcb_thickness, h = height, $fn = facets);
  194. }
  195. }
  196. }
  197. }
  198. // add parts for clearance check
  199. if (clear == 1) {
  200. // electrolytic capacitors
  201. cap_diam = 10.2;
  202. for (rot = [0, 180, 270]) {
  203. rotate([0, 0, rot]) {
  204. translate([-pcb_front + cap_diam/2, 0, 0]) {
  205. *cylinder(r = (cap_diam/2), h = 20, $fn = facets);
  206. }
  207. }
  208. }
  209. // PCBs
  210. for (rot = [0, 180, 270]) {
  211. rotate([0, 0, rot]) {
  212. translate([-(pcb_front + pcb_thickness), -pcb_width/2, -pcb_low_exp]) {
  213. cube([pcb_thickness, pcb_width, pcb_length]);
  214. }
  215. }
  216. }
  217. // connectors
  218. cap_h = 12.3;
  219. cap_w = 10.53/2;
  220. for (rot = [0, 180, 270]) {
  221. rotate([0, 0, rot]) {
  222. translate([-pcb_front, -cap_w/2 - 2.5, 0]) {
  223. *cube([cap_h, cap_w, 20]);
  224. }
  225. }
  226. }
  227. }
  228. }
  229. // flares from the body to the microphone stalk and cable
  230. module octa_mount_flare(height, lip, transition, xradius, yradius, corner, top_radius, stalk_height, dot) {
  231. // bottom rounded box
  232. difference() {
  233. octa_mount_box(height, xradius, yradius, corner);
  234. octa_mount_box_relative(height, xradius, yradius, corner, -(2 * wall));
  235. // flange to mount on body
  236. octa_mount_box_relative(lip + 1.00, xradius, yradius, corner, - (wall));
  237. }
  238. // flare to round section
  239. translate([0, 0, height]) {
  240. difference() {
  241. hull() {
  242. octa_mount_box(1, xradius, yradius, corner);
  243. translate([0, 0, transition]) {
  244. cylinder(r = top_radius, h = 1, $fn = facets);
  245. }
  246. }
  247. hull() {
  248. octa_mount_box_relative(1, xradius, yradius, corner, - 2 * wall);
  249. translate([0, 0, transition]) {
  250. cylinder(r = top_radius - wall, h = 1, $fn = facets);
  251. }
  252. }
  253. }
  254. }
  255. // cylindrical stalk
  256. translate([0, 0, height + transition]) {
  257. difference() {
  258. cylinder(r = top_radius, h = stalk_height, $fn = facets);
  259. cylinder(r = top_radius - wall, h = stalk_height, $fn = facets);
  260. }
  261. // add marker for "back of microphone" orientation
  262. if (dot == 1) {
  263. rotate([0, 0, 90]) {
  264. translate([0, top_radius - wall * 2 / 3, stalk_height - top_radius]) {
  265. difference() {
  266. sphere(r = top_radius / 3, $fn = 32);
  267. translate([0, -top_radius + top_radius / 2, 0]) {
  268. cube([top_radius, top_radius, top_radius], center = true);
  269. }
  270. }
  271. }
  272. }
  273. }
  274. }
  275. }
  276. // flares from the body to a dual cable housing
  277. module octa_mount_flare_dual(height, lip, transition, xradius, yradius, corner, top_radius, stalk_height) {
  278. // hack to get it to render, fix problem in octa_mount_box when radius is equal to corner...
  279. delta = 0.001;
  280. // bottom rounded box
  281. difference() {
  282. octa_mount_box(height, xradius, yradius, corner);
  283. octa_mount_box_relative(height, xradius, yradius, corner, -(2 * wall));
  284. // flange to mount on body
  285. octa_mount_box_relative(lip + 1.00, xradius, yradius, corner, - (wall));
  286. }
  287. // flare to rounded section section
  288. translate([0, 0, height]) {
  289. difference() {
  290. hull() {
  291. octa_mount_box(0.01, xradius, yradius, corner);
  292. translate([0, 0, transition]) {
  293. octa_mount_box(0.01, top_radius, top_radius * 2, top_radius - delta);
  294. }
  295. }
  296. hull() {
  297. octa_mount_box_relative(0.01, xradius, yradius, corner, - 2 * wall);
  298. translate([0, 0, transition]) {
  299. octa_mount_box(0.01, top_radius - wall, (top_radius * 2) - 1.5 * wall, top_radius - wall - delta);
  300. }
  301. }
  302. }
  303. }
  304. // corner box cable stalk
  305. translate([0, 0, height + transition]) {
  306. difference() {
  307. octa_mount_box(stalk_height, top_radius, top_radius * 2, top_radius - delta);
  308. // add holes for two cables
  309. for (offset = [top_radius - wall/2, -(top_radius - wall/2)]) {
  310. translate([0, offset, 0]){
  311. cylinder(r = top_radius - wall, h = stalk_height, $fn = facets);
  312. }
  313. }
  314. }
  315. }
  316. }
  317. // top conical section that plugs into capsule array
  318. module octa_capsule_array_mount(angles) {
  319. difference() {
  320. translate([0, 0, 0]) {
  321. rotate([0, 0, 45]) {
  322. difference() {
  323. cylinder(h = mount_top_height, r1 = mount_radius + wall, r2 = mount_radius_capsule, $fn = facets);
  324. cylinder(h = mount_top_height, r1 = mount_radius, r2 = mount_radius_capsule * 0.8, $fn = facets);
  325. }
  326. }
  327. }
  328. // indentations that match the four lower capsule holders
  329. // add ridge height adjustment
  330. translate([0, 0, mount_top_height + (mic_radius - capsule_height) + capsule_height * cos(90 - elev_angle) - 2]) {
  331. for (az = angles) {
  332. rotate([0, 180 - elev_angle, az + 45]) {
  333. translate([0, 0, mic_radius - capsule_height]) {
  334. capsule(leg_angles, 0, 1, ridge_wfit, ridge_hfit, 1);
  335. }
  336. }
  337. }
  338. }
  339. // indentations at the top to open up the array a bit
  340. echo (mount_radius_capsule);
  341. translate([0, 0, mount_top_height + mount_radius_capsule / 8]) {
  342. for (rot = [45, 135, -135, -45]) {
  343. translate([0, 0, 0]) {
  344. rotate([0, 90, rot]) {
  345. linear_extrude(height = mount_radius + wall * 4) {
  346. minkowski() {
  347. polygon(points = [[0, mount_radius_capsule * 0.35], [0, - mount_radius_capsule * 0.35],
  348. [mount_radius_capsule * 2 / 3, 0]]);
  349. circle(r = 1.0, $fn = facets);
  350. }
  351. }
  352. }
  353. }
  354. }
  355. }
  356. }
  357. }
  358. // internal ring of shock mount
  359. module tetra_shock_mount_internal_ring(height, radius, corner, gap, lip) {
  360. slot_sep = radius * 2 / 2.5;
  361. slot_w = 5;
  362. slot_o = height / 3;
  363. difference() {
  364. union() {
  365. // base ring
  366. difference() {
  367. tetra_mount_box_relative(slot_o, radius + gap, corner, 3 * wall);
  368. tetra_mount_box(slot_o, radius + gap, corner);
  369. }
  370. // upper ring with slots for rubber bands
  371. difference() {
  372. tetra_mount_box_relative(height, radius + gap + 2 * wall, corner, 2 * wall);
  373. tetra_mount_box_relative(height, radius + gap + wall, corner, 1 * wall);
  374. for (rot = [0, 90, 180, 270]) rotate([0, 0, rot]) {
  375. // slots for rubber bands
  376. minkr = 1.25;
  377. for (m = [0, 1]) mirror([0, m, 0]) {
  378. translate([-slot_w / 2 + slot_sep, radius + gap, slot_o + minkr]) {
  379. minkowski() {
  380. cube([slot_w - minkr, 10, slot_o - minkr]);
  381. rotate([90, 0, 0]) cylinder(r = minkr, h = 1, $fn = facets);
  382. }
  383. translate([slot_w / 2, -2, 0]) {
  384. cube([slot_w / 2, 10, 10]);
  385. }
  386. }
  387. }
  388. }
  389. }
  390. // body for bars that connect both rings together
  391. for (rot = [0, 90, 180, 270]) rotate([0, 0, rot]) {
  392. translate([radius + gap + 3 * wall, -(connector_w/2 + wall), 0]) {
  393. cube([connector_d + wall, connector_w + 2 * wall, height]);
  394. }
  395. for (m = [0, 1]) mirror([0, m, 0]) {
  396. translate([radius + gap + 4 * wall, -(connector_w/2 + wall), 0]) {
  397. cylinder(r = wall * 2, h = height, $fn = 3);
  398. }
  399. }
  400. }
  401. }
  402. // carve holes for bars that connect both rings
  403. for (rot = [0, 90, 180, 270]) rotate([0, 0, rot]) {
  404. translate([radius + gap + 3 * wall, -connector_w/2, 0]) {
  405. cube([connector_d, connector_w, height - 2.75 * wall]);
  406. translate([connector_d / 2, 0, height - 3 * wall]) {
  407. rotate([-90, 0, 0]) {
  408. cylinder(r = connector_d / 2, h = connector_w, $fn = facets);
  409. }
  410. }
  411. }
  412. }
  413. }
  414. for (rot = [0, 90, 180, 270]) rotate([0, 0, rot]) {
  415. // lip to support microphone on lower ring only
  416. if (lip == 1) {
  417. lip_w = 10;
  418. translate([radius + gap + 2.5 * wall, -lip_w/2, height]) {
  419. rotate([90, 90, 180]) {
  420. linear_extrude(height = lip_w) {
  421. polygon([[0, 0], [0, 4], [1, 4], [height * 2/3, 0]]);
  422. }
  423. }
  424. }
  425. }
  426. }
  427. }
  428. // eyelet for connecting the external ring to the stand mount
  429. module tetra_shock_mount_ring(outside_radius, inside_radius, thickness) {
  430. difference() {
  431. union() {
  432. cylinder(r = outside_radius, h = thickness, $fn = facets);
  433. translate([0, -outside_radius, 0]) {
  434. cube([outside_radius, outside_radius, thickness]);
  435. }
  436. }
  437. cylinder(r = inside_radius, h = thickness, $fn = facets);
  438. }
  439. }
  440. // external ring of shock mount (connects to stand mount)
  441. module tetra_shock_mount_external_ring(height, radius, corner, gap, lip) {
  442. difference() {
  443. tetra_mount_box_relative(6, radius, mount_corner, gap);
  444. tetra_mount_box_relative(6, radius, mount_corner, gap - 4 * wall);
  445. }
  446. for (rot = [0, 90, 180, 270]) {
  447. rotate([0, 0, rot]) {
  448. translate([radius + gap + 4 * wall, -7.5, 0]) {
  449. cube([4, 15, 6]);
  450. }
  451. translate([radius + gap, -2, 0]) {
  452. cube([7, 4, 6]);
  453. }
  454. }
  455. }
  456. // connection to stand mount
  457. translate([0, 18, 0]) {
  458. intersection() {
  459. difference() {
  460. tetra_mount_box_relative(6, radius, mount_corner - 5, gap);
  461. tetra_mount_box_relative(6, radius, mount_corner - 5, gap - 4 * wall);
  462. }
  463. translate([-(radius + 2 * mount_corner), 0, 0]) {
  464. cube([2 * (radius + 2 * mount_corner), radius + 2 * mount_corner, 6]);
  465. }
  466. }
  467. }
  468. // connection to hub
  469. translate([-2, radius + 2 * mount_corner + 12, 0]) {
  470. cube([4, 10, 6]);
  471. }
  472. // rotating mount
  473. o_rad = 8;
  474. i_rad = 3;
  475. thk = 4;
  476. rotate([0, 90, 0]) {
  477. translate([-o_rad, 66, -2]) {
  478. tetra_shock_mount_ring(o_rad, i_rad, thk);
  479. }
  480. }
  481. }
  482. // connector that joins the two internal rings
  483. module tetra_shock_mount_connector(length, lip, width, thickness, fit) {
  484. cube([length + 2 * lip , width - 2 * fit, thickness - 2 * fit]);
  485. translate([lip, -(thickness / 2), 0])
  486. cube([length , width + thickness, thickness * 3 / 2]);
  487. }
  488. // mount to standard microphone clip stand mount
  489. module tetra_shock_mount_stand(height, wall, stand_wall) {
  490. // stand mount
  491. translate([0, 0, 0]) {
  492. difference() {
  493. union() {
  494. // main mount cylinder
  495. translate([0, 0, 0]) {
  496. difference() {
  497. cylinder(r = mic_mount_radius + mic_mount_fit + stand_wall,
  498. h = height, $fn = facets);
  499. // make the hole for the mount (* 1.5 to cut the ridge as well)
  500. cylinder(r = mic_mount_radius + mic_mount_fit, h = height, $fn = facets);
  501. }
  502. }
  503. }
  504. // slot for fitting into microphone stand
  505. translate([mic_mount_radius - stand_wall / 2, - mic_mount_slot_width / 2, 0]) {
  506. cube([2 * stand_wall, mic_mount_slot_width, mic_mount_slot_height]);
  507. }
  508. // eyelet for microphone stand
  509. translate([mic_mount_radius - stand_wall / 2, 0, mic_mount_slot_height]) {
  510. rotate([0, 90, 0]) {
  511. cylinder(r = mic_mount_slot_radius, h = 2 * stand_wall, $fn = facets);
  512. }
  513. }
  514. }
  515. // top of mount
  516. translate([0, 0, height]) {
  517. difference() {
  518. cylinder(h = mic_mount_radius,
  519. r1 = mic_mount_radius + mount_wall + wall + mic_mount_fit, r2 = 5, $fn = facets);
  520. cylinder(h = mic_mount_radius,
  521. r1 = mic_mount_radius + mount_wall + mic_mount_fit, r2 = 1, $fn = facets);
  522. }
  523. translate([0, 0, mic_mount_radius - 1]) {
  524. cylinder(h = 1, r = 5, $fn = facets);
  525. }
  526. }
  527. // eyelets
  528. o_rad = 8;
  529. i_rad = 3;
  530. thk = 4;
  531. for (m = [0, 1]) mirror([0, m, 0]) {
  532. rotate([90, 90, 0]) {
  533. translate([-(height + o_rad + 6), 0, thk/2 + fit]) {
  534. rotate([0, 0, 45])
  535. tetra_shock_mount_ring(o_rad, i_rad, thk);
  536. }
  537. }
  538. }
  539. }
  540. }
  541. ////
  542. //// render all the different parts
  543. ////
  544. // microphone body: flare to capsule array (slips into PCB holder body)
  545. //
  546. module render_octa_capsule_flare(z_offset) {
  547. translate([0, 0, z_offset]) {
  548. octa_mount_flare(pcb_hi_clear + pcb_hi_exp, mount_lip, flare_height, box_radius + wall, box_radius * 2 - wall,
  549. mount_corner, mount_radius + wall, stalk_height, 1);
  550. translate([0, 0, pcb_hi_clear + pcb_hi_exp + flare_height + stalk_height]) {
  551. octa_capsule_array_mount([45, 135, -45, -135]);
  552. }
  553. }
  554. }
  555. // microphone body: main body, holds printed circuit boards
  556. //
  557. octa_pcb_mount_height = pcb_length - pcb_low_exp - pcb_hi_exp;
  558. module render_octa_pcb_mount(z_offset, showint) {
  559. translate([0, 0, z_offset]) {
  560. octa_mount_body(octa_pcb_mount_height, box_radius + wall, box_radius * 2 - wall, mount_corner, mount_lip, mount_lip, 0);
  561. }
  562. // add ccrma logo
  563. rotate([0, 0, -90]) {
  564. translate([0, -(box_radius - 0.5), tetra_pcb_mount_height / 2]) {
  565. rotate([90, 270, 0]) {
  566. logo_scale = 1 / 2.2;
  567. scale([logo_scale, logo_scale, 1.0]) {
  568. ccrma_logo(1.65);
  569. }
  570. }
  571. }
  572. }
  573. }
  574. // microphone body: flare to microphone cable (slips into PCB holder body)
  575. //
  576. module render_octa_cable_flare(z_offset, flip) {
  577. translate([0, 0, z_offset]) {
  578. octa_mount_flare_dual(pcb_low_clear + pcb_low_exp, mount_lip, 20, box_radius + wall, box_radius * 2 - wall,
  579. mount_corner, cable_diam / 2 + wall, 10, 0);
  580. }
  581. }
  582. // microphone body: render all parts with a vertical separation
  583. //
  584. module render_octa_body(z_offset, spread, showint) {
  585. rotate([0, 180, 0]) {
  586. render_octa_cable_flare(0);
  587. }
  588. lippy = spread - mount_lip;
  589. render_octa_pcb_mount(lippy, showint);
  590. render_octa_capsule_flare(octa_pcb_mount_height + 2 * lippy);
  591. }
  592. // microphone: render the full assembly with a vertical separation
  593. //
  594. module render_octa_microphone(z_offset, spread) {
  595. render_octa_body(z_offset, spread);
  596. lippy = spread - mount_lip;
  597. render_octa_capsule_array(z_offset + octa_pcb_mount_height + mount_top_height +
  598. flare_height + stalk_height + pcb_hi_clear + pcb_hi_exp + 2 * lippy + spread + mic_radius);
  599. }
  600. // microphone: render the full assembly with a vertical separation
  601. // cut out halt of the assembly so that we can see the inside
  602. //
  603. module render_octa_microphone_cutout(z_offset, spread) {
  604. difference() {
  605. render_octa_microphone(z_offset, spread);
  606. // a cube that blots out 1/4 of the microphone
  607. rotate([0, 0, 45]) {
  608. translate([0, 0, -50]) {
  609. cube([50, 100, 650]);
  610. }
  611. }
  612. }
  613. }
  614. // shock mount: microphone clip on stand mount
  615. //
  616. module render_tetra_shock_mount_stand(z_offset) {
  617. translate([z_offset]) {
  618. tetra_shock_mount_stand(mic_mount_height, mount_wall, mic_mount_wall);
  619. }
  620. }
  621. // shock mount: external ring
  622. //
  623. module render_tetra_shock_mount_external_ring(z_offset) {
  624. translate([0, 0, z_offset]) {
  625. tetra_shock_mount_external_ring(ring_height, box_radius + wall, mount_corner, main_radius_inc, 0);
  626. }
  627. }
  628. // shock mount: bottom internal ring
  629. //
  630. module render_tetra_shock_mount_internal_ring_bot(z_offset) {
  631. translate([0, 0, z_offset]) {
  632. tetra_shock_mount_internal_ring(ring_height, box_radius + wall, mount_corner, internal_ring_gap, 1);
  633. }
  634. }
  635. // shock mount: all four internal ring connectors
  636. //
  637. module render_tetra_shock_mount_ring_connectors(offset) {
  638. for (o = [0, 1, 2, 3]) {
  639. translate([-18, (10 + offset) * o, 0]) {
  640. tetra_shock_mount_connector(ring_sep, 4, connector_w, connector_d, 0.1);
  641. }
  642. }
  643. }
  644. // shock mount: top internal ring
  645. //
  646. module render_tetra_shock_mount_internal_ring_top(z_offset) {
  647. translate([0, 0, z_offset]) {
  648. tetra_shock_mount_internal_ring(ring_height, box_radius + wall, mount_corner, internal_ring_gap, 0);
  649. }
  650. }
  651. // shock mount: render all parts
  652. //
  653. module render_tetra_shock_mount(z_offset) {
  654. // internal rings
  655. translate([0, 0, z_offset + ring_sep / 2]) {
  656. render_tetra_shock_mount_internal_ring_top(0);
  657. rotate([0, 180, 0]) {
  658. render_tetra_shock_mount_internal_ring_bot(ring_sep + 2);
  659. }
  660. // insert the connecting rods
  661. for (r = [0, 90, 180, 270]) {
  662. rotate([0, 0, r]) {
  663. translate([box_radius + 3 * wall + internal_ring_gap, 0, -1]) {
  664. rotate([0, 90, 0]) {
  665. translate([-4, -5, 1]) {
  666. tetra_shock_mount_connector(ring_sep, 4, connector_w, connector_d, 0.1);
  667. }
  668. }
  669. }
  670. }
  671. }
  672. }
  673. // external ring
  674. translate([0, 0, z_offset - ring_height / 4]) {
  675. render_tetra_shock_mount_external_ring(0);
  676. }
  677. // mount to stand
  678. translate([0, 85, -(mic_mount_height + mic_mount_radius + ring_height / 4)]) {
  679. rotate([0, 0, 90]) {
  680. render_tetra_shock_mount_stand(0);
  681. }
  682. }
  683. }