1
0

Octathingy_mount_pcb.scad 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420
  1. //
  2. // Spherical Harmonics Ear Project (*SpHEAR)
  3. //
  4. // 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-2018, 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. include <Octathingy_common.scad>;
  31. include <CCRMA_logo.scad>;
  32. // d-sub connector
  33. include <db25.scad>;
  34. ////
  35. //// overrides
  36. // inner radius of mount stalk
  37. mount_radius = 4.0;
  38. ////
  39. //// default model parameters
  40. ////
  41. // size of Zapnspark printed circuit board
  42. // kicad length = 79.375
  43. // measured length = 79.20 (2016.08.25)
  44. pcb_length = pcb_version == 2 ? 72.39 : 79.20;
  45. // kicad width = 19.050
  46. // measured width = 18.82 (2016.08.25)
  47. pcb_width = pcb_version == 2 ? 15.34 : 18.85;
  48. // ultimaker spec thickness = 1.61
  49. // measured thickness = 1.56 (w/ copper)
  50. pcb_thickness = pcb_version == 2 ? 1.68 + 0.02 : 1.58;
  51. // tolerance to add to length and width of pcb
  52. //
  53. // measured 3d print width = 18.70 (with pcb_fit = 0.3)
  54. // actual printed = 18.70 - 0.3 = 16.97
  55. // total correction = 18.85 - 16.97 = 1.88
  56. //
  57. pcb_fit = 0.4;
  58. // tolerance add to thickness of pcb
  59. //
  60. // printed with pcb_tfit = 0.15 -> 1.58 + 0.15 = 1.73 (ideal printed)
  61. // measured print channel = 1.63 : 0.1 thinner (ultimaker 2 plus, 2016.08.24)
  62. // measured pcb thickness = 1.58 (othermill)
  63. //
  64. pcb_tfit = 0.15;
  65. // we leave part of the pcb exposed on the bottom of the body so that we
  66. // can solder the wires that connect the microphone with the
  67. // preamplifier, same at the top of the pcb to solder the wires
  68. // to the capsules
  69. pcb_low_exp = 12.0;
  70. pcb_hi_exp = 8.0;
  71. // lip fit for flares
  72. lip_fit = 0.15;
  73. // clearance from the bottom and top of pcb's to the start of the flare,
  74. // this adds space for the protuding molex pins on which we solder
  75. pcb_low_clear = 15.0;
  76. pcb_hi_clear = 15.0;
  77. // depth of slot into which the printed circuit board fits
  78. pcb_slot_depth = 1.0;
  79. // diameter of four conductor cable
  80. cable_diam = 9.5;
  81. // lip that mounts flares into main body box
  82. mount_lip = 10.0;
  83. // capsule array mount, height of flare and stalk
  84. flare_height = 50;
  85. stalk_height = 60;
  86. // wall thickness
  87. wall = 1.0;
  88. // back and front clearance of pcb (components and leads)
  89. pcb_front = pcb_version == 2 ? 2.50 : 3.00;
  90. pcb_back = pcb_version == 2 ? 1.70 : 1.80;
  91. // calculated minimum "radius" of microphone box
  92. box_radius = pcb_front + (pcb_thickness + pcb_tfit) + pcb_back + 2 * wall;
  93. // calculated main body corner radius
  94. mount_corner = box_radius - pcb_width / 2 + pcb_slot_depth + 4.0;
  95. // body parameters
  96. render_screw_holes = true;
  97. radial_pcb_offset = pcb_version == 2 ? 15.0 : 17.0;
  98. octa_pcb_mount_height = pcb_length - pcb_low_exp - pcb_hi_exp;
  99. octa_pcb_radius = radial_pcb_offset + pcb_width/2 + (pcb_version == 2 ? 4.75 : 5) * wall;
  100. // body to flares snap joint arm slot width
  101. snap_joint_slot_w = 0.75;
  102. // width and radius of snap joint hook that locks upper and lower flanges to body
  103. snap_joint_hook_w = 5.0;
  104. snap_joint_hook_r = 1.4;
  105. // dimensions of 12 pin male bottom connector
  106. //
  107. // Amphenol T 3635 002
  108. // 12 pin DIN male to cable, gold plated contacts
  109. //
  110. // inner diameter of connector core
  111. conn_core_diam = 13.00 + 0.2;
  112. // outer diameter of connector core sleeve
  113. conn_core_o_diam = 17.00;
  114. // inner diameter of connector core sleeve
  115. conn_core_s_diam = 15.00;
  116. // from top of connector to sleeve
  117. conn_core_sleeve = 13.00;
  118. // from top of connector to holes
  119. conn_core_holes_h = 6.00;
  120. // between holes
  121. conn_core_holes_w = 9.20;
  122. // hole diameter
  123. conn_core_holes_d = 1.95 + 0.2;
  124. // screw head diameter
  125. conn_core_screw_d = 2.75 + 0.5;
  126. // sleeve overlap
  127. conn_core_overlap = 3.00;
  128. // shock mount parameters
  129. //
  130. internal_ring_height = 55.0;
  131. external_ring_height = 10.0;
  132. rubber_band_angle = 45;
  133. main_radius_inc = (internal_ring_height / 2) / tan(rubber_band_angle);
  134. // gap between internal ring and microphone body
  135. internal_ring_gap = 1.0;
  136. // connector that joins the two internal rings
  137. connector_w = 10.0;
  138. connector_d = 2.0;
  139. // wall thickness and height of shock mount rings
  140. ring_wall = 4 * wall;
  141. ring_ext_height = 6;
  142. // gap between external ring and support arm
  143. ring_arm_gap = 16;
  144. // the main body that holds the phantom power interfaces
  145. module one_pcb_slot (pcb_w, pcb_l, pcb_t, slot_d, front, back, test = false) {
  146. d = pcb_t + front + back;
  147. render() translate([-(pcb_w/2 + wall/2), -back, 0]) {
  148. // make cage with slots for pcb
  149. difference() {
  150. translate([-2 * wall, 0, 0]) {
  151. cube([pcb_w + 4 * wall, d, pcb_l]);
  152. }
  153. translate([slot_d, 0, 0]) {
  154. cube([pcb_w - 2 * slot_d, pcb_t + front + back, pcb_l]);
  155. }
  156. translate([0, back, 0]) {
  157. cube([pcb_w, pcb_t, pcb_l]);
  158. }
  159. // make top and bottom entry channels
  160. translate([slot_d, back + pcb_t/2, 0]) {
  161. rotate([0, 0, 45]) cylinder(r1 = pcb_t * 1.1, r2 = 0, h = 8.0, $fn = 4);
  162. }
  163. translate([pcb_w - slot_d, back + pcb_t/2, 0]) {
  164. rotate([0, 0, 45]) cylinder(r1 = pcb_t * 1.1, r2 = 0, h = 8.0, $fn = 4);
  165. }
  166. translate([slot_d, back + pcb_t/2, pcb_l - 8.0]) {
  167. rotate([0, 0, 45]) cylinder(r2 = pcb_t * 1.1, r1 = 0, h = 8.0, $fn = 4);
  168. }
  169. translate([pcb_w - slot_d, back + pcb_t/2, pcb_l - 8.0]) {
  170. rotate([0, 0, 45]) cylinder(r2 = pcb_t * 1.1, r1 = 0, h = 8.0, $fn = 4);
  171. }
  172. }
  173. // add spar in the back
  174. translate([-2 * wall, -back + wall, 0]) {
  175. cube([pcb_w + 4 * wall, wall, pcb_l]);
  176. }
  177. // pcb for testing fit
  178. if (test) {
  179. translate([0, back, 0]) {
  180. cube([pcb_w, pcb_t, pcb_l]);
  181. }
  182. // small electrolytic capacitors (pcb_version == 2)
  183. // https://www.mouser.com/datasheet/2/293/e-umw-1219455.pdf
  184. cap_diam = 8.0;
  185. // should be 5, but transistors are a bit taller;
  186. cap_len = 6.0;
  187. translate([pcb_w/2, pcb_t + cap_diam + 0.15, 6]) {
  188. rotate([90, 0, 0]) cylinder(r = (cap_diam/2), h = cap_len, $fn = facets);
  189. }
  190. // film capacitors
  191. cap_h = 12;
  192. cap_w = 9;
  193. cap_t = 5.5;
  194. translate([pcb_w/2 - cap_w/2, pcb_t + 0.15, 10]) {
  195. cube([cap_w, cap_t, cap_h]);
  196. }
  197. }
  198. }
  199. // add capacitor if in test mode
  200. *if (test) {
  201. cap_diam = 10.2;
  202. translate([0, cap_diam/2 + pcb_t, 0]) {
  203. cylinder(r = cap_diam/2, h = 20, $fn = facets);
  204. }
  205. }
  206. }
  207. module rounded_octagon(height, radius) {
  208. intersection() {
  209. cylinder(r = radius, h = height, $fn = 8);
  210. cylinder(r = radius - wall, h = height + thin_mint, $fn = facets);
  211. }
  212. }
  213. module rounded_octagon_wall(height, radius, wall) {
  214. difference() {
  215. rounded_octagon(height, radius);
  216. rounded_octagon(height + thin_mint, radius - wall);
  217. }
  218. }
  219. octa_pcb_twist = pcb_version == 2 ? 12 : 16;
  220. module octa_mount_body(height, radius, lower_lip, upper_lip, clear) {
  221. // rotate pcb assembly so it does not interfere with the screws
  222. offset_angle = -octa_pcb_twist;
  223. // rotate individual pcb's to better use the internal space of the body
  224. twist_angle = octa_pcb_twist;
  225. difference() {
  226. union() {
  227. difference() {
  228. union() {
  229. // main body
  230. rounded_octagon_wall(height, radius, 2 * wall);
  231. // slots for printed circuit boards
  232. intersection() {
  233. for (r = [0:360/8:360]) rotate([0, 0, r + offset_angle]) {
  234. translate([radial_pcb_offset, 0, 0]) {
  235. rotate([0, 0, 180 + twist_angle]) {
  236. one_pcb_slot(pcb_width + pcb_fit, height * 2/3, pcb_thickness + pcb_tfit,
  237. pcb_slot_depth, pcb_front, pcb_back, false);
  238. }
  239. }
  240. }
  241. // clip outside
  242. rounded_octagon(height, radius);
  243. }
  244. }
  245. // upper lip for flare to microphone
  246. translate([0, 0, height - upper_lip]) {
  247. rounded_octagon_wall(upper_lip, radius, wall + lip_fit);
  248. }
  249. // lower lip for flare to cable or connector
  250. translate([0, 0, 0]) {
  251. rounded_octagon_wall(upper_lip, radius, wall + lip_fit);
  252. }
  253. }
  254. if (render_screw_holes) {
  255. // add backplates for upper lip screws
  256. for (r = [45, 135, 225, 315]) {
  257. rotate([0, 0, r]) translate([-(radius - 3 * wall), -2.5, 0]) {
  258. cube([2, 5, height]);
  259. }
  260. }
  261. }
  262. }
  263. if (render_screw_holes) {
  264. // make eight holes in the the body for screws that hold both flares
  265. // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
  266. difference() {
  267. for (z = [lower_lip/2, height - upper_lip/2]) {
  268. for (r = [45, 135, 225, 315]) {
  269. rotate([0, 0, r]) translate([-(radius + 2 * wall), 0, z]) {
  270. rotate([0, 90, 0]) {
  271. cylinder(r = 0.7, h = radius + wall, $fn = facets);
  272. }
  273. }
  274. }
  275. }
  276. cylinder(r = radius/2, h = height);
  277. }
  278. }
  279. }
  280. }
  281. // flare from the body to the microphone stalk
  282. module octa_mount_flare_no_ws(height, lip, transition, radius, top_radius, stalk_height, dot) {
  283. // bottom box
  284. difference() {
  285. union() {
  286. rounded_octagon_wall(height, radius, 2 * wall);
  287. if (render_screw_holes) {
  288. // small pedestals for the screws that attach the flare to the body
  289. // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
  290. for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
  291. translate([radius - wall - 1.75, 0, lip/2]) {
  292. rotate([0, 90, 0]) {
  293. cylinder(r = 1.5, h = 2 * wall, $fn = facets);
  294. }
  295. }
  296. }
  297. }
  298. }
  299. // flange to mount on body
  300. rounded_octagon_wall(lip + 1.00, radius - wall, wall);
  301. // and make a smooth transition to avoid overhangs
  302. translate([0, 0, lip + 1.00]) {
  303. hull() {
  304. rounded_octagon_wall(thin_mint, radius - wall, wall);
  305. translate([0, 0, 1.0]) {
  306. rounded_octagon_wall(thin_mint, radius - 2 * wall, wall);
  307. }
  308. }
  309. }
  310. if (render_screw_holes) {
  311. // holes for screws that attach the flare to the body
  312. // Number 0 Size, 1/4" Long = thread diameter: 1.6mm, head diameter: 2.75
  313. for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
  314. translate([radius/2, 0, lip/2]) {
  315. rotate([0, 90, 0]) {
  316. cylinder(r = (1.6 + 0.1)/2, h = radius, $fn = facets);
  317. }
  318. }
  319. }
  320. }
  321. }
  322. // flare to round section
  323. translate([0, 0, height]) {
  324. difference() {
  325. hull() {
  326. rounded_octagon(thin_mint, radius);
  327. translate([0, 0, transition]) {
  328. cylinder(r = top_radius, h = thin_mint, $fn = facets);
  329. }
  330. }
  331. hull() {
  332. rounded_octagon(thin_mint, radius - wall);
  333. translate([0, 0, transition]) {
  334. cylinder(r = top_radius - wall, h = thin_mint, $fn = facets);
  335. }
  336. }
  337. }
  338. }
  339. // cylindrical stalk
  340. translate([0, 0, height + transition]) {
  341. difference() {
  342. cylinder(r = top_radius, h = stalk_height, $fn = facets);
  343. cylinder(r = top_radius - wall, h = stalk_height, $fn = facets);
  344. }
  345. // add marker for "back of microphone" orientation
  346. if (dot == 1) {
  347. rotate([0, 0, 90]) {
  348. translate([0, top_radius - wall * 2 / 3, stalk_height - top_radius]) {
  349. difference() {
  350. sphere(r = top_radius / 3, $fn = 32);
  351. translate([0, -top_radius + top_radius / 2, 0]) {
  352. cube([top_radius, top_radius, top_radius], center = true);
  353. }
  354. }
  355. }
  356. }
  357. }
  358. // close stalk and add holes for cables
  359. translate([0, 0, stalk_height - top_radius - wall]) {
  360. difference() {
  361. cylinder(r = top_radius - wall, h = top_radius + wall, $fn = facets);
  362. translate([0, 0, 0]) {
  363. sphere(r = top_radius - wall, $fn = facets);
  364. }
  365. wire_diam = mic_wire_diam + mic_wire_fit;
  366. for (r = [0, 90, 180, 270]) rotate([0, 0, r]) {
  367. for (t = [0, 1]) {
  368. rotate([0, 0, 45 * t]) translate([top_radius - wire_diam - t * wire_diam * 2/3, 0, wall]) {
  369. cylinder(r = wire_diam / 2, h = top_radius * 2, $fn = facets);
  370. }
  371. }
  372. }
  373. translate([0, 0, wall]) cylinder(r = wire_diam, h = top_radius * 2, $fn = facets);
  374. }
  375. }
  376. }
  377. }
  378. module octa_mount_flare_old(height, lip, transition, radius, top_radius, stalk_height, dot) {
  379. // transition from bottom box to windscreen mounting thread
  380. transition_to_threads = 5;
  381. // bottom box
  382. difference() {
  383. union() {
  384. rounded_octagon_wall(height, radius, 2 * wall);
  385. if (render_screw_holes) {
  386. // small pedestals for the screws that attach the flare to the body
  387. // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
  388. for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
  389. translate([radius - wall - 1.75, 0, lip/2]) {
  390. rotate([0, 90, 0]) {
  391. cylinder(r = 1.5, h = 2 * wall, $fn = facets);
  392. }
  393. }
  394. }
  395. }
  396. // indicator of "front" of microphone
  397. rotate([0, 0, 180 + 22.5]) translate([radius - 2, 0, 0]) {
  398. cylinder(r = 1.0, h = lip/2, $fn = facets);
  399. }
  400. // stops for shock mount
  401. for (r = [0, 90, 180, 270]) rotate([0, 0, r - 22.5]) {
  402. translate([radius - 3.4, 0, 0]) scale([2.0, 1.0, 1.0]) {
  403. difference() {
  404. cylinder(r = 2.0, h = lip + transition_to_threads, $fn = facets);
  405. translate([-2, -2.0, 0]) cube([2.0, 4.0, lip + transition_to_threads]);
  406. }
  407. }
  408. }
  409. }
  410. // flange to mount on body
  411. rounded_octagon_wall(lip + 1.00, radius - wall, wall);
  412. // and make a smooth transition to avoid overhangs
  413. translate([0, 0, lip + 1.00]) {
  414. hull() {
  415. rounded_octagon_wall(thin_mint, radius - wall, wall);
  416. translate([0, 0, 1.0]) {
  417. rounded_octagon_wall(thin_mint, radius - 2 * wall, wall);
  418. }
  419. }
  420. }
  421. if (render_screw_holes) {
  422. // holes for screws that attach the flare to the body
  423. // Number 0 Size, 1/4" Long = thread diameter: 1.6mm, head diameter: 2.75
  424. for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
  425. translate([radius/2, 0, lip/2]) {
  426. rotate([0, 90, 0]) {
  427. cylinder(r = (1.6 + 0.1)/2, h = radius, $fn = facets);
  428. }
  429. }
  430. }
  431. }
  432. }
  433. // flare to windscreen threads
  434. translate([0, 0, height - windscreen_thread_height - transition_to_threads]) {
  435. difference() {
  436. hull() {
  437. rounded_octagon(thin_mint, radius);
  438. translate([0, 0, transition_to_threads]) {
  439. cylinder(r = windscreen_thread_radius + 0.5, h = thin_mint, $fn = facets);
  440. }
  441. }
  442. hull() {
  443. rounded_octagon(thin_mint, radius - wall);
  444. translate([0, 0, transition_to_threads]) {
  445. cylinder(r = windscreen_thread_radius - windscreen_thread_depth - wall, h = thin_mint, $fn = facets);
  446. }
  447. }
  448. }
  449. }
  450. // windscreen mounting threads
  451. translate([0, 0, height - windscreen_thread_height]) difference() {
  452. metric_thread(diameter = windscreen_thread_radius * 2, pitch = windscreen_thread_pitch,
  453. length = windscreen_thread_height, angle = windscreen_thread_angle, internal = false);
  454. cylinder(r = windscreen_thread_radius - wall - windscreen_thread_depth, h = windscreen_thread_height + thin_mint, $fn = facets);
  455. }
  456. // flare to stalk
  457. translate([0, 0, height - 1.5]) {
  458. difference() {
  459. hull() {
  460. cylinder(r = windscreen_thread_radius - windscreen_thread_depth, h = thin_mint, $fn = facets);
  461. translate([0, 0, transition + 1.5]) {
  462. cylinder(r = top_radius, h = thin_mint, $fn = facets);
  463. }
  464. }
  465. hull() {
  466. cylinder(r = windscreen_thread_radius - windscreen_thread_depth - wall, h = thin_mint, $fn = facets);
  467. translate([0, 0, transition + 1.5]) {
  468. cylinder(r = top_radius - wall, h = thin_mint, $fn = facets);
  469. }
  470. }
  471. }
  472. }
  473. // cylindrical stalk
  474. translate([0, 0, height + transition]) {
  475. difference() {
  476. cylinder(r = top_radius, h = stalk_height, $fn = facets);
  477. cylinder(r = top_radius - wall, h = stalk_height, $fn = facets);
  478. }
  479. // close stalk and add holes for cables
  480. translate([0, 0, stalk_height - top_radius - wall]) {
  481. difference() {
  482. cylinder(r = top_radius - wall, h = top_radius + wall, $fn = facets);
  483. translate([0, 0, 0]) {
  484. sphere(r = top_radius - wall, $fn = facets);
  485. }
  486. wire_diam = mic_wire_diam + mic_wire_fit;
  487. for (r = [0, 90, 180, 270]) rotate([0, 0, r]) {
  488. for (t = [0, 1]) {
  489. rotate([0, 0, 45 * t]) translate([top_radius - wire_diam - t * wire_diam * 2/3, 0, wall]) {
  490. cylinder(r = wire_diam / 2, h = top_radius * 2, $fn = facets);
  491. }
  492. }
  493. }
  494. translate([0, 0, wall]) cylinder(r = wire_diam, h = top_radius * 2, $fn = facets);
  495. }
  496. }
  497. }
  498. }
  499. module octa_mount_flare(height, lip, transition, radius, top_radius, stalk_height, dot) {
  500. // transition from bottom box to windscreen mounting thread
  501. transition_to_threads = 5;
  502. // bottom box
  503. difference() {
  504. union() {
  505. rounded_octagon_wall(height, radius, 2 * wall);
  506. if (render_screw_holes) {
  507. // small pedestals for the screws that attach the flare to the body
  508. // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
  509. for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
  510. translate([radius - wall - 1.75, 0, lip/2]) {
  511. rotate([0, 90, 0]) {
  512. cylinder(r = 1.5, h = 2 * wall, $fn = facets);
  513. }
  514. }
  515. }
  516. }
  517. // indicator of "front" of microphone
  518. rotate([0, 0, 180 + 22.5]) translate([radius - 2, 0, 0]) {
  519. cylinder(r = 1.0, h = lip/2, $fn = facets);
  520. }
  521. // stops for shock mount
  522. for (r = [0, 90, 180, 270]) rotate([0, 0, r - 22.5]) {
  523. translate([radius - 3.4, 0, 0]) scale([2.0, 1.0, 1.0]) {
  524. difference() {
  525. cylinder(r = 2.0, h = lip + transition_to_threads, $fn = facets);
  526. translate([-2, -2.0, 0]) cube([2.0, 4.0, lip + transition_to_threads]);
  527. }
  528. }
  529. }
  530. }
  531. // flange to mount on body
  532. rounded_octagon_wall(lip + 1.00, radius - wall, wall);
  533. // and make a smooth transition to avoid overhangs
  534. translate([0, 0, lip + 1.00]) {
  535. hull() {
  536. rounded_octagon_wall(thin_mint, radius - wall, wall);
  537. translate([0, 0, 1.0]) {
  538. rounded_octagon_wall(thin_mint, radius - 2 * wall, wall);
  539. }
  540. }
  541. }
  542. if (render_screw_holes) {
  543. // holes for screws that attach the flare to the body
  544. // Number 0 Size, 1/4" Long = thread diameter: 1.6mm, head diameter: 2.75
  545. for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
  546. translate([radius/2, 0, lip/2]) {
  547. rotate([0, 90, 0]) {
  548. cylinder(r = (1.6 + 0.1)/2, h = radius, $fn = facets);
  549. }
  550. }
  551. }
  552. }
  553. }
  554. // flare to windscreen threads
  555. translate([0, 0, height - windscreen_thread_height - transition_to_threads]) {
  556. difference() {
  557. hull() {
  558. rounded_octagon(thin_mint, radius);
  559. translate([0, 0, transition_to_threads]) {
  560. cylinder(r = windscreen_thread_radius + 0.5, h = thin_mint, $fn = facets);
  561. }
  562. }
  563. hull() {
  564. rounded_octagon(thin_mint, radius - wall);
  565. translate([0, 0, transition_to_threads]) {
  566. cylinder(r = windscreen_thread_radius - windscreen_thread_depth - wall, h = thin_mint, $fn = facets);
  567. }
  568. }
  569. }
  570. }
  571. // windscreen mounting threads
  572. translate([0, 0, height - windscreen_thread_height]) difference() {
  573. metric_thread(diameter = windscreen_thread_radius * 2, pitch = windscreen_thread_pitch,
  574. length = windscreen_thread_height, angle = windscreen_thread_angle, internal = false);
  575. cylinder(r = windscreen_thread_radius - wall - windscreen_thread_depth, h = windscreen_thread_height + thin_mint, $fn = facets);
  576. }
  577. // flare to stalk
  578. translate([0, 0, height - 1.5]) {
  579. difference() {
  580. cylinder(r1 = windscreen_thread_radius - windscreen_thread_depth,
  581. r2 = top_radius + wall + fit, h = transition + 1.5, $fn = facets);
  582. cylinder(r1 = windscreen_thread_radius - windscreen_thread_depth - wall,
  583. r2 = top_radius + fit, h = transition + 1.5, $fn = facets);
  584. }
  585. }
  586. // socket for stalk
  587. s_length = 10.0;
  588. translate([0, 0, height + transition - s_length]) {
  589. difference() {
  590. cylinder(r = top_radius + wall + fit, h = s_length, $fn = facets);
  591. cylinder(r = top_radius + fit, h = s_length, $fn = facets);
  592. // add key slot for orientation
  593. translate([top_radius, 0, -1]) {
  594. cylinder(r = 0.4, h = s_length + 2, $fn = facets);
  595. }
  596. }
  597. }
  598. // internal flare for stalk
  599. translate([0, 0, height - 1.5]) {
  600. difference() {
  601. cylinder(r1 = windscreen_thread_radius - windscreen_thread_depth,
  602. r2 = top_radius + wall + fit, h = transition + 1.5 - s_length, $fn = facets);
  603. cylinder(r1 = windscreen_thread_radius - windscreen_thread_depth - wall,
  604. r2 = top_radius + fit, h = transition + 1.5 - s_length, $fn = facets);
  605. }
  606. }
  607. }
  608. // flares from the body to a dual cable housing
  609. module octa_mount_flare_dual(height, lip, transition, xradius, yradius, corner, top_radius, stalk_height) {
  610. // hack to get it to render, fix problem in rounded_block when radius is equal to corner...
  611. delta = 0.001;
  612. difference() {
  613. union() {
  614. // bottom rounded box
  615. difference() {
  616. rounded_block(height, xradius, yradius, corner);
  617. rounded_block_relative(height, xradius, yradius, corner, -(2 * wall));
  618. // flange to mount on body
  619. rounded_block_relative(lip + 1.00, xradius, yradius, corner, - (wall));
  620. // and make a smooth transition to avoid overhangs
  621. translate([0, 0, lip + 1.00]) {
  622. hull() {
  623. rounded_block_relative(thin_mint, xradius, yradius, corner, - wall);
  624. translate([0, 0, 1.0]) {
  625. rounded_block_relative(thin_mint, xradius, yradius, corner, - 2 * wall);
  626. }
  627. }
  628. }
  629. }
  630. // flare to rounded section
  631. translate([0, 0, height]) {
  632. difference() {
  633. hull() {
  634. rounded_block(thin_mint, xradius, yradius, corner);
  635. translate([0, 0, transition]) {
  636. rounded_block(thin_mint, top_radius + wall / 2, top_radius * 2 + wall / 2, top_radius - delta);
  637. }
  638. }
  639. hull() {
  640. rounded_block_relative(thin_mint, xradius, yradius, corner, - 2 * wall);
  641. translate([0, -top_radius, transition]) {
  642. cube([thin_mint, (top_radius) * 2, thin_mint]);
  643. }
  644. }
  645. }
  646. }
  647. // corner box cable stalk
  648. translate([0, 0, height + transition]) {
  649. rounded_block(stalk_height, top_radius + wall / 2, top_radius * 2 + wall / 2, top_radius - delta);
  650. }
  651. }
  652. // holes for the cables
  653. for (offset = [top_radius - wall/2, -(top_radius - wall/2)]) {
  654. translate([0, offset, 0]){
  655. cylinder(r = top_radius - wall, h = height + transition + stalk_height, $fn = facets);
  656. }
  657. }
  658. }
  659. }
  660. // flare from the body to a dual conector housing
  661. // bottom connector holder
  662. module tetra_mount_connector_holder(height, radius, inside_radius, sleeve_height, sleeve_radius) {
  663. difference() {
  664. union() {
  665. cylinder(r = radius, h = height, $fn = facets);
  666. // add seats for screw heads
  667. for (m = [-1, 1]) translate([m * conn_core_holes_w / 2, radius / 2, conn_core_holes_h]) {
  668. rotate([90, 0, 0]) {
  669. scale([1, 1, 1]) cylinder(r = conn_core_screw_d / 2, h = radius * 1.43, $fn = facets);
  670. }
  671. }
  672. }
  673. cylinder(r = inside_radius, h = height, $fn = facets);
  674. // transition from thin wall to thick wall at the bottom of connector
  675. *cylinder(r1 = radius - wall, r2 = inside_radius, h = 2.0, $fn = facets);
  676. // holes for connector core screws
  677. for (m = [-1, 1]) translate([m * conn_core_holes_w / 2, - radius / 3, conn_core_holes_h]) {
  678. rotate([90, 0, 0]) {
  679. cylinder(r = conn_core_holes_d / 2, h = radius, $fn = facets);
  680. }
  681. }
  682. // substract cutout for screw heads
  683. for (m = [-1, 1]) translate([m * conn_core_holes_w / 2, - radius + 1.5, conn_core_holes_h]) {
  684. rotate([90, 0, 0]) {
  685. cylinder(r = conn_core_screw_d / 2, h = 2.0, $fn = facets);
  686. }
  687. }
  688. }
  689. // thinner cylinder sits inside connector sleeve
  690. translate([0, 0, height]) {
  691. difference() {
  692. cylinder(r = sleeve_radius, h = sleeve_height, $fn = facets);
  693. cylinder(r = inside_radius, h = sleeve_height, $fn = facets);
  694. }
  695. }
  696. }
  697. // flare to dual cable connectors
  698. module octa_mount_flare_connector(height, lip, transition, radius, top_xradius, top_yradius) {
  699. // hack to get it to render, fix problem in rounded_block when radius is equal to corner...
  700. delta = 0.001;
  701. // bottom rounded box
  702. difference() {
  703. union() {
  704. rounded_octagon_wall(height, radius, 2 * wall);
  705. if (render_screw_holes) {
  706. // small pedestals for the screws that attach the flare to the body
  707. // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
  708. for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
  709. translate([radius - wall - 1.75, 0, lip/2]) {
  710. rotate([0, 90, 0]) {
  711. cylinder(r = 1.5, h = 2 * wall, $fn = facets);
  712. }
  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. if (render_screw_holes) {
  729. // holes for screws that attach the flare to the body
  730. // Number 0 Size, 1/4" Long = thread diameter: 1.6mm, head diameter: 2.75
  731. for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
  732. translate([radius/2, 0, lip/2]) {
  733. rotate([0, 90, 0]) {
  734. cylinder(r = (1.6 + 0.1)/2, h = radius, $fn = facets);
  735. }
  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. if (render_screw_holes) {
  765. // small pedestals for the screws that attach the flare to the body
  766. // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
  767. for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
  768. translate([radius - wall - 1.75, 0, lip/2]) {
  769. rotate([0, 90, 0]) {
  770. cylinder(r = 1.5, h = 2 * wall, $fn = facets);
  771. }
  772. }
  773. }
  774. }
  775. }
  776. // flange to mount on body
  777. rounded_octagon_wall(lip + 1.00, radius - wall, wall);
  778. // and make a smooth transition to avoid overhangs
  779. translate([0, 0, lip + 1.00]) {
  780. hull() {
  781. rounded_octagon_wall(thin_mint, radius - wall, wall);
  782. translate([0, 0, 1.0]) {
  783. rounded_octagon_wall(thin_mint, radius - 2 * wall, wall);
  784. }
  785. }
  786. }
  787. if (render_screw_holes) {
  788. // holes for screws that attach the flare to the body
  789. // Number 0 Size, 1/4" Long = thread diameter: 1.6mm, head diameter: 2.75
  790. for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
  791. translate([radius/2, 0, lip/2]) {
  792. rotate([0, 90, 0]) {
  793. cylinder(r = (1.6 + 0.1)/2, h = radius, $fn = facets);
  794. }
  795. }
  796. }
  797. }
  798. }
  799. // flare to db25 connector mounting plate
  800. expand = pcb_version == 2 ? 1 : 3;
  801. // height of connector
  802. guard_height = 9.525;
  803. // thickness of db25 plate
  804. db25_t = 3 * wall;
  805. translate([0, 0, height]) {
  806. minkr = 2.0;
  807. difference() {
  808. hull() {
  809. rounded_octagon(thin_mint, radius);
  810. rotate([0, 0, -22.5]) translate([0, 0, transition - 5.0]) {
  811. minkowski() {
  812. db25_plate(th = thin_mint, border = expand);
  813. cylinder(r = minkr, h = thin_mint, $fn = facets);
  814. }
  815. }
  816. }
  817. hull() {
  818. rounded_octagon(thin_mint, radius - 2 * wall);
  819. rotate([0, 0, -22.5]) translate([0, 0, transition - 5.0]) {
  820. minkowski() {
  821. db25_plate(th = thin_mint, border = expand - 2 * wall);
  822. cylinder(r = minkr, h = thin_mint, $fn = facets);
  823. }
  824. }
  825. }
  826. }
  827. // db25 mounting plate
  828. rotate([0, 0, -22.5]) translate([0, 0, transition]) {
  829. difference() {
  830. db25_plate(th = db25_t, border = expand);
  831. db25_cutout(th = db25_t);
  832. }
  833. // connector border
  834. translate([0, 0, -5.0]) difference() {
  835. overhang = 3.0;
  836. minkowski() {
  837. db25_plate(th = 5.0 + db25_t + overhang, border = expand);
  838. cylinder(r = minkr, h = thin_mint, $fn = facets);
  839. }
  840. db25_plate(th = 5.0 + db25_t + overhang + thin_mint, border = expand);
  841. }
  842. }
  843. // for testing
  844. *rotate([0, 0, -22.5]) translate([0, 0, 40]) db25_plate(th = 1.0, border = 1.0);
  845. }
  846. }
  847. module octa_mount_stand(height, lip, transition, radius, top_xradius, top_yradius) {
  848. // flare to db25 connector mounting plate
  849. expand = 3;
  850. // height of connector
  851. guard_height = 9.525;
  852. // thickness of db25 plate
  853. db25_t = 3 * wall;
  854. translate([0, 0, height]) {
  855. minkr = 2.0;
  856. // db25 mounting plate
  857. rotate([0, 0, -22.5]) translate([0, 0, transition]) {
  858. // add guard wall around connector
  859. difference() {
  860. minkowski() {
  861. db25_plate(th = guard_height + db25_t, border = 1.8 * expand);
  862. cylinder(r = minkr, h = thin_mint, $fn = facets);
  863. }
  864. db25_plate(th = guard_height + db25_t + thin_mint, border = 1.8 * expand);
  865. }
  866. }
  867. // ring and connector
  868. translate([0, 0, height]) {
  869. o_rad = 8;
  870. i_rad = 3;
  871. rotate([0, 90, -22.5]) {
  872. // connector
  873. translate([-guard_height, 13, 0]) cube([guard_height, 10, o_rad/2]);
  874. translate([-guard_height, 9, o_rad/4]) rotate([0, 90, 0]) {
  875. difference() {
  876. cylinder(r = o_rad, h = guard_height, $fn = facets);
  877. translate([-10, -16, 0]) cube([20, 20, 10]);
  878. }
  879. }
  880. // ring
  881. translate([-o_rad, 30, 0]) {
  882. shock_mount_ring(o_rad, i_rad, ring_wall);
  883. }
  884. }
  885. }
  886. }
  887. }
  888. // top conical section that plugs into capsule array
  889. module octa_capsule_array_mount(angles) {
  890. difference() {
  891. union() {
  892. difference() {
  893. cylinder(h = mount_top_height, r1 = mount_radius + wall, r2 = mount_radius_capsule + 0.9, $fn = facets);
  894. cylinder(h = mount_top_height, r1 = mount_radius, r2 = mount_radius_capsule - 2 * wall * wall, $fn = facets);
  895. }
  896. // second set of optional "leaves" to get a better mount
  897. *difference() {
  898. cylinder(h = mount_top_height, r1 = mount_radius + wall, r2 = mount_radius_capsule * 0.8, $fn = facets);
  899. cylinder(h = mount_top_height, r1 = mount_radius, r2 = mount_radius_capsule * 0.8 - 1.2 * wall, $fn = facets);
  900. }
  901. }
  902. // indentations that match the four lower capsule holders
  903. // add ridge height adjustment
  904. translate([0, 0, mount_top_height + (mic_radius - capsule_height) + capsule_height * cos(90 - elev_angle) - 2]) {
  905. for (az = angles) {
  906. rotate([0, 180 - elev_angle, az + 45]) {
  907. translate([0, 0, mic_radius - capsule_height]) {
  908. capsule(leg_angles, 0, 1, ridge_wfit, ridge_hfit, 1);
  909. }
  910. }
  911. }
  912. }
  913. // indentations at the top to open up the array a bit
  914. translate([0, 0, mount_top_height + mount_radius_capsule / 8]) {
  915. for (rot = [45, 135, -135, -45]) {
  916. translate([0, 0, 0]) {
  917. rotate([0, 90, rot]) {
  918. scale([0.5, 0.5, 1.3]) linear_extrude(height = mount_radius_capsule, scale = 2.8) {
  919. minkowski() {
  920. polygon(points = [[0, mount_radius_capsule * 0.2], [0, - mount_radius_capsule * 0.2],
  921. [mount_radius_capsule, 0]]);
  922. circle(r = 2.4, $fn = facets);
  923. }
  924. }
  925. }
  926. }
  927. }
  928. }
  929. }
  930. }
  931. //
  932. // shock mount components
  933. //
  934. // shock mount band that attaches snugly to microphone body
  935. module octa_shock_mount_band(band_height, radius, delta_radius) {
  936. rotate([0, 0, 22.5]) {
  937. // inner octagon, hugs the body
  938. difference() {
  939. rounded_octagon_wall(band_height, radius + 3 * wall, 2 * wall);
  940. rotate([0, 0, -22.5 + 90]) translate([-40, -(1.273 * radius)/2, 0]) {
  941. cube([80, 1.273 * radius, band_height + thin_mint]);
  942. }
  943. // space for screw heads
  944. slot_w = 4.0;
  945. slot_d = 1.5;
  946. for (r = [0, 180]) rotate([0, 0, r - 45])
  947. translate([radius - slot_d/2, -slot_w/2, 0]) cube([slot_d, slot_w, band_height]);
  948. }
  949. // the outer octagon
  950. rounded_octagon_wall(band_height, radius + delta_radius, 2 * wall);
  951. }
  952. // joins inner and outer octagons
  953. for (m = [0, 1]) mirror([m, 0, 0]) {
  954. translate([radius, -10, 0]) {
  955. cube([delta_radius - 4 * wall, 20, band_height]);
  956. }
  957. }
  958. }
  959. // shock mount internal ring
  960. module octa_shock_mount_internal_ring(height, radius, band_height, corner) {
  961. echo(radius);
  962. delta_radius = pcb_version == 2 ? 7.5 : 6;
  963. // octagonal band
  964. octa_shock_mount_band(band_height, radius, delta_radius);
  965. // 8 columns for mounting rubber bands
  966. for (r = [0, 90, 180, 270]) rotate([0, 0, r]) {
  967. for (m = [0, 1]) mirror([m, 0, 0]) {
  968. translate([radius + (pcb_version == 2 ? 3.5 : 2.25), radius/2 - 2, 0]) {
  969. rotate([0, 0, 0]) {
  970. difference() {
  971. // columns
  972. union() {
  973. translate([3, 0, 0]) rotate([0, 0, 45]) scale([1.4, 0.8, 1.0])
  974. cylinder(r = 3, h = height, $fn = facets);
  975. }
  976. // lower slots for rubber bands
  977. rotate([0, 0, 45]) translate([2.5, radius/2, 2.0]) scale([1.0, 1.0, 2.2]) rotate([90, 0, 0]) {
  978. cylinder(r = 1.1, h = radius * 2, $fn = facets);
  979. }
  980. // upper slots for rubber bands
  981. rotate([0, 0, 45]) translate([2.5, radius/2, height - 2.0]) scale([1.0, 1.0, 2.2]) rotate([90, 0, 0]) {
  982. cylinder(r = 1.1, h = radius * 2, $fn = facets);
  983. }
  984. }
  985. }
  986. }
  987. }
  988. // walls between columns so that they cannot bend
  989. rotate([0, 0, 45]) translate([radius + (pcb_version == 2 ? 2.7 : 2.25) * wall, -14, 0]) {
  990. cube([wall, 28, height]);
  991. }
  992. }
  993. }
  994. // shock mount external ring
  995. module octa_shock_mount_external_ring(height, radius, corner) {
  996. // main ring
  997. rotate([0, 0, 22.5]) rounded_octagon_wall(ring_ext_height, radius, ring_wall);
  998. for (rot = [0, 90, 180, 270]) {
  999. // anchors for rubber bands
  1000. rotate([0, 0, rot + 45]) {
  1001. translate([radius * cos(22.5) + ring_wall + 0.75, -6, 0]) {
  1002. minkowski() {
  1003. cube([4 - 2, 12, ring_ext_height]);
  1004. cylinder(r = 1.5, h = thin_mint, $fn = facets);
  1005. }
  1006. }
  1007. translate([radius * cos(22.5), -2, 0]) {
  1008. cube([7, 4, ring_ext_height]);
  1009. }
  1010. }
  1011. }
  1012. // connection to hub
  1013. translate([radius * cos(22.5), -2, 0]) {
  1014. cube([10, 4, ring_ext_height * 2]);
  1015. }
  1016. // reinforce connection to ring
  1017. intersection() {
  1018. translate([radius * cos(22.5), 0, 0]) {
  1019. difference() {
  1020. cylinder(r = 6, h = ring_ext_height * 2, $fn = 4);
  1021. translate([-10, -5, 0]) {
  1022. cube([10, 10, ring_ext_height * 2]);
  1023. }
  1024. }
  1025. }
  1026. translate([radius + ring_wall - 7, 0, 0]) {
  1027. rotate([0, 0, 45]) cylinder(r1 = radius * 1.5, r2 = ring_wall/2 + 1, h = ring_ext_height * 2, $fn = 4);
  1028. }
  1029. }
  1030. // reinforcement
  1031. intersection() {
  1032. rotate([0, 0, 22.5]) rounded_octagon_wall(ring_ext_height * 2, radius, ring_wall);
  1033. translate([radius - 6.5, 0, 0]) {
  1034. rotate([0, 0, 45]) cylinder(r1 = radius * 1.5, r2 = ring_wall/2 + 1, h = ring_ext_height * 2, $fn = 4);
  1035. }
  1036. }
  1037. // rotating mount
  1038. o_rad = 8;
  1039. i_rad = 3;
  1040. rotate([0, 90, -90]) {
  1041. translate([-o_rad, radius * cos(22.5) + o_rad + ring_wall * 2, -2]) {
  1042. shock_mount_ring(o_rad, i_rad, ring_wall);
  1043. }
  1044. }
  1045. }
  1046. // stand mount with quick clip connector
  1047. module octa_quik_release_stand_mount(band_height, radius) {
  1048. vertical_offset = 18;
  1049. mount_offset = 3.0;
  1050. // octagonal band
  1051. octa_shock_mount_band(band_height, radius, pcb_version == 2 ? 7.5 : 6);
  1052. difference() {
  1053. hull() {
  1054. // attachment "plate"
  1055. translate([radius, -10, 0]) {
  1056. cube([2, 20, band_height]);
  1057. }
  1058. // quik release adapter tube
  1059. translate([(radius + mic_mount_radius + mic_mount_wall + 6.0 + mount_offset) * cos(22.5), 0,
  1060. vertical_offset]) {
  1061. cylinder(r = mic_mount_radius + mic_mount_fit + mic_mount_wall, h = band_height - vertical_offset, $fn = facets);
  1062. }
  1063. }
  1064. // cutout for the center hole and side hole of the adapter
  1065. translate([(radius + mic_mount_radius + mic_mount_wall + 6.0 + mount_offset) * cos(22.5), 0,
  1066. vertical_offset + thin_mint]) {
  1067. cylinder(r = mic_mount_radius + mic_mount_fit, h = mic_mount_height, $fn = facets);
  1068. }
  1069. }
  1070. translate([(radius + mic_mount_radius + mic_mount_wall + 6.0 + mount_offset) * cos(22.5), 0,
  1071. mic_mount_height + vertical_offset + thin_mint]) {
  1072. rotate([0, 180, 180]) quik_release_stand_adapter(mic_mount_height, mount_wall, mic_mount_wall);
  1073. }
  1074. }
  1075. // mount pillars that plug into robotic arm sockets
  1076. module sphear_arm_mount_pillars(radius, height, grip_sep, grip_width) {
  1077. // pillars for arm grips
  1078. m_r = 1.0;
  1079. for (m = [0, 1]) mirror([m, 0, 0]) translate([radius + 3 * wall + m_r, - grip_width/2 + m_r, 0]) {
  1080. minkowski() {
  1081. cube([5 - 2*m_r, grip_width - 2*m_r, height]);
  1082. cylinder(r = m_r, h = thin_mint, $fn = 32);
  1083. }
  1084. }
  1085. // transition
  1086. tran_h = 30.0;
  1087. for (m = [0, 1]) mirror([m, 0, 0]) {
  1088. hull() {
  1089. translate([radius + 3 * wall + m_r, -grip_width/2 + m_r, height]) {
  1090. minkowski() {
  1091. cube([5 - 2 * m_r, grip_width - 2 * m_r, thin_mint]);
  1092. cylinder(r = m_r, h = thin_mint, $fn = 32);
  1093. }
  1094. }
  1095. translate([grip_sep - wall + m_r, -(arm_w + 2 * fit + 2 * wall)/2 + m_r, height + tran_h]) {
  1096. minkowski() {
  1097. cube([arm_l - 2 * fit + 2 * wall - 2 * m_r, arm_w - 2 * fit + 2 * wall - 2 * m_r, thin_mint]);
  1098. cylinder(r = m_r, h = thin_mint, $fn = 32);
  1099. }
  1100. }
  1101. }
  1102. }
  1103. // grip pillar, plugs into slots
  1104. for (m = [0, 1]) mirror([m, 0, 0]) {
  1105. translate([grip_sep + m_r, -(arm_w + 2 * fit)/2 + m_r, height + tran_h]) {
  1106. minkowski() {
  1107. cube([arm_l - 2 * fit - 2 * m_r, arm_w - 2 * fit - 2 * m_r, 20 - 3.0]);
  1108. cylinder(r = m_r, h = thin_mint, $fn = 32);
  1109. }
  1110. }
  1111. }
  1112. }
  1113. // octathingy arm mount for robotic arm
  1114. module octa_arm_mount(band_height, radius, height) {
  1115. vertical_offset = 18;
  1116. mount_offset = 3.0;
  1117. // octagonal band
  1118. octa_shock_mount_band(band_height, radius, pcb_version == 2 ? 7.5 : 6);
  1119. // pillars for arm grips
  1120. //
  1121. // this separation between pillars comes from original arm gripper (it
  1122. // could be something else now), this should be move to a common parameter
  1123. grip_sep = 25.4 * 1.5 / 2;
  1124. grip_width = 15.0;
  1125. sphear_arm_mount_pillars(radius, height - 50.0, grip_sep, grip_width);
  1126. }
  1127. ////
  1128. //// render all the different parts
  1129. ////
  1130. // microphone body: flare to capsule array (slips into PCB holder body)
  1131. //
  1132. module render_octa_capsule_flare(z_offset) {
  1133. translate([0, 0, z_offset]) {
  1134. octa_mount_flare(pcb_hi_clear + pcb_hi_exp, mount_lip, flare_height, octa_pcb_radius, mount_radius + wall, stalk_height, 1);
  1135. *translate([0, 0, pcb_hi_clear + pcb_hi_exp + flare_height + stalk_height]) {
  1136. octa_capsule_array_mount([45, 135, -45, -135]);
  1137. }
  1138. }
  1139. }
  1140. // microphone body: main body, holds printed circuit boards
  1141. //
  1142. module render_octa_pcb_mount(z_offset, showint) {
  1143. translate([0, 0, z_offset]) {
  1144. octa_mount_body(octa_pcb_mount_height, octa_pcb_radius, mount_lip, mount_lip, 0);
  1145. // add ccrma logo
  1146. rotate([0, 0, -90 + 22.5]) {
  1147. translate([0, -(octa_pcb_radius - (pcb_version == 2 ? 3.4 : 3.7)), octa_pcb_mount_height / 2]) {
  1148. rotate([90, 270, 0]) {
  1149. logo_scale = 1 / (pcb_version == 2 ? 3.0 : 2.4);
  1150. scale([logo_scale, logo_scale, 1.0]) {
  1151. ccrma_logo(1.65);
  1152. }
  1153. }
  1154. }
  1155. }
  1156. }
  1157. }
  1158. // microphone body: flare to microphone cable (slips into PCB holder body)
  1159. //
  1160. module render_octa_cable_flare(z_offset, flip) {
  1161. translate([0, 0, z_offset]) {
  1162. octa_mount_flare_dual(pcb_low_clear + pcb_low_exp, mount_lip, 20, box_radius + wall, box_radius * 2 - wall,
  1163. mount_corner, cable_diam / 2 + wall, 10, 0);
  1164. }
  1165. }
  1166. // microphone body: flare to dual cable connectors (slips into PCB holder body)
  1167. //
  1168. module render_octa_connector_flare(z_offset, flip) {
  1169. conn_offset = 2.0;
  1170. conn_wall = conn_core_o_diam / 2 - conn_core_diam / 2;
  1171. translate([0, 0, z_offset]) {
  1172. difference() {
  1173. union() {
  1174. octa_mount_flare_connector(pcb_low_clear + pcb_low_exp, mount_lip, 20,
  1175. octa_pcb_radius,
  1176. conn_core_o_diam / 2, conn_core_o_diam + conn_offset);
  1177. for (m = [0, 1]) mirror([0, m, 0]) translate([0, conn_core_o_diam / 2 + conn_offset, pcb_low_clear + pcb_low_exp + 20]) {
  1178. // add two connectors
  1179. rotate([0, 0, -90]) {
  1180. tetra_mount_connector_holder(conn_core_sleeve, conn_core_o_diam / 2, conn_core_diam / 2,
  1181. conn_core_overlap, conn_core_s_diam / 2);
  1182. }
  1183. // add wall in between the two connectors
  1184. translate([- 2 * wall, - (conn_core_o_diam / 2 + conn_offset), 0]) {
  1185. cube([4 * wall, conn_offset + wall, 10]);
  1186. }
  1187. }
  1188. }
  1189. // redo the hole in the connector holder so that it drills into the top of the flare
  1190. for (m = [0, 1]) mirror([0, m, 0]) translate([0, conn_core_o_diam / 2 + conn_offset, 0]) {
  1191. cylinder(r = conn_core_diam / 2, h = 100, $fn = facets);
  1192. }
  1193. }
  1194. }
  1195. }
  1196. // microphone body: flare to db25 connector (slips into PCB holder body)
  1197. //
  1198. module render_octa_mount_dsub_flare(z_offset, flip) {
  1199. updown = 0;
  1200. if (flip) {
  1201. updown = 180;
  1202. }
  1203. rotate([0, updown, 90]) {
  1204. conn_offset = 2.0;
  1205. translate([0, 0, z_offset - mount_lip]) {
  1206. octa_mount_flare_dsub(pcb_low_clear + pcb_low_exp - (pcb_version == 2 ? 13 : 0), mount_lip,
  1207. pcb_version == 2 ? 33 : 20, octa_pcb_radius,
  1208. conn_core_o_diam / 2, conn_core_o_diam + conn_offset);
  1209. }
  1210. }
  1211. }
  1212. // microphone body: render all parts with a vertical separation
  1213. //
  1214. module render_octa_body(z_offset, spread, showint) {
  1215. rotate([0, 180, 0]) {
  1216. render_octa_mount_dsub_flare(pcb_version == 2 ? 10 : 0, 0);
  1217. }
  1218. lippy = spread - mount_lip;
  1219. render_octa_pcb_mount(lippy, showint);
  1220. render_octa_capsule_flare(octa_pcb_mount_height + 2 * lippy);
  1221. }
  1222. // microphone: render the full assembly with vertical separation between components
  1223. //
  1224. module render_octa_microphone(z_offset, spread) {
  1225. render_octa_body(z_offset, spread);
  1226. lippy = spread - mount_lip;
  1227. *render_octa_capsule_array(z_offset + octa_pcb_mount_height + mount_top_height +
  1228. flare_height + stalk_height + pcb_hi_clear + pcb_hi_exp + 2 * lippy + spread + mic_radius);
  1229. }
  1230. // microphone: render the full assembly with vertical separation between components
  1231. // cut out half of the assembly so that we can see the inside
  1232. //
  1233. module render_octa_microphone_cutout(z_offset, spread) {
  1234. difference() {
  1235. render_octa_microphone(z_offset, spread);
  1236. // a cube that blots out 1/4 of the microphone
  1237. rotate([0, 0, 90]) {
  1238. translate([0, 0, -50]) {
  1239. cube([50, 100, 650]);
  1240. }
  1241. }
  1242. }
  1243. }
  1244. // shock mount: microphone clip on stand mount
  1245. //
  1246. module render_octa_shock_mount_stand(z_offset) {
  1247. translate([z_offset]) {
  1248. shock_mount_stand(mic_mount_height, mount_wall, mic_mount_wall);
  1249. }
  1250. }
  1251. // shock mount: external ring
  1252. //
  1253. module render_octa_shock_mount_external_ring_old(z_offset) {
  1254. translate([0, 0, z_offset]) {
  1255. shock_mount_external_ring(external_ring_height, box_radius + wall, box_radius * 2 - wall, mount_corner, main_radius_inc, 0);
  1256. }
  1257. }
  1258. module render_octa_shock_mount_external_ring(z_offset) {
  1259. translate([0, 0, z_offset]) {
  1260. octa_shock_mount_external_ring(external_ring_height, octa_pcb_radius + internal_ring_gap + main_radius_inc + 5.25, 20);
  1261. }
  1262. }
  1263. // shock mount: bottom internal ring
  1264. //
  1265. module render_octa_shock_mount_internal_ring_bot(z_offset) {
  1266. translate([0, 0, z_offset]) {
  1267. shock_mount_internal_ring(external_ring_height, box_radius + wall, box_radius * 2 - wall, mount_corner, internal_ring_gap, 1);
  1268. }
  1269. }
  1270. module render_octa_shock_mount_internal_ring_bot(z_offset) {
  1271. translate([0, 0, z_offset]) {
  1272. shock_mount_internal_ring(external_ring_height, A/2 + wall, A/2 + 3, octa_pcb_radius * 2/3, internal_ring_gap, 1);
  1273. }
  1274. }
  1275. // shock mount: top internal ring
  1276. //
  1277. module render_octa_shock_mount_internal_ring_top_old(z_offset) {
  1278. translate([0, 0, z_offset]) {
  1279. shock_mount_internal_ring(external_ring_height, box_radius + wall, box_radius * 2 - wall, mount_corner, internal_ring_gap, 0);
  1280. }
  1281. }
  1282. module render_octa_shock_mount_internal_ring_top(z_offset) {
  1283. translate([0, 0, z_offset]) {
  1284. shock_mount_internal_ring(external_ring_height, A/2 + wall, A/2 + 3, octa_pcb_radius * 2/3, internal_ring_gap, 0);
  1285. }
  1286. }
  1287. // shock mount: all four internal ring connectors
  1288. //
  1289. module render_octa_shock_mount_ring_connectors(offset) {
  1290. for (o = [0, 1, 2, 3]) {
  1291. translate([-18, (10 + offset) * o, 0]) {
  1292. shock_mount_connector(internal_ring_height, 4, connector_w, connector_d, 0.1);
  1293. }
  1294. }
  1295. }
  1296. // shock mount: render all parts
  1297. //
  1298. module render_octa_shock_mount(z_offset) {
  1299. // internal rings
  1300. translate([0, 0, z_offset + internal_ring_height / 2]) {
  1301. render_octa_shock_mount_internal_ring_top(0);
  1302. rotate([0, 180, 0]) {
  1303. render_octa_shock_mount_internal_ring_bot(internal_ring_height + 2);
  1304. }
  1305. // insert the connecting rods
  1306. for (r = [0, 90, 180, 270]) {
  1307. rotate([0, 0, r]) {
  1308. translate([((r % 180) ? box_radius * 2 : box_radius) + 3 * wall + internal_ring_gap, 0, -1]) {
  1309. rotate([0, 90, 0]) {
  1310. translate([-4, -5, 1]) {
  1311. shock_mount_connector(internal_ring_height, 4, connector_w, connector_d, 0.1);
  1312. }
  1313. }
  1314. }
  1315. }
  1316. }
  1317. }
  1318. // external ring
  1319. translate([0, 0, z_offset - external_ring_height / 4]) {
  1320. render_octa_shock_mount_external_ring(0);
  1321. }
  1322. // mount to stand
  1323. 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)]) {
  1324. render_octa_shock_mount_stand(0);
  1325. }
  1326. }