My self designed awesome 3D printer
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.

extruder.scad 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  1. // adapted from https://www.thingiverse.com/thing:1383913
  2. // #######################################################
  3. // ###################### Extruders ######################
  4. // #######################################################
  5. include <rounded.scad>
  6. include <nema.scad>
  7. include <tslot_xy.scad>
  8. draw_extruder = false;
  9. extruder_width = nema17_size;
  10. extruder_depth = 15;
  11. extruder_height_m = 15; // material below motor
  12. extruder_cover_d = 12;
  13. extruder_filament_d = 1.75;
  14. extruder_gear_od = 12; // outer diameter: mk8 = 9, mk7 = 12
  15. extruder_gear_ed = 10.25; // effective diameter: mk8 = 6.75, mk7 = 10.25
  16. extruder_gear_groove_width = 3.5;
  17. fillet = 1.5;
  18. extruder_supports = true;
  19. extruder_brass_tube = false;
  20. extruder_lever_with_switch = true;
  21. // bearing 624
  22. extruder_bearing_od = 13;
  23. extruder_bearing_id = 4;
  24. extruder_bearing_h = 5;
  25. extruder_filament_offset = (extruder_gear_ed + extruder_filament_d) / 2;
  26. echo(extruder_filament_offset=extruder_filament_offset);
  27. bracket_height = 8;
  28. bracket_width = extruder_height_m;
  29. bracket_width_add = 10;
  30. bracket_dist_add = 1;
  31. extruder_bearing_x = extruder_filament_offset + (extruder_filament_d / 2) + (extruder_bearing_od / 2);
  32. lever_h = 12;
  33. // #######################################################
  34. if (draw_extruder)
  35. extruder(30, "1", true);
  36. module extruder(slot, id = "", draw_slot = false) {
  37. translate([-nema17_size / 2 - bracket_dist_add, 0, slot + bracket_height + 10])
  38. rotate([-90, 0, 0])
  39. extruder_assembly(id);
  40. color("green")
  41. extruder_bracket(slot);
  42. if (draw_slot)
  43. %translate([bracket_height, -100, 0])
  44. tslot_y(slot, 300);
  45. }
  46. module extruder_bracket(slot) {
  47. difference() {
  48. union() {
  49. translate([bracket_height, 0, slot])
  50. cube([slot, bracket_width + bracket_width_add, bracket_height]);
  51. cube([bracket_height, bracket_width + bracket_width_add, slot + bracket_height]);
  52. translate([-nema17_size - bracket_dist_add, 0, slot])
  53. cube([nema17_size + bracket_dist_add, bracket_width, bracket_height]);
  54. }
  55. translate([bracket_height + slot / 2, (bracket_width + bracket_width_add) / 2, slot - 1])
  56. cylinder(d = 4.4, h = bracket_height + 2);
  57. translate([-1, (bracket_width + bracket_width_add) / 2, slot / 2])
  58. rotate([0, 90, 0])
  59. cylinder(d = 4.4, h = bracket_height + 2);
  60. translate([-bracket_height - 14, 0, slot + bracket_height + 6])
  61. rotate([-90, 0, 0])
  62. extruder_screw_holes_main();
  63. }
  64. }
  65. module extruder_assembly(id = "") {
  66. color("cyan") extruder_holder();
  67. color("yellow") extruder_top_plate();
  68. color("orange") extruder_cover(id);
  69. if (!extruder_lever_with_switch) {
  70. color("red")
  71. extruder_lever();
  72. } else {
  73. color("red")
  74. translate([6, 0, 62.4 - 4.9])
  75. extruder_lever_switch();
  76. }
  77. color("silver", 0.5)
  78. %extruder_bearing();
  79. // Filament mockup
  80. color("blue", 0.25)
  81. %translate([extruder_filament_offset, 0, -15])
  82. cylinder(d=extruder_filament_d, h=100, $fn=64);
  83. // NEMA17 mockup
  84. color("gray")
  85. %translate([-nema17_size / 2, 40 + 10, extruder_height_m])
  86. rotate([90, 0, 0])
  87. nema17(40);
  88. }
  89. module extruder_holder() {
  90. difference() {
  91. union() {
  92. translate([-extruder_width/2, 0, 0])
  93. rounded_cube(extruder_width, 10, extruder_height_m, 0, fillet, 0);
  94. translate([-extruder_width/2, -6, extruder_height_m])
  95. rounded_cube(extruder_width, 16, 11, fillet,fillet,fillet);
  96. translate([-extruder_width/2, -6, extruder_height_m-5])
  97. rounded_cube(extruder_width, 16, 10, 0,0,fillet);
  98. translate([extruder_filament_offset-5,0, extruder_height_m+10])
  99. cube([10, 7.5, 9]); // tip for flex filament
  100. translate([-12,0, extruder_height_m+10.9])
  101. cylinder(d2 = 5, d1=8, h=2.1, $fn=64); // spring
  102. }
  103. translate([-extruder_width/2-0.15, -15, 0.1])
  104. rounded_cube(extruder_width+0.3, 15, extruder_height_m, fillet,fillet,fillet);
  105. translate([0,10.1,extruder_height_m+21.5])
  106. rotate([90,0,0])
  107. cylinder(d=23, h=2.6, $fn=64);
  108. translate([-12,0, extruder_height_m+11])
  109. cylinder(r = 1.5, h=20, $fn=64, center=true); //spring
  110. //hotend mount
  111. translate([extruder_filament_offset,0, 0]) {
  112. extruder_hotend_mount();
  113. translate([-5.1,-10,20])
  114. cube([10.2, 10, 20]);
  115. }
  116. //motor screws
  117. translate([-31/2, -6, extruder_height_m+6])
  118. rotate([-90, 0, 0]) {
  119. cylinder(r = 1.6, h = 25, $fn=32);
  120. cylinder(r = 3.1, h = 6, $fn=32, center=true);
  121. }
  122. translate([ 31/2, -6, extruder_height_m+6])
  123. rotate([-90, 0, 0]) {
  124. cylinder(r = 1.6, h = 25, $fn=32);
  125. cylinder(r = 3.1, h = 6, $fn=32, center=true);
  126. }
  127. extruder_screw_holes_main();
  128. extruder_flex_guide();
  129. }
  130. // tip extruder_supports
  131. if (extruder_supports)
  132. for (xx =[-5.2, -2.5, 0, 2.5, 4.7])
  133. translate([extruder_filament_offset+xx, 7.6, extruder_height_m+11.4])
  134. cube ([0.55, 2.4, 8]);
  135. }
  136. module extruder_top_plate() {
  137. difference() {
  138. hull() {
  139. translate([-14.5, 6, extruder_height_m+39.5]) rotate([-90, 0, 0]) cylinder(r=3, h=4, $fn=32);
  140. translate([-18, 6, extruder_height_m+36]) rotate([-90, 0, 0]) cylinder(r=3, h=4, $fn=32);
  141. translate([-18, 6, extruder_height_m+29]) rotate([-90, 0, 0]) cylinder(r=3, h=4, $fn=32);
  142. translate([ 31/2, 6, extruder_height_m+37]) rotate([-90, 0, 0]) cylinder(r = 5.5, h=4, $fn=32);
  143. translate([18, 6, extruder_height_m+29]) rotate([-90, 0, 0]) cylinder(r=3, h=4, $fn=32);
  144. }
  145. translate([0,10.1,extruder_height_m+21.5]) rotate([90,0,0]) cylinder(d=24, h=5, $fn=64);
  146. //mount holes
  147. translate([-31/2, 5.9, extruder_height_m+37]) rotate([-90, 0, 0]) {
  148. cylinder(r = 1.6, h = 5, $fn=32);
  149. cylinder(r = 3.5, h = 2, $fn=32);
  150. }
  151. translate([ 31/2, 5.9, extruder_height_m+37]) rotate([-90, 0, 0]) {
  152. hd = extruder_brass_tube ? 4.2 : 3;
  153. cylinder(d = hd, h = 5, $fn=32);
  154. }
  155. }
  156. }
  157. module extruder_lever() {
  158. translate([0, 0, extruder_height_m])
  159. difference() {
  160. union() {
  161. hull() {
  162. translate([-8, -(lever_h/2), 32.5])
  163. rounded_cube(38-14+fillet, lever_h, 10, noback = true);
  164. translate([-13, -(lever_h/2), 39.5])
  165. rotate([-90, 0, 0])
  166. rounded_cylinder(3, lever_h-1, fillet, true, true);
  167. translate([-13, -(lever_h/2), 35.5])
  168. rotate([-90, 0, 0])
  169. rounded_cylinder(3, lever_h-1, fillet, true, true);
  170. }
  171. // lever tip
  172. hull() {
  173. translate([-13, -(lever_h/2), 39.5])
  174. rotate([-90, 0, 0])
  175. rounded_cylinder(3, lever_h-1, fillet, true, true);
  176. translate([-13, -(lever_h/2), 35.5])
  177. rotate([-90, 0, 0])
  178. rounded_cylinder(3, lever_h-1, fillet, true, true);
  179. translate([-18.5, -(lever_h/2), 35.5])
  180. rotate([-90, 0, 0])
  181. rounded_cylinder(3, lever_h-1, fillet, true, true);
  182. translate([-25, -(lever_h/2), 39.5])
  183. rotate([-90, 0, 0])
  184. rounded_cylinder(3, lever_h-1, fillet, true, true);
  185. }
  186. // bearing holder arm
  187. hull() {
  188. translate([extruder_bearing_x-extruder_bearing_od/2+1, -(lever_h/2), 21.5])
  189. rounded_cube(extruder_bearing_od/2, lever_h, 15);
  190. translate([ 31/2, -(lever_h/2), 37])
  191. rotate([-90, 0, 0])
  192. rounded_cylinder(r = 5.5, h = lever_h, rrnd=fillet, $fn=64);
  193. translate([extruder_bearing_x, 0, 21.5])
  194. rotate([-90, 0, 0])
  195. rounded_cylinder((extruder_bearing_od-2)/2, lever_h, center=true);
  196. if (extruder_bearing_od <= 16)
  197. translate([min((extruder_bearing_x+2),20-(extruder_bearing_od-2)/2), 0, 21.5])
  198. rotate([-90, 0, 0])
  199. rounded_cylinder((extruder_bearing_od-2)/2, lever_h, center=true);
  200. }
  201. //spring tip
  202. translate([-12,0, 30.5]) cylinder(d1 = 5, d2=8, h=2.1, $fn=64);
  203. //filament tip
  204. translate([extruder_filament_offset,0, 30])
  205. cylinder(d1 = 6, d2=10, h=3, $fn=64);
  206. }
  207. translate([extruder_filament_offset, 0, 42.5-3])
  208. cylinder(d1 = 4, d2=5, h=3, $fn=64);
  209. //mounting hole
  210. translate([ 31/2, -(lever_h/2), 37])
  211. rotate([-90, 0, 0]) {
  212. hd = extruder_brass_tube ? 4.2 : 3;
  213. cylinder(d=hd, h = 20, $fn=32);
  214. cylinder(d=8, h = 7, $fn=32, center=true);
  215. }
  216. translate([extruder_bearing_x, 0, 21.5])
  217. rotate([-90, 0, 0]) {
  218. difference() {
  219. cylinder(d=extruder_bearing_od+2, h=extruder_bearing_h+0.5, $fn=64, center=true);
  220. difference() {
  221. cylinder(d=extruder_bearing_id+(extruder_bearing_od-extruder_bearing_id)/3, h=extruder_bearing_h+0.5, $fn=64, center=true);
  222. cylinder(d=extruder_bearing_od, h=extruder_bearing_h+0.1, $fn=64, center=true);
  223. }
  224. }
  225. cylinder(d=extruder_bearing_id*0.95, h=20, $fn=64, center=true);
  226. }
  227. //translate([extruder_filament_offset, -(extruder_bearing_h)/2, 0]) cube([20, extruder_bearing_h+0.1, 21.5]);
  228. // filament hole
  229. translate([extruder_filament_offset,0, 25])
  230. cylinder(d=4.2, h=20, $fn=64);
  231. // spring screw
  232. translate([-12,0, 32.5]) {
  233. cylinder(r = 1.6, h=30, $fn=64, center=true);
  234. translate([-3, -3.3, 3])
  235. cube([6, 10, 3.0]);
  236. }
  237. }
  238. }
  239. module extruder_switch_model() {
  240. $fn = 15;
  241. difference() {
  242. union() {
  243. cube([12.8, 5.8, 6.2]);
  244. translate([-0.5, (5.8 - 4) / 2, 6.2 + 2.5])
  245. rotate([0, 11, 0])
  246. cube([13.5, 4.0, 0.3]);
  247. translate([0.9, 5.8 / 2, -4.0])
  248. cylinder(d = 0.8, h = 4.0);
  249. translate([12.8 - 0.9, 5.8 / 2, -4.0])
  250. cylinder(d = 0.8, h = 4.0);
  251. translate([12.8 / 2, 5.8 / 2, -4.0])
  252. cylinder(d = 0.8, h = 4.0);
  253. }
  254. translate([3.1, 5.9, 1.0])
  255. rotate([90, 0, 0])
  256. cylinder(d = 2.0, 6.0);
  257. translate([3.1 + 6.5, 5.9, 1.0])
  258. rotate([90, 0, 0])
  259. cylinder(d = 2.0, 6.0);
  260. }
  261. }
  262. module extruder_lever_switch() {
  263. $fn = 20;
  264. translate([-6, 0, extruder_height_m - 77.4 + 4.9])
  265. extruder_lever();
  266. %translate([-9 + 0.5, 3, 0])
  267. rotate([180, -90, 0])
  268. extruder_switch_model();
  269. difference() {
  270. cylinder(d = 9.0, h = 13.0);
  271. translate([0, 0, -0.1])
  272. cylinder(d1 = 5.1, d2 = 2.5, h = 13.2);
  273. translate([-5.5, -15, 0])
  274. cube([5, 30, 13.1]);
  275. translate([-9 + 0.5, 3, 0])
  276. rotate([180, -90, 0])
  277. extruder_switch_model();
  278. }
  279. difference() {
  280. union() {
  281. translate([-11, 3.0, 0])
  282. cube([11, 1.5 + 1.5, 13]);
  283. translate([-11, -6.0, -3])
  284. cube([11, 1.5 + 1.5, 13 + 3]);
  285. }
  286. for (off = [-1 : 0.1 : 1]) {
  287. translate([-7.5 + off, 10, 3.1])
  288. rotate([90, 0, 0])
  289. cylinder(d = 2.5, 20.0);
  290. translate([-7.5 + off, 10, 9.6])
  291. rotate([90, 0, 0])
  292. cylinder(d = 2.5, 20.0);
  293. }
  294. }
  295. }
  296. module extruder_cover(id = "") {
  297. difference() {
  298. union() {
  299. translate([-extruder_width/2, -extruder_cover_d, 0])
  300. rounded_cube(extruder_width, extruder_cover_d, extruder_height_m, fillet,fillet,fillet);
  301. translate([extruder_filament_offset-5,-6, extruder_height_m-1])
  302. cube ([10, 6, 20]);
  303. // add id number
  304. translate([-6, -extruder_cover_d + 1, 12])
  305. rotate([90, 90, 0])
  306. linear_extrude(height = 3)
  307. text(id, 12, font = "Liberation Sans:style=Bold");
  308. }
  309. translate([extruder_filament_offset,0,0])
  310. extruder_hotend_mount();
  311. extruder_screw_holes_main();
  312. extruder_flex_guide();
  313. }
  314. }
  315. module extruder_hotend_mount() {
  316. cylinder(d=4.2, h=46, $fn=64);
  317. cylinder(d=5.8, h=8, $fn=64);
  318. }
  319. module extruder_screw_holes_main() {
  320. translate([extruder_width/2-5.5, -extruder_cover_d, extruder_height_m/2]) rotate([-90, 0, 0]) {
  321. cylinder(r = 1.6, h = 50, $fn=32);
  322. cylinder(r = 3.2, h = 11, $fn=32, center=true);
  323. }
  324. translate([-extruder_width/2+5.5, -extruder_cover_d, extruder_height_m/2]) rotate([-90, 0, 0]) {
  325. cylinder(r = 1.6, h = 50, $fn=32);
  326. cylinder(r = 3.2, h = 11, $fn=32, center=true);
  327. }
  328. translate([extruder_width/2-5.5, extruder_depth-4, extruder_height_m/2]) rotate([-90, 0, 0]) cylinder( d = 6.6, h = 4.1, $fn=6);
  329. translate([-extruder_width/2+5.5, extruder_depth-4, extruder_height_m/2]) rotate([-90, 0, 0]) cylinder( d = 6.6, h = 4.1, $fn=6);
  330. }
  331. module extruder_flex_guide() {
  332. difference() {
  333. translate([0, -10, extruder_height_m+6+31/2]) rotate([-90, 0, 0]) cylinder(d=extruder_gear_od+1, h=20, $fn=64);
  334. intersection() {
  335. translate([0, -10, extruder_height_m+6+31/2]) rotate([-90, 0, 0]) cylinder(d=extruder_gear_od+1, h=20, $fn=64);
  336. translate([0, 0, extruder_height_m+6+31/2]) rotate([90, 0, 0]) rotate_extrude($fn=64) {
  337. translate([extruder_gear_ed/2 + (extruder_gear_od - extruder_gear_ed)/2 +0.5, 0, 0])
  338. resize([(extruder_gear_od-extruder_gear_ed), extruder_gear_groove_width]) circle(d = extruder_gear_od-extruder_gear_ed, $fn=64);
  339. }
  340. }
  341. }
  342. translate([0, 3.5, extruder_height_m+6+31/2]) rotate([-90, 0, 0]) cylinder(d1=extruder_gear_od+1, d2 = extruder_gear_od+2, h=0.55, $fn=64);
  343. translate([0, 4, extruder_height_m+6+31/2]) rotate([-90, 0, 0]) cylinder(d=extruder_gear_od+2, h=20, $fn=64);
  344. translate([0, -3.5, extruder_height_m+6+31/2]) mirror([0,1,0]) rotate([-90, 0, 0]) cylinder(d1=extruder_gear_od+1, d2 = extruder_gear_od+2, h=0.55, $fn=64);
  345. translate([0, -4, extruder_height_m+6+31/2]) mirror([0,1,0]) rotate([-90, 0, 0]) cylinder(d=extruder_gear_od+2, h=20, $fn=64);
  346. translate([extruder_bearing_od/2 + extruder_gear_ed/2 + extruder_filament_d,-10, extruder_height_m+6+31/2]) {
  347. rotate([-90, 0, 0]) cylinder(d=extruder_bearing_od+1, h=20, $fn=64);
  348. translate([0,0,-(extruder_bearing_od+1)/2]) cube([(extruder_bearing_od+1)/2, 20, (extruder_bearing_od+1)/2]);
  349. }
  350. }
  351. module extruder_bearing() {
  352. translate([extruder_bearing_od/2 + extruder_gear_ed/2+extruder_filament_d, 0, extruder_height_m+6+31/2]) {
  353. difference() {
  354. rotate([-90, 0, 0]) cylinder(d=extruder_bearing_od, h=extruder_bearing_h, $fn=64, center=true);
  355. rotate([-90, 0, 0]) cylinder(d=extruder_bearing_id, h=extruder_bearing_h+0.1, $fn=64, center=true);
  356. }
  357. }
  358. }