Octathingy_mount_pcb.scad 24 KB

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