TestRig.scad 4.8 KB

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