Octathingy_mount_pcb.scad 58 KB

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