TestRig.scad 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  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 = 0.95;
  36. // length of contact
  37. contact_length = 2.9;
  38. // depth of contact channel (includes contact)
  39. contact_depth = 0.79;
  40. // island around contact
  41. contact_border = 0.5;
  42. // contact offset from center line
  43. contact_offset = 0.3;
  44. // cutout offset from edge of capsule
  45. contact_cutout = 1.0;
  46. // support depth
  47. disk_depth = 1.17;
  48. disk_edge = 0.49;
  49. // adjustment for the inner radius of the capsule holder
  50. // measured inside diameter of a trial print was around 7.5 to 8.2
  51. // instead of 10, capsule diameter was 9.99)
  52. fudge = 0.15;
  53. // number of facets for rendering cylinders
  54. facets = 64;
  55. // one slot for a contact
  56. module contact (trans, angle, slot = false) {
  57. rotate([0, 0, angle]) {
  58. translate(trans) {
  59. translate([- (contact_width + 2 * contact_border) / 2, 0, 0]) {
  60. if (slot == false) {
  61. difference() {
  62. // base for the contact
  63. cube([contact_width + 2 * contact_border, capsule_radius + wall / 2, disk_depth]);
  64. translate([contact_width / 2, 0, contact_depth]) {
  65. // channel for clip
  66. cube([contact_width, capsule_radius + wall / 2, disk_depth]);
  67. }
  68. // cutout for clip from edge of disk
  69. translate([contact_width / 2, capsule_radius - contact_cutout, 0]) {
  70. cube([contact_width, contact_length, disk_depth]);
  71. }
  72. }
  73. } else {
  74. // just the cutouts
  75. translate([contact_width / 2, 0, contact_depth]) {
  76. // channel for clip
  77. cube([contact_width, capsule_radius + wall, disk_depth]);
  78. }
  79. translate([contact_width / 2, capsule_radius - 0.666, 0]) {
  80. cube([contact_width, contact_length, disk_depth]);
  81. }
  82. }
  83. }
  84. }
  85. }
  86. }
  87. // main capsule holder
  88. *translate([capsule_radius * 3.0, 0, 0]) {
  89. difference() {
  90. cylinder(r = capsule_radius + wall, h = capsule_height, $fn = facets);
  91. cylinder(r = capsule_radius + fudge, h = capsule_height, $fn = facets);
  92. }
  93. }
  94. // contact springs
  95. difference() {
  96. union() {
  97. difference() {
  98. union() {
  99. cylinder(r = capsule_radius + wall, h = disk_edge, $fn = facets);
  100. cylinder(r = capsule_radius, h = disk_depth, $fn = facets);
  101. }
  102. difference() {
  103. cylinder(r = capsule_radius, h = disk_depth, $fn = facets);
  104. cylinder(r = capsule_radius_i, h = disk_depth, $fn = facets);
  105. }
  106. }
  107. // contacts
  108. contact([contact_border + contact_offset, 0, 0], 0);
  109. contact([-contact_border - contact_offset, 0, 0], 0);
  110. // GND contact
  111. contact([- contact_border - contact_offset, 0, 0], 90);
  112. // one more radial connection
  113. rotate([0, 0, -120]) {
  114. translate([-contact_width / 2, 0, 0]) {
  115. cube([contact_width, capsule_radius, disk_depth]);
  116. }
  117. }
  118. }
  119. contact([contact_border + contact_offset, 0, 0], 0, true);
  120. contact([-contact_border - contact_offset, 0, 0], 0, true);
  121. contact([- contact_border - contact_offset, 0, 0], 90, true);
  122. // finally trim the seat for the holder
  123. translate([0, 0, disk_edge]) {
  124. difference() {
  125. cylinder(r = capsule_radius + wall, h = disk_depth, $fn = facets);
  126. cylinder(r = capsule_radius, h = disk_depth, $fn = facets);
  127. }
  128. }
  129. }