Information and documentation on building an embedded board test lab.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

221 lines
7.7 KiB

  1. /* [Bolt holes in the corners] */
  2. // Pick the size of the long threaded rods that run through
  3. // the corners and hold everything together.
  4. //
  5. // These are the sizes that are commonly available at
  6. // Home Depot or Lowes:
  7. //
  8. // 1/4 inch: 3.175
  9. // #12 : 2.778125
  10. // #10 : 2.38125 (default and recommended)
  11. //
  12. // Note: you should pick the same size and fudge factor
  13. // for the frame parts.
  14. bolt_size = 2.38125;
  15. // Make the bolt holes this much bigger than the size of the bolt
  16. // to give a more comfortable fit
  17. bolt_hole_fudge = 0.2; // [0:0.25:1]
  18. /* [Notches for attaching to the frame parts] */
  19. // You can optionally omit the notches for one ear that will
  20. // join with a frame on the side that has no tabs.
  21. // For the the other you should leave this at its default of true.
  22. notches_enabled = true;
  23. // Make the slot this much taller than the tabs
  24. // to give a more comfortable fit.
  25. notch_fudge = 0.3; // [0:0.25:1]
  26. /* [Bolt holes for mounting to the rack] */
  27. // The size of the bolt holes for mounting to the server rack.
  28. // The default is for M6 bolts.
  29. ear_bolt_size = 3;
  30. // Make the ear bolt holes this much longer than they are wide
  31. // in case the entire assembled rack is not precisely the right
  32. // length.
  33. ear_bolt_stretch = 3;
  34. /* [Hidden] */
  35. width = 82;
  36. length = 90;
  37. height = 5;
  38. frame_width = 15.875;
  39. distance_to_frame = 10;
  40. distance_between_bolt_holes = 15.875 * 2 + 12.7;
  41. ear_height = distance_to_frame + frame_width;
  42. notch_height = 2;
  43. outer_wall_thickness = 12;
  44. inner_wall_thickness = 7;
  45. back_wall_thickness = 5;
  46. wall_diff = outer_wall_thickness - inner_wall_thickness;
  47. floor_depth = 3;
  48. tray_depth = 5;
  49. tray_slot_depth = 2.5;
  50. spacer_depth = 3;
  51. epsilon = 0.001;
  52. sd_window_width = 40;
  53. sd_window_height = height - (tray_depth + floor_depth)*2;
  54. near_pillar_width = 15;
  55. far_pillar_width = 10;
  56. floor_window_width = sd_window_width;
  57. floor_window_border = (width - floor_window_width - outer_wall_thickness*2) / 2;
  58. floor_window_length = length - back_wall_thickness - floor_window_border*2;
  59. port_window_width = length - near_pillar_width - far_pillar_width;
  60. port_window_frame_height = floor_depth + tray_depth + spacer_depth - notch_height;
  61. bolt_radius = bolt_size + bolt_hole_fudge;
  62. ear_bolt_radius = ear_bolt_size + bolt_hole_fudge;
  63. floor_mini_window_width = (floor_window_width - floor_window_border) / 2;
  64. floor_mini_window_length = (floor_window_length - floor_window_border) / 2;
  65. difference() {
  66. union() {
  67. // the main tray block
  68. translate([0, -epsilon, 0]) {
  69. cube([width, length + epsilon, height]);
  70. }
  71. // the ear
  72. translate([0, -height, 0]) {
  73. cube([width, height, ear_height]);
  74. }
  75. // reinforce the joint
  76. translate([0, 0, 0]) {
  77. rotate([45, 0, 0]) {
  78. cube([width, height-0.5, height-0.5]);
  79. }
  80. }
  81. translate([ (width - distance_between_bolt_holes)/2 - ear_bolt_radius, 0, 0]) {
  82. rotate([45, 0, 0]) {
  83. cube([distance_between_bolt_holes + 2*ear_bolt_radius, height+1, height+1]);
  84. }
  85. }
  86. }
  87. // cut the bolt holes
  88. for (a=[[outer_wall_thickness/2, near_pillar_width/2],
  89. [outer_wall_thickness/2, length - far_pillar_width/2],
  90. [width - outer_wall_thickness/2, near_pillar_width/2],
  91. [width - outer_wall_thickness/2, length - far_pillar_width/2]]) {
  92. translate([a[0], a[1], -epsilon]) {
  93. cylinder( h=height + 2*epsilon,
  94. r=bolt_radius,
  95. center=false,
  96. $fn=360);
  97. }
  98. }
  99. // make the sides thinner
  100. polyhedron(
  101. points = [
  102. [ wall_diff, length-far_pillar_width-wall_diff, height+notch_height+epsilon],
  103. [ wall_diff, near_pillar_width+wall_diff, height+notch_height+epsilon],
  104. [ wall_diff, length-far_pillar_width-wall_diff, -epsilon],
  105. [ wall_diff, near_pillar_width+wall_diff, -epsilon],
  106. [-wall_diff, length-far_pillar_width+wall_diff, height+notch_height+epsilon],
  107. [-wall_diff, near_pillar_width-wall_diff, height+notch_height+epsilon],
  108. [-wall_diff, length-far_pillar_width+wall_diff, -epsilon],
  109. [-wall_diff, near_pillar_width-wall_diff, -epsilon]
  110. ],
  111. faces = [
  112. [1,0,2,3],
  113. [4,5,7,6],
  114. [0,4,6,2],
  115. [6,7,3,2],
  116. [7,5,1,3],
  117. [5,4,0,1]
  118. ],
  119. convexity = 10);
  120. polyhedron(
  121. points = [
  122. [width-wall_diff, near_pillar_width+wall_diff, height+notch_height+epsilon],
  123. [width-wall_diff, length-far_pillar_width-wall_diff, height+notch_height+epsilon],
  124. [width-wall_diff, near_pillar_width+wall_diff, -epsilon],
  125. [width-wall_diff, length-far_pillar_width-wall_diff, -epsilon],
  126. [width+wall_diff, near_pillar_width-wall_diff, height+notch_height+epsilon],
  127. [width+wall_diff, length-far_pillar_width+wall_diff, height+notch_height+epsilon],
  128. [width+wall_diff, near_pillar_width-wall_diff, -epsilon],
  129. [width+wall_diff, length-far_pillar_width+wall_diff, -epsilon]
  130. ],
  131. faces = [
  132. [1,0,2,3],
  133. [4,5,7,6],
  134. [0,4,6,2],
  135. [6,7,3,2],
  136. [7,5,1,3],
  137. [5,4,0,1]
  138. ],
  139. convexity = 10);
  140. if (notches_enabled) {
  141. // cut the notches
  142. translate([ wall_diff - epsilon,
  143. near_pillar_width + wall_diff,
  144. -epsilon]) {
  145. cube([ inner_wall_thickness-2 + epsilon,
  146. length - near_pillar_width - far_pillar_width - 2*wall_diff,
  147. notch_height + notch_fudge + epsilon]);
  148. }
  149. translate([ width - wall_diff - (inner_wall_thickness-2),
  150. near_pillar_width + wall_diff,
  151. -epsilon]) {
  152. cube([ inner_wall_thickness-2 + epsilon,
  153. length - near_pillar_width - far_pillar_width - 2*wall_diff,
  154. notch_height + notch_fudge + epsilon]);
  155. }
  156. }
  157. // cut some mini windows in the floor
  158. for (a=[[outer_wall_thickness + floor_window_border,
  159. floor_window_border],
  160. [width - outer_wall_thickness - floor_window_border - floor_mini_window_width,
  161. floor_window_border],
  162. [outer_wall_thickness + floor_window_border,
  163. 2*floor_window_border + floor_mini_window_length],
  164. [width - outer_wall_thickness - floor_window_border - floor_mini_window_width,
  165. 2*floor_window_border + floor_mini_window_length]]) {
  166. translate([a[0], a[1], -epsilon]) {
  167. cube([ floor_mini_window_width,
  168. floor_mini_window_length,
  169. height + 2*epsilon]);
  170. }
  171. }
  172. // cut the bolt holes on the ear
  173. for (a=[ width/2 - distance_between_bolt_holes/2,
  174. width/2 + distance_between_bolt_holes/2]) {
  175. for (b=[-ear_bolt_stretch/2, ear_bolt_stretch/2]) {
  176. translate([ a,
  177. -height-epsilon,
  178. ear_height - frame_width/2 + b]) {
  179. rotate([-90,0,0]) {
  180. cylinder( h=height + 2*epsilon,
  181. r=ear_bolt_radius,
  182. center=false,
  183. $fn=360);
  184. }
  185. }
  186. }
  187. translate([ a - ear_bolt_radius,
  188. -height-epsilon,
  189. ear_height - frame_width/2 - ear_bolt_stretch/2]) {
  190. cube([ ear_bolt_radius*2,
  191. height + 2*epsilon,
  192. ear_bolt_stretch]);
  193. }
  194. }
  195. }