TinySpHEAR_mount_pcb.scad 23 KB

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