Tensioner: more space for belt around bearing, decrease height for X
[clinton/prusa3.git] / box_frame / y-drivetrain.scad
1 // PRUSA iteration3
2 // Y drivetrain (idler and stepper holders)
3 // GNU GPL v3
4 // Josef Průša <josefprusa@me.com>
5 // Václav 'ax' Hůla <axtheb@gmail.com>
6 // http://www.reprap.org/wiki/Prusa_Mendel
7 // http://github.com/prusajr/PrusaMendel
8
9 include <configuration.scad>
10 use <inc/bearing-guide.scad>
11
12 module motorholder(thickness=10){
13 difference(){
14 union(){
15 // Motor holding part
16 translate([29, -21 + 50, 0])
17 {
18 //#cube([42, 42, 2], center=true);
19 difference(){
20 union(){
21 translate([-21 + 4.5, 0, 5]) cube([9, 31, thickness], center=true);
22 nema17([0, 1, 1, 0], thickness=thickness, shadow=false);
23 mirror([0, 0, 1]) translate([0, 0, -10]) nema17([0, 1, 1, 0], thickness=thickness, shadow=7);
24 // Parts joining part
25 translate([-29, -21, 0]) cube([14, 30, thickness]);
26 }
27 // Motor mounting holes
28 translate([0, 0, thickness]) mirror([0, 0, 1]) nema17([0, 1, 1, 0], thickness=thickness, holes=true);
29 }
30 }
31
32 // Front holding part
33 translate([0, 10, 0]) cylinder(h = thickness, r=8);
34 translate([0, 20, 5]) cube([16, 20, thickness], center=true);
35 translate([0, 30, 0]) cylinder(h = thickness, r=8);
36 }
37 translate([0, 10, -1]) cylinder(h = 12, r=4.5);
38 translate([0, 30, -1]) cylinder(h = 12, r=4.5);
39 }
40 }
41
42 module oval(r=4, l=15, h=2){
43 intersection() {
44 union() {
45 translate([l / 2, 0, 0]) cylinder(r=r, h=h, $fn=4);
46 translate([-l / 2, 0, 0]) cylinder(r=r, h=h, $fn=4);
47 translate([0, 0, h / 2]) cube([l, r * 2, h], center=true);
48 }
49 translate([0, 0, h / 2]) cube([l + r * 1.2, r * 2, h], center=true);
50 }
51 }
52
53
54 module idlermount(len=42, narrow_len=0, narrow_width=0, rod=threaded_rod_diameter_horizontal / 2, idler_height=16){
55 difference(){
56 union(){
57 //wide part holding bearing
58 translate([- (10 + idler_width) / 2, -25 + narrow_len, 0] ) cube_fillet([10 + idler_width, len + idler_bearing[2] * 1.1 - narrow_len, idler_height]);
59 //For X there is narrow part inside the x-idler
60 if (narrow_len > 0){
61 translate([-narrow_width / 2, -25, 0] ) cube_fillet([narrow_width, len + idler_bearing[2], idler_height], vertical=[0, 0, 2, 2]);
62 mirror([1, 0, 0]) translate([-narrow_width / 2, narrow_len -25, idler_height / 2 ]) fillet(1.5, idler_height - 0.04, $fn=8);
63 translate([-narrow_width / 2, narrow_len -25, idler_height / 2]) fillet(1.5, idler_height - 0.04, $fn=8);
64 }
65 }
66 translate([-12, -10, idler_height / 2]) rotate([90, 0, 90]) oval(r=rod, l=12, h=25);
67 //nut
68 translate([0, -17, idler_height / 2]) rotate([90, 0, 0]) cylinder(r=m4_nut_diameter_horizontal / 2, h=9, $fn=6, center=true);
69 translate([0, -19, idler_height / 2]) rotate([90, 90, 0]) cylinder(r=m4_diameter / 2, h=15, $fn=7, center=true);
70
71 translate([0, len + idler_bearing[2] - 33, idler_height / 2]) {
72 rotate([0, 90, 0]) idler_assy(idler_bearing);
73 translate([0, 10, 0]) cube([idler_width + 1, 20, idler_height + 2], center=true);
74 }
75
76 }
77 }
78
79
80 motorholder();
81 translate([32, 20, 0]) idlermount();
82
83 if (idler_bearing[3] == 1) {
84 translate([0, -12 - idler_bearing[0] / 2, 0]) {
85 bearing_guide_inner();
86 translate([idler_bearing[0] + 10, 0, 0])
87 bearing_guide_outer();
88 }
89 }