Octathingy_mount_pcb.scad 60 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528
  1. ////
  2. // Spherical Harmonics Ear Project (*SpHEAR)
  3. //
  4. // OctaSpHEAR or Octathingy, Second Order Ambisonics Microphone
  5. //
  6. // based on:
  7. // "A second-order soundfield microphone with improved polar pattern shape"
  8. // by Eric Benjamin, Audio Engineering Society Convention Paper 8728,
  9. // October 2012, San Francisco
  10. //
  11. // Copyright 2015-2019, Fernando Lopez-Lezcano, All Rights Reserved
  12. // nando@ccrma.stanford.edu
  13. //
  14. // This program is free software: you can redistribute it and/or modify
  15. // it under the terms of the GNU General Public License as published by
  16. // the Free Software Foundation, either version 3 of the License, or
  17. // (at your option) any later version.
  18. //
  19. // This program is distributed in the hope that it will be useful,
  20. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. // GNU General Public License for more details.
  23. //
  24. // You should have received a copy of the GNU General Public License
  25. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  26. //
  27. // 3d Models released under the Creative Commons license as follows:
  28. // Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)
  29. // http://creativecommons.org/licenses/by-nc-sa/4.0/
  30. // d-sub connector
  31. include <db25.scad>;
  32. ////
  33. //// rendering control
  34. ////
  35. // render version 2 printed circuit board and parts
  36. render_pcb = false;
  37. ////
  38. //// default model parameters
  39. ////
  40. // capsule array mount, height of flare and stalk
  41. flare_height = 50;
  42. stalk_height = 60;
  43. // calculated minimum "radius" of microphone box
  44. box_radius = pcb_front + (pcb_thickness + pcb_tfit) + pcb_back + 2 * wall;
  45. // calculated main body corner radius
  46. mount_corner = box_radius - pcb_width / 2 + pcb_slot_depth + 4.0;
  47. // body parameters
  48. radial_pcb_offset = pcb_version == 2 ? 15.0 : 17.0;
  49. octa_pcb_mount_height = pcb_length - pcb_low_exp - pcb_hi_exp;
  50. octa_pcb_wall = (pcb_version == 2 ? 4.75 : 5) * wall;
  51. // windscreen thread offset
  52. octa_pcb_thread_offset = (pcb_version == 2 ? -1.82 : 0.0);
  53. octa_pcb_radius = radial_pcb_offset + pcb_width/2 + octa_pcb_wall;
  54. // shock mount parameters
  55. //
  56. internal_ring_height = 55.0;
  57. external_ring_height = 10.0;
  58. rubber_band_angle = 45;
  59. main_radius_inc = (internal_ring_height / 2) / tan(rubber_band_angle);
  60. // gap between internal ring and microphone body
  61. internal_ring_gap = 1.0;
  62. // connector that joins the two internal rings
  63. connector_w = 10.0;
  64. connector_d = 2.0;
  65. // wall thickness and height of shock mount rings
  66. ring_wall = 4 * wall;
  67. ring_ext_height = 6;
  68. // gap between external ring and support arm
  69. ring_arm_gap = 16;
  70. // the main body that holds the phantom power interfaces
  71. // one printed circuit board with space in the back and front
  72. module one_pcb_slot (height, pcb_w, pcb_l, pcb_t, pcb_offset, slot_d, front, back, test = false) {
  73. render() translate([-(pcb_w/2 + 0.5), 0, 0]) {
  74. // printed circuit board with space for solder and components
  75. cube([pcb_w, pcb_t, pcb_l]);
  76. // open space in back and front
  77. // tune front and back by hand
  78. translate([slot_d, -2.0, 0]) cube([pcb_w - (2.0 * slot_d), 15, pcb_l]);
  79. // make top and bottom entry channels
  80. translate([slot_d, pcb_t/2, 0]) {
  81. rotate([0, 0, 45]) cylinder(r1 = pcb_t * 1.1, r2 = 0, h = 8.0, $fn = 4);
  82. }
  83. translate([pcb_w - slot_d, pcb_t/2, 0]) {
  84. rotate([0, 0, 45]) cylinder(r1 = pcb_t * 1.1, r2 = 0, h = 8.0, $fn = 4);
  85. }
  86. translate([slot_d, pcb_t/2, height - 8.0]) {
  87. rotate([0, 0, 45]) cylinder(r2 = pcb_t * 1.1, r1 = 0, h = 8.0, $fn = 4);
  88. }
  89. translate([pcb_w - slot_d, pcb_t/2, height - 8.0]) {
  90. rotate([0, 0, 45]) cylinder(r2 = pcb_t * 1.1, r1 = 0, h = 8.0, $fn = 4);
  91. }
  92. }
  93. }
  94. // the printed circuit board and parts (for testing fit inside body of microphone)
  95. module one_pcb_parts (height, pcb_w, pcb_l, pcb_t, pcb_offset, slot_d, front, back) {
  96. //render() translate([-(pcb_w/2 + wall), -(back + wall), 0]) {
  97. render() translate([-(pcb_w/2 + 0.5), 0, 0]) {
  98. // printed circuit board
  99. translate([0, 0, pcb_offset]) cube([pcb_w, pcb_t, pcb_l]);
  100. // small electrolytic capacitors (pcb_version == 2)
  101. // https://www.mouser.com/datasheet/2/293/e-umw-1219455.pdf
  102. cap_diam = 8.0;
  103. // should be 5, but transistors are a bit taller;
  104. cap_len = 6.0;
  105. translate([pcb_w/2, cap_len + pcb_t, 6]) {
  106. rotate([90, 0, 0]) cylinder(r = (cap_diam/2), h = cap_len, $fn = facets);
  107. }
  108. // film capacitors
  109. cap_h = 12;
  110. cap_w = 9;
  111. cap_t = 5.5;
  112. translate([pcb_w/2 - cap_w/2, pcb_t, 10]) {
  113. cube([cap_w, cap_t, cap_h]);
  114. }
  115. }
  116. }
  117. module rounded_octagon(height, radius) {
  118. intersection() {
  119. cylinder(r = radius, h = height, $fn = 8);
  120. cylinder(r = radius - wall, h = height + thin_mint, $fn = facets);
  121. }
  122. }
  123. module rounded_octagon_wall(height, radius, wall) {
  124. difference() {
  125. rounded_octagon(height, radius);
  126. rounded_octagon(height + thin_mint, radius - wall);
  127. }
  128. }
  129. // twist angle to optimize space usage inside body
  130. //octa_pcb_twist = pcb_version == 2 ? 12 : 16;
  131. octa_pcb_twist = pcb_version == 2 ? 13.5 : 16;
  132. // tilt angle to clear upper flare thread
  133. octa_pcb_tilt = pcb_version == 2 ? -0.7 : 0.0;
  134. module octa_mount_body_old(height, radius, lower_lip, upper_lip, clear) {
  135. // rotate pcb assembly so it does not interfere with the screws
  136. offset_angle = -octa_pcb_twist;
  137. // rotate individual pcb's to better use the internal space of the body
  138. twist_angle = octa_pcb_twist;
  139. difference() {
  140. union() {
  141. difference() {
  142. union() {
  143. // main body
  144. rounded_octagon_wall(height, radius, 2 * wall);
  145. // slots for printed circuit boards
  146. intersection() {
  147. for (r = [0:360/8:360]) rotate([0, octa_pcb_tilt, r + offset_angle]) {
  148. translate([radial_pcb_offset, 0, 0]) {
  149. rotate([0, 0, 180 + twist_angle]) {
  150. one_pcb_slot(height * 2/3, pcb_width + pcb_fit, pcb_length, pcb_thickness + pcb_tfit, -10,
  151. pcb_slot_depth, pcb_front, pcb_back, false);
  152. }
  153. }
  154. }
  155. // clip outside
  156. rounded_octagon(height, radius);
  157. }
  158. }
  159. // upper lip for flare to microphone
  160. translate([0, 0, height - upper_lip]) {
  161. rounded_octagon_wall(upper_lip, radius, wall + lip_fit);
  162. }
  163. // lower lip for flare to cable or connector
  164. translate([0, 0, 0]) {
  165. rounded_octagon_wall(upper_lip, radius, wall + lip_fit);
  166. }
  167. }
  168. // add backplates for upper lip screws
  169. for (r = [45, 135, 225, 315]) {
  170. rotate([0, 0, r]) translate([-(radius - 3 * wall), -2.5, 0]) {
  171. cube([2, 5, height]);
  172. }
  173. }
  174. }
  175. // make eight holes in the the body for screws that hold both flares
  176. // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
  177. difference() {
  178. for (z = [lower_lip/2, height - upper_lip/2]) {
  179. for (r = [45, 135, 225, 315]) {
  180. rotate([0, 0, r]) translate([-(radius + 2 * wall), 0, z]) {
  181. rotate([0, 90, 0]) {
  182. cylinder(r = 0.7, h = radius + wall, $fn = facets);
  183. }
  184. }
  185. }
  186. }
  187. cylinder(r = radius/2, h = height);
  188. }
  189. }
  190. }
  191. module octa_mount_body(height, radius, lower_lip, upper_lip, clear) {
  192. // rotate pcb assembly so it does not interfere with the screws
  193. offset_angle = -octa_pcb_twist;
  194. // rotate individual pcb's to better use the internal space of the body
  195. twist_angle = octa_pcb_twist;
  196. difference() {
  197. union() {
  198. difference() {
  199. union() {
  200. // main body
  201. rounded_octagon_wall(height, radius, 2 * wall);
  202. difference() {
  203. // fill the inside of the body
  204. translate([0, 0, -1]) rounded_octagon(height * 2/3, radius);
  205. // remove everything else
  206. union() {
  207. translate([0, 0, -1]) for (r = [0:360/8:360]) rotate([0, octa_pcb_tilt, r + offset_angle]) {
  208. translate([radial_pcb_offset, 0, 0]) {
  209. rotate([0, 0, 180 + twist_angle]) {
  210. one_pcb_slot(height * 2/3, pcb_width + pcb_fit, pcb_length, pcb_thickness + pcb_tfit, -10,
  211. pcb_slot_depth, pcb_front, pcb_back);
  212. }
  213. }
  214. }
  215. // make center hole
  216. cylinder(r = 6.0, h = height, $fn = facets);
  217. }
  218. }
  219. translate([0, 0, -1]) for (r = [0:360/8:360]) rotate([0, octa_pcb_tilt, r + offset_angle]) {
  220. translate([radial_pcb_offset, 0, 0]) {
  221. rotate([0, 0, 180 + twist_angle]) {
  222. // add wall that connects core with outer shell
  223. translate([-(pcb_width/2 + 2 * wall), -(wall + pcb_back), 0]) {
  224. cube([pcb_width + 2 * wall, wall, height * 2/3]);
  225. }
  226. if (render_pcb) {
  227. // add components if we are testing for fit
  228. one_pcb_parts(height * 2/3, pcb_width + pcb_fit, pcb_length, pcb_thickness + pcb_tfit, -10,
  229. pcb_slot_depth, pcb_front, pcb_back);
  230. }
  231. }
  232. }
  233. }
  234. }
  235. // clip inside of body below body (we need this because of pcb tilt)
  236. translate([0, 0, -2.0]) rounded_octagon(2.0, radius);
  237. // upper lip for flare to microphone
  238. translate([0, 0, height - upper_lip]) {
  239. rounded_octagon_wall(upper_lip, radius, wall + lip_fit);
  240. }
  241. // lower lip for flare to cable or connector
  242. translate([0, 0, 0]) {
  243. rounded_octagon_wall(upper_lip, radius, wall + lip_fit);
  244. }
  245. }
  246. // add backplates for upper lip screws
  247. for (r = [45, 135, 225, 315]) {
  248. rotate([0, 0, r]) translate([-(radius - 3 * wall), -2.5, 0]) {
  249. cube([2, 5, height]);
  250. }
  251. }
  252. }
  253. // make eight holes in the the body for screws that hold both flares
  254. // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
  255. difference() {
  256. for (z = [lower_lip/2, height - upper_lip/2]) {
  257. for (r = [45, 135, 225, 315]) {
  258. rotate([0, 0, r]) translate([-(radius + 2 * wall), 0, z]) {
  259. rotate([0, 90, 0]) {
  260. cylinder(r = 0.7, h = radius + wall, $fn = facets);
  261. }
  262. }
  263. }
  264. }
  265. cylinder(r = radius/2, h = height);
  266. }
  267. }
  268. }
  269. // flare from the body to the microphone stalk
  270. module octa_mount_flare_no_ws(height, lip, transition, radius, top_radius, stalk_height, dot) {
  271. // bottom box
  272. difference() {
  273. union() {
  274. rounded_octagon_wall(height, radius, 2 * wall);
  275. // small pedestals for the screws that attach the flare to the body
  276. // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
  277. for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
  278. translate([radius - wall - 1.75, 0, lip/2]) {
  279. rotate([0, 90, 0]) {
  280. cylinder(r = 1.5, h = 2 * wall, $fn = facets);
  281. }
  282. }
  283. }
  284. }
  285. // flange to mount on body
  286. rounded_octagon_wall(lip + 1.00, radius - wall, wall);
  287. // and make a smooth transition to avoid overhangs
  288. translate([0, 0, lip + 1.00]) {
  289. hull() {
  290. rounded_octagon_wall(thin_mint, radius - wall, wall);
  291. translate([0, 0, 1.0]) {
  292. rounded_octagon_wall(thin_mint, radius - 2 * wall, wall);
  293. }
  294. }
  295. }
  296. // holes for screws that attach the flare to the body
  297. // Number 0 Size, 1/4" Long = thread diameter: 1.6mm, head diameter: 2.75
  298. for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
  299. translate([radius/2, 0, lip/2]) {
  300. rotate([0, 90, 0]) {
  301. cylinder(r = (1.6 + 0.1)/2, h = radius, $fn = facets);
  302. }
  303. }
  304. }
  305. }
  306. // flare to round section
  307. translate([0, 0, height]) {
  308. difference() {
  309. hull() {
  310. rounded_octagon(thin_mint, radius);
  311. translate([0, 0, transition]) {
  312. cylinder(r = top_radius, h = thin_mint, $fn = facets);
  313. }
  314. }
  315. hull() {
  316. rounded_octagon(thin_mint, radius - wall);
  317. translate([0, 0, transition]) {
  318. cylinder(r = top_radius - wall, h = thin_mint, $fn = facets);
  319. }
  320. }
  321. }
  322. }
  323. // cylindrical stalk
  324. translate([0, 0, height + transition]) {
  325. difference() {
  326. cylinder(r = top_radius, h = stalk_height, $fn = facets);
  327. cylinder(r = top_radius - wall, h = stalk_height, $fn = facets);
  328. }
  329. // add marker for "back of microphone" orientation
  330. if (dot == 1) {
  331. rotate([0, 0, 90]) {
  332. translate([0, top_radius - wall * 2 / 3, stalk_height - top_radius]) {
  333. difference() {
  334. sphere(r = top_radius / 3, $fn = 32);
  335. translate([0, -top_radius + top_radius / 2, 0]) {
  336. cube([top_radius, top_radius, top_radius], center = true);
  337. }
  338. }
  339. }
  340. }
  341. }
  342. // close stalk and add holes for cables
  343. translate([0, 0, stalk_height - top_radius - wall]) {
  344. difference() {
  345. cylinder(r = top_radius - wall, h = top_radius + wall, $fn = facets);
  346. translate([0, 0, 0]) {
  347. sphere(r = top_radius - wall, $fn = facets);
  348. }
  349. wire_diam = mic_wire_diam + mic_wire_fit;
  350. for (r = [0, 90, 180, 270]) rotate([0, 0, r]) {
  351. for (t = [0, 1]) {
  352. rotate([0, 0, 45 * t]) translate([top_radius - wire_diam - t * wire_diam * 2/3, 0, wall]) {
  353. cylinder(r = wire_diam / 2, h = top_radius * 2, $fn = facets);
  354. }
  355. }
  356. }
  357. translate([0, 0, wall]) cylinder(r = wire_diam, h = top_radius * 2, $fn = facets);
  358. }
  359. }
  360. }
  361. }
  362. module octa_mount_flare_old(height, lip, transition, radius, top_radius, stalk_height, dot) {
  363. // transition from bottom box to windscreen mounting thread
  364. transition_to_threads = 5;
  365. // bottom box
  366. difference() {
  367. union() {
  368. rounded_octagon_wall(height, radius, 2 * wall);
  369. // small pedestals for the screws that attach the flare to the body
  370. // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
  371. for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
  372. translate([radius - wall - 1.75, 0, lip/2]) {
  373. rotate([0, 90, 0]) {
  374. cylinder(r = 1.5, h = 2 * wall, $fn = facets);
  375. }
  376. }
  377. }
  378. // indicator of "front" of microphone
  379. rotate([0, 0, 180 + 22.5]) translate([radius - 2, 0, 0]) {
  380. cylinder(r = 1.0, h = lip/2, $fn = facets);
  381. }
  382. // stops for shock mount
  383. for (r = [0, 90, 180, 270]) rotate([0, 0, r - 22.5]) {
  384. translate([radius - 3.4, 0, 0]) scale([2.0, 1.0, 1.0]) {
  385. difference() {
  386. cylinder(r = 2.0, h = lip + transition_to_threads, $fn = facets);
  387. translate([-2, -2.0, 0]) cube([2.0, 4.0, lip + transition_to_threads]);
  388. }
  389. }
  390. }
  391. }
  392. // flange to mount on body
  393. rounded_octagon_wall(lip + 1.00, radius - wall, wall);
  394. // and make a smooth transition to avoid overhangs
  395. translate([0, 0, lip + 1.00]) {
  396. hull() {
  397. rounded_octagon_wall(thin_mint, radius - wall, wall);
  398. translate([0, 0, 1.0]) {
  399. rounded_octagon_wall(thin_mint, radius - 2 * wall, wall);
  400. }
  401. }
  402. }
  403. // holes for screws that attach the flare to the body
  404. // Number 0 Size, 1/4" Long = thread diameter: 1.6mm, head diameter: 2.75
  405. for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
  406. translate([radius/2, 0, lip/2]) {
  407. rotate([0, 90, 0]) {
  408. cylinder(r = (1.6 + 0.1)/2, h = radius, $fn = facets);
  409. }
  410. }
  411. }
  412. }
  413. // flare to windscreen threads
  414. translate([0, 0, height - windscreen_thread_height - transition_to_threads]) {
  415. difference() {
  416. hull() {
  417. rounded_octagon(thin_mint, radius);
  418. translate([0, 0, transition_to_threads]) {
  419. cylinder(r = windscreen_thread_radius + 0.5, h = thin_mint, $fn = facets);
  420. }
  421. }
  422. hull() {
  423. rounded_octagon(thin_mint, radius - wall);
  424. translate([0, 0, transition_to_threads]) {
  425. cylinder(r = windscreen_thread_radius - windscreen_thread_depth - wall, h = thin_mint, $fn = facets);
  426. }
  427. }
  428. }
  429. }
  430. // windscreen mounting threads
  431. translate([0, 0, height - windscreen_thread_height]) difference() {
  432. metric_thread(diameter = windscreen_thread_radius * 2, pitch = windscreen_thread_pitch,
  433. length = windscreen_thread_height, angle = windscreen_thread_angle, internal = false);
  434. cylinder(r = windscreen_thread_radius - wall - windscreen_thread_depth, h = windscreen_thread_height + thin_mint, $fn = facets);
  435. }
  436. // flare to stalk
  437. translate([0, 0, height - 1.5]) {
  438. difference() {
  439. hull() {
  440. cylinder(r = windscreen_thread_radius - windscreen_thread_depth, h = thin_mint, $fn = facets);
  441. translate([0, 0, transition + 1.5]) {
  442. cylinder(r = top_radius, h = thin_mint, $fn = facets);
  443. }
  444. }
  445. hull() {
  446. cylinder(r = windscreen_thread_radius - windscreen_thread_depth - wall, h = thin_mint, $fn = facets);
  447. translate([0, 0, transition + 1.5]) {
  448. cylinder(r = top_radius - wall, h = thin_mint, $fn = facets);
  449. }
  450. }
  451. }
  452. }
  453. // cylindrical stalk
  454. translate([0, 0, height + transition]) {
  455. difference() {
  456. cylinder(r = top_radius, h = stalk_height, $fn = facets);
  457. cylinder(r = top_radius - wall, h = stalk_height, $fn = facets);
  458. }
  459. // close stalk and add holes for cables
  460. translate([0, 0, stalk_height - top_radius - wall]) {
  461. difference() {
  462. cylinder(r = top_radius - wall, h = top_radius + wall, $fn = facets);
  463. translate([0, 0, 0]) {
  464. sphere(r = top_radius - wall, $fn = facets);
  465. }
  466. wire_diam = mic_wire_diam + mic_wire_fit;
  467. for (r = [0, 90, 180, 270]) rotate([0, 0, r]) {
  468. for (t = [0, 1]) {
  469. rotate([0, 0, 45 * t]) translate([top_radius - wire_diam - t * wire_diam * 2/3, 0, wall]) {
  470. cylinder(r = wire_diam / 2, h = top_radius * 2, $fn = facets);
  471. }
  472. }
  473. }
  474. translate([0, 0, wall]) cylinder(r = wire_diam, h = top_radius * 2, $fn = facets);
  475. }
  476. }
  477. }
  478. }
  479. // stalk from flare to capsule array mount
  480. module octa_mount_stalk(height, lip, transition, radius, top_radius, stalk_height, dot) {
  481. translate([0, 0, height + transition]) {
  482. translate ([0, 0, -10.0]) difference() {
  483. cylinder(r = top_radius, h = stalk_height + 10.0, $fn = facets);
  484. cylinder(r = top_radius - wall, h = stalk_height + 10.0, $fn = facets);
  485. }
  486. // close stalk and add holes for cables
  487. translate([0, 0, stalk_height - top_radius - wall]) {
  488. difference() {
  489. cylinder(r = top_radius - wall, h = top_radius + wall, $fn = facets);
  490. translate([0, 0, 0]) {
  491. sphere(r = top_radius - wall, $fn = facets);
  492. }
  493. wire_diam = mic_wire_diam + mic_wire_fit;
  494. for (r = [0, 90, 180, 270]) rotate([0, 0, r]) {
  495. for (t = [0, 1]) {
  496. rotate([0, 0, 45 * t]) translate([top_radius - wire_diam - t * wire_diam * 2/3, 0, wall]) {
  497. cylinder(r = wire_diam / 2, h = top_radius * 2, $fn = facets);
  498. }
  499. }
  500. }
  501. translate([0, 0, wall]) cylinder(r = wire_diam, h = top_radius * 2, $fn = facets);
  502. }
  503. }
  504. // add flange for coupling into flare
  505. difference() {
  506. cylinder(r2 = top_radius, r1 = top_radius + wall, h = 10.0, $fn = facets);
  507. cylinder(r2 = top_radius - wall, r1 = top_radius, h = 10.0, $fn = facets);
  508. }
  509. translate([top_radius, 0, -10.0]) {
  510. // add key to stalk so orientation is always correct
  511. difference() {
  512. cylinder(r = 0.4, h = 10.0, $fn = facets);
  513. }
  514. }
  515. }
  516. }
  517. // flare from body to capsule array stalk
  518. module octa_mount_flare(height, lip, transition, radius, top_radius, stalk_height, dot) {
  519. // transition from bottom box to windscreen mounting thread
  520. transition_to_threads = 5;
  521. // bottom box
  522. difference() {
  523. union() {
  524. rounded_octagon_wall(height - windscreen_thread_height, radius, 2 * wall);
  525. // small pedestals for the screws that attach the flare to the body
  526. // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
  527. for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
  528. translate([radius - wall - 1.75, 0, lip/2]) {
  529. rotate([0, 90, 0]) {
  530. cylinder(r = 1.5, h = 2 * wall, $fn = facets);
  531. }
  532. }
  533. }
  534. // indicator of "front" of microphone
  535. rotate([0, 0, 180 + 22.5]) translate([radius - 2, 0, 0]) {
  536. cylinder(r = 1.0, h = lip/3, $fn = facets);
  537. }
  538. // stops for shock mount
  539. for (r = [0, 90, 180, 270]) rotate([0, 0, r - 22.5]) {
  540. translate([radius - 3.4, 0, 0]) scale([2.0, 1.0, 1.0]) {
  541. difference() {
  542. // cylinder(r = 2.0, h = lip + transition_to_threads, $fn = facets);
  543. cylinder(r = 2.0, h = 5.0, $fn = facets);
  544. translate([-2, -2.0, 0]) cube([2.0, 4.0, lip + transition_to_threads]);
  545. }
  546. }
  547. }
  548. }
  549. // flange to mount on body
  550. rounded_octagon_wall(lip + 1.00, radius - wall, wall);
  551. // and make a smooth transition to avoid overhangs
  552. translate([0, 0, lip + 1.00]) {
  553. hull() {
  554. rounded_octagon_wall(thin_mint, radius - wall, wall);
  555. translate([0, 0, 1.0]) {
  556. rounded_octagon_wall(thin_mint, radius - 2 * wall, wall);
  557. }
  558. }
  559. }
  560. // holes for screws that attach the flare to the body
  561. // Number 0 Size, 1/4" Long = thread diameter: 1.6mm, head diameter: 2.75
  562. for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
  563. translate([radius/2, 0, lip/2]) {
  564. rotate([0, 90, 0]) {
  565. cylinder(r = (1.6 + 0.1)/2, h = radius, $fn = facets);
  566. }
  567. }
  568. }
  569. }
  570. // windscreen mounting threads
  571. translate([0, 0, height - windscreen_thread_height]) difference() {
  572. metric_thread(diameter = windscreen_thread_radius * 2, pitch = windscreen_thread_pitch,
  573. length = windscreen_thread_height, angle = windscreen_thread_angle, internal = false);
  574. cylinder(r = windscreen_thread_radius - wall - windscreen_thread_depth, h = windscreen_thread_height + thin_mint, $fn = facets);
  575. // clip thread tips
  576. difference() {
  577. cylinder(r = windscreen_thread_radius + wall, h = windscreen_thread_height + thin_mint, $fn = facets);
  578. cylinder(r = windscreen_thread_radius - windscreen_thread_depth * 0.3, h = windscreen_thread_height + thin_mint, $fn = facets);
  579. }
  580. }
  581. // flare to stalk
  582. translate([0, 0, height - 1.5]) {
  583. difference() {
  584. cylinder(r1 = windscreen_thread_radius - windscreen_thread_depth,
  585. r2 = top_radius + wall + fit, h = transition + 1.5, $fn = facets);
  586. cylinder(r1 = windscreen_thread_radius - windscreen_thread_depth - wall,
  587. r2 = top_radius + fit, h = transition + 1.5, $fn = facets);
  588. }
  589. }
  590. // socket for stalk
  591. s_length = 10.0;
  592. translate([0, 0, height + transition - s_length]) {
  593. difference() {
  594. cylinder(r = top_radius + wall + fit, h = s_length, $fn = facets);
  595. cylinder(r = top_radius + fit, h = s_length, $fn = facets);
  596. // add key slot for orientation
  597. translate([top_radius, 0, -1]) {
  598. cylinder(r = 0.4, h = s_length + 2, $fn = facets);
  599. }
  600. }
  601. }
  602. // internal flare for stalk
  603. translate([0, 0, height - 1.5]) {
  604. difference() {
  605. cylinder(r1 = windscreen_thread_radius - windscreen_thread_depth,
  606. r2 = top_radius + wall + fit, h = transition + 1.5 - s_length, $fn = facets);
  607. cylinder(r1 = windscreen_thread_radius - windscreen_thread_depth - wall,
  608. r2 = top_radius + fit, h = transition + 1.5 - s_length, $fn = facets);
  609. }
  610. }
  611. }
  612. // flare from the body to a dual cable housing
  613. module octa_mount_flare_dual(height, lip, transition, xradius, yradius, corner, top_radius, stalk_height) {
  614. // hack to get it to render, fix problem in rounded_block when radius is equal to corner...
  615. delta = 0.001;
  616. difference() {
  617. union() {
  618. // bottom rounded box
  619. difference() {
  620. rounded_block(height, xradius, yradius, corner);
  621. rounded_block_relative(height, xradius, yradius, corner, -(2 * wall));
  622. // flange to mount on body
  623. rounded_block_relative(lip + 1.00, xradius, yradius, corner, - (wall));
  624. // and make a smooth transition to avoid overhangs
  625. translate([0, 0, lip + 1.00]) {
  626. hull() {
  627. rounded_block_relative(thin_mint, xradius, yradius, corner, - wall);
  628. translate([0, 0, 1.0]) {
  629. rounded_block_relative(thin_mint, xradius, yradius, corner, - 2 * wall);
  630. }
  631. }
  632. }
  633. }
  634. // flare to rounded section
  635. translate([0, 0, height]) {
  636. difference() {
  637. hull() {
  638. rounded_block(thin_mint, xradius, yradius, corner);
  639. translate([0, 0, transition]) {
  640. rounded_block(thin_mint, top_radius + wall / 2, top_radius * 2 + wall / 2, top_radius - delta);
  641. }
  642. }
  643. hull() {
  644. rounded_block_relative(thin_mint, xradius, yradius, corner, - 2 * wall);
  645. translate([0, -top_radius, transition]) {
  646. cube([thin_mint, (top_radius) * 2, thin_mint]);
  647. }
  648. }
  649. }
  650. }
  651. // corner box cable stalk
  652. translate([0, 0, height + transition]) {
  653. rounded_block(stalk_height, top_radius + wall / 2, top_radius * 2 + wall / 2, top_radius - delta);
  654. }
  655. }
  656. // holes for the cables
  657. for (offset = [top_radius - wall/2, -(top_radius - wall/2)]) {
  658. translate([0, offset, 0]){
  659. cylinder(r = top_radius - wall, h = height + transition + stalk_height, $fn = facets);
  660. }
  661. }
  662. }
  663. }
  664. // flare from the body to a dual conector housing
  665. // bottom connector holder
  666. module tetra_mount_connector_holder(height, radius, inside_radius, sleeve_height, sleeve_radius) {
  667. difference() {
  668. union() {
  669. cylinder(r = radius, h = height, $fn = facets);
  670. // add seats for screw heads
  671. for (m = [-1, 1]) translate([m * conn_core_holes_w / 2, radius / 2, conn_core_holes_h]) {
  672. rotate([90, 0, 0]) {
  673. scale([1, 1, 1]) cylinder(r = conn_core_screw_d / 2, h = radius * 1.43, $fn = facets);
  674. }
  675. }
  676. }
  677. cylinder(r = inside_radius, h = height, $fn = facets);
  678. // transition from thin wall to thick wall at the bottom of connector
  679. *cylinder(r1 = radius - wall, r2 = inside_radius, h = 2.0, $fn = facets);
  680. // holes for connector core screws
  681. for (m = [-1, 1]) translate([m * conn_core_holes_w / 2, - radius / 3, conn_core_holes_h]) {
  682. rotate([90, 0, 0]) {
  683. cylinder(r = conn_core_holes_d / 2, h = radius, $fn = facets);
  684. }
  685. }
  686. // substract cutout for screw heads
  687. for (m = [-1, 1]) translate([m * conn_core_holes_w / 2, - radius + 1.5, conn_core_holes_h]) {
  688. rotate([90, 0, 0]) {
  689. cylinder(r = conn_core_screw_d / 2, h = 2.0, $fn = facets);
  690. }
  691. }
  692. }
  693. // thinner cylinder sits inside connector sleeve
  694. translate([0, 0, height]) {
  695. difference() {
  696. cylinder(r = sleeve_radius, h = sleeve_height, $fn = facets);
  697. cylinder(r = inside_radius, h = sleeve_height, $fn = facets);
  698. }
  699. }
  700. }
  701. // flare to dual cable connectors
  702. module octa_mount_flare_connector(height, lip, transition, radius, top_xradius, top_yradius) {
  703. // hack to get it to render, fix problem in rounded_block when radius is equal to corner...
  704. delta = 0.001;
  705. // bottom rounded box
  706. difference() {
  707. union() {
  708. rounded_octagon_wall(height, radius, 2 * wall);
  709. // small pedestals for the screws that attach the flare to the body
  710. // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
  711. for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
  712. translate([radius - wall - 1.75, 0, lip/2]) {
  713. rotate([0, 90, 0]) {
  714. cylinder(r = 1.5, h = 2 * wall, $fn = facets);
  715. }
  716. }
  717. }
  718. }
  719. // flange to mount on body
  720. rounded_octagon_wall(lip + 1.00, radius - wall, wall);
  721. // and make a smooth transition to avoid overhangs
  722. translate([0, 0, lip + 1.00]) {
  723. hull() {
  724. rounded_octagon_wall(thin_mint, radius - wall, wall);
  725. translate([0, 0, 1.0]) {
  726. rounded_octagon_wall(thin_mint, radius - 2 * wall, wall);
  727. }
  728. }
  729. }
  730. // holes for screws that attach the flare to the body
  731. // Number 0 Size, 1/4" Long = thread diameter: 1.6mm, head diameter: 2.75
  732. for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
  733. translate([radius/2, 0, lip/2]) {
  734. rotate([0, 90, 0]) {
  735. cylinder(r = (1.6 + 0.1)/2, h = radius, $fn = facets);
  736. }
  737. }
  738. }
  739. }
  740. // flare to rounded section
  741. translate([0, 0, height]) {
  742. difference() {
  743. hull() {
  744. rounded_octagon(thin_mint, radius);
  745. translate([0, 0, transition]) {
  746. rounded_block(thin_mint, top_xradius, top_yradius, top_xradius - delta);
  747. }
  748. }
  749. hull() {
  750. rounded_octagon(thin_mint, radius - 2 * wall);
  751. translate([0, -top_xradius, transition]) {
  752. cube([thin_mint, (top_xradius) * 2, thin_mint]);
  753. }
  754. }
  755. }
  756. }
  757. }
  758. // flare to d-sub 25 pin connector
  759. module octa_mount_flare_dsub(height, lip, transition, radius, top_xradius, top_yradius) {
  760. // bottom octagonal box
  761. difference() {
  762. union() {
  763. rounded_octagon_wall(height, radius, 2 * wall);
  764. // small pedestals for the screws that attach the flare to the body
  765. // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
  766. for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
  767. translate([radius - wall - 1.75, 0, lip/2]) {
  768. rotate([0, 90, 0]) {
  769. cylinder(r = 1.5, h = 2 * wall, $fn = facets);
  770. }
  771. }
  772. }
  773. }
  774. // flange to mount on body
  775. rounded_octagon_wall(lip + 1.00, radius - wall, wall);
  776. // and make a smooth transition to avoid overhangs
  777. translate([0, 0, lip + 1.00]) {
  778. hull() {
  779. rounded_octagon_wall(thin_mint, radius - wall, wall);
  780. translate([0, 0, 1.0]) {
  781. rounded_octagon_wall(thin_mint, radius - 2 * wall, wall);
  782. }
  783. }
  784. }
  785. // holes for screws that attach the flare to the body
  786. // Number 0 Size, 1/4" Long = thread diameter: 1.6mm, head diameter: 2.75
  787. for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
  788. translate([radius/2, 0, lip/2]) {
  789. rotate([0, 90, 0]) {
  790. cylinder(r = (1.6 + 0.1)/2, h = radius, $fn = facets);
  791. }
  792. }
  793. }
  794. }
  795. // flare to db25 connector mounting plate
  796. expand = pcb_version == 2 ? 1 : 3;
  797. // height of connector
  798. guard_height = 9.525;
  799. // thickness of db25 plate
  800. db25_t = 3 * wall;
  801. translate([0, 0, height]) {
  802. minkr = 2.0;
  803. difference() {
  804. hull() {
  805. rounded_octagon(thin_mint, radius);
  806. rotate([0, 0, -22.5]) translate([0, 0, transition - 5.0]) {
  807. minkowski() {
  808. db25_plate(th = thin_mint, border = expand);
  809. cylinder(r = minkr, h = thin_mint, $fn = facets);
  810. }
  811. }
  812. }
  813. hull() {
  814. rounded_octagon(thin_mint, radius - 2 * wall);
  815. rotate([0, 0, -22.5]) translate([0, 0, transition - 5.0]) {
  816. minkowski() {
  817. db25_plate(th = thin_mint, border = expand - 2 * wall);
  818. cylinder(r = minkr, h = thin_mint, $fn = facets);
  819. }
  820. }
  821. }
  822. }
  823. // db25 mounting plate
  824. rotate([0, 0, -22.5]) translate([0, 0, transition]) {
  825. difference() {
  826. db25_plate(th = db25_t, border = expand);
  827. db25_cutout(th = db25_t);
  828. }
  829. // connector border
  830. translate([0, 0, -5.0]) difference() {
  831. overhang = 3.0;
  832. minkowski() {
  833. db25_plate(th = 5.0 + db25_t + overhang, border = expand);
  834. cylinder(r = minkr, h = thin_mint, $fn = facets);
  835. }
  836. db25_plate(th = 5.0 + db25_t + overhang + thin_mint, border = expand);
  837. }
  838. }
  839. // for testing
  840. *rotate([0, 0, -22.5]) translate([0, 0, 40]) db25_plate(th = 1.0, border = 1.0);
  841. }
  842. }
  843. module octa_mount_stand(height, lip, transition, radius, top_xradius, top_yradius) {
  844. // flare to db25 connector mounting plate
  845. expand = 3;
  846. // height of connector
  847. guard_height = 9.525;
  848. // thickness of db25 plate
  849. db25_t = 3 * wall;
  850. translate([0, 0, height]) {
  851. minkr = 2.0;
  852. // db25 mounting plate
  853. rotate([0, 0, -22.5]) translate([0, 0, transition]) {
  854. // add guard wall around connector
  855. difference() {
  856. minkowski() {
  857. db25_plate(th = guard_height + db25_t, border = 1.8 * expand);
  858. cylinder(r = minkr, h = thin_mint, $fn = facets);
  859. }
  860. db25_plate(th = guard_height + db25_t + thin_mint, border = 1.8 * expand);
  861. }
  862. }
  863. // ring and connector
  864. translate([0, 0, height]) {
  865. o_rad = 8;
  866. i_rad = 3;
  867. rotate([0, 90, -22.5]) {
  868. // connector
  869. translate([-guard_height, 13, 0]) cube([guard_height, 10, o_rad/2]);
  870. translate([-guard_height, 9, o_rad/4]) rotate([0, 90, 0]) {
  871. difference() {
  872. cylinder(r = o_rad, h = guard_height, $fn = facets);
  873. translate([-10, -16, 0]) cube([20, 20, 10]);
  874. }
  875. }
  876. // ring
  877. translate([-o_rad, 30, 0]) {
  878. shock_mount_ring(o_rad, i_rad, ring_wall);
  879. }
  880. }
  881. }
  882. }
  883. }
  884. // top conical section that plugs into capsule array
  885. module octa_capsule_array_mount(angles) {
  886. difference() {
  887. union() {
  888. difference() {
  889. cylinder(h = mount_top_height, r1 = mount_radius + wall, r2 = mount_radius_capsule + 0.9, $fn = facets);
  890. cylinder(h = mount_top_height, r1 = mount_radius, r2 = mount_radius_capsule - 2 * wall * wall, $fn = facets);
  891. }
  892. // second set of optional "leaves" to get a better mount
  893. *difference() {
  894. cylinder(h = mount_top_height, r1 = mount_radius + wall, r2 = mount_radius_capsule * 0.8, $fn = facets);
  895. cylinder(h = mount_top_height, r1 = mount_radius, r2 = mount_radius_capsule * 0.8 - 1.2 * wall, $fn = facets);
  896. }
  897. }
  898. // indentations that match the four lower capsule holders
  899. // add ridge height adjustment
  900. translate([0, 0, mount_top_height + (mic_radius - capsule_height) + capsule_height * cos(90 - elev_angle) - 2]) {
  901. for (az = angles) {
  902. rotate([0, 180 - elev_angle, az + 45]) {
  903. translate([0, 0, mic_radius - capsule_height]) {
  904. capsule(leg_angles, 0, 1, ridge_wfit, ridge_hfit, 1);
  905. }
  906. }
  907. }
  908. }
  909. // indentations at the top to open up the array a bit
  910. translate([0, 0, mount_top_height + mount_radius_capsule / 8]) {
  911. for (rot = [45, 135, -135, -45]) {
  912. translate([0, 0, 0]) {
  913. rotate([0, 90, rot]) {
  914. scale([0.5, 0.5, 1.3]) linear_extrude(height = mount_radius_capsule, scale = 2.8) {
  915. minkowski() {
  916. polygon(points = [[0, mount_radius_capsule * 0.2], [0, - mount_radius_capsule * 0.2],
  917. [mount_radius_capsule, 0]]);
  918. circle(r = 2.4, $fn = facets);
  919. }
  920. }
  921. }
  922. }
  923. }
  924. }
  925. }
  926. }
  927. //
  928. // shock mount components
  929. //
  930. // shock mount band that attaches snugly to microphone body
  931. module octa_shock_mount_band(band_height, radius, delta_radius) {
  932. rotate([0, 0, 22.5]) {
  933. // inner octagon, hugs the body
  934. difference() {
  935. rounded_octagon_wall(band_height, radius + 3 * wall, 2 * wall);
  936. rotate([0, 0, -22.5 + 90]) translate([-40, -(1.273 * radius)/2, 0]) {
  937. cube([80, 1.273 * radius, band_height + thin_mint]);
  938. }
  939. // space for screw heads
  940. slot_w = 4.0;
  941. slot_d = 1.5;
  942. for (r = [0, 180]) rotate([0, 0, r - 45])
  943. translate([radius - slot_d/2, -slot_w/2, 0]) cube([slot_d, slot_w, band_height]);
  944. }
  945. // the outer octagon
  946. rounded_octagon_wall(band_height, radius + delta_radius, 2 * wall);
  947. }
  948. // joins inner and outer octagons
  949. for (m = [0, 1]) mirror([m, 0, 0]) {
  950. translate([radius, -10, 0]) {
  951. cube([delta_radius - 4 * wall, 20, band_height]);
  952. }
  953. }
  954. }
  955. // shock mount internal ring
  956. module octa_shock_mount_internal_ring(height, radius, band_height, corner) {
  957. delta_radius = pcb_version == 2 ? 7.5 : 6;
  958. // octagonal band
  959. octa_shock_mount_band(band_height, radius, delta_radius);
  960. // 8 columns for mounting rubber bands
  961. for (r = [0, 90, 180, 270]) rotate([0, 0, r]) {
  962. for (m = [0, 1]) mirror([m, 0, 0]) {
  963. translate([radius + (pcb_version == 2 ? 3.5 : 2.25), radius/2 - 2, 0]) {
  964. rotate([0, 0, 0]) {
  965. difference() {
  966. // columns
  967. union() {
  968. translate([3, 0, 0]) rotate([0, 0, 45]) scale([1.4, 0.8, 1.0])
  969. cylinder(r = 3, h = height, $fn = facets);
  970. }
  971. // lower slots for rubber bands
  972. rotate([0, 0, 45]) translate([2.5, radius/2, 2.0]) scale([1.0, 1.0, 2.2]) rotate([90, 0, 0]) {
  973. cylinder(r = 1.1, h = radius * 2, $fn = facets);
  974. }
  975. // upper slots for rubber bands
  976. rotate([0, 0, 45]) translate([2.5, radius/2, height - 2.0]) scale([1.0, 1.0, 2.2]) rotate([90, 0, 0]) {
  977. cylinder(r = 1.1, h = radius * 2, $fn = facets);
  978. }
  979. }
  980. }
  981. }
  982. }
  983. // walls between columns so that they cannot bend
  984. rotate([0, 0, 45]) translate([radius + (pcb_version == 2 ? 2.7 : 2.25) * wall, -14, 0]) {
  985. cube([wall, 28, height]);
  986. }
  987. }
  988. }
  989. // shock mount sleeve, slips over microphone body and has hooks for the elastic bands
  990. module elastic_band_hook (slot_r = 1.1) {
  991. hook_l = 6.0;
  992. translate([slot_r, hook_l/2, 0]) {
  993. rotate([90, 0, 0]) scale([1, 2.2, 1]) cylinder(r = slot_r, h = hook_l, $fn = facets);
  994. }
  995. }
  996. module octa_shock_mount_sleeve(radius, height, hooks = true, logo = true) {
  997. // gap between body and sleeve
  998. gap = internal_ring_gap + 0;
  999. difference() {
  1000. // fit gap for slide tubes
  1001. sgap = 0.2;
  1002. stop_ro = 2.0 + 2 * wall + sgap;
  1003. union() {
  1004. // sleeve
  1005. rotate([0, 0, 22.5]) rounded_octagon_wall(height, radius + 2 * wall + gap, 2 * wall);
  1006. // tubes for stops
  1007. for (r = [0, 90, 180, 270]) {
  1008. rotate([0, 0, r + 45]) {
  1009. translate([radius - 2 * wall + gap, 0, 0]) {
  1010. difference() {
  1011. scale([1, 1.4, 1]) cylinder(r = stop_ro, h = height, $fn = facets);
  1012. translate([-2 * stop_ro, -2 * stop_ro, 0]) {
  1013. cube([2 * stop_ro, 4 * stop_ro, height]);
  1014. }
  1015. }
  1016. }
  1017. }
  1018. }
  1019. // pillars for elastic band hooks
  1020. if (hooks) {
  1021. for (r = [0, 90, 180, 270]) rotate([0, 0, r + 45]) {
  1022. pill_r = 2.5;
  1023. translate([radius + stop_ro + gap - 2 * wall, 0, 0]) {
  1024. difference() {
  1025. scale([2, 1, 1]) cylinder(r = pill_r, h = height, $fn = facets);
  1026. translate([-7 * wall, -pill_r, 0]) cube([6 * wall, pill_r * 2, height]);
  1027. }
  1028. }
  1029. }
  1030. }
  1031. // add ccrma logo
  1032. if (logo) {
  1033. rotate([0, 0, 90]) {
  1034. translate([0, -(radius - (pcb_version == 2 ? gap + 1.4 : 0) + 2 * wall),
  1035. height / 2]) {
  1036. rotate([90, 270, 0]) {
  1037. logo_scale = 1 / (pcb_version == 2 ? 3.0 : 2.4);
  1038. scale([logo_scale, logo_scale, 1.0]) {
  1039. ccrma_logo(1.65);
  1040. }
  1041. }
  1042. }
  1043. }
  1044. }
  1045. }
  1046. // slots for stops and screws
  1047. for (r = [0, 90, 180, 270]) {
  1048. // stops
  1049. stop_r = 2.0 + sgap;
  1050. rotate([0, 0, r + 45]) {
  1051. translate([radius - 2 * wall + gap, 0, 0]) {
  1052. // there is a little bit of play between the wd assembly and the top
  1053. ws_play = 0.4;
  1054. cylinder(r = stop_r, h = height - 10.0 - ws_play, $fn = facets);
  1055. }
  1056. }
  1057. // screws
  1058. screw_h = 1.3;
  1059. rotate([0, 0, r + 22.5]) {
  1060. translate([radius - 1.5 * wall + gap, -3.5/2, 0]) {
  1061. cube([screw_h + sgap, 3.5, height - 8]);
  1062. }
  1063. }
  1064. }
  1065. // slot for front mark
  1066. translate([radius - 2 * wall, 0, 0]) cylinder(r = 1.5, h = height, $fn = facets);
  1067. // shave channel for logo
  1068. translate([radius - 2 * wall, -10/2, 0]) cube([wall/3, 10, height]);
  1069. // upper elastic band hooks
  1070. for (r = [0, 90, 180, 270]) rotate([0, 0, r + 45]) {
  1071. translate([radius + stop_ro + gap - 2*wall, 0, height - 1.6]) {
  1072. elastic_band_hook();
  1073. }
  1074. }
  1075. // lower elastic band hooks
  1076. for (r = [0, 90, 180, 270]) rotate([0, 0, r + 45]) {
  1077. translate([radius + stop_ro + gap - 2*wall, 0, 1.6]) {
  1078. rotate([180, 0, 0]) elastic_band_hook();
  1079. }
  1080. }
  1081. }
  1082. }
  1083. // shock mount external ring
  1084. module octa_shock_mount_external_ring_old(height, radius, corner) {
  1085. // main ring
  1086. rotate([0, 0, 22.5]) rounded_octagon_wall(ring_ext_height, radius, ring_wall);
  1087. for (rot = [0, 90, 180, 270]) {
  1088. // anchors for rubber bands
  1089. rotate([0, 0, rot + 45]) {
  1090. translate([radius * cos(22.5) + ring_wall + 0.75, -6, 0]) {
  1091. minkowski() {
  1092. cube([4 - 2, 12, ring_ext_height]);
  1093. cylinder(r = 1.5, h = thin_mint, $fn = facets);
  1094. }
  1095. }
  1096. translate([radius * cos(22.5), -2, 0]) {
  1097. cube([7, 4, ring_ext_height]);
  1098. }
  1099. }
  1100. }
  1101. // connection to hub
  1102. translate([radius * cos(22.5), -2, 0]) {
  1103. cube([10, 4, ring_ext_height * 2]);
  1104. }
  1105. // reinforce connection to ring
  1106. intersection() {
  1107. translate([radius * cos(22.5), 0, 0]) {
  1108. difference() {
  1109. cylinder(r = 6, h = ring_ext_height * 2, $fn = 4);
  1110. translate([-10, -5, 0]) {
  1111. cube([10, 10, ring_ext_height * 2]);
  1112. }
  1113. }
  1114. }
  1115. translate([radius + ring_wall - 7, 0, 0]) {
  1116. rotate([0, 0, 45]) cylinder(r1 = radius * 1.5, r2 = ring_wall/2 + 1, h = ring_ext_height * 2, $fn = 4);
  1117. }
  1118. }
  1119. // reinforcement
  1120. intersection() {
  1121. rotate([0, 0, 22.5]) rounded_octagon_wall(ring_ext_height * 2, radius, ring_wall);
  1122. translate([radius - 6.5, 0, 0]) {
  1123. rotate([0, 0, 45]) cylinder(r1 = radius * 1.5, r2 = ring_wall/2 + 1, h = ring_ext_height * 2, $fn = 4);
  1124. }
  1125. }
  1126. // rotating mount
  1127. o_rad = 8;
  1128. i_rad = 3;
  1129. rotate([0, 90, -90]) {
  1130. translate([-o_rad, radius * cos(22.5) + o_rad + ring_wall * 2, -2]) {
  1131. shock_mount_ring(o_rad, i_rad, ring_wall);
  1132. }
  1133. }
  1134. }
  1135. module octa_shock_mount_external_ring(height, radius, corner) {
  1136. // main ring
  1137. rotate([0, 0, 22.5]) rounded_octagon_wall(ring_ext_height, radius, ring_wall);
  1138. for (m = [0, 1]) mirror([0, m, 0]) {
  1139. for (rot = [0, 90, 180, 270]) {
  1140. // anchors for rubber bands
  1141. rotate([0, 0, rot + 20]) {
  1142. translate([radius * cos(22.5) + ring_wall + 2.0, -5, 0]) {
  1143. minkowski() {
  1144. cube([4 - 3, 6, ring_ext_height]);
  1145. cylinder(r = 1.0, h = thin_mint, $fn = facets);
  1146. }
  1147. }
  1148. translate([radius * cos(22.5), -2, 0]) {
  1149. cube([7, 4, ring_ext_height]);
  1150. }
  1151. }
  1152. }
  1153. }
  1154. // connection to hub
  1155. translate([radius * cos(22.5), -2, 0]) {
  1156. cube([10, 4, ring_ext_height * 2]);
  1157. }
  1158. // reinforce connection to ring
  1159. intersection() {
  1160. translate([radius * cos(22.5), 0, 0]) {
  1161. difference() {
  1162. cylinder(r = 6, h = ring_ext_height * 2, $fn = 4);
  1163. translate([-10, -5, 0]) {
  1164. cube([10, 10, ring_ext_height * 2]);
  1165. }
  1166. }
  1167. }
  1168. translate([radius + ring_wall - 7, 0, 0]) {
  1169. rotate([0, 0, 45]) cylinder(r1 = radius * 1.5, r2 = ring_wall/2 + 1, h = ring_ext_height * 2, $fn = 4);
  1170. }
  1171. }
  1172. // reinforcement
  1173. intersection() {
  1174. rotate([0, 0, 22.5]) rounded_octagon_wall(ring_ext_height * 2, radius, ring_wall);
  1175. translate([radius - 6.5, 0, 0]) {
  1176. rotate([0, 0, 45]) cylinder(r1 = radius * 1.5, r2 = ring_wall/2 + 1, h = ring_ext_height * 2, $fn = 4);
  1177. }
  1178. }
  1179. // rotating mount
  1180. o_rad = 8;
  1181. i_rad = 3;
  1182. rotate([0, 90, -90]) {
  1183. translate([-o_rad, radius * cos(22.5) + o_rad + ring_wall * 2, -2]) {
  1184. shock_mount_ring(o_rad, i_rad, ring_wall);
  1185. }
  1186. }
  1187. }
  1188. // stand mount with quick clip connector
  1189. module octa_quik_release_stand_mount(band_height, radius) {
  1190. vertical_offset = 18;
  1191. mount_offset = 3.0;
  1192. // octagonal band
  1193. octa_shock_mount_band(band_height, radius, pcb_version == 2 ? 7.5 : 6);
  1194. difference() {
  1195. hull() {
  1196. // attachment "plate"
  1197. translate([radius, -10, 0]) {
  1198. cube([2, 20, band_height]);
  1199. }
  1200. // quik release adapter tube
  1201. translate([(radius + mic_mount_radius + mic_mount_wall + 6.0 + mount_offset) * cos(22.5), 0,
  1202. vertical_offset]) {
  1203. cylinder(r = mic_mount_radius + mic_mount_fit + mic_mount_wall, h = band_height - vertical_offset, $fn = facets);
  1204. }
  1205. }
  1206. // cutout for the center hole and side hole of the adapter
  1207. translate([(radius + mic_mount_radius + mic_mount_wall + 6.0 + mount_offset) * cos(22.5), 0,
  1208. vertical_offset + thin_mint]) {
  1209. cylinder(r = mic_mount_radius + mic_mount_fit, h = mic_mount_height, $fn = facets);
  1210. }
  1211. }
  1212. translate([(radius + mic_mount_radius + mic_mount_wall + 6.0 + mount_offset) * cos(22.5), 0,
  1213. mic_mount_height + vertical_offset + thin_mint]) {
  1214. rotate([0, 180, 180]) quik_release_stand_adapter(mic_mount_height, mount_wall, mic_mount_wall);
  1215. }
  1216. }
  1217. // octathingy arm mount for robotic arm
  1218. module octa_arm_mount(band_height, radius, height) {
  1219. vertical_offset = 18;
  1220. mount_offset = 3.0;
  1221. // octagonal band
  1222. octa_shock_mount_band(band_height, radius, pcb_version == 2 ? 7.5 : 6);
  1223. // pillars for arm grips
  1224. sphear_arm_mount_pillars(radius, height - 50.0, grip_sep, grip_width);
  1225. }
  1226. module octa_arm_mount_pillars(band_height, radius, height, grip_width, grip_depth) {
  1227. vertical_offset = 18;
  1228. mount_offset = 3.0;
  1229. // pillars for arm grips
  1230. sphear_arm_mount_pillars(radius, height - 60.0, grip_sep, grip_width, grip_depth);
  1231. }
  1232. ////
  1233. //// render all the different parts
  1234. ////
  1235. // microphone body: stalk from capsule flare to capsule array (for microphone version 1)
  1236. //
  1237. module render_octa_capsule_stalk(z_offset) {
  1238. translate([0, 0, z_offset]) {
  1239. octa_mount_stalk(pcb_hi_clear + pcb_hi_exp, mount_lip, flare_height, octa_pcb_radius, mount_radius + wall, stalk_height, 1);
  1240. translate([0, 0, pcb_hi_clear + pcb_hi_exp + flare_height + stalk_height]) {
  1241. octa_capsule_array_mount([45, 135, -45, -135]);
  1242. }
  1243. }
  1244. }
  1245. // microphone body: flare to capsule array (slips into PCB holder body)
  1246. //
  1247. module render_octa_capsule_flare(z_offset) {
  1248. translate([0, 0, z_offset]) {
  1249. octa_mount_flare(pcb_hi_clear + pcb_hi_exp, mount_lip, flare_height, octa_pcb_radius, mount_radius + wall, stalk_height, 1);
  1250. }
  1251. }
  1252. // microphone body: main body, holds printed circuit boards
  1253. //
  1254. module render_octa_pcb_mount(z_offset, showint) {
  1255. translate([0, 0, z_offset]) {
  1256. octa_mount_body(octa_pcb_mount_height, octa_pcb_radius, mount_lip, mount_lip, 0);
  1257. // add ccrma logo
  1258. rotate([0, 0, -90 + 22.5]) {
  1259. translate([0, -(octa_pcb_radius - (pcb_version == 2 ? 3.4 : 3.7)), octa_pcb_mount_height / 2]) {
  1260. rotate([90, 270, 0]) {
  1261. logo_scale = 1 / (pcb_version == 2 ? 3.0 : 2.4);
  1262. scale([logo_scale, logo_scale, 1.0]) {
  1263. ccrma_logo(1.65);
  1264. }
  1265. }
  1266. }
  1267. }
  1268. }
  1269. }
  1270. // microphone body: flare to microphone cable (slips into PCB holder body)
  1271. //
  1272. module render_octa_cable_flare(z_offset, flip) {
  1273. translate([0, 0, z_offset]) {
  1274. octa_mount_flare_dual(pcb_low_clear + pcb_low_exp, mount_lip, 20, box_radius + wall, box_radius * 2 - wall,
  1275. mount_corner, cable_diam / 2 + wall, 10, 0);
  1276. }
  1277. }
  1278. // microphone body: flare to dual cable connectors (slips into PCB holder body)
  1279. //
  1280. module render_octa_connector_flare(z_offset, flip) {
  1281. conn_offset = 2.0;
  1282. conn_wall = conn_core_o_diam / 2 - conn_core_diam / 2;
  1283. translate([0, 0, z_offset]) {
  1284. difference() {
  1285. union() {
  1286. octa_mount_flare_connector(pcb_low_clear + pcb_low_exp, mount_lip, 20,
  1287. octa_pcb_radius,
  1288. conn_core_o_diam / 2, conn_core_o_diam + conn_offset);
  1289. for (m = [0, 1]) mirror([0, m, 0]) translate([0, conn_core_o_diam / 2 + conn_offset, pcb_low_clear + pcb_low_exp + 20]) {
  1290. // add two connectors
  1291. rotate([0, 0, -90]) {
  1292. tetra_mount_connector_holder(conn_core_sleeve, conn_core_o_diam / 2, conn_core_diam / 2,
  1293. conn_core_overlap, conn_core_s_diam / 2);
  1294. }
  1295. // add wall in between the two connectors
  1296. translate([- 2 * wall, - (conn_core_o_diam / 2 + conn_offset), 0]) {
  1297. cube([4 * wall, conn_offset + wall, 10]);
  1298. }
  1299. }
  1300. }
  1301. // redo the hole in the connector holder so that it drills into the top of the flare
  1302. for (m = [0, 1]) mirror([0, m, 0]) translate([0, conn_core_o_diam / 2 + conn_offset, 0]) {
  1303. cylinder(r = conn_core_diam / 2, h = 100, $fn = facets);
  1304. }
  1305. }
  1306. }
  1307. }
  1308. // microphone body: flare to db25 connector (slips into PCB holder body)
  1309. //
  1310. module render_octa_mount_dsub_flare(z_offset, flip) {
  1311. updown = 0;
  1312. if (flip) {
  1313. updown = 180;
  1314. }
  1315. rotate([0, updown, 90]) {
  1316. conn_offset = 2.0;
  1317. translate([0, 0, z_offset - mount_lip]) {
  1318. octa_mount_flare_dsub(pcb_low_clear + pcb_low_exp - (pcb_version == 2 ? 13 : 0), mount_lip,
  1319. pcb_version == 2 ? 33 : 20, octa_pcb_radius,
  1320. conn_core_o_diam / 2, conn_core_o_diam + conn_offset);
  1321. }
  1322. }
  1323. }
  1324. // microphone body: render all parts with a vertical separation
  1325. //
  1326. module render_octa_body(z_offset, spread, showint) {
  1327. rotate([0, 180, 0]) {
  1328. render_octa_mount_dsub_flare(pcb_version == 2 ? 10 : 0, 0);
  1329. }
  1330. lippy = spread - mount_lip;
  1331. render_octa_pcb_mount(lippy, showint);
  1332. render_octa_capsule_flare(octa_pcb_mount_height + 2 * lippy);
  1333. }
  1334. // microphone: render the full assembly with vertical separation between components
  1335. //
  1336. module render_octa_microphone(z_offset, spread) {
  1337. render_octa_body(z_offset, spread);
  1338. lippy = spread - mount_lip;
  1339. render_octa_capsule_array(z_offset + octa_pcb_mount_height + mount_top_height +
  1340. flare_height + stalk_height + pcb_hi_clear + pcb_hi_exp + 2 * lippy + spread + mic_radius);
  1341. render_octa_capsule_stalk(z_offset + (pcb_version == 2 ? 43.2 : 49.2) - 10.0);
  1342. }
  1343. // microphone: render the full assembly with vertical separation between components
  1344. // cut out half of the assembly so that we can see the inside
  1345. //
  1346. module render_octa_microphone_cutout(z_offset, spread) {
  1347. difference() {
  1348. render_octa_microphone(z_offset, spread);
  1349. // a cube that blots out 1/4 of the microphone
  1350. rotate([0, 0, 90]) {
  1351. translate([0, 0, -50]) {
  1352. cube([50, 100, 650]);
  1353. }
  1354. }
  1355. }
  1356. }
  1357. // shock mount: microphone clip on stand mount
  1358. //
  1359. module render_octa_shock_mount_stand(z_offset) {
  1360. translate([z_offset]) {
  1361. shock_mount_stand(mic_mount_height, mount_wall, mic_mount_wall);
  1362. }
  1363. }
  1364. // shock mount: external ring
  1365. //
  1366. module render_octa_shock_mount_external_ring_old(z_offset) {
  1367. translate([0, 0, z_offset]) {
  1368. shock_mount_external_ring(external_ring_height, box_radius + wall, box_radius * 2 - wall, mount_corner, main_radius_inc, 0);
  1369. }
  1370. }
  1371. module render_octa_shock_mount_external_ring(z_offset) {
  1372. translate([0, 0, z_offset]) {
  1373. octa_shock_mount_external_ring(external_ring_height, octa_pcb_radius + internal_ring_gap + main_radius_inc + 5.25, 20);
  1374. }
  1375. }
  1376. // shock mount: bottom internal ring
  1377. //
  1378. module render_octa_shock_mount_internal_ring_bot(z_offset) {
  1379. translate([0, 0, z_offset]) {
  1380. shock_mount_internal_ring(external_ring_height, box_radius + wall, box_radius * 2 - wall, mount_corner, internal_ring_gap, 1);
  1381. }
  1382. }
  1383. module render_octa_shock_mount_internal_ring_bot(z_offset) {
  1384. translate([0, 0, z_offset]) {
  1385. shock_mount_internal_ring(external_ring_height, A/2 + wall, A/2 + 3, octa_pcb_radius * 2/3, internal_ring_gap, 1);
  1386. }
  1387. }
  1388. // shock mount: top internal ring
  1389. //
  1390. module render_octa_shock_mount_internal_ring_top_old(z_offset) {
  1391. translate([0, 0, z_offset]) {
  1392. shock_mount_internal_ring(external_ring_height, box_radius + wall, box_radius * 2 - wall, mount_corner, internal_ring_gap, 0);
  1393. }
  1394. }
  1395. module render_octa_shock_mount_internal_ring_top(z_offset) {
  1396. translate([0, 0, z_offset]) {
  1397. shock_mount_internal_ring(external_ring_height, A/2 + wall, A/2 + 3, octa_pcb_radius * 2/3, internal_ring_gap, 0);
  1398. }
  1399. }
  1400. // shock mount: all four internal ring connectors
  1401. //
  1402. module render_octa_shock_mount_ring_connectors(offset) {
  1403. for (o = [0, 1, 2, 3]) {
  1404. translate([-18, (10 + offset) * o, 0]) {
  1405. shock_mount_connector(internal_ring_height, 4, connector_w, connector_d, 0.1);
  1406. }
  1407. }
  1408. }
  1409. // shock mount: render all parts
  1410. //
  1411. module render_octa_shock_mount(z_offset) {
  1412. // internal rings
  1413. translate([0, 0, z_offset + internal_ring_height / 2]) {
  1414. render_octa_shock_mount_internal_ring_top(0);
  1415. rotate([0, 180, 0]) {
  1416. render_octa_shock_mount_internal_ring_bot(internal_ring_height + 2);
  1417. }
  1418. // insert the connecting rods
  1419. for (r = [0, 90, 180, 270]) {
  1420. rotate([0, 0, r]) {
  1421. translate([((r % 180) ? box_radius * 2 : box_radius) + 3 * wall + internal_ring_gap, 0, -1]) {
  1422. rotate([0, 90, 0]) {
  1423. translate([-4, -5, 1]) {
  1424. shock_mount_connector(internal_ring_height, 4, connector_w, connector_d, 0.1);
  1425. }
  1426. }
  1427. }
  1428. }
  1429. }
  1430. }
  1431. // external ring
  1432. translate([0, 0, z_offset - external_ring_height / 4]) {
  1433. render_octa_shock_mount_external_ring(0);
  1434. }
  1435. // mount to stand
  1436. translate([box_radius + mount_corner + ring_wall + ring_arm_gap + 8 + ring_wall / 2 + 4, 0, -(mic_mount_height + mic_mount_radius + external_ring_height / 4)]) {
  1437. render_octa_shock_mount_stand(0);
  1438. }
  1439. }