TinySpHEAR_mount_pcb.scad 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662
  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-2018, 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. ////
  27. //// default model parameters
  28. ////
  29. // diameter of microphone capsule cable (Mogami 2490)
  30. capsule_cable_diam = 1.7;
  31. // capsule array mount, height of flare and stalk
  32. flare_height = pcb_version == 2 ? 45 : 50;
  33. stalk_height = pcb_version == 2 ? 35 : 40;
  34. // adjust mic array to mount relative height
  35. mic_to_mount_fit = 0.0;
  36. //// screw holes to join the body to the two flares
  37. //
  38. // rotation of holes to avoid pcb slots
  39. screw_rotation = -3.0;
  40. // shock mount parameters
  41. //
  42. // angle in degrees of rubber bands
  43. rubber_band_angle = 40;
  44. // height of external ring
  45. external_ring_height = 6.0;
  46. external_ring_radius = (40.0 / 2) / tan(rubber_band_angle);
  47. // height of internal ring posts
  48. internal_ring_height = 50.0;
  49. //height of internal ring band that slips over microphone body
  50. internal_band_height = 20.0;
  51. // gap between internal ring and microphone body
  52. internal_ring_gap = 2.75;
  53. // connector that joins the two internal rings
  54. connector_w = 10.0;
  55. connector_d = 2.0;
  56. // wall thickness and height of shock mount rings
  57. ring_wall = 4 * wall;
  58. ring_ext_height = 6;
  59. // gap between external ring and support arm
  60. ring_arm_gap = 20;
  61. // all four printed circuit boards
  62. module tetra_pcb_clear(length, width, thick, slot_depth, front, back, side, twist) {
  63. for (rot = [0, 90, 180, 270]) {
  64. rotate([0, 0, rot + twist]) translate([-side, 0, 0]) {
  65. pcb_clear(pcb_length + pcb_fit, pcb_width + pcb_fit, pcb_thickness + pcb_tfit, slot_depth, front, back);
  66. }
  67. }
  68. }
  69. // the main body of the microphone mount
  70. module tetra_mount_body(height, radius, corner, lower_lip, upper_lip, screw_rotation, clear) {
  71. // lateral offset of pcb's
  72. side = 1.4;
  73. // twist of pcbs inside body
  74. twist = 0;
  75. // twist of each pcb
  76. pcb_twist = 0;
  77. difference() {
  78. rounded_block(height, radius, radius, corner);
  79. union() {
  80. // hollow out the inside with slots for pcbs
  81. tetra_pcb_clear(pcb_length, pcb_width, pcb_thickness, pcb_slot_depth, pcb_front, pcb_back, side, twist);
  82. // trim square angles
  83. cylinder(r = pcb_front, h = height, $fn = facets);
  84. // remove slots from inside body
  85. slot_len = 30;
  86. translate([0, 0, slot_len]) {
  87. difference() {
  88. rounded_block_relative(height, radius, radius, corner, - (2 * wall));
  89. // add columns for upper screw holes
  90. col_w = 3.5;
  91. for (r = [45, 135, 225, 315]) rotate([0, 0, r])
  92. translate([radius - col_w*2/3, -col_w/2, 0]) {
  93. cube([col_w, col_w, height]);
  94. }
  95. }
  96. }
  97. // upper lip for flare to microphone
  98. translate([0, 0, height - upper_lip]) {
  99. difference() {
  100. rounded_block(upper_lip, radius, radius, corner);
  101. rounded_block_relative(upper_lip, radius, radius, corner, -(wall + lip_fit));
  102. }
  103. }
  104. // lower lip for flare to cable
  105. translate([0, 0, 0]) {
  106. difference() {
  107. rounded_block(lower_lip, radius, radius, corner);
  108. rounded_block_relative(lower_lip, radius, radius, corner, -(wall + lip_fit));
  109. }
  110. }
  111. // make eight holes in the the body for screws that hold both flares
  112. // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
  113. for (z = [lower_lip/2, height - upper_lip/2]) {
  114. for (r = [45, 135, 225, 315]) {
  115. rotate([0, 0, r + screw_rotation])
  116. translate([-(radius + 2 * wall), 0, z]) {
  117. rotate([0, 90, 0]) {
  118. cylinder(r = 0.7, h = radius + wall, $fn = facets);
  119. }
  120. }
  121. }
  122. }
  123. }
  124. }
  125. // add parts for clearance check
  126. if (clear == 1) {
  127. for (rot = [0, 180, 270]) {
  128. //for (rot = [0]) {
  129. rotate([0, 0, rot + twist]) {
  130. translate([-(pcb_front + pcb_thickness), -pcb_width/2 + side, -pcb_low_exp]) {
  131. // twist the assembly in place
  132. rotate([0, 0, pcb_twist]) {
  133. // PCBs
  134. cube([pcb_thickness, pcb_width, pcb_length]);
  135. // small electrolytic capacitors (pcb_version == 2)
  136. // https://www.mouser.com/datasheet/2/293/e-umw-1219455.pdf
  137. cap_diam = 8.0;
  138. // should be 5, but transistors are a bit taller;
  139. cap_len = 6.5;
  140. translate([pcb_thickness + 0.15, pcb_width/2, 6]) {
  141. rotate([0, 90, 0]) cylinder(r = (cap_diam/2), h = cap_len, $fn = facets);
  142. }
  143. // film capacitors
  144. cap_h = 12;
  145. cap_w = 9;
  146. cap_t = 5.5;
  147. translate([pcb_thickness + 0.15, pcb_width/2 - cap_w/2, 10]) {
  148. cube([cap_t, cap_w, cap_h]);
  149. }
  150. }
  151. }
  152. }
  153. }
  154. // big electrolytic capacitors (pcb_version == 1)
  155. cap_diam = 10.2;
  156. *for (rot = [0, 180, 270]) {
  157. rotate([0, 0, rot + twist]) {
  158. translate([-pcb_front + cap_diam/2, side, 0]) {
  159. cylinder(r = (cap_diam/2), h = 20, $fn = facets);
  160. }
  161. }
  162. }
  163. }
  164. }
  165. // flares from the body to the microphone stalk and cable
  166. module tetra_mount_flare(height, lip, transition, bot_radius, bot_corner, top_radius, screw_rotation, windscreen, shock_mount) {
  167. // bottom rounded box
  168. difference() {
  169. union() {
  170. rounded_block(height, bot_radius, bot_radius, bot_corner);
  171. if (windscreen) {
  172. // add thread for attaching windscreen
  173. translate([0, 0, lip]) {
  174. metric_thread(diameter = windscreen_thread_radius * 2, pitch = windscreen_thread_pitch,
  175. length = windscreen_thread_height, angle = windscreen_thread_angle, internal = false);
  176. }
  177. cylinder(r2 = box_corner_radius + 1.5, r1 = box_radius + 0.5, h = lip , $fn = facets);
  178. // index for back of microphone
  179. translate([-bot_radius, 0, 0]) {
  180. cylinder(r = 1.0, h = height, $fn = facets);
  181. }
  182. // stops for shock mount
  183. for (r = [0, 90, 180, 270]) rotate([0, 0, r]) {
  184. translate([bot_radius, 0, 0]) scale([2.0, 1.0, 1.0]) cylinder(r = 2.0, h = lip, $fn = facets);
  185. }
  186. }
  187. // small supports for the screws that attach the flare to the body
  188. // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
  189. for (r = [45, 135, 225, 315]) rotate([0, 0, r + screw_rotation]) {
  190. translate([bot_radius + wall/3, 0, lip/2]) {
  191. rotate([0, 90, 0]) {
  192. cylinder(r = 1.5, h = 2 * wall, $fn = facets);
  193. }
  194. }
  195. }
  196. }
  197. rounded_block_relative(height, bot_radius, bot_radius, bot_corner, -(2 * wall));
  198. // cut flange to mount on body
  199. rounded_block_relative(lip + 1.00, bot_radius, bot_radius, bot_corner, - (wall));
  200. // holes for screws that attach the flare to the body
  201. // Number 0 Size, 1/4" Long = thread diameter: 1.6mm, head diameter: 2.75
  202. for (r = [45, 135, 225, 315]) rotate([0, 0, r + screw_rotation]) {
  203. translate([bot_radius + wall, 0, lip/2]) {
  204. rotate([0, 90, 0]) {
  205. cylinder(r = (1.6 + 0.1)/2, h = bot_radius, $fn = facets);
  206. }
  207. }
  208. }
  209. // and make a smooth transition to avoid overhangs
  210. translate([0, 0, lip + 1.00]) {
  211. hull() {
  212. rounded_block_relative(thin_mint, bot_radius, bot_radius, bot_corner, - wall);
  213. translate([0, 0, 1.0]) {
  214. rounded_block_relative(thin_mint, bot_radius, bot_radius, bot_corner, - 2 * wall);
  215. }
  216. }
  217. }
  218. }
  219. // flare to round section
  220. translate([0, 0, height]) {
  221. difference() {
  222. hull() {
  223. rounded_block(thin_mint, bot_radius, bot_radius, bot_corner);
  224. translate([0, 0, transition]) {
  225. cylinder(r = top_radius, h = thin_mint, $fn = facets);
  226. }
  227. }
  228. // screw mounted shock mount (test)
  229. *union() {
  230. if (shock_mount) {
  231. ratio = (transition - windscreen_thread_height) / transition;
  232. thread_radius = bot_radius - ((bot_radius - top_radius) * ratio) + 2.0 * wall;
  233. hull() {
  234. rounded_block(thin_mint, bot_radius, bot_radius, bot_corner);
  235. translate([0, 0, transition - windscreen_thread_height]) {
  236. cylinder(r = thread_radius, h = thin_mint, $fn = facets);
  237. }
  238. }
  239. translate([0, 0, transition - windscreen_thread_height]) {
  240. metric_thread(diameter = thread_radius * 2, pitch = windscreen_thread_pitch,
  241. length = windscreen_thread_height, angle = windscreen_thread_angle, internal = false);
  242. }
  243. } else {
  244. hull() {
  245. rounded_block(thin_mint, bot_radius, bot_radius, bot_corner);
  246. translate([0, 0, transition]) {
  247. cylinder(r = top_radius, h = thin_mint, $fn = facets);
  248. }
  249. }
  250. }
  251. }
  252. hull() {
  253. rounded_block_relative(thin_mint, bot_radius, bot_radius, bot_corner, - wall);
  254. translate([0, 0, transition]) {
  255. cylinder(r = top_radius - wall, h = thin_mint, $fn = facets);
  256. }
  257. }
  258. }
  259. }
  260. }
  261. // stalk that connects upper flare to capsule array mount
  262. module tetra_mount_array_stalk(height, radius) {
  263. difference() {
  264. cylinder(r = radius, h = height, $fn = facets);
  265. cylinder(r = radius - wall, h = height, $fn = facets);
  266. }
  267. // add marker for "back of microphone" orientation
  268. *rotate([0, 0, 90]) {
  269. translate([0, radius - wall * 2 / 3, height - radius]) {
  270. difference() {
  271. sphere(r = radius / 3, $fn = 32);
  272. translate([0, -radius + radius / 2, 0]) {
  273. cube([radius, radius, radius], center = true);
  274. }
  275. }
  276. }
  277. }
  278. }
  279. // bottom cable holder
  280. module tetra_mount_cable_holder(height, radius) {
  281. difference() {
  282. cylinder(r = radius, h = height, $fn = facets);
  283. cylinder(r = radius - wall, h = height, $fn = facets);
  284. }
  285. }
  286. // bottom connector holder
  287. module tetra_mount_connector_holder(height, radius, inside_radius, sleeve_height, sleeve_radius) {
  288. difference() {
  289. union() {
  290. cylinder(r = radius, h = height, $fn = facets);
  291. // add seats for screw heads
  292. for (m = [-1, 1]) translate([m * conn_core_holes_w / 2, radius / 2, conn_core_holes_h]) {
  293. rotate([90, 0, 0]) {
  294. scale([1, 1, 1]) cylinder(r = conn_core_screw_d / 2, h = radius * 1.43, $fn = facets);
  295. }
  296. }
  297. }
  298. cylinder(r = inside_radius, h = height, $fn = facets);
  299. // transition from thin wall to thick wall at the bottom of connector
  300. cylinder(r1 = radius - wall, r2 = inside_radius, h = 2.0, $fn = facets);
  301. // holes for connector core screws
  302. for (m = [-1, 1]) translate([m * conn_core_holes_w / 2, - radius / 3, conn_core_holes_h]) {
  303. rotate([90, 0, 0]) {
  304. cylinder(r = conn_core_holes_d / 2, h = radius, $fn = facets);
  305. }
  306. }
  307. // substract cutout for screw heads
  308. for (m = [-1, 1]) translate([m * conn_core_holes_w / 2, - radius + 1.5, conn_core_holes_h]) {
  309. rotate([90, 0, 0]) {
  310. cylinder(r = conn_core_screw_d / 2, h = 2.0, $fn = facets);
  311. }
  312. }
  313. }
  314. // thinner cylinder sits inside connector sleeve
  315. translate([0, 0, height]) {
  316. difference() {
  317. cylinder(r = sleeve_radius, h = sleeve_height, $fn = facets);
  318. cylinder(r = inside_radius, h = sleeve_height, $fn = facets);
  319. }
  320. }
  321. }
  322. // top conical section that plugs into capsule array
  323. module tilted_cylinder(radius, height, offset) {
  324. hull() {
  325. cylinder(r = radius, h = thin_mint, $fn = facets);
  326. translate([offset, 0, height]) {
  327. cylinder(r = radius, h = thin_mint, $fn = facets);
  328. }
  329. }
  330. }
  331. module tilted_cube(width, depth, height, offset) {
  332. hull() {
  333. cube([width, depth, thin_mint]);
  334. translate([offset, 0, height]) {
  335. cube([width, depth, thin_mint]);
  336. }
  337. }
  338. }
  339. module tetra_capsule_array_mount_old(angles, mount_radius, mount_wall) {
  340. difference() {
  341. union() {
  342. rotate([0, 0, 45]) {
  343. wire_offset = wall;
  344. wire_diam = mic_wire_diam + mic_wire_fit;
  345. // FIXME: this 1.75 is the former leg_thick value, it should be calculated
  346. // based on the capsule diameter so that the cable fits in between the capsules
  347. // sleeve_width = 1.75 + wire_offset + wire_diam * 2 + wall / 2;
  348. sleeve_width = 3.75 + wire_offset + wire_diam * 2 + wall / 2;
  349. sleeve_width_max = capsule_radius + wall;
  350. sleeve_w = (sleeve_width > sleeve_width_max) ? sleeve_width : sleeve_width_max;
  351. difference() {
  352. hull() {
  353. cylinder(r = mount_radius + mount_wall, h = thin_mint, $fn = facets);
  354. translate([0, 0, mount_top_height]) {
  355. rounded_block(thin_mint, sleeve_w, mount_radius_capsule - wall/2, mount_radius*4/5);
  356. }
  357. }
  358. // cavity for printing without support
  359. scale([1.0, 1.0, 3.0]) {
  360. sphere(r = mount_radius, $fn = facets);
  361. }
  362. // holes for cables
  363. // offset for outer hole
  364. hole_offset_l = mount_radius - wire_diam / 2;
  365. hole_offset_h = (sleeve_w - wall - wire_diam / 2) - hole_offset_l;
  366. for (m = [0, 1]) mirror([m, 0, 0]) {
  367. translate([hole_offset_l - wire_diam, 0, 0]) {
  368. tilted_cylinder(wire_diam / 2, mount_top_height, hole_offset_h);
  369. }
  370. translate([hole_offset_l, 0, 0]) {
  371. tilted_cylinder(wire_diam / 2, mount_top_height, hole_offset_h);
  372. }
  373. // shave the inside of the double tube
  374. translate([hole_offset_l - wire_diam, - wire_diam / 4, 0]) {
  375. tilted_cube(wire_diam, wire_diam/2, mount_top_height, hole_offset_h);
  376. }
  377. }
  378. }
  379. }
  380. }
  381. // indentations that match the two lower capsule holders
  382. // add ridge height adjustment
  383. translate([0, 0, mount_top_height + (mic_radius - capsule_height) + capsule_height * cos(elev_angle) - mic_to_mount_fit]) {
  384. rotate([0, (90 + elev_angle), angles[0]]) {
  385. translate([0, 0, mic_radius - capsule_height]) {
  386. capsule(leg_angles_top, 0, 0, 0.0, 0.0, 1);
  387. }
  388. }
  389. rotate([0, (90 + elev_angle), angles[1]]) {
  390. translate([0, 0, mic_radius - capsule_height]) {
  391. capsule(leg_angles_top, 0, 0, 0.0, 0.0, 1);
  392. }
  393. }
  394. }
  395. // slice top sides of mount
  396. for (rot = [45, 45 + 180]) {
  397. translate([0, 0, 0]) {
  398. rotate([0, 30, rot]) {
  399. translate([-mount_radius_capsule, -(mount_radius_capsule), mount_top_height])
  400. cube([mount_radius_capsule*2, mount_radius_capsule*2, 10]);
  401. }
  402. }
  403. }
  404. }
  405. }
  406. module tetra_capsule_array_mount(angles, mount_radius, mount_wall) {
  407. pedestal = 3.0;
  408. difference() {
  409. union() {
  410. rotate([0, 0, 45]) {
  411. wire_offset = wall;
  412. wire_diam = mic_wire_diam + mic_wire_fit;
  413. difference() {
  414. // outer sleeve
  415. hull() {
  416. for (r = [0, 180]) rotate([0, 0, r]) {
  417. for (t = [1, -1]) translate([mount_radius + 2 * wall, (wire_diam/2 + wall/4) * t, mount_top_height - pedestal]) {
  418. cylinder(r = wire_diam/2 + wall, h = pedestal, $fn = facets);
  419. }
  420. }
  421. cylinder(r = mount_radius + mount_wall, h = thin_mint, $fn = facets);
  422. }
  423. // holes for cables in top part of sleeve
  424. for (r = [0, 180]) rotate([0, 0, r]) {
  425. for (t = [1, -1]) translate([mount_radius + 2 * wall, (wire_diam/2 + wall/4) * t, mount_top_height - pedestal]) {
  426. cylinder(r = wire_diam/2, h = pedestal, $fn = facets);
  427. }
  428. }
  429. // holes for cables in bottom part of sleeve
  430. for (r = [0, 180]) rotate([0, 0, r]) {
  431. for (t = [1, -1]) {
  432. hull() {
  433. translate([mount_radius - wire_diam/2 - wall, wire_diam/2 * t, 0]) {
  434. cylinder(r = wire_diam/2, h = thin_mint, $fn = facets);
  435. }
  436. translate([mount_radius + 2 * wall, (wire_diam/2 + wall/4) * t, mount_top_height - pedestal]) {
  437. cylinder(r = wire_diam/2, h = thin_mint, $fn = facets);
  438. }
  439. }
  440. }
  441. }
  442. // cavity for printing without support
  443. scale([1.0, 1.0, 3.0]) {
  444. sphere(r = mount_radius, $fn = facets);
  445. }
  446. }
  447. }
  448. }
  449. // indentations that match the two lower capsule holders
  450. // add ridge height adjustment
  451. translate([0, 0, mount_top_height + (mic_radius - capsule_height) + capsule_height * cos(elev_angle) - mic_to_mount_fit]) {
  452. rotate([0, (90 + elev_angle), angles[0]]) {
  453. translate([0, 0, mic_radius - capsule_height]) {
  454. capsule(leg_angles_top, 0, 0, 0.0, 0.0, 1);
  455. }
  456. }
  457. rotate([0, (90 + elev_angle), angles[1]]) {
  458. translate([0, 0, mic_radius - capsule_height]) {
  459. capsule(leg_angles_top, 0, 0, 0.0, 0.0, 1);
  460. }
  461. }
  462. }
  463. // slice top sides of mount
  464. for (r = [45, 45 + 180]) rotate([0, 0, r]) {
  465. translate([mount_radius_capsule, -mount_radius_capsule*1.5, mount_top_height]) {
  466. rotate([0, 30, 0]) {
  467. cube([mount_radius_capsule*3, mount_radius_capsule*3, 10]);
  468. }
  469. }
  470. }
  471. }
  472. }
  473. ////
  474. //// render all the different parts
  475. ////
  476. // microphone body: flare to capsule array (slips into PCB holder body)
  477. //
  478. module render_tetra_capsule_flare(z_offset) {
  479. translate([0, 0, z_offset]) {
  480. tetra_mount_flare(pcb_hi_clear + pcb_hi_exp,
  481. mount_lip, flare_height, box_radius + wall, mount_corner, mount_radius + wall, screw_rotation, true);
  482. translate([0, 0, pcb_hi_clear + pcb_hi_exp + flare_height]) {
  483. tetra_mount_array_stalk(stalk_height, mount_radius + wall);
  484. }
  485. translate([0, 0, pcb_hi_clear + pcb_hi_exp + flare_height + stalk_height]) {
  486. tetra_capsule_array_mount([-45, 135], mount_radius, wall);
  487. }
  488. }
  489. }
  490. // microphone body: main body, holds printed circuit boards
  491. //
  492. tetra_pcb_mount_height = pcb_length - pcb_low_exp - pcb_hi_exp;
  493. module render_tetra_pcb_mount(z_offset, showint) {
  494. translate([0, 0, z_offset]) {
  495. tetra_mount_body(tetra_pcb_mount_height, box_radius + wall, mount_corner, mount_lip, mount_lip, screw_rotation, showint);
  496. // add ccrma logo
  497. rotate([0, 0, -90]) {
  498. translate([0, -(box_radius - 0.5), tetra_pcb_mount_height / 2]) {
  499. rotate([90, 270, 0]) {
  500. logo_scale = 1 / (pcb_version == 2 ? 3 : 2.4);
  501. scale([logo_scale, logo_scale, 1.0]) {
  502. ccrma_logo(1.65);
  503. }
  504. }
  505. }
  506. }
  507. }
  508. }
  509. // microphone body: flare to microphone cable (slips into PCB holder body)
  510. //
  511. module render_tetra_cable_flare(z_offset, flip) {
  512. translate([0, 0, z_offset]) {
  513. tetra_mount_flare(pcb_low_clear + pcb_low_exp, mount_lip, 20, box_radius + wall, mount_corner, cable_diam / 2 + wall, - screw_rotation, false);
  514. translate([0, 0, pcb_low_clear + pcb_low_exp + 20]) {
  515. tetra_mount_cable_holder(10, cable_diam / 2 + wall);
  516. }
  517. }
  518. }
  519. // microphone body: flare to 12 pin connector (slips into PCB holder body)
  520. //
  521. module render_tetra_connector_flare(z_offset, flip) {
  522. translate([0, 0, z_offset]) {
  523. // make the upper sleeve shorter
  524. flare_adjust = 6.0;
  525. flare_height = 20;
  526. tetra_mount_flare(pcb_low_clear + pcb_low_exp - flare_adjust, mount_lip, flare_height, box_radius + wall, mount_corner, conn_core_o_diam / 2, - screw_rotation, false, true);
  527. rotate([0, 0, -90]) translate([0, 0, pcb_low_clear + pcb_low_exp + 20 - flare_adjust]) {
  528. tetra_mount_connector_holder(conn_core_sleeve, conn_core_o_diam / 2, conn_core_diam / 2, conn_core_overlap, conn_core_s_diam / 2);
  529. }
  530. }
  531. }
  532. // microphone body: render all parts with a vertical separation
  533. //
  534. module render_tetra_body(z_offset, spread, showint) {
  535. rotate([0, 180, 0]) {
  536. render_tetra_connector_flare(0);
  537. }
  538. lippy = spread - mount_lip;
  539. render_tetra_pcb_mount(lippy, showint);
  540. render_tetra_capsule_flare(tetra_pcb_mount_height + 2 * lippy);
  541. }
  542. // microphone: render the full assembly with a vertical separation
  543. //
  544. module render_tetra_microphone(z_offset, spread) {
  545. render_tetra_body(z_offset, spread);
  546. lippy = spread - mount_lip;
  547. render_tetra_capsule_array(z_offset + tetra_pcb_mount_height + mount_top_height +
  548. flare_height + stalk_height + pcb_hi_clear + pcb_hi_exp + 2 * lippy + spread/2 + mic_radius, 0);
  549. }
  550. // microphone: render the full assembly with a vertical separation
  551. // cut out halt of the assembly so that we can see the inside
  552. //
  553. module render_tetra_microphone_cutout(z_offset, spread) {
  554. difference() {
  555. render_tetra_microphone(z_offset, spread);
  556. // a cube that blots out 1/4 of the microphone
  557. rotate([0, 0, 90]) {
  558. translate([0, 0, -300]) {
  559. cube([50, 100, 650]);
  560. }
  561. }
  562. }
  563. }
  564. // shock mount: microphone clip on stand mount
  565. //
  566. module render_tetra_shock_mount_stand(z_offset) {
  567. translate([z_offset]) {
  568. shock_mount_stand(mic_mount_height, mount_wall, mic_mount_wall);
  569. }
  570. }
  571. // shock mount: external ring
  572. //
  573. module render_tetra_shock_mount_external_ring(z_offset) {
  574. translate([0, 0, z_offset]) {
  575. tetra_shock_mount_external_ring(external_ring_height, box_radius, mount_corner, external_ring_radius);
  576. }
  577. }
  578. // shock mount: bottom internal ring
  579. //
  580. module render_tetra_shock_mount_internal_ring(z_offset) {
  581. translate([0, 0, z_offset]) {
  582. tetra_shock_mount_internal_ring(internal_ring_height, box_radius, internal_band_height, mount_corner, internal_ring_gap);
  583. }
  584. }
  585. // test arm mount
  586. //
  587. module render_tetra_arm_mount(z_offset) {
  588. translate([0, 0, z_offset]) {
  589. tetra_arm_mount(internal_ring_height, box_radius, internal_band_height, mount_corner, internal_ring_gap);
  590. }
  591. }
  592. // shock mount: render all parts
  593. //
  594. module render_tetra_shock_mount(z_offset) {
  595. // internal ring
  596. translate([0, 0, z_offset + (internal_ring_height + external_ring_height) / 2 - 1]) {
  597. rotate([0, 180, 0]) {
  598. render_tetra_shock_mount_internal_ring(0);
  599. }
  600. }
  601. // external ring
  602. translate([0, 0, z_offset]) {
  603. render_tetra_shock_mount_external_ring(0);
  604. }
  605. // mount to stand
  606. translate([box_radius + mount_corner + ring_wall + ring_arm_gap, 0, -(mic_mount_height + mic_mount_radius + 13.25) + z_offset]) {
  607. render_tetra_shock_mount_stand(0);
  608. }
  609. }