My self designed awesome 3D printer
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

xyRepRap.scad 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388
  1. // #######################################################
  2. // ################## Config Parameters ##################
  3. // #######################################################
  4. slot = 30; // or 20
  5. slot_off = 1; // distance between adjacent slots
  6. // print area / volume
  7. heatbed_width = 400;
  8. heatbed_length = 400;
  9. heatbed_height = 6;
  10. // distance between heatbed edge and inner t-slot frame edge
  11. frame_off_x = 20;
  12. frame_off_y = 20;
  13. outer_width = heatbed_width + (2 * (slot + frame_off_x));
  14. outer_length = heatbed_length + (2 * (slot + frame_off_y));
  15. // TODO depend on print area height
  16. outer_height = 500;
  17. // display heatbed centered in print volume
  18. bed_draw_height = (outer_height - heatbed_height) / 2;
  19. echo(print_x=heatbed_width, print_y=heatbed_length);
  20. echo(frame_x=outer_width, frame_y=outer_length, frame_z=outer_height);
  21. // #######################################################
  22. // ###################### Libraries ######################
  23. // #######################################################
  24. include <lib/tslot_xy.scad>
  25. include <lib/nema.scad>
  26. include <lib/Belt_Generator.scad>
  27. include <lib/Pulley_T-MXL-XL-HTD-GT2_N-tooth.scad>
  28. include <lib/bearing_idler.scad>
  29. include <lib/rail_mount.scad>
  30. include <lib/linear_bearing.scad>
  31. module gt2_belt(length) {
  32. difference() {
  33. belting("straight", "GT2_2mm", belt_length = length);
  34. translate([-5, -5, 6])
  35. cube([length + 10, 10, 10]);
  36. }
  37. }
  38. // #######################################################
  39. // ######################## Frame ########################
  40. // #######################################################
  41. module slot_angle_connector() {
  42. color("gray")
  43. translate([slot, 0, 0])
  44. rotate([0, -90, 0])
  45. difference() {
  46. cube([slot, slot, slot]);
  47. translate([0, -5, 0])
  48. rotate([0, 45, 0])
  49. cube([2 * slot, 2 * slot, 2 * slot]);
  50. }
  51. }
  52. module foot() {
  53. color("yellow")
  54. translate([0, 0, 10])
  55. cylinder(d = 6, h = 20);
  56. color("yellow")
  57. difference() {
  58. sphere(d = 20);
  59. translate([-15, -15, -30])
  60. cube([30, 30, 30]);
  61. }
  62. }
  63. module lower_frame(double) {
  64. // bottom frame
  65. translate([slot + slot_off, 0, 0])
  66. tslot_x(slot, outer_width - (2 * (slot + slot_off)));
  67. if (double) {
  68. translate([slot + slot_off, outer_length - slot, slot])
  69. rotate([-90, 0, 0])
  70. tslot_2_x(slot, outer_width - (2 * (slot + slot_off)));
  71. translate([0, slot + slot_off, 0])
  72. tslot_2_y(slot, outer_width - (2 * (slot + slot_off)));
  73. translate([outer_width - slot, slot + slot_off, 0])
  74. tslot_2_y(slot, outer_width - (2 * (slot + slot_off)));
  75. } else {
  76. translate([slot + slot_off, outer_length - slot, 0])
  77. tslot_x(slot, outer_width - (2 * (slot + slot_off)));
  78. translate([0, slot + slot_off, 0])
  79. tslot_y(slot, outer_width - (2 * (slot + slot_off)));
  80. translate([outer_width - slot, slot + slot_off, 0])
  81. tslot_y(slot, outer_width - (2 * (slot + slot_off)));
  82. }
  83. }
  84. module frame() {
  85. // outer corner pillars
  86. tslot_z(slot, outer_height);
  87. translate([outer_width - slot, 0, 0])
  88. tslot_z(slot, outer_height);
  89. translate([0, outer_length - slot, 0])
  90. tslot_z(slot, outer_height);
  91. translate([outer_width - slot, outer_length - slot, 0])
  92. tslot_z(slot, outer_height);
  93. lower_frame(false);
  94. // top frame
  95. translate([0, 0, outer_height - slot])
  96. lower_frame(true);
  97. // end caps
  98. color("black")
  99. translate([0, 0, outer_height]) {
  100. cube([slot, slot, 2]);
  101. translate([outer_width - slot, 0, 0])
  102. cube([slot, slot, 2]);
  103. translate([0, outer_length - slot, 0])
  104. cube([slot, slot, 2]);
  105. translate([outer_width - slot, outer_length - slot, 0])
  106. cube([slot, slot, 2]);
  107. }
  108. // feet
  109. translate([slot / 2, slot / 2, -30])
  110. foot();
  111. translate([outer_width - slot / 2, slot / 2, -30])
  112. foot();
  113. translate([slot / 2, outer_length - slot / 2, -30])
  114. foot();
  115. translate([outer_width - slot / 2, outer_length - slot / 2, -30])
  116. foot();
  117. // connecting elements
  118. translate([slot + slot_off, 0, slot + slot_off])
  119. slot_angle_connector();
  120. translate([slot + slot_off, outer_length - slot, slot + slot_off])
  121. slot_angle_connector();
  122. translate([slot + slot_off, 0, outer_height - slot - slot_off])
  123. rotate([0, 90, 0])
  124. slot_angle_connector();
  125. translate([slot + slot_off, outer_length - slot, outer_height - slot - slot_off - slot])
  126. rotate([0, 90, 0])
  127. slot_angle_connector();
  128. translate([outer_width - slot - slot_off, 0, slot + slot_off])
  129. rotate([0, -90, 0])
  130. slot_angle_connector();
  131. translate([outer_width - slot - slot_off, outer_length - slot, slot + slot_off])
  132. rotate([0, -90, 0])
  133. slot_angle_connector();
  134. translate([outer_width - slot - slot_off, 0, outer_height - slot - slot_off])
  135. rotate([0, 180, 0])
  136. slot_angle_connector();
  137. translate([outer_width - slot - slot_off, outer_length - slot, outer_height - slot - slot_off - slot])
  138. rotate([0, 180, 0])
  139. slot_angle_connector();
  140. translate([slot, slot + slot_off, slot + slot_off])
  141. rotate([0, 0, 90])
  142. slot_angle_connector();
  143. translate([slot, slot + slot_off, outer_height - slot - slot_off - slot])
  144. rotate([0, 90, 90])
  145. slot_angle_connector();
  146. translate([0, outer_length - slot - slot_off, slot + slot_off])
  147. rotate([0, 0, -90])
  148. slot_angle_connector();
  149. translate([0, outer_length - slot - slot_off, outer_height - slot - slot_off - slot])
  150. rotate([0, 90, -90])
  151. slot_angle_connector();
  152. translate([outer_width, slot + slot_off, slot + slot_off])
  153. rotate([0, 0, 90])
  154. slot_angle_connector();
  155. translate([outer_width, slot + slot_off, outer_height - slot - slot_off - slot])
  156. rotate([0, 90, 90])
  157. slot_angle_connector();
  158. translate([outer_width - slot, outer_length - slot - slot_off, slot + slot_off])
  159. rotate([0, 0, -90])
  160. slot_angle_connector();
  161. translate([outer_width - slot, outer_length - slot - slot_off, outer_height - slot - slot_off - slot])
  162. rotate([0, 90, -90])
  163. slot_angle_connector();
  164. translate([slot + slot_off, slot + slot_off, slot])
  165. rotate([-90, 0, 0])
  166. slot_angle_connector();
  167. translate([outer_width - slot - slot_off, slot + slot_off, slot])
  168. rotate([-90, 0, 90])
  169. slot_angle_connector();
  170. translate([slot + slot_off, outer_length - slot - slot_off, 0])
  171. rotate([90, 0, 0])
  172. slot_angle_connector();
  173. translate([outer_width - slot - slot_off, outer_length - slot - slot_off, 0])
  174. rotate([90, 0, -90])
  175. slot_angle_connector();
  176. /*
  177. translate([slot + slot_off, slot + slot_off, outer_height])
  178. rotate([-90, 0, 0])
  179. slot_angle_connector();
  180. translate([outer_width - slot - slot_off, slot + slot_off, outer_height])
  181. rotate([-90, 0, 90])
  182. slot_angle_connector();
  183. translate([slot + slot_off, outer_length - slot - slot_off, outer_height - slot])
  184. rotate([90, 0, 0])
  185. slot_angle_connector();
  186. translate([outer_width - slot - slot_off, outer_length - slot - slot_off, outer_height - slot])
  187. rotate([90, 0, -90])
  188. slot_angle_connector();
  189. */
  190. }
  191. // #######################################################
  192. // ###################### Mechanics ######################
  193. // #######################################################
  194. rail_mount_dist = 12;
  195. y_carriage_pos = 175;
  196. module rail(length) {
  197. cylinder(d = rail_dia, h = length);
  198. echo(rail_dia=rail_dia, rail_len=length);
  199. }
  200. module y_rails() {
  201. // y smooth rail on blue side
  202. color("cyan")
  203. translate([rail_dia / 2 + rail_y_off_1, 18, -30])
  204. rotate([-90, 0, 0])
  205. rail(outer_length - slot - nema17_size - (2 * rail_mount_dist));
  206. // y carriage on blue side
  207. translate([rail_y_off_1 - (lm8uu_outer + lm8uu_dia_add) / 2 + y_carriage_rail_support, y_carriage_pos, -slot])
  208. y_carriage(idler_a_blue, idler_b_blue);
  209. // rail mounts for blue side
  210. color("green")
  211. translate([0, 2 * rail_mount_dist, -2 * slot])
  212. rail_mount(slot);
  213. color("green")
  214. translate([0, outer_length - (2 * slot) - nema17_size - rail_mount_dist + 5, -2 * slot])
  215. rail_mount(slot);
  216. // y smooth rail on red side
  217. color("cyan")
  218. translate([outer_width - (2 * slot) - rail_dia / 2 - rail_y_off_1, 18, -30])
  219. rotate([-90, 0, 0])
  220. rail(outer_length - slot - nema17_size - (2 * rail_mount_dist));
  221. // y carriage on red side
  222. translate([outer_width - slot - y_carriage_width - y_carriage_block_width, y_carriage_pos + y_carriage_length, -slot])
  223. rotate([0, 0, 180])
  224. y_carriage(idler_a_red, idler_b_red);
  225. // rail mounts for red side
  226. color("green")
  227. translate([outer_width - (2 * slot), 2 * rail_mount_dist + rail_mount_len, -2 * slot])
  228. rotate([0, 0, 180])
  229. rail_mount(slot);
  230. color("green")
  231. translate([outer_width - (2 * slot), outer_length - (2 * slot) - nema17_size - rail_mount_dist + 5 + rail_mount_len, -2 * slot])
  232. rotate([0, 0, 180])
  233. rail_mount(slot);
  234. }
  235. module x_rails() {
  236. // TODO length calculate properly!
  237. translate([30, y_carriage_pos, 15])
  238. rotate([0, 90, 0])
  239. rail(outer_length - (4 * slot));
  240. translate([30, y_carriage_pos + x_rail_dist, 15])
  241. rotate([0, 90, 0])
  242. rail(outer_length - (4 * slot));
  243. }
  244. module motion_xy() {
  245. translate([slot, slot, outer_height])
  246. y_rails();
  247. color("cyan")
  248. translate([slot, slot + y_carriage_len_add, outer_height - (1.5 * slot)])
  249. x_rails();
  250. // left ("blue") motor
  251. translate([slot, outer_length - slot - nema17_size - nema17_mount_wall, outer_height + nema17_mount_wall])
  252. rotate([180, 0, 90]) {
  253. color("blue")
  254. translate([0, 0, -65])
  255. nema17(65);
  256. color("green")
  257. nema17_mount(slot);
  258. // blue motor pulley
  259. color("magenta")
  260. translate([nema17_size / 2, nema17_size / 2, 22.4])
  261. rotate([180, 0, 0])
  262. gt2_pulley();
  263. // blue gt2 belt at motor
  264. color("blue")
  265. translate([nema17_size / 2, nema17_size / 2 + 6.5, nema17_mount_wall + 1])
  266. rotate([0, 0, 180])
  267. gt2_belt(outer_length - (5 * slot) - y_carriage_pos);
  268. color("blue")
  269. translate([-outer_length + (3 * slot) + 10 + nema17_size / 2, nema17_size / 2 - 6.5, nema17_mount_wall + 1])
  270. gt2_belt(outer_length - (3 * slot) - 10);
  271. }
  272. // right ("red") motor
  273. translate([outer_width - slot - nema17_size, outer_length - slot - nema17_size - nema17_mount_wall, outer_height + nema17_mount_wall])
  274. rotate([180, 0, 90]) {
  275. color("red")
  276. translate([0, 0, -65])
  277. nema17(65);
  278. color("green")
  279. nema17_mount(slot);
  280. // red motor pulley
  281. color("cyan")
  282. translate([nema17_size / 2, nema17_size / 2, 8.2])
  283. gt2_pulley();
  284. // red gt2 belt at motor
  285. color("red")
  286. translate([nema17_size / 2, nema17_size / 2 + 6.5, nema17_mount_wall + 8])
  287. rotate([0, 0, 180])
  288. gt2_belt(outer_length - (3 * slot) - 10);
  289. color("red")
  290. translate([nema17_size / 2 - (outer_length - (5 * slot) - y_carriage_pos), nema17_size / 2 - 6.5, nema17_mount_wall + 8])
  291. gt2_belt(outer_length - (5 * slot) - y_carriage_pos);
  292. }
  293. // long back belts
  294. color("blue")
  295. translate([slot + 15, slot + 10, outer_height - 7])
  296. gt2_belt(outer_width - nema17_size - (2 * slot) + 13);
  297. color("red")
  298. translate([slot + 15, slot + 10, outer_height - 14])
  299. gt2_belt(outer_width - nema17_size - (2 * slot) + 13);
  300. // blue belt on red side
  301. color("blue")
  302. translate([outer_width - slot - 15, slot + 10, outer_height - 7])
  303. rotate([0, 0, 90])
  304. gt2_belt(y_carriage_pos + 10);
  305. // red belt on blue side
  306. color("red")
  307. translate([slot + 15, slot + 19 + y_carriage_pos, outer_height - 14])
  308. rotate([0, 0, -90])
  309. gt2_belt(y_carriage_pos + 10);
  310. // idler on blue side
  311. translate([slot + bearing_mount_width + 15, 0, outer_height - slot])
  312. rotate([0, 0, 90])
  313. slot_mount_bracket(slot, true);
  314. // idler on red side
  315. translate([outer_width - slot - 15, 0, outer_height - slot])
  316. rotate([0, 0, 90])
  317. slot_mount_bracket(slot, true);
  318. }
  319. // #######################################################
  320. // ####################### Heatbed #######################
  321. // #######################################################
  322. module heatbed() {
  323. color("yellow")
  324. translate([slot + frame_off_x, slot + frame_off_y, bed_draw_height])
  325. cube([heatbed_width, heatbed_length, heatbed_height]);
  326. }
  327. // ########################################################
  328. // ####################### Assembly #######################
  329. // ########################################################
  330. frame();
  331. motion_xy();
  332. heatbed();