TestRig.scad 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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 = 1.7;
  47. contact_cutout_gnd = 2.2;
  48. // support depth
  49. disk_depth = 0.9;
  50. disk_edge = 0.49;
  51. // adjustment for the inner radius of the capsule holder
  52. // measured inside diameter of a trial print was around 7.5 to 8.2
  53. // instead of 10, capsule diameter was 9.99)
  54. // changed from 0.15 to 0.1 for tighter fit
  55. fudge = 0.10;
  56. // number of facets for rendering cylinders
  57. facets = 128;
  58. // one slot for a contact
  59. module contact (trans, angle, cutout, slot = false) {
  60. rotate([0, 0, angle]) {
  61. translate(trans) {
  62. translate([- (contact_width + 2 * contact_border) / 2, 0, 0]) {
  63. if (slot == false) {
  64. difference() {
  65. // base for the contact
  66. cube([contact_width + 2 * contact_border, capsule_radius + wall / 2, disk_depth]);
  67. translate([contact_width / 2, 0, contact_depth]) {
  68. // channel for clip
  69. cube([contact_width, capsule_radius + wall / 2, disk_depth]);
  70. }
  71. // cutout for clip from edge of disk
  72. translate([contact_width, capsule_radius - cutout, 0]) {
  73. cylinder(r = contact_width / 2 * 1.25, h = disk_depth, $fn = facets);
  74. //cube([contact_width, 0.8, disk_depth]);
  75. }
  76. }
  77. } else {
  78. // just the cutouts
  79. translate([contact_width / 2, 0, contact_depth]) {
  80. // channel for clip
  81. cube([contact_width, capsule_radius + wall, disk_depth]);
  82. }
  83. translate([contact_width, capsule_radius - cutout, 0]) {
  84. //cube([contact_width, 0.8, disk_depth]);
  85. cylinder(r = contact_width / 2 * 1.25, h = disk_depth, $fn = facets);
  86. }
  87. }
  88. }
  89. }
  90. }
  91. }
  92. // main capsule holder
  93. translate([capsule_radius * 3.0, capsule_radius * 3, 0]) {
  94. difference() {
  95. cylinder(r = capsule_radius + wall, h = capsule_height, $fn = facets);
  96. cylinder(r = capsule_radius + fudge, h = capsule_height, $fn = facets);
  97. }
  98. }
  99. // back plate with contact springs
  100. difference() {
  101. union() {
  102. difference() {
  103. union() {
  104. cylinder(r = capsule_radius + wall, h = disk_edge, $fn = facets);
  105. cylinder(r = capsule_radius, h = disk_depth, $fn = facets);
  106. }
  107. difference() {
  108. cylinder(r = capsule_radius, h = disk_depth, $fn = facets);
  109. cylinder(r = capsule_radius_i, h = disk_depth, $fn = facets);
  110. }
  111. }
  112. // contacts
  113. contact([contact_border + contact_offset, 0, 0], 0, contact_cutout);
  114. contact([-contact_border - contact_offset, 0, 0], 0, contact_cutout);
  115. // GND contact
  116. contact([- contact_border - contact_offset, 0, 0], 90, contact_cutout_gnd);
  117. // one more radial connection
  118. rotate([0, 0, -120]) {
  119. translate([-contact_width / 2, 0, 0]) {
  120. cube([contact_width, capsule_radius, disk_depth]);
  121. }
  122. }
  123. }
  124. // contact cutouts
  125. contact([contact_border + contact_offset, 0, 0], 0, contact_cutout, true);
  126. contact([-contact_border - contact_offset, 0, 0], 0, contact_cutout, true);
  127. // contact cutout for GND
  128. contact([- contact_border - contact_offset, 0, 0], 90, contact_cutout_gnd, true);
  129. // finally trim the seat for the holder
  130. translate([0, 0, disk_edge]) {
  131. difference() {
  132. cylinder(r = capsule_radius + wall, h = disk_depth, $fn = facets);
  133. cylinder(r = capsule_radius, h = disk_depth, $fn = facets);
  134. }
  135. }
  136. }
  137. // sleeve that holds everything together
  138. translate([capsule_radius * 3 , 0, 0]) {
  139. difference() {
  140. cylinder(r = capsule_radius + 2 * wall, h = capsule_height * 2 / 3, $fn = facets);
  141. cylinder(r = capsule_radius + wall, h = capsule_height * 2 / 3, $fn = facets);
  142. }
  143. difference() {
  144. cylinder(r = capsule_radius + wall, h = disk_edge, $fn = facets);
  145. cylinder(r = capsule_radius, h = disk_edge, $fn = facets);
  146. }
  147. // back plate for contacts 1 / 2
  148. translate([-(contact_width + 2 * contact_border), capsule_radius / 2, 0]) {
  149. cube([(contact_width + 2 * contact_border) * 2, capsule_radius / 2, disk_edge]);
  150. }
  151. // back plate for GND contact
  152. rotate([0, 0, 90]) {
  153. translate([-(contact_width + 2 * contact_border), capsule_radius * 1 / 3, 0]) {
  154. cube([(contact_width + 2 * contact_border), capsule_radius * 2 / 3, disk_edge]);
  155. }
  156. }
  157. }