1
0

TinySpHEAR_mount_pcb.scad 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824
  1. //
  2. // Spherical Harmonics Ear Project (*SpHEAR)
  3. //
  4. // TinySpHEAR, First Order (B-format) Ambisonics Microphone
  5. // Mount for four Zapnspark phantom power printed circuit boards
  6. //
  7. // Copyright 2015-2016, Fernando Lopez-Lezcano, All Rights Reserved
  8. // nando@ccrma.stanford.edu
  9. //
  10. // This program is free software: you can redistribute it and/or modify
  11. // it under the terms of the GNU General Public License as published by
  12. // the Free Software Foundation, either version 3 of the License, or
  13. // (at your option) any later version.
  14. //
  15. // This program is distributed in the hope that it will be useful,
  16. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. // GNU General Public License for more details.
  19. //
  20. // You should have received a copy of the GNU General Public License
  21. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  22. //
  23. // 3d Models released under the Creative Commons license as follows:
  24. // Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)
  25. // http://creativecommons.org/licenses/by-nc-sa/4.0/
  26. include <SpHEAR_common.scad>;
  27. include <TinySpHEAR_common.scad>;
  28. include <CCRMA_logo.scad>;
  29. ////
  30. //// default model parameters
  31. ////
  32. // size of Zapnspark printed circuit board
  33. // kicad length = 79.375
  34. // measured length = 79.20 (2016.08.25)
  35. pcb_length = 79.20;
  36. // kicad width = 19.050
  37. // measured width = 18.82 (2016.08.25)
  38. pcb_width = 18.85;
  39. // ultimaker spec thickness = 1.61
  40. // measured thickness = 1.56 (w/ copper)
  41. pcb_thickness = 1.58;
  42. // tolerance to add to length and width of pcb
  43. //
  44. // measured 3d print width = 18.70 (with pcb_fit = 0.3)
  45. // actual printed = 18.70 - 0.3 = 16.97
  46. // total correction = 18.85 - 16.97 = 1.88
  47. //
  48. pcb_fit = 0.4;
  49. // tolerance add to thickness of pcb
  50. //
  51. // printed with pcb_tfit = 0.15 -> 1.58 + 0.15 = 1.73 (ideal printed)
  52. // measured print channel = 1.63 : 0.1 thinner (ultimaker 2 plus, 2016.08.24)
  53. // measured pcb thickness = 1.58 (othermill)
  54. //
  55. pcb_tfit = 0.15;
  56. // we leave part of the pcb exposed on the bottom of the body so that we
  57. // can solder the wires that connect the microphone with the
  58. // preamplifier, same at the top of the pcb to solder the wires
  59. // to the capsules
  60. pcb_low_exp = 12.0;
  61. pcb_hi_exp = 8.0;
  62. // clearance from the bottom and top of pcb's to the start of the flare,
  63. // this adds space for the protuding molex pins on which we solder
  64. pcb_low_clear = 15.0;
  65. pcb_hi_clear = 15.0;
  66. // back and front clearance of pcb (components and leads)
  67. pcb_front = 13.25;
  68. pcb_back = 3.0;
  69. // depth of slot into which the printed circuit board fits
  70. pcb_slot_depth = 1.0;
  71. // diameter of four conductor cable (Mogami W2931)
  72. cable_diam = 9.5;
  73. // diameter of microphone capsule cable (Mogami 2490)
  74. capsule_cable_diam = 1.7;
  75. // lip that mounts flares into main body box
  76. mount_lip = 10.0;
  77. // lip fit for flares
  78. lip_fit = 0.05;
  79. // capsule array mount, height of flare and stalk
  80. flare_height = 50;
  81. stalk_height = 40;
  82. // adjust mic array to mount relative height
  83. mic_to_mount_fit = 0.0;
  84. // wall thickness
  85. wall = 1.0;
  86. // calculated minimum "radius" of microphone box
  87. box_radius = pcb_front + (pcb_thickness + pcb_tfit) + pcb_back + 2 * wall;
  88. // calculated main body corner radius
  89. mount_corner = box_radius - pcb_width / 2 + pcb_slot_depth + 4.0;
  90. //// snap joints to join the body to the two flares
  91. //
  92. // render snap joints to join all three main assemblies
  93. render_snap_joints = false;
  94. // body to flares snap joint arm slot width
  95. snap_joint_slot_w = 0.75;
  96. // width and radius of snap joint hook that locks upper and lower flanges to body
  97. snap_joint_hook_w = 5.0;
  98. snap_joint_hook_r = 1.4;
  99. //// screw holes to join the body to the two flares
  100. //
  101. render_screw_holes = true;
  102. // dimensions of 12 pin male bottom connector
  103. //
  104. // Amphenol T 3635 002
  105. // 12 pin DIN male to cable, gold plated contacts
  106. //
  107. // inner diameter of connector core
  108. conn_core_diam = 13.00 + 0.2;
  109. // outer diameter of connector core sleeve
  110. conn_core_o_diam = 17.00;
  111. // inner diameter of connector core sleeve
  112. conn_core_s_diam = 15.00;
  113. // from top of connector to sleeve
  114. conn_core_sleeve = 13.00;
  115. // from top of connector to holes
  116. conn_core_holes_h = 6.00;
  117. // between holes
  118. conn_core_holes_w = 9.20;
  119. // hole diameter
  120. conn_core_holes_d = 1.95 + 0.2;
  121. // screw head diameter
  122. conn_core_screw_d = 2.75 + 0.5;
  123. // sleeve overlap
  124. conn_core_overlap = 3.00;
  125. // shock mount parameters
  126. //
  127. ring_sep = 30.0;
  128. ring_height = 10.0;
  129. rubber_band_angle = 40;
  130. main_radius_inc = (ring_sep / 2) / tan(rubber_band_angle);
  131. // gap between internal ring and microphone body
  132. internal_ring_gap = 1.0;
  133. // connector that joins the two internal rings
  134. connector_w = 10.0;
  135. connector_d = 2.0;
  136. // wall thickness and height of shock mount rings
  137. ring_wall = 4 * wall;
  138. ring_ext_height = 6;
  139. // gap between external ring and support arm
  140. ring_arm_gap = 20;
  141. // all four printed circuit boards
  142. module tetra_pcb_clear(length, width, thick, slot_depth, front, back) {
  143. for (rot = [0, 90, 180, 270]) {
  144. rotate([0, 0, rot]) {
  145. pcb_clear(pcb_length + pcb_fit, pcb_width + pcb_fit, pcb_thickness + pcb_tfit, slot_depth, front, back);
  146. }
  147. }
  148. }
  149. // the main body of the microphone mount
  150. module tetra_mount_body(height, radius, corner, lower_lip, upper_lip, clear) {
  151. difference() {
  152. rounded_block(height, radius, radius, corner);
  153. union() {
  154. // hollow out the inside with slots for pcbs
  155. tetra_pcb_clear(pcb_length, pcb_width, pcb_thickness, pcb_slot_depth, pcb_front, pcb_back);
  156. // trim square angles
  157. cylinder(r = pcb_front, h = height, $fn = facets);
  158. // remove slots from inside body
  159. slot_len = 30;
  160. translate([0, 0, slot_len]) {
  161. difference() {
  162. rounded_block_relative(height, radius, radius, corner, - (2 * wall));
  163. if (render_screw_holes) {
  164. // add columns for upper screw holes
  165. col_w = 3.5;
  166. for (r = [45, 135, 225, 315]) rotate([0, 0, r])
  167. translate([radius - col_w*2/3, -col_w/2, 0]) {
  168. cube([col_w, col_w, height]);
  169. }
  170. }
  171. }
  172. }
  173. // upper lip for flare to microphone
  174. translate([0, 0, height - upper_lip]) {
  175. difference() {
  176. rounded_block(upper_lip, radius, radius, corner);
  177. rounded_block_relative(upper_lip, radius, radius, corner, -(wall + lip_fit));
  178. }
  179. }
  180. // lower lip for flare to cable
  181. translate([0, 0, 0]) {
  182. difference() {
  183. rounded_block(lower_lip, radius, radius, corner);
  184. rounded_block_relative(lower_lip, radius, radius, corner, -(wall + lip_fit));
  185. }
  186. }
  187. if (render_screw_holes) {
  188. // make eight holes in the the body for screws that hold both flares
  189. // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
  190. for (z = [lower_lip/2, height - upper_lip/2])
  191. for (r = [45, 135, 225, 315]) {
  192. rotate([0, 0, r])
  193. translate([-(radius + 2 * wall), 0, z]) {
  194. rotate([0, 90, 0]) {
  195. cylinder(r = 0.7, h = radius + wall, $fn = facets);
  196. }
  197. }
  198. }
  199. }
  200. if (render_snap_joints) {
  201. // slots for snap joint hooks
  202. // lower
  203. for (m=[-1, 1]) rotate([0, 90, 0]) {
  204. translate([-lower_lip * 3/4, (radius - wall/2)*m, -(snap_joint_hook_w/2 + 0.25)]) {
  205. cylinder(r = snap_joint_hook_r, h = snap_joint_hook_w + 0.5, $fn = facets);
  206. }
  207. }
  208. // upper
  209. for (m=[-1, 1]) rotate([0, 90, 0]) {
  210. translate([- height + upper_lip * 3/4, (radius - wall/2)*m, -(snap_joint_hook_w/2 + 0.25)]) {
  211. cylinder(r = snap_joint_hook_r, h = snap_joint_hook_w + 0.5, $fn = facets);
  212. }
  213. }
  214. }
  215. }
  216. }
  217. if (render_snap_joints) {
  218. // upper lip is too thin, reinforce the back of the snap joint hook holes
  219. for (r = [0, 180]) rotate([0, 90, r]) {
  220. translate([- height + upper_lip * 3/4, (radius - wall), -(snap_joint_hook_w/2 + 0.25)]) {
  221. difference() {
  222. cylinder(r = snap_joint_hook_r * 1.25, h = snap_joint_hook_w + 0.5, $fn = facets);
  223. translate([- snap_joint_hook_r * 1.25, - wall, 0]) {
  224. cube([snap_joint_hook_r * 3, snap_joint_hook_r * 3, snap_joint_hook_w * 1.5]);
  225. }
  226. }
  227. }
  228. }
  229. }
  230. // add parts for clearance check
  231. if (clear == 1) {
  232. // electrolytic capacitors
  233. cap_diam = 10.2;
  234. for (rot = [0, 180, 270]) {
  235. rotate([0, 0, rot]) {
  236. translate([-pcb_front + cap_diam/2, 0, 0]) {
  237. *cylinder(r = (cap_diam/2), h = 20, $fn = facets);
  238. }
  239. }
  240. }
  241. // PCBs
  242. for (rot = [0, 180, 270]) {
  243. rotate([0, 0, rot]) {
  244. translate([-(pcb_front + pcb_thickness), -pcb_width/2, -pcb_low_exp]) {
  245. cube([pcb_thickness, pcb_width, pcb_length]);
  246. }
  247. }
  248. }
  249. // connectors
  250. cap_h = 12.3;
  251. cap_w = 10.53/2;
  252. for (rot = [0, 180, 270]) {
  253. rotate([0, 0, rot]) {
  254. translate([-pcb_front, -cap_w/2 - 2.5, 0]) {
  255. *cube([cap_h, cap_w, 20]);
  256. }
  257. }
  258. }
  259. }
  260. }
  261. // flares from the body to the microphone stalk and cable
  262. module tetra_mount_flare(height, lip, transition, bot_radius, bot_corner, top_radius) {
  263. // bottom rounded box
  264. difference() {
  265. union() {
  266. rounded_block(height, bot_radius, bot_radius, bot_corner);
  267. if (render_screw_holes) {
  268. // small supports for the screws that attach the flare to the body
  269. // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
  270. for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
  271. translate([bot_radius + wall/3, 0, lip/2]) {
  272. rotate([0, 90, 0]) {
  273. cylinder(r = 1.5, h = 2 * wall, $fn = facets);
  274. }
  275. }
  276. }
  277. }
  278. if (render_snap_joints) {
  279. // make snap joint arm thicker
  280. for (r = [0, 180]) rotate([0, 0, r]) {
  281. translate([- snap_joint_hook_w - snap_joint_slot_w / 2, bot_radius, 0]) {
  282. cube([snap_joint_hook_w * 2 + snap_joint_slot_w, wall / 2, lip * 1.25]);
  283. }
  284. }
  285. }
  286. }
  287. rounded_block_relative(height, bot_radius, bot_radius, bot_corner, -(2 * wall));
  288. // cut flange to mount on body
  289. rounded_block_relative(lip + 1.00, bot_radius, bot_radius, bot_corner, - (wall));
  290. if (render_screw_holes) {
  291. // holes for screws that attach the flare to the body
  292. // Number 0 Size, 1/4" Long = thread diameter: 1.6mm, head diameter: 2.75
  293. for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
  294. translate([bot_radius + wall, 0, lip/2]) {
  295. rotate([0, 90, 0]) {
  296. cylinder(r = (1.6 + 0.1)/2, h = bot_radius, $fn = facets);
  297. }
  298. }
  299. }
  300. }
  301. if (render_snap_joints) {
  302. // cut slots for snap joint hooks
  303. for (r = [0, 180]) rotate([0, 0, r]) {
  304. for (m = [-1, 1]) {
  305. translate([m * (snap_joint_hook_w + snap_joint_slot_w) - snap_joint_slot_w / 2, bot_radius - 1.5 * wall, 0]) {
  306. cube([snap_joint_slot_w, 2 * wall, lip - 1.0]);
  307. }
  308. }
  309. }
  310. }
  311. // and make a smooth transition to avoid overhangs
  312. translate([0, 0, lip + 1.00]) {
  313. hull() {
  314. rounded_block_relative(thin_mint, bot_radius, bot_radius, bot_corner, - wall);
  315. translate([0, 0, 1.0]) {
  316. rounded_block_relative(thin_mint, bot_radius, bot_radius, bot_corner, - 2 * wall);
  317. }
  318. }
  319. }
  320. }
  321. if (render_snap_joints) {
  322. // add snap joint hook to arm
  323. for (r = [0, 180]) rotate([0, 0, r]) {
  324. translate([- snap_joint_hook_w / 2, bot_radius - wall/2, 1/4 * lip]) {
  325. rotate([90, 0, 90]) {
  326. difference() {
  327. cylinder(r = snap_joint_hook_r - 0.2, h = snap_joint_hook_w, $fn = facets);
  328. translate([0, -snap_joint_hook_r, 0]) {
  329. cube([snap_joint_hook_r, snap_joint_hook_w, snap_joint_hook_w]);
  330. }
  331. }
  332. }
  333. }
  334. }
  335. }
  336. // flare to round section
  337. translate([0, 0, height]) {
  338. difference() {
  339. hull() {
  340. rounded_block(thin_mint, bot_radius, bot_radius, bot_corner);
  341. translate([0, 0, transition]) {
  342. cylinder(r = top_radius, h = thin_mint, $fn = facets);
  343. }
  344. }
  345. hull() {
  346. rounded_block_relative(thin_mint, bot_radius, bot_radius, bot_corner, - wall);
  347. translate([0, 0, transition]) {
  348. cylinder(r = top_radius - wall, h = thin_mint, $fn = facets);
  349. }
  350. }
  351. }
  352. }
  353. }
  354. // stalk that connects upper flare to capsule array mount
  355. module tetra_mount_array_stalk(height, radius) {
  356. difference() {
  357. cylinder(r = radius, h = height, $fn = facets);
  358. cylinder(r = radius - wall, h = height, $fn = facets);
  359. }
  360. // add marker for "back of microphone" orientation
  361. rotate([0, 0, 90]) {
  362. translate([0, radius - wall * 2 / 3, height - radius]) {
  363. difference() {
  364. sphere(r = radius / 3, $fn = 32);
  365. translate([0, -radius + radius / 2, 0]) {
  366. cube([radius, radius, radius], center = true);
  367. }
  368. }
  369. }
  370. }
  371. }
  372. // bottom cable holder
  373. module tetra_mount_cable_holder(height, radius) {
  374. difference() {
  375. cylinder(r = radius, h = height, $fn = facets);
  376. cylinder(r = radius - wall, h = height, $fn = facets);
  377. }
  378. }
  379. // bottom connector holder
  380. module tetra_mount_connector_holder(height, radius, inside_radius, sleeve_height, sleeve_radius) {
  381. difference() {
  382. union() {
  383. cylinder(r = radius, h = height, $fn = facets);
  384. // add seats for screw heads
  385. for (m = [-1, 1]) translate([m * conn_core_holes_w / 2, radius / 2, conn_core_holes_h]) {
  386. rotate([90, 0, 0]) {
  387. scale([1, 1, 1]) cylinder(r = conn_core_screw_d / 2, h = radius * 1.43, $fn = facets);
  388. }
  389. }
  390. }
  391. cylinder(r = inside_radius, h = height, $fn = facets);
  392. // transition from thin wall to thick wall at the bottom of connector
  393. cylinder(r1 = radius - wall, r2 = inside_radius, h = 2.0, $fn = facets);
  394. // holes for connector core screws
  395. for (m = [-1, 1]) translate([m * conn_core_holes_w / 2, - radius / 3, conn_core_holes_h]) {
  396. rotate([90, 0, 0]) {
  397. cylinder(r = conn_core_holes_d / 2, h = radius, $fn = facets);
  398. }
  399. }
  400. // substract cutout for screw heads
  401. for (m = [-1, 1]) translate([m * conn_core_holes_w / 2, - radius + 1.5, conn_core_holes_h]) {
  402. rotate([90, 0, 0]) {
  403. cylinder(r = conn_core_screw_d / 2, h = 2.0, $fn = facets);
  404. }
  405. }
  406. }
  407. // thinner cylinder sits inside connector sleeve
  408. translate([0, 0, height]) {
  409. difference() {
  410. cylinder(r = sleeve_radius, h = sleeve_height, $fn = facets);
  411. cylinder(r = inside_radius, h = sleeve_height, $fn = facets);
  412. }
  413. }
  414. }
  415. // top conical section that plugs into capsule array
  416. module tilted_cylinder(radius, height, offset) {
  417. hull() {
  418. cylinder(r = radius, h = thin_mint, $fn = facets);
  419. translate([offset, 0, height]) {
  420. cylinder(r = radius, h = thin_mint, $fn = facets);
  421. }
  422. }
  423. }
  424. module tilted_cube(width, depth, height, offset) {
  425. hull() {
  426. cube([width, depth, thin_mint]);
  427. translate([offset, 0, height]) {
  428. cube([width, depth, thin_mint]);
  429. }
  430. }
  431. }
  432. module tetra_capsule_array_mount(angles, mount_radius, mount_wall) {
  433. difference() {
  434. union() {
  435. rotate([0, 0, 45]) {
  436. wire_offset = wall;
  437. wire_diam = mic_wire_diam + mic_wire_fit;
  438. // FIXME: this 1.75 is the former leg_thick value, it should be calculated
  439. // based on the capsule diameter so that the cable fits in between the capsules
  440. sleeve_width = 1.75 + wire_offset + wire_diam * 2 + wall / 2;
  441. sleeve_width_max = capsule_radius + wall;
  442. sleeve_w = (sleeve_width > sleeve_width_max) ? sleeve_width : sleeve_width_max;
  443. difference() {
  444. hull() {
  445. cylinder(r = mount_radius + mount_wall, h = thin_mint, $fn = facets);
  446. translate([0, 0, mount_top_height]) {
  447. rounded_block(thin_mint, sleeve_w, mount_radius_capsule - wall/2, mount_radius*4/5);
  448. }
  449. }
  450. // cavity for printing without support
  451. scale([1.0, 1.0, 3.0]) {
  452. sphere(r = mount_radius, $fn = facets);
  453. }
  454. // holes for cables
  455. // offset for outer hole
  456. hole_offset_l = mount_radius - wire_diam / 2;
  457. hole_offset_h = (sleeve_w - wall - wire_diam / 2) - hole_offset_l;
  458. for (m = [0, 1]) mirror([m, 0, 0]) {
  459. translate([hole_offset_l - wire_diam, 0, 0]) {
  460. tilted_cylinder(wire_diam / 2, mount_top_height, hole_offset_h);
  461. }
  462. translate([hole_offset_l, 0, 0]) {
  463. tilted_cylinder(wire_diam / 2, mount_top_height, hole_offset_h);
  464. }
  465. // shave the inside of the double tube
  466. translate([hole_offset_l - wire_diam, - wire_diam / 4, 0]) {
  467. tilted_cube(wire_diam, wire_diam/2, mount_top_height, hole_offset_h);
  468. }
  469. }
  470. }
  471. }
  472. }
  473. // indentations that match the two lower capsule holders
  474. // add ridge height adjustment
  475. translate([0, 0, mount_top_height + (mic_radius - capsule_height) + capsule_height * cos(elev_angle) - mic_to_mount_fit]) {
  476. rotate([0, (90 + elev_angle), angles[0]]) {
  477. translate([0, 0, mic_radius - capsule_height]) {
  478. capsule([], 0, 1, 0.02, 0.02, 1);
  479. }
  480. }
  481. rotate([0, (90 + elev_angle), angles[1]]) {
  482. translate([0, 0, mic_radius - capsule_height]) {
  483. capsule([], 0, 1, 0.02, 0.02, 1);
  484. }
  485. }
  486. }
  487. // slice top sides of mount
  488. for (rot = [45, 45 + 180]) {
  489. translate([0, 0, 0]) {
  490. rotate([0, 30, rot]) {
  491. translate([-mount_radius_capsule, -(mount_radius_capsule), mount_top_height])
  492. cube([mount_radius_capsule*2, mount_radius_capsule*2, 10]);
  493. }
  494. }
  495. }
  496. }
  497. }
  498. // windscreen
  499. module tetra_wind_screen_quad(radius, corner, height, band_height, helix_radius, twist) {
  500. // quad helix windscreen support
  501. translate([0, 0, 0]) {
  502. for (r = [0, 90, -90, 180]) for (t = [1, -1]) rotate([0, 0, r]) {
  503. linear_extrude(height = height, center = false, convexity = 0, twist = twist * t, $fn = facets) {
  504. translate([radius + helix_radius, 0, 0]) {
  505. circle(r = helix_radius, $fn = facets);
  506. }
  507. }
  508. }
  509. }
  510. // connectors to top
  511. translate([0, 0, height]) {
  512. for (r = [0, 90, -90, 180]) rotate([0, 0, r + twist]) {
  513. translate([radius + helix_radius, 0, 0]) {
  514. cylinder(r = helix_radius * 2/3, h = 2.0, $fn = facets);
  515. }
  516. }
  517. }
  518. }
  519. module tetra_wind_screen(radius, corner, height, band_height, beam_radius, twist) {
  520. // quad helix windscreen support
  521. translate([0, 0, 0]) {
  522. for (r = [0, 60, 120, 180, 240, 300]) for (t = [1, -1]) rotate([0, 0, r]) {
  523. linear_extrude(height = height, center = false, convexity = 0, twist = twist * t, $fn = facets) {
  524. translate([radius + beam_radius, 0, 0]) {
  525. circle(r = beam_radius, $fn = facets);
  526. }
  527. }
  528. }
  529. }
  530. // connectors to top
  531. translate([0, 0, height]) {
  532. for (r = [0, 60, 120, 180, 240, 300]) rotate([0, 0, r + twist]) {
  533. translate([radius + beam_radius, 0, 0]) {
  534. cylinder(r = beam_radius * 2/3, h = 2.0, $fn = facets);
  535. }
  536. }
  537. }
  538. }
  539. module tetra_wind_screen_top(radius, beam_rad) {
  540. // main ring
  541. difference() {
  542. cylinder(r = radius + beam_rad * 1.5, h = beam_rad * 1.5, $fn = facets);
  543. cylinder(r = radius + beam_rad * 0.5, h = beam_rad * 1.5, $fn = facets);
  544. }
  545. // cross
  546. for (r = [0, 90, 180, 270]) rotate([0, 0, r]) {
  547. translate([0, -beam_rad/2, 0]) {
  548. cube([radius + beam_rad, beam_rad, beam_rad * 1.5]);
  549. }
  550. }
  551. }
  552. module tetra_wind_screen_mount(radius, helix_radius, corner, beam_rad) {
  553. difference() {
  554. rounded_block_relative(band_height, radius, radius, corner, 2 * beam_rad);
  555. rounded_block_relative(band_height, radius, radius, corner, 1.2); // (lip_fit + 0.5));
  556. // indentation to trap nylon screen
  557. }
  558. // supports for double helix
  559. for (r = [0, 60, 120, 180, 240, 300]) rotate([0, 0, r]) {
  560. translate([0, helix_radius + beam_rad, 0]) {
  561. difference() {
  562. union() {
  563. cylinder(r = beam_rad, h = band_height, $fn = facets);
  564. // attach beam to sides (2)
  565. translate([-beam_rad/2, -beam_rad * 2, 0]) {
  566. cube([beam_rad, beam_rad * 2, band_height]);
  567. }
  568. }
  569. // cut bottom of attachment beams
  570. translate([-3, -1.1, 0]) {
  571. rotate([-15, 0, 0]) {
  572. cube([10, 10, 10]);
  573. }
  574. }
  575. }
  576. }
  577. }
  578. }
  579. // small tube to connect both helical windscreen mounts
  580. module tetra_wind_screen_connector(beam_rad) {
  581. difference() {
  582. cylinder(r = beam_rad * 1.2, h = 4, $fn = facets);
  583. cylinder(r = beam_rad * 2/3 + fit, h = 5, $fn = facets);
  584. }
  585. }
  586. ////
  587. //// render all the different parts
  588. ////
  589. // microphone body: flare to capsule array (slips into PCB holder body)
  590. //
  591. module render_tetra_capsule_flare(z_offset) {
  592. translate([0, 0, z_offset]) {
  593. tetra_mount_flare(pcb_hi_clear + pcb_hi_exp,
  594. mount_lip, flare_height, box_radius + wall, mount_corner, mount_radius + wall, stalk_height);
  595. translate([0, 0, pcb_hi_clear + pcb_hi_exp + flare_height]) {
  596. tetra_mount_array_stalk(stalk_height, mount_radius + wall);
  597. }
  598. translate([0, 0, pcb_hi_clear + pcb_hi_exp + flare_height + stalk_height]) {
  599. tetra_capsule_array_mount([-45, 135], mount_radius, wall);
  600. }
  601. }
  602. }
  603. // microphone body: main body, holds printed circuit boards
  604. //
  605. tetra_pcb_mount_height = pcb_length - pcb_low_exp - pcb_hi_exp;
  606. module render_tetra_pcb_mount(z_offset, showint) {
  607. translate([0, 0, z_offset]) {
  608. tetra_mount_body(tetra_pcb_mount_height, box_radius + wall, mount_corner, mount_lip, mount_lip, showint);
  609. }
  610. // add ccrma logo
  611. rotate([0, 0, -90]) {
  612. translate([0, -(box_radius - 0.5), tetra_pcb_mount_height / 2]) {
  613. rotate([90, 270, 0]) {
  614. logo_scale = 1 / 2.4;
  615. scale([logo_scale, logo_scale, 1.0]) {
  616. ccrma_logo(1.65);
  617. }
  618. }
  619. }
  620. }
  621. }
  622. // microphone body: flare to microphone cable (slips into PCB holder body)
  623. //
  624. module render_tetra_cable_flare(z_offset, flip) {
  625. translate([0, 0, z_offset]) {
  626. tetra_mount_flare(pcb_low_clear + pcb_low_exp, mount_lip, 20, box_radius + wall, mount_corner, cable_diam / 2 + wall, 10);
  627. translate([0, 0, pcb_low_clear + pcb_low_exp + 20]) {
  628. tetra_mount_cable_holder(10, cable_diam / 2 + wall);
  629. }
  630. }
  631. }
  632. // microphone body: flare to 12 pin connector (slips into PCB holder body)
  633. //
  634. module render_tetra_connector_flare(z_offset, flip) {
  635. translate([0, 0, z_offset]) {
  636. tetra_mount_flare(pcb_low_clear + pcb_low_exp, mount_lip, 20, box_radius + wall, mount_corner, conn_core_o_diam / 2, 10);
  637. rotate([0, 0, -90]) translate([0, 0, pcb_low_clear + pcb_low_exp + 20]) {
  638. tetra_mount_connector_holder(conn_core_sleeve, conn_core_o_diam / 2, conn_core_diam / 2, conn_core_overlap, conn_core_s_diam / 2);
  639. }
  640. }
  641. }
  642. // microphone body: render all parts with a vertical separation
  643. //
  644. module render_tetra_body(z_offset, spread, showint) {
  645. rotate([0, 180, 0]) {
  646. render_tetra_connector_flare(0);
  647. }
  648. lippy = spread - mount_lip;
  649. render_tetra_pcb_mount(lippy, showint);
  650. render_tetra_capsule_flare(tetra_pcb_mount_height + 2 * lippy);
  651. }
  652. // microphone: render the full assembly with a vertical separation
  653. //
  654. module render_tetra_microphone(z_offset, spread) {
  655. render_tetra_body(z_offset, spread);
  656. lippy = spread - mount_lip;
  657. render_tetra_capsule_array(z_offset + tetra_pcb_mount_height + mount_top_height +
  658. flare_height + stalk_height + pcb_hi_clear + pcb_hi_exp + 2 * lippy + spread + mic_radius);
  659. }
  660. // microphone: render the full assembly with a vertical separation
  661. // cut out halt of the assembly so that we can see the inside
  662. //
  663. module render_tetra_microphone_cutout(z_offset, spread) {
  664. difference() {
  665. render_tetra_microphone(z_offset, spread);
  666. // a cube that blots out 1/4 of the microphone
  667. rotate([0, 0, 90]) {
  668. translate([0, 0, -50]) {
  669. cube([50, 100, 650]);
  670. }
  671. }
  672. }
  673. }
  674. // shock mount: microphone clip on stand mount
  675. //
  676. module render_tetra_shock_mount_stand(z_offset) {
  677. translate([z_offset]) {
  678. shock_mount_stand(mic_mount_height, mount_wall, mic_mount_wall);
  679. }
  680. }
  681. // shock mount: external ring
  682. //
  683. module render_tetra_shock_mount_external_ring(z_offset) {
  684. translate([0, 0, z_offset]) {
  685. shock_mount_external_ring(ring_height, box_radius + wall, box_radius + wall, mount_corner, main_radius_inc, 0);
  686. }
  687. }
  688. // shock mount: bottom internal ring
  689. //
  690. module render_tetra_shock_mount_internal_ring_bot(z_offset) {
  691. translate([0, 0, z_offset]) {
  692. shock_mount_internal_ring(ring_height, box_radius + wall, box_radius + wall, mount_corner, internal_ring_gap, 1);
  693. }
  694. }
  695. // shock mount: all four internal ring connectors
  696. //
  697. module render_tetra_shock_mount_ring_connectors(offset) {
  698. for (o = [0, 1, 2, 3]) {
  699. translate([-18, (10 + offset) * o, 0]) {
  700. shock_mount_connector(ring_sep, 4, connector_w, connector_d, 0.1);
  701. }
  702. }
  703. }
  704. // shock mount: top internal ring
  705. //
  706. module render_tetra_shock_mount_internal_ring_top(z_offset) {
  707. translate([0, 0, z_offset]) {
  708. shock_mount_internal_ring(ring_height, box_radius + wall, box_radius + wall, mount_corner, internal_ring_gap, 0);
  709. }
  710. }
  711. // shock mount: render all parts
  712. //
  713. module render_tetra_shock_mount(z_offset) {
  714. // internal rings
  715. translate([0, 0, z_offset + ring_sep / 2]) {
  716. render_tetra_shock_mount_internal_ring_top(0);
  717. rotate([0, 180, 0]) {
  718. render_tetra_shock_mount_internal_ring_bot(ring_sep + 2);
  719. }
  720. // insert the connecting rods
  721. for (r = [0, 90, 180, 270]) {
  722. rotate([0, 0, r]) {
  723. translate([box_radius + 3 * wall + internal_ring_gap, 0, -1]) {
  724. rotate([0, 90, 0]) {
  725. translate([-4, -5, 1]) {
  726. shock_mount_connector(ring_sep, 4, connector_w, connector_d, 0.1);
  727. }
  728. }
  729. }
  730. }
  731. }
  732. }
  733. // external ring
  734. translate([0, 0, z_offset - ring_height / 4]) {
  735. render_tetra_shock_mount_external_ring(0);
  736. }
  737. // mount to stand
  738. translate([box_radius + mount_corner + ring_wall + ring_arm_gap + 8 + ring_wall / 2 + 1, 0, -(mic_mount_height + mic_mount_radius + ring_height / 4 + 2.2)]) {
  739. render_tetra_shock_mount_stand(0);
  740. }
  741. }