TinySpHEAR_mount_pcb.scad 22 KB

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