3.5_hdd_mount.scad 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. // Copyright (C) 2013 Michael McMaster <michael@codesrc.com>
  2. //
  3. // This file is part of SCSI2SD.
  4. //
  5. // SCSI2SD is free software: you can redistribute it and/or modify
  6. // it under the terms of the GNU General Public License as published by
  7. // the Free Software Foundation, either version 3 of the License, or
  8. // (at your option) any later version.
  9. //
  10. // SCSI2SD is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. // GNU General Public License for more details.
  14. //
  15. // You should have received a copy of the GNU General Public License
  16. // along with SCSI2SD. If not, see <http://www.gnu.org/licenses/>.
  17. $fa = 3; // 4-times as many angles per circle.
  18. $fs = 0.1; // 0.1mm accuracy
  19. // A* taken from SFF-8301 Specification for Form Factor of 3.5" Disk Drives
  20. A3 = 101.6; // width
  21. A5 = 3.19; // Distance from side to bottom hole.
  22. A6 = 44.45; // Distance from A7 to second bottom hole.
  23. A7 = 41.28; // Distance from front to bottom holes.
  24. A8 = 28.5; // Distance from front to side holes
  25. A9 = 101.60; // Distance between side holes.
  26. A10 = 6.35; // Height from base to site holes.
  27. A13 = 76.2; // Distance from A7 to third bottom hole.
  28. m3HoleRadius=2.667/2; // M3x0.50 minimum hole size (aluminium or softer material)
  29. holeBulk=4; // Extra around holes
  30. tmp = 10;
  31. // NOTE: PCB width (3860mils) must be less than 101.6 - (2 * wall width)
  32. // Max width is about 1.5mm.
  33. wallWidth = 1.3;
  34. screwWidth = 3;
  35. foo = 6;
  36. bar = 4; // PSOC MOUNT
  37. PCB_DIFF=90.42; // Clearance line of "fat" via is 10mil from edge.
  38. PCB_off = (A3 - PCB_DIFF) / 2;
  39. // from front = A7 + foo = 47.28
  40. // second = 47.28 + A6 = 91.73. Perfect!
  41. // Height between board and screw:
  42. // screwWidth + 1.6mm pcb only = 3 + 1.6 =4.6. Not a problem!
  43. // Width of PCB vs side hole bulk: 101.6 - 97.5360 = 4.064
  44. // only 2mm to spare on either side.
  45. // TODO Made a NOTCH in the PCB to handle this!
  46. // notch: A8 +- holeBulk = 28.5 - 4, 28.5 + 4 = 24 -> 33mm. 3mm in.
  47. module hdd_side()
  48. {
  49. difference()
  50. {
  51. union()
  52. {
  53. cube([A8 + A9 + tmp, wallWidth, A10 + holeBulk]);
  54. // Bottom mount 1
  55. translate([A7 - (foo / 2), 0, 0])
  56. {
  57. cube([foo, foo, screwWidth]);
  58. }
  59. // Bottom mount 2
  60. translate([A6 + A7 - (foo / 2), 0, 0])
  61. {
  62. cube([foo, foo, screwWidth]);
  63. }
  64. // Bottom mount 3
  65. translate([A13 + A7 - (foo / 2), 0, 0])
  66. {
  67. cube([foo, foo, screwWidth]);
  68. }
  69. // psoc mount 1
  70. translate([A7 - (foo / 2) + foo, 0, 0])
  71. {
  72. cube([foo, foo + bar, screwWidth]);
  73. }
  74. // psoc mount 2
  75. translate([A6 + A7 - (foo / 2) + foo, 0, 0])
  76. {
  77. cube([foo, foo + bar, screwWidth]);
  78. }
  79. // Extra bulk behind side holes
  80. translate([A8, 0, A10])
  81. {
  82. rotate([270, 0, 0])
  83. {
  84. cylinder(h=screwWidth, r=holeBulk);
  85. }
  86. }
  87. translate([A8 + A9, 0, A10])
  88. {
  89. rotate([270, 0, 0])
  90. {
  91. cylinder(h=screwWidth, r=holeBulk);
  92. }
  93. }
  94. }
  95. // Remove excess material from the side
  96. translate([-0.5, -0.5,screwWidth + wallWidth])
  97. {
  98. cube([A8 - tmp + 0.5, wallWidth + 1, A10 + holeBulk]);
  99. }
  100. translate([A8 + tmp, -0.5, screwWidth + wallWidth])
  101. {
  102. cube([A9 - (tmp * 2), wallWidth + 1, A10 + holeBulk]);
  103. }
  104. // SIDE HOLES
  105. translate([A8, -0.5, A10])
  106. {
  107. rotate([270, 0, 0])
  108. {
  109. cylinder(h=screwWidth + 1, r=m3HoleRadius);
  110. }
  111. }
  112. translate([A8 + A9, -0.5, A10])
  113. {
  114. rotate([270, 0, 0])
  115. {
  116. cylinder(h=screwWidth + 1, r=m3HoleRadius);
  117. }
  118. }
  119. // BOTTOM HOLES
  120. // Bottom hole 1
  121. translate([A7, A5, -0.5])
  122. {
  123. cylinder(h=screwWidth + 1, r = m3HoleRadius);
  124. }
  125. // Bottom hole 2
  126. translate([A6 + A7, A5, -0.5])
  127. {
  128. cylinder(h=screwWidth + 1, r = m3HoleRadius);
  129. }
  130. // Bottom hole 3
  131. translate([A13 + A7, A5, -0.5])
  132. {
  133. cylinder(h=screwWidth + 1, r = m3HoleRadius);
  134. }
  135. // PSOC hole1
  136. translate([A7 + foo, PCB_off, -0.5])
  137. {
  138. cylinder(h=screwWidth + 1, r = m3HoleRadius);
  139. }
  140. // PSOC hole2
  141. translate([A6 + A7 + foo, PCB_off, -0.5])
  142. {
  143. cylinder(h=screwWidth + 1, r = m3HoleRadius);
  144. }
  145. }
  146. }
  147. union()
  148. {
  149. hdd_side();
  150. translate([0, A3, 0])
  151. {
  152. mirror([0, 1, 0])
  153. {
  154. hdd_side();
  155. }
  156. }
  157. cube([wallWidth * 2, A3, wallWidth]);
  158. translate([A8 + A9 + tmp - wallWidth * 2, 0, 0])
  159. {
  160. cube([wallWidth * 2, A3, wallWidth]);
  161. }
  162. // Bottom hole 1
  163. translate([A7 + foo, foo + bar, 0])
  164. {
  165. cube([wallWidth * 2, A3 - ((foo + bar) * 2), wallWidth]);
  166. }
  167. // Bottom hole 2
  168. translate([A6 + A7 + foo, foo + bar, 0])
  169. {
  170. cube([wallWidth * 2, A3 - ((foo + bar) * 2), wallWidth]);
  171. }
  172. for (i = [0:3])
  173. {
  174. translate([0, (i * (A3 - wallWidth) / 3), 0])
  175. {
  176. cube([A8 + A9 + tmp, wallWidth, wallWidth]);
  177. }
  178. }
  179. }