1
0

TinySpHEAR_mount_pcb.scad 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761
  1. //
  2. // Spherical Harmonics Ear Project (*SpHEAR)
  3. //
  4. // TinySpHEAR, First Order (B-format) Ambisonics Microphone
  5. // Mount for four Zapnspark phantom power printed circuit boards
  6. //
  7. // Copyright 2015-2016, Fernando Lopez-Lezcano, All Rights Reserved
  8. // nando@ccrma.stanford.edu
  9. //
  10. // This program is free software: you can redistribute it and/or modify
  11. // it under the terms of the GNU General Public License as published by
  12. // the Free Software Foundation, either version 3 of the License, or
  13. // (at your option) any later version.
  14. //
  15. // This program is distributed in the hope that it will be useful,
  16. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. // GNU General Public License for more details.
  19. //
  20. // You should have received a copy of the GNU General Public License
  21. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  22. //
  23. // 3d Models released under the Creative Commons license as follows:
  24. // Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)
  25. // http://creativecommons.org/licenses/by-nc-sa/4.0/
  26. include <TinySpHEAR_common.scad>;
  27. include <CCRMA_logo.scad>;
  28. ////
  29. //// default model parameters
  30. ////
  31. // size of Zapnspark printed circuit board
  32. // kicad length = 79.375
  33. // measured length = 79.20 (2016.08.25)
  34. pcb_length = 79.20;
  35. // kicad width = 19.050
  36. // measured width = 18.82 (2016.08.25)
  37. pcb_width = 18.85;
  38. // ultimaker spec thickness = 1.61
  39. // measured thickness = 1.56 (w/ copper)
  40. pcb_thickness = 1.58;
  41. // tolerance to add to length and width of pcb
  42. //
  43. // measured 3d print width = 18.70 (with pcb_fit = 0.3)
  44. // actual printed = 18.70 - 0.3 = 16.97
  45. // total correction = 18.85 - 16.97 = 1.88
  46. //
  47. pcb_fit = 0.4;
  48. // tolerance add to thickness of pcb
  49. //
  50. // printed with pcb_tfit = 0.15 -> 1.58 + 0.15 = 1.73 (ideal printed)
  51. // measured print channel = 1.63 : 0.1 thinner (ultimaker 2 plus, 2016.08.24)
  52. // measured pcb thickness = 1.58 (othermill)
  53. //
  54. pcb_tfit = 0.15;
  55. // we leave part of the pcb exposed on the bottom of the body so that we
  56. // can solder the wires that connect the microphone with the
  57. // preamplifier, same at the top of the pcb to solder the wires
  58. // to the capsules
  59. pcb_low_exp = 12.0;
  60. pcb_hi_exp = 8.0;
  61. // clearance from the bottom and top of pcb's to the start of the flare,
  62. // this adds space for the protuding molex pins on which we solder
  63. pcb_low_clear = 15.0;
  64. pcb_hi_clear = 15.0;
  65. // back and front clearance of pcb (components and leads)
  66. pcb_front = 13.25;
  67. pcb_back = 3.0;
  68. // depth of slot into which the printed circuit board fits
  69. pcb_slot_depth = 1.0;
  70. // diameter of four conductor cable (Mogami W2931)
  71. cable_diam = 9.5;
  72. // diameter of microphone capsule cable (Mogami 2490)
  73. capsule_cable_diam = 1.7;
  74. // lip that mounts flares into main body box
  75. mount_lip = 10.0;
  76. // lip fit for flares
  77. lip_fit = 0.05;
  78. // capsule array mount, height of flare and stalk
  79. flare_height = 50;
  80. stalk_height = 40;
  81. // adjust mic array to mount fit
  82. mic_to_mount_fit = 0.0;
  83. // wall thickness
  84. wall = 1.0;
  85. // calculated minimum "radius" of microphone box
  86. box_radius = pcb_front + (pcb_thickness + pcb_tfit) + pcb_back + 2 * wall;
  87. // calculated main body corner radius
  88. mount_corner = box_radius - pcb_width / 2 + pcb_slot_depth + 4.0;
  89. // dimensions of 12 pin male bottom connector
  90. //
  91. // Amphenol T 3635 002
  92. // 12 pin DIN male to cable, gold plated contacts
  93. //
  94. conn_diam_fit = 0.4;
  95. conn_max_diam = 18.00 + conn_diam_fit;
  96. conn_min_diam = 17.12 + conn_diam_fit;
  97. conn_bottom_h = 7.25;
  98. conn_sleeve = 7.00;
  99. conn_lock_diam = 15.1;
  100. conn_top_h = 12.40;
  101. // width and radius of "click" that locks upper and lower flanges to body
  102. click_width = 5.0;
  103. click_radius = 1.4;
  104. // dimensions of 5/32 screws for the collar that locks the connector in place
  105. collar_screw_head = 4.00;
  106. collar_screw_hole = 2.40;
  107. collar_screw_nut = 5.30 + 0.2;
  108. // shock mount parameters
  109. //
  110. ring_sep = 30.0;
  111. ring_height = 10.0;
  112. rubber_band_angle = 40;
  113. main_radius_inc = (ring_sep / 2) / tan(rubber_band_angle);
  114. // gap between internal ring and microphone body
  115. internal_ring_gap = 1.0;
  116. // connector that joins the two internal rings
  117. connector_w = 10.0;
  118. connector_d = 2.0;
  119. // wall thickness and height of shock mount rings
  120. ring_wall = 4 * wall;
  121. ring_ext_height = 6;
  122. // gap between external ring and support arm
  123. ring_arm_gap = 20;
  124. // all four printed circuit boards
  125. module tetra_pcb_clear(length, width, thick, slot_depth, front, back) {
  126. for (rot = [0, 90, 180, 270]) {
  127. rotate([0, 0, rot]) {
  128. pcb_clear(pcb_length + pcb_fit, pcb_width + pcb_fit, pcb_thickness + pcb_tfit, slot_depth, front, back);
  129. }
  130. }
  131. }
  132. // the main body of the microphone mount
  133. module tetra_mount_body(height, radius, corner, lower_lip, upper_lip, clear) {
  134. difference() {
  135. rounded_block(height, radius, radius, corner);
  136. union() {
  137. // hollow out the inside with slots for pcbs
  138. tetra_pcb_clear(pcb_length, pcb_width, pcb_thickness, pcb_slot_depth, pcb_front, pcb_back);
  139. // trim square angles
  140. cylinder(r = pcb_front, h = height, $fn = facets);
  141. // remove slots from inside body
  142. slot_len = 30;
  143. translate([0, 0, slot_len]) {
  144. rounded_block_relative(height, radius, radius, corner, - (2 * wall));
  145. }
  146. // upper lip for flare to microphone
  147. translate([0, 0, height - upper_lip]) {
  148. difference() {
  149. rounded_block(upper_lip, radius, radius, corner);
  150. rounded_block_relative(upper_lip, radius, radius, corner, -(wall + lip_fit));
  151. }
  152. }
  153. // lower lip for flare to cable
  154. translate([0, 0, 0]) {
  155. difference() {
  156. rounded_block(lower_lip, radius, radius, corner);
  157. rounded_block_relative(lower_lip, radius, radius, corner, -(wall + lip_fit));
  158. }
  159. }
  160. // slots for click tonges
  161. // lower
  162. for (m=[-1, 1]) rotate([0, 90, 0]) {
  163. translate([-lower_lip * 3/4, (radius - wall/2)*m, -(click_width/2 + 0.25)]) {
  164. cylinder(r = click_radius, h = click_width + 0.5, $fn = facets);
  165. }
  166. }
  167. // upper
  168. for (m=[-1, 1]) rotate([0, 90, 0]) {
  169. translate([- height + upper_lip * 3/4, (radius - wall/2)*m, -(click_width/2 + 0.25)]) {
  170. cylinder(r = click_radius, h = click_width + 0.5, $fn = facets);
  171. }
  172. }
  173. }
  174. }
  175. // upper lip is too thin, reinforce the back of the click holes
  176. for (r = [0, 180]) rotate([0, 90, r]) {
  177. translate([- height + upper_lip * 3/4, (radius - wall), -(click_width/2 + 0.25)]) {
  178. difference() {
  179. cylinder(r = click_radius * 1.25, h = click_width + 0.5, $fn = facets);
  180. translate([- click_radius * 1.25, - wall, 0]) {
  181. cube([click_radius * 3, click_radius * 3, click_width * 1.5]);
  182. }
  183. }
  184. }
  185. }
  186. // add parts for clearance check
  187. if (clear == 1) {
  188. // electrolytic capacitors
  189. cap_diam = 10.2;
  190. for (rot = [0, 180, 270]) {
  191. rotate([0, 0, rot]) {
  192. translate([-pcb_front + cap_diam/2, 0, 0]) {
  193. *cylinder(r = (cap_diam/2), h = 20, $fn = facets);
  194. }
  195. }
  196. }
  197. // PCBs
  198. for (rot = [0, 180, 270]) {
  199. rotate([0, 0, rot]) {
  200. translate([-(pcb_front + pcb_thickness), -pcb_width/2, -pcb_low_exp]) {
  201. cube([pcb_thickness, pcb_width, pcb_length]);
  202. }
  203. }
  204. }
  205. // connectors
  206. cap_h = 12.3;
  207. cap_w = 10.53/2;
  208. for (rot = [0, 180, 270]) {
  209. rotate([0, 0, rot]) {
  210. translate([-pcb_front, -cap_w/2 - 2.5, 0]) {
  211. *cube([cap_h, cap_w, 20]);
  212. }
  213. }
  214. }
  215. }
  216. }
  217. // flares from the body to the microphone stalk and cable
  218. module tetra_mount_flare(height, lip, transition, bot_radius, bot_corner, top_radius, stalk_height, dot) {
  219. // bottom rounded box
  220. difference() {
  221. rounded_block(height, bot_radius, bot_radius, bot_corner);
  222. rounded_block_relative(height, bot_radius, bot_radius, bot_corner, -(2 * wall));
  223. // cut flange to mount on body
  224. rounded_block_relative(lip + 1.00, bot_radius, bot_radius, bot_corner, - (wall));
  225. // cut slots for tonge
  226. for (r = [0, 180]) rotate([0, 0, r]) {
  227. for (m = [-1, 1]) {
  228. translate([m * (click_width + 0.5) - 0.25, bot_radius - 1.5 * wall, 0]) {
  229. cube([0.5, 2 * wall, lip * 2/3]);
  230. }
  231. }
  232. }
  233. // and make a smooth transition to avoid overhangs
  234. translate([0, 0, lip + 1.00]) {
  235. hull() {
  236. rounded_block_relative(thin_mint, bot_radius, bot_radius, bot_corner, - wall);
  237. translate([0, 0, 1.0]) {
  238. rounded_block_relative(thin_mint, bot_radius, bot_radius, bot_corner, - 2 * wall);
  239. }
  240. }
  241. }
  242. }
  243. // add click to secure to lip
  244. for (r = [0, 180]) rotate([0, 0, r]) {
  245. translate([- click_width / 2, bot_radius - wall/2, 1/4 * lip]) {
  246. rotate([90, 0, 90]) {
  247. difference() {
  248. cylinder(r = click_radius - 0.2, h = click_width, $fn = facets);
  249. translate([0, -click_radius, 0]) {
  250. cube([click_radius, click_width, click_width]);
  251. }
  252. }
  253. }
  254. }
  255. }
  256. // flare to round section
  257. translate([0, 0, height]) {
  258. difference() {
  259. hull() {
  260. rounded_block(thin_mint, bot_radius, bot_radius, bot_corner);
  261. translate([0, 0, transition]) {
  262. cylinder(r = top_radius, h = thin_mint, $fn = facets);
  263. }
  264. }
  265. hull() {
  266. rounded_block_relative(thin_mint, bot_radius, bot_radius, bot_corner, - wall);
  267. translate([0, 0, transition]) {
  268. cylinder(r = top_radius - wall, h = thin_mint, $fn = facets);
  269. }
  270. }
  271. }
  272. }
  273. // cylindrical stalk
  274. translate([0, 0, height + transition]) {
  275. difference() {
  276. cylinder(r = top_radius, h = stalk_height, $fn = facets);
  277. cylinder(r = top_radius - wall, h = stalk_height, $fn = facets);
  278. }
  279. // add marker for "back of microphone" orientation
  280. if (dot == 1) {
  281. rotate([0, 0, 90]) {
  282. translate([0, top_radius - wall * 2 / 3, stalk_height - top_radius]) {
  283. difference() {
  284. sphere(r = top_radius / 3, $fn = 32);
  285. translate([0, -top_radius + top_radius / 2, 0]) {
  286. cube([top_radius, top_radius, top_radius], center = true);
  287. }
  288. }
  289. }
  290. }
  291. }
  292. }
  293. }
  294. // flares from the body to 12 pin connector
  295. module tetra_mount_connector_flare(height, lip, transition, bot_radius, bot_corner, top_radius, stalk_height, dot) {
  296. // bottom rounded box
  297. difference() {
  298. rounded_block(height, bot_radius, bot_radius, bot_corner);
  299. rounded_block_relative(height, bot_radius, bot_radius, bot_corner, -(2 * wall));
  300. // cut flange to mount on body
  301. rounded_block_relative(lip + 1.00, bot_radius, bot_radius, bot_corner, - (wall));
  302. // cut slots for tonge
  303. for (r = [0, 180]) rotate([0, 0, r]) {
  304. for (m = [-1, 1]) {
  305. translate([m * (click_width + 0.5) - 0.25, bot_radius - 1.5 * wall, 0]) {
  306. cube([0.5, 2 * wall, lip * 2/3]);
  307. }
  308. }
  309. }
  310. // and make a smooth transition to avoid overhangs
  311. translate([0, 0, lip + 1.00]) {
  312. hull() {
  313. rounded_block_relative(thin_mint, bot_radius, bot_radius, bot_corner, - wall);
  314. translate([0, 0, 1.0]) {
  315. rounded_block_relative(thin_mint, bot_radius, bot_radius, bot_corner, - 2 * wall);
  316. }
  317. }
  318. }
  319. }
  320. // add click to secure to lip
  321. for (r = [0, 180]) rotate([0, 0, r]) {
  322. translate([- click_width / 2, bot_radius - wall/2, 1/4 * lip]) {
  323. rotate([90, 0, 90]) {
  324. difference() {
  325. cylinder(r = click_radius - 0.2, h = click_width, $fn = facets);
  326. translate([0, -click_radius, 0]) {
  327. cube([click_radius, click_width, click_width]);
  328. }
  329. }
  330. }
  331. }
  332. }
  333. // flare to round section
  334. translate([0, 0, height]) {
  335. difference() {
  336. hull() {
  337. rounded_block(thin_mint, bot_radius, bot_radius, bot_corner);
  338. translate([0, 0, transition]) {
  339. cylinder(r = top_radius, h = thin_mint, $fn = facets);
  340. }
  341. }
  342. hull() {
  343. rounded_block_relative(thin_mint, bot_radius, bot_radius, bot_corner, - wall);
  344. translate([0, 0, transition]) {
  345. cylinder(r = top_radius - wall, h = thin_mint, $fn = facets);
  346. }
  347. }
  348. }
  349. }
  350. // connector holder
  351. translate([0, 0, height + transition]) {
  352. difference() {
  353. cylinder(r = top_radius, h = conn_sleeve + conn_top_h / 2, $fn = facets);
  354. cylinder(r = top_radius - wall, h = conn_sleeve + conn_top_h / 2, $fn = facets);
  355. // holes for bolts for securing connector
  356. rotate([0, 0, 90]) for (m = [0, 1]) {
  357. mirror([m, 0, 0]) scale([2/3, 1, 1]) translate([top_radius / 2, top_radius, conn_top_h / 2 + conn_sleeve / 2]) {
  358. rotate([90, 0, 0]) {
  359. cylinder(r = conn_sleeve / 2 - thin_mint, h = top_radius * 2, $fn = facets);
  360. }
  361. }
  362. }
  363. }
  364. }
  365. // connector bottom transition
  366. translate([0, 0, height + transition + conn_sleeve + conn_top_h / 2 - thin_mint]) {
  367. radius_diff = (conn_max_diam - conn_min_diam) / 2;
  368. difference() {
  369. hull() {
  370. cylinder(r = top_radius, h = thin_mint, $fn = facets);
  371. translate([0, 0, conn_bottom_h]) {
  372. cylinder(r = top_radius - radius_diff, h = thin_mint, $fn = facets);
  373. }
  374. }
  375. hull() {
  376. cylinder(r = top_radius - wall, h = thin_mint, $fn = facets);
  377. translate([0, 0, conn_bottom_h]) {
  378. cylinder(r = top_radius - radius_diff - wall, h = thin_mint, $fn = facets);
  379. }
  380. }
  381. }
  382. }
  383. }
  384. // connector lock collar
  385. module tetra_mount_connector_lock(height, radius, side) {
  386. difference() {
  387. union() {
  388. difference() {
  389. cylinder(r = radius + wall, h = height, $fn = facets);
  390. cylinder(r = radius, h = height, $fn = facets);
  391. }
  392. difference() {
  393. // bolts for securing connector
  394. for (m = [0, 1]) {
  395. mirror([m, 0, 0]) scale([2/3, 1, 1]) translate([radius / 2, radius, height / 2]) {
  396. rotate([90, 0, 0]) {
  397. cylinder(r = (conn_sleeve - wall) / 2, h = radius * 2, $fn = facets);
  398. }
  399. }
  400. }
  401. // shave bolts to size of internal connector collar
  402. intersection() {
  403. translate([-conn_lock_diam/2, -conn_lock_diam/2, 0]) {
  404. cube([conn_lock_diam, conn_lock_diam, height]);
  405. }
  406. cylinder(r = radius - wall, h = height, $fn = facets);
  407. }
  408. // and shave everything outside of the cylinder
  409. difference() {
  410. cylinder(r = radius + 4 * wall, h = height, $fn = facets);
  411. cylinder(r = radius + wall, h = height, $fn = facets);
  412. }
  413. }
  414. // screw holders
  415. difference() {
  416. for (m = [0, 1]) mirror([m, 0, 0]) {
  417. translate([radius, 0, 0]) {
  418. cube([wall + 0.5 + collar_screw_head + 1.00, 3 * wall, height]);
  419. }
  420. translate([radius, - 3 * wall, 0]) {
  421. cube([wall + 0.5 + collar_screw_head + 1.00, 3 * wall, height]);
  422. }
  423. }
  424. // through holes for screws
  425. for (m = [0, 1]) mirror([m, 0, 0]) {
  426. translate([radius + wall + 0.5 + collar_screw_head / 2, 4 * wall, height / 2]) {
  427. rotate([90, 0, 0]) {
  428. cylinder(r = collar_screw_hole / 2, h = 8 * wall, $fn = facets);
  429. }
  430. }
  431. }
  432. // recessed nuts
  433. translate([radius + wall + 0.5 + collar_screw_head / 2, - 2.333 * wall, height / 2]) {
  434. rotate([90, 30, 0]) {
  435. cylinder(r = collar_screw_nut / 2, h = wall, $fn = 6);
  436. }
  437. }
  438. }
  439. }
  440. // substract one half (or the other)...
  441. cut_size = 2 * (radius + wall); // + 0.5 + collar_screw_head / 2 + 0.5);
  442. // cut internal cylinder
  443. translate([-cut_size / 2, 0, 0]) {
  444. cube([cut_size, cut_size, height]);
  445. }
  446. // cut screw holder assymetrically
  447. translate([radius + wall, wall, 0]) {
  448. cube([0.5 + collar_screw_head + 1.00, 5 * wall, height]);
  449. }
  450. mirror([1, 0, 0]) translate([radius + wall, -wall, 0]) {
  451. cube([0.5 + collar_screw_head + 1.00, 5 * wall, height]);
  452. }
  453. }
  454. }
  455. // top conical section that plugs into capsule array
  456. module tilted_cylinder(radius, height, offset) {
  457. hull() {
  458. cylinder(r = radius, h = thin_mint, $fn = facets);
  459. translate([offset, 0, height]) {
  460. cylinder(r = radius, h = thin_mint, $fn = facets);
  461. }
  462. }
  463. }
  464. module tilted_cube(width, depth, height, offset) {
  465. hull() {
  466. cube([width, depth, thin_mint]);
  467. translate([offset, 0, height]) {
  468. cube([width, depth, thin_mint]);
  469. }
  470. }
  471. }
  472. module tetra_capsule_array_mount(angles) {
  473. difference() {
  474. union() {
  475. rotate([0, 0, 45]) {
  476. wire_offset = wall;
  477. wire_diam = mic_wire_diam + mic_wire_fit;
  478. sleeve_width = leg_thick + wire_offset + wire_diam * 2 + wall / 2;
  479. sleeve_width_max = capsule_radius + wall;
  480. sleeve_w = (sleeve_width > sleeve_width_max) ? sleeve_width : sleeve_width_max;
  481. difference() {
  482. hull() {
  483. cylinder(r = mount_radius + wall, h = thin_mint, $fn = facets);
  484. translate([0, 0, mount_top_height]) {
  485. rounded_block(thin_mint, sleeve_w, mount_radius_capsule - wall/2, mount_radius*4/5);
  486. }
  487. }
  488. // cavity for printing without support
  489. scale([1.0, 1.0, 3.0]) {
  490. sphere(r = mount_radius, $fn = facets);
  491. }
  492. // holes for cables
  493. // offset for outer hole
  494. hole_offset_l = mount_radius - wire_diam / 2;
  495. hole_offset_h = (sleeve_w - wall - wire_diam / 2) - hole_offset_l;
  496. for (m = [0, 1]) mirror([m, 0, 0]) {
  497. translate([hole_offset_l - wire_diam, 0, 0]) {
  498. tilted_cylinder(wire_diam / 2, mount_top_height, hole_offset_h);
  499. }
  500. translate([hole_offset_l, 0, 0]) {
  501. tilted_cylinder(wire_diam / 2, mount_top_height, hole_offset_h);
  502. }
  503. // shave the inside of the double tube
  504. translate([hole_offset_l - wire_diam, - wire_diam / 4, 0]) {
  505. tilted_cube(wire_diam, wire_diam/2, mount_top_height, hole_offset_h);
  506. }
  507. }
  508. }
  509. }
  510. }
  511. // indentations that match the two lower capsule holders
  512. // add ridge height adjustment
  513. translate([0, 0, mount_top_height + (mic_radius - capsule_height) + capsule_height * cos(elev_angle) - mic_to_mount_fit]) {
  514. rotate([0, (90 + elev_angle), angles[0]]) {
  515. translate([0, 0, mic_radius - capsule_height]) {
  516. capsule([], 0, 1, 0.02, 0.02, 1);
  517. }
  518. }
  519. rotate([0, (90 + elev_angle), angles[1]]) {
  520. translate([0, 0, mic_radius - capsule_height]) {
  521. capsule([], 0, 1, 0.02, 0.02, 1);
  522. }
  523. }
  524. }
  525. // slice top sides of mount
  526. for (rot = [45, 45 + 180]) {
  527. translate([0, 0, 0]) {
  528. rotate([0, 30, rot]) {
  529. translate([-mount_radius_capsule, -(mount_radius_capsule), mount_top_height])
  530. cube([mount_radius_capsule*2, mount_radius_capsule*2, 10]);
  531. }
  532. }
  533. }
  534. }
  535. }
  536. ////
  537. //// render all the different parts
  538. ////
  539. // microphone body: flare to capsule array (slips into PCB holder body)
  540. //
  541. module render_tetra_capsule_flare(z_offset) {
  542. translate([0, 0, z_offset]) {
  543. tetra_mount_flare(pcb_hi_clear + pcb_hi_exp,
  544. mount_lip, flare_height, box_radius + wall, mount_corner, mount_radius + wall, stalk_height, 1);
  545. translate([0, 0, pcb_hi_clear + pcb_hi_exp + flare_height + stalk_height]) {
  546. tetra_capsule_array_mount([-45, 135]);
  547. }
  548. }
  549. }
  550. // microphone body: main body, holds printed circuit boards
  551. //
  552. tetra_pcb_mount_height = pcb_length - pcb_low_exp - pcb_hi_exp;
  553. module render_tetra_pcb_mount(z_offset, showint) {
  554. translate([0, 0, z_offset]) {
  555. tetra_mount_body(tetra_pcb_mount_height, box_radius + wall, mount_corner, mount_lip, mount_lip, showint);
  556. }
  557. // add ccrma logo
  558. rotate([0, 0, -90]) {
  559. translate([0, -(box_radius - 0.5), tetra_pcb_mount_height / 2]) {
  560. rotate([90, 270, 0]) {
  561. logo_scale = 1 / 2.4;
  562. scale([logo_scale, logo_scale, 1.0]) {
  563. ccrma_logo(1.65);
  564. }
  565. }
  566. }
  567. }
  568. }
  569. // microphone body: flare to microphone cable (slips into PCB holder body)
  570. //
  571. module render_tetra_cable_flare(z_offset, flip) {
  572. translate([0, 0, z_offset]) {
  573. tetra_mount_flare(pcb_low_clear + pcb_low_exp, mount_lip, 20, box_radius + wall, mount_corner, cable_diam / 2 + wall, 10, 0);
  574. }
  575. }
  576. // microphone body: flare to 12 pin connector (slips into PCB holder body)
  577. //
  578. module render_tetra_connector_flare(z_offset, flip) {
  579. translate([0, 0, z_offset]) {
  580. tetra_mount_connector_flare(pcb_low_clear + pcb_low_exp, mount_lip, 20, box_radius + wall, mount_corner, conn_max_diam / 2 + wall, 10, 0);
  581. }
  582. }
  583. // microphone body: 12 pin connector lock collar
  584. //
  585. module render_tetra_connector_lock(z_offset) {
  586. translate([0, 0, z_offset]) {
  587. tetra_mount_connector_lock(conn_sleeve + 2 * wall, (conn_max_diam / 2) + wall);
  588. }
  589. }
  590. // microphone body: render all parts with a vertical separation
  591. //
  592. module render_tetra_body(z_offset, spread, showint) {
  593. rotate([0, 180, 0]) {
  594. render_tetra_connector_flare(0);
  595. }
  596. lippy = spread - mount_lip;
  597. render_tetra_pcb_mount(lippy, showint);
  598. render_tetra_capsule_flare(tetra_pcb_mount_height + 2 * lippy);
  599. }
  600. // microphone: render the full assembly with a vertical separation
  601. //
  602. module render_tetra_microphone(z_offset, spread) {
  603. render_tetra_body(z_offset, spread);
  604. lippy = spread - mount_lip;
  605. render_tetra_capsule_array(z_offset + tetra_pcb_mount_height + mount_top_height +
  606. flare_height + stalk_height + pcb_hi_clear + pcb_hi_exp + 2 * lippy + spread + mic_radius);
  607. }
  608. // microphone: render the full assembly with a vertical separation
  609. // cut out halt of the assembly so that we can see the inside
  610. //
  611. module render_tetra_microphone_cutout(z_offset, spread) {
  612. difference() {
  613. render_tetra_microphone(z_offset, spread);
  614. // a cube that blots out 1/4 of the microphone
  615. rotate([0, 0, 90]) {
  616. translate([0, 0, -50]) {
  617. cube([50, 100, 650]);
  618. }
  619. }
  620. }
  621. }
  622. // shock mount: microphone clip on stand mount
  623. //
  624. module render_tetra_shock_mount_stand(z_offset) {
  625. translate([z_offset]) {
  626. shock_mount_stand(mic_mount_height, mount_wall, mic_mount_wall);
  627. }
  628. }
  629. // shock mount: external ring
  630. //
  631. module render_tetra_shock_mount_external_ring(z_offset) {
  632. translate([0, 0, z_offset]) {
  633. shock_mount_external_ring(ring_height, box_radius + wall, box_radius + wall, mount_corner, main_radius_inc, 0);
  634. }
  635. }
  636. // shock mount: bottom internal ring
  637. //
  638. module render_tetra_shock_mount_internal_ring_bot(z_offset) {
  639. translate([0, 0, z_offset]) {
  640. shock_mount_internal_ring(ring_height, box_radius + wall, box_radius + wall, mount_corner, internal_ring_gap, 1);
  641. }
  642. }
  643. // shock mount: all four internal ring connectors
  644. //
  645. module render_tetra_shock_mount_ring_connectors(offset) {
  646. for (o = [0, 1, 2, 3]) {
  647. translate([-18, (10 + offset) * o, 0]) {
  648. shock_mount_connector(ring_sep, 4, connector_w, connector_d, 0.1);
  649. }
  650. }
  651. }
  652. // shock mount: top internal ring
  653. //
  654. module render_tetra_shock_mount_internal_ring_top(z_offset) {
  655. translate([0, 0, z_offset]) {
  656. shock_mount_internal_ring(ring_height, box_radius + wall, box_radius + wall, mount_corner, internal_ring_gap, 0);
  657. }
  658. }
  659. // shock mount: render all parts
  660. //
  661. module render_tetra_shock_mount(z_offset) {
  662. // internal rings
  663. translate([0, 0, z_offset + ring_sep / 2]) {
  664. render_tetra_shock_mount_internal_ring_top(0);
  665. rotate([0, 180, 0]) {
  666. render_tetra_shock_mount_internal_ring_bot(ring_sep + 2);
  667. }
  668. // insert the connecting rods
  669. for (r = [0, 90, 180, 270]) {
  670. rotate([0, 0, r]) {
  671. translate([box_radius + 3 * wall + internal_ring_gap, 0, -1]) {
  672. rotate([0, 90, 0]) {
  673. translate([-4, -5, 1]) {
  674. shock_mount_connector(ring_sep, 4, connector_w, connector_d, 0.1);
  675. }
  676. }
  677. }
  678. }
  679. }
  680. }
  681. // external ring
  682. translate([0, 0, z_offset - ring_height / 4]) {
  683. render_tetra_shock_mount_external_ring(0);
  684. }
  685. // mount to stand
  686. translate([box_radius + mount_corner + ring_wall + ring_arm_gap + 8 + ring_wall / 2 + 4, 0, -(mic_mount_height + mic_mount_radius + ring_height / 4)]) {
  687. render_tetra_shock_mount_stand(0);
  688. }
  689. }