TinySpHEAR_mount_pcb.scad 22 KB

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