TestRig.scad 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. //
  2. // Test Rig for Primo EM182 capsules
  3. //
  4. // Copyright 2015, Fernando Lopez-Lezcano, All Rights Reserved
  5. // nando@ccrma.stanford.edu
  6. //
  7. //
  8. // This program is free software: you can redistribute it and/or modify
  9. // it under the terms of the GNU General Public License as published by
  10. // the Free Software Foundation, either version 3 of the License, or
  11. // (at your option) any later version.
  12. //
  13. // This program is distributed in the hope that it will be useful,
  14. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. // GNU General Public License for more details.
  17. //
  18. // You should have received a copy of the GNU General Public License
  19. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. //
  21. //
  22. // 3d Models released under the Creative Commons license as follows:
  23. // Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)
  24. // http://creativecommons.org/licenses/by-nc-sa/4.0/
  25. // dimensions of the EM182 electret microphone
  26. capsule_radius = 5;
  27. capsule_radius_i = 2.2;
  28. capsule_height = 4.5;
  29. // wall thickness of capsule holder
  30. wall = 1;
  31. // contact pads
  32. pad_offset = 3.56;
  33. // slot for contact
  34. // contact_width = 0.85;
  35. contact_width = 1.00;
  36. // length of contact
  37. contact_length = 2.9;
  38. // depth of contact channel (includes contact)
  39. // contact_depth = 0.79;
  40. contact_depth = 0.5;
  41. // island around contact
  42. contact_border = 0.5;
  43. // contact offset from center line
  44. contact_offset = 0.3;
  45. // cutout offset from edge of capsule
  46. contact_cutout = 2.0;
  47. contact_cutout_gnd = 2.5;
  48. // support depth
  49. disk_depth = 0.9;
  50. disk_edge = 0.49;
  51. // thinkness of sleeve
  52. sleeve_edge = 0.66;
  53. // adjustment for the inner radius of the capsule holder
  54. // measured inside diameter of a trial print was around 7.5 to 8.2
  55. // instead of 10, capsule diameter was 9.99)
  56. // changed from 0.15 to 0.1 for tighter fit
  57. fudge = 0.10;
  58. // number of facets for rendering cylinders
  59. facets = 128;
  60. // one slot for a contact
  61. module contact (trans, angle, cutout, slot = false) {
  62. rotate([0, 0, angle]) {
  63. translate(trans) {
  64. translate([- (contact_width + 2 * contact_border) / 2, 0, 0]) {
  65. if (slot == false) {
  66. difference() {
  67. // base for the contact
  68. cube([contact_width + 2 * contact_border, capsule_radius + wall / 2, disk_depth]);
  69. translate([contact_width / 2, 0, contact_depth]) {
  70. // channel for clip
  71. cube([contact_width, capsule_radius + wall / 2, disk_depth]);
  72. }
  73. // cutout for clip from edge of disk
  74. translate([contact_width / 2, capsule_radius - cutout, 0]) {
  75. cube([contact_width, contact_width, disk_depth]);
  76. //cylinder(r = contact_width / 2 * 1.25, h = disk_depth, $fn = facets);
  77. }
  78. }
  79. } else {
  80. // just the cutouts
  81. translate([contact_width / 2, 0, contact_depth]) {
  82. // channel for clip
  83. cube([contact_width, capsule_radius + wall, disk_depth]);
  84. }
  85. translate([contact_width / 2, capsule_radius - cutout, 0]) {
  86. cube([contact_width, contact_width, disk_depth]);
  87. //cylinder(r = contact_width / 2 * 1.25, h = disk_depth, $fn = facets);
  88. }
  89. }
  90. }
  91. }
  92. }
  93. }
  94. // main capsule holder
  95. translate([capsule_radius * 3.0, capsule_radius * 3, 0]) {
  96. difference() {
  97. cylinder(r = capsule_radius + wall, h = capsule_height, $fn = facets);
  98. cylinder(r = capsule_radius + fudge, h = capsule_height, $fn = facets);
  99. }
  100. }
  101. // back plate with contact springs
  102. difference() {
  103. union() {
  104. difference() {
  105. union() {
  106. cylinder(r = capsule_radius + wall, h = disk_edge, $fn = facets);
  107. cylinder(r = capsule_radius, h = disk_depth, $fn = facets);
  108. }
  109. difference() {
  110. cylinder(r = capsule_radius, h = disk_depth, $fn = facets);
  111. cylinder(r = capsule_radius_i, h = disk_depth, $fn = facets);
  112. }
  113. }
  114. // contacts
  115. contact([contact_border + contact_offset, 0, 0], 0, contact_cutout);
  116. contact([-contact_border - contact_offset, 0, 0], 0, contact_cutout);
  117. // GND contact
  118. contact([- contact_border - contact_offset, 0, 0], 90, contact_cutout_gnd);
  119. // one more radial connection
  120. rotate([0, 0, -120]) {
  121. translate([-contact_width / 2, 0, 0]) {
  122. cube([contact_width, capsule_radius, disk_depth]);
  123. }
  124. }
  125. }
  126. // contact cutouts
  127. contact([contact_border + contact_offset, 0, 0], 0, contact_cutout, true);
  128. contact([-contact_border - contact_offset, 0, 0], 0, contact_cutout, true);
  129. // contact cutout for GND
  130. contact([- contact_border - contact_offset, 0, 0], 90, contact_cutout_gnd, true);
  131. // finally trim the seat for the holder
  132. translate([0, 0, disk_edge]) {
  133. difference() {
  134. cylinder(r = capsule_radius + wall, h = disk_depth, $fn = facets);
  135. cylinder(r = capsule_radius, h = disk_depth, $fn = facets);
  136. }
  137. }
  138. }
  139. // sleeve that holds everything together
  140. translate([capsule_radius * 3 , 0, 0]) {
  141. difference() {
  142. cylinder(r = capsule_radius + 2 * wall, h = capsule_height * 2 / 3, $fn = facets);
  143. cylinder(r = capsule_radius + wall, h = capsule_height * 2 / 3, $fn = facets);
  144. }
  145. difference() {
  146. cylinder(r = capsule_radius + wall, h = sleeve_edge, $fn = facets);
  147. cylinder(r = capsule_radius, h = sleeve_edge, $fn = facets);
  148. }
  149. // back plate for contacts 1 / 2
  150. translate([-(contact_width + 1.5 * contact_border) + 0.1, capsule_radius / 2 - 0.1, 0]) {
  151. cube([(contact_width + 1.5 * contact_border) * 2 - 0.2, capsule_radius / 2 + 0.1, sleeve_edge]);
  152. }
  153. // back plate for GND contact
  154. rotate([0, 0, 90]) {
  155. translate([-(contact_width + 1.5 * contact_border), capsule_radius * 1 / 3, 0]) {
  156. cube([(contact_width + 1.5 * contact_border), capsule_radius * 2 / 3, sleeve_edge]);
  157. }
  158. }
  159. }