Simplify tensioner
[clinton/prusa3.git] / box_frame / y-drivetrain.scad
CommitLineData
2159eed1
VAH
1// PRUSA iteration3
2// Y drivetrain (idler and stepper holders)
7e896b17 3// GNU GPL v3
2159eed1
VAH
4// Josef Průša <josefprusa@me.com>
5// Václav 'ax' Hůla <axtheb@gmail.com>
7e896b17
VAH
6// http://www.reprap.org/wiki/Prusa_Mendel
7// http://github.com/prusajr/PrusaMendel
8
7e896b17 9include <configuration.scad>
eff6608e 10use <inc/bearing-guide.scad>
7e896b17
VAH
11
12module motorholder(thickness=10){
13 difference(){
14 union(){
15 // Motor holding part
f705c26c 16 translate([29, -21 + 50, 0])
7e896b17 17 {
f705c26c 18 //#cube([42, 42, 2], center=true);
7e896b17
VAH
19 difference(){
20 union(){
f705c26c
VAH
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);
7e896b17 24 // Parts joining part
f705c26c 25 translate([-29, -21, 0]) cube([14, 30, thickness]);
7e896b17
VAH
26 }
27 // Motor mounting holes
f705c26c 28 translate([0, 0, thickness]) mirror([0, 0, 1]) nema17([0, 1, 1, 0], thickness=thickness, holes=true);
7e896b17
VAH
29 }
30 }
31
32 // Front holding part
f705c26c
VAH
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);
7e896b17 36 }
f705c26c
VAH
37 translate([0, 10, -1]) cylinder(h = 12, r=4.5);
38 translate([0, 30, -1]) cylinder(h = 12, r=4.5);
7e896b17
VAH
39 }
40}
41
67f4a88f 42module oval(r=4, l=14, h=2){
0d8b4afe
VAH
43 intersection() {
44 union() {
45 translate([l / 2, 0, 0]) cylinder(r=r, h=h, $fn=4);
67f4a88f 46 //translate([-l / 2, 0, 0]) cylinder(r=r, h=h, $fn=4);
0d8b4afe
VAH
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 }
b325d8c2
KY
51}
52
7e896b17 53
f705c26c 54module idlermount(len=42, narrow_len=0, narrow_width=0, rod=threaded_rod_diameter_horizontal / 2, idler_height=16){
7e896b17
VAH
55 difference(){
56 union(){
f705c26c 57 //wide part holding bearing
6229a141 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]);
0d8b4afe 59 //For X there is narrow part inside the x-idler
f705c26c
VAH
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]);
6229a141
VAH
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);
f705c26c 64 }
7e896b17 65 }
67f4a88f
VAH
66 translate([-12, -9, idler_height / 2]) rotate([90, 0, 90]) oval(r=rod, l=12, h=25);
67 translate([0, -15 - single_wall_width, idler_height / 2]) {
68 //nut
69 rotate([90, 0, 0]) cylinder(r=m4_nut_diameter_horizontal / 2, h=3.3, $fn=6);
70 //nut insert
71 translate([0, -3.3, -m4_diameter * 1.5 / 2]) cube([20, 3.3, m4_diameter * 1.5]);
72 }
73
0d8b4afe 74 translate([0, -19, idler_height / 2]) rotate([90, 90, 0]) cylinder(r=m4_diameter / 2, h=15, $fn=7, center=true);
7e896b17 75
f705c26c
VAH
76 translate([0, len + idler_bearing[2] - 33, idler_height / 2]) {
77 rotate([0, 90, 0]) idler_assy(idler_bearing);
78 translate([0, 10, 0]) cube([idler_width + 1, 20, idler_height + 2], center=true);
c4e4d509
VAH
79 }
80
7e896b17 81 }
7e896b17
VAH
82}
83
b325d8c2 84
42e0b559 85motorholder();
f705c26c 86translate([32, 20, 0]) idlermount();
7337be14 87
eff6608e
VAH
88if (idler_bearing[3] == 1) {
89 translate([0, -12 - idler_bearing[0] / 2, 0]) {
90 bearing_guide_inner();
f705c26c 91 translate([idler_bearing[0] + 10, 0, 0])
eff6608e
VAH
92 bearing_guide_outer();
93 }
94}